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 e6b643bf32c3..7bf2cb4415a9 100644 --- a/packages/google-cloud-compute/google/cloud/compute_v1/__init__.py +++ b/packages/google-cloud-compute/google/cloud/compute_v1/__init__.py @@ -1495,7 +1495,6 @@ "GetZoneOperationRequest", "GetZoneRequest", "GlobalAddressesClient", - "GlobalForwardingRulesClient", "GlobalNetworkEndpointGroupsAttachEndpointsRequest", "GlobalNetworkEndpointGroupsClient", "GlobalNetworkEndpointGroupsDetachEndpointsRequest", @@ -2226,6 +2225,7 @@ "UrlMapTest", "UrlMapValidationResult", "UrlMapsAggregatedList", + "UrlMapsClient", "UrlMapsScopedList", "UrlMapsValidateRequest", "UrlMapsValidateResponse", @@ -2271,5 +2271,5 @@ "ZoneSetLabelsRequest", "ZoneSetPolicyRequest", "ZonesClient", - "UrlMapsClient", + "GlobalForwardingRulesClient", ) 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 d60589b40f2e..07d2e5f422e2 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 @@ -148,7 +148,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.AcceleratorTypeAggregatedList.from_json(response.content) + return compute.AcceleratorTypeAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def get( self, @@ -208,7 +210,9 @@ def get( response.raise_for_status() # Return the response - return compute.AcceleratorType.from_json(response.content) + return compute.AcceleratorType.from_json( + response.content, ignore_unknown_fields=True + ) def list( self, @@ -263,7 +267,9 @@ def list( response.raise_for_status() # Return the response - return compute.AcceleratorTypeList.from_json(response.content) + return compute.AcceleratorTypeList.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("AcceleratorTypesRestTransport",) 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 cd3f80cf6bac..9de0c94e5f2e 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.AddressAggregatedList.from_json(response.content) + return compute.AddressAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -229,7 +231,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -308,7 +310,7 @@ def get( response.raise_for_status() # Return the response - return compute.Address.from_json(response.content) + return compute.Address.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -394,7 +396,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -448,7 +450,9 @@ def list( response.raise_for_status() # Return the response - return compute.AddressList.from_json(response.content) + return compute.AddressList.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("AddressesRestTransport",) 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 e5cc0414a22a..c04a4c6207e0 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.AutoscalerAggregatedList.from_json(response.content) + return compute.AutoscalerAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -229,7 +231,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -301,7 +303,9 @@ def get( response.raise_for_status() # Return the response - return compute.Autoscaler.from_json(response.content) + return compute.Autoscaler.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -387,7 +391,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -444,7 +448,9 @@ def list( response.raise_for_status() # Return the response - return compute.AutoscalerList.from_json(response.content) + return compute.AutoscalerList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -531,7 +537,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def update( self, @@ -618,7 +624,7 @@ def update( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("AutoscalersRestTransport",) 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 c896529b1ca2..9bcbfb4f78dd 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 @@ -179,7 +179,7 @@ def add_signed_url_key( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def delete( self, @@ -260,7 +260,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def delete_signed_url_key( self, @@ -342,7 +342,7 @@ def delete_signed_url_key( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -399,7 +399,9 @@ def get( response.raise_for_status() # Return the response - return compute.BackendBucket.from_json(response.content) + return compute.BackendBucket.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -485,7 +487,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -542,7 +544,9 @@ def list( response.raise_for_status() # Return the response - return compute.BackendBucketList.from_json(response.content) + return compute.BackendBucketList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -630,7 +634,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def update( self, @@ -718,7 +722,7 @@ def update( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("BackendBucketsRestTransport",) 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 080c741124ed..fabca78afb9d 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 @@ -179,7 +179,7 @@ def add_signed_url_key( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def aggregated_list( self, @@ -237,7 +237,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.BackendServiceAggregatedList.from_json(response.content) + return compute.BackendServiceAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -318,7 +320,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def delete_signed_url_key( self, @@ -400,7 +402,7 @@ def delete_signed_url_key( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -473,7 +475,9 @@ def get( response.raise_for_status() # Return the response - return compute.BackendService.from_json(response.content) + return compute.BackendService.from_json( + response.content, ignore_unknown_fields=True + ) def get_health( self, @@ -531,7 +535,9 @@ def get_health( response.raise_for_status() # Return the response - return compute.BackendServiceGroupHealth.from_json(response.content) + return compute.BackendServiceGroupHealth.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -617,7 +623,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -674,7 +680,9 @@ def list( response.raise_for_status() # Return the response - return compute.BackendServiceList.from_json(response.content) + return compute.BackendServiceList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -762,7 +770,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_security_policy( self, @@ -850,7 +858,7 @@ def set_security_policy( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def update( self, @@ -938,7 +946,7 @@ def update( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("BackendServicesRestTransport",) 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 212eeadbfda6..26e9eead2e78 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.DiskTypeAggregatedList.from_json(response.content) + return compute.DiskTypeAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def get( self, @@ -218,7 +220,7 @@ def get( response.raise_for_status() # Return the response - return compute.DiskType.from_json(response.content) + return compute.DiskType.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -272,7 +274,9 @@ def list( response.raise_for_status() # Return the response - return compute.DiskTypeList.from_json(response.content) + return compute.DiskTypeList.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("DiskTypesRestTransport",) 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 a45810aef8a7..aeb3c45c0771 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 @@ -180,7 +180,7 @@ def add_resource_policies( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def aggregated_list( self, @@ -236,7 +236,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.DiskAggregatedList.from_json(response.content) + return compute.DiskAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def create_snapshot( self, @@ -326,7 +328,7 @@ def create_snapshot( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def delete( self, @@ -407,7 +409,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -478,7 +480,7 @@ def get( response.raise_for_status() # Return the response - return compute.Disk.from_json(response.content) + return compute.Disk.from_json(response.content, ignore_unknown_fields=True) def get_iam_policy( self, @@ -582,7 +584,7 @@ def get_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -668,7 +670,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -722,7 +724,7 @@ def list( response.raise_for_status() # Return the response - return compute.DiskList.from_json(response.content) + return compute.DiskList.from_json(response.content, ignore_unknown_fields=True) def remove_resource_policies( self, @@ -811,7 +813,7 @@ def remove_resource_policies( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def resize( self, @@ -899,7 +901,7 @@ def resize( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_iam_policy( self, @@ -1008,7 +1010,7 @@ def set_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def set_labels( self, @@ -1097,7 +1099,7 @@ def set_labels( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def test_iam_permissions( self, @@ -1156,7 +1158,9 @@ def test_iam_permissions( response.raise_for_status() # Return the response - return compute.TestPermissionsResponse.from_json(response.content) + return compute.TestPermissionsResponse.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("DisksRestTransport",) 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 43da3694e783..f05367b43b91 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 @@ -172,7 +172,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -238,7 +238,9 @@ def get( response.raise_for_status() # Return the response - return compute.ExternalVpnGateway.from_json(response.content) + return compute.ExternalVpnGateway.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -324,7 +326,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -381,7 +383,9 @@ def list( response.raise_for_status() # Return the response - return compute.ExternalVpnGatewayList.from_json(response.content) + return compute.ExternalVpnGatewayList.from_json( + response.content, ignore_unknown_fields=True + ) def set_labels( self, @@ -465,7 +469,7 @@ def set_labels( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def test_iam_permissions( self, @@ -521,7 +525,9 @@ def test_iam_permissions( response.raise_for_status() # Return the response - return compute.TestPermissionsResponse.from_json(response.content) + return compute.TestPermissionsResponse.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("ExternalVpnGatewaysRestTransport",) 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 2018ae10d650..0dcc9d27fcf0 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 @@ -170,7 +170,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -223,7 +223,7 @@ def get( response.raise_for_status() # Return the response - return compute.Firewall.from_json(response.content) + return compute.Firewall.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -309,7 +309,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -363,7 +363,9 @@ def list( response.raise_for_status() # Return the response - return compute.FirewallList.from_json(response.content) + return compute.FirewallList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -449,7 +451,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def update( self, @@ -535,7 +537,7 @@ def update( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("FirewallsRestTransport",) 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 ee40d69f9e06..84815563432b 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.ForwardingRuleAggregatedList.from_json(response.content) + return compute.ForwardingRuleAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -229,7 +231,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -303,7 +305,9 @@ def get( response.raise_for_status() # Return the response - return compute.ForwardingRule.from_json(response.content) + return compute.ForwardingRule.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -389,7 +393,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -446,7 +450,9 @@ def list( response.raise_for_status() # Return the response - return compute.ForwardingRuleList.from_json(response.content) + return compute.ForwardingRuleList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -535,7 +541,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_target( self, @@ -624,7 +630,7 @@ def set_target( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("ForwardingRulesRestTransport",) 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 b9c2f07964ca..42b2f9913161 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 @@ -170,7 +170,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -247,7 +247,7 @@ def get( response.raise_for_status() # Return the response - return compute.Address.from_json(response.content) + return compute.Address.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -333,7 +333,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -388,7 +388,9 @@ def list( response.raise_for_status() # Return the response - return compute.AddressList.from_json(response.content) + return compute.AddressList.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("GlobalAddressesRestTransport",) 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 7d26ef92b5be..63e5c2364d47 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 @@ -172,7 +172,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -245,7 +245,9 @@ def get( response.raise_for_status() # Return the response - return compute.ForwardingRule.from_json(response.content) + return compute.ForwardingRule.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -331,7 +333,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -388,7 +390,9 @@ def list( response.raise_for_status() # Return the response - return compute.ForwardingRuleList.from_json(response.content) + return compute.ForwardingRuleList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -476,7 +480,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_target( self, @@ -564,7 +568,7 @@ def set_target( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("GlobalForwardingRulesRestTransport",) 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 eedebf997717..316ce70e54c5 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 @@ -179,7 +179,7 @@ def attach_network_endpoints( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def delete( self, @@ -260,7 +260,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def detach_network_endpoints( self, @@ -348,7 +348,7 @@ def detach_network_endpoints( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -412,7 +412,9 @@ def get( response.raise_for_status() # Return the response - return compute.NetworkEndpointGroup.from_json(response.content) + return compute.NetworkEndpointGroup.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -498,7 +500,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -553,7 +555,9 @@ def list( response.raise_for_status() # Return the response - return compute.NetworkEndpointGroupList.from_json(response.content) + return compute.NetworkEndpointGroupList.from_json( + response.content, ignore_unknown_fields=True + ) def list_network_endpoints( self, @@ -611,7 +615,7 @@ def list_network_endpoints( # Return the response return compute.NetworkEndpointGroupsListNetworkEndpoints.from_json( - response.content + response.content, ignore_unknown_fields=True ) 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 e7afb894a3b8..dbf1c83361f2 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.OperationAggregatedList.from_json(response.content) + return compute.OperationAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -199,7 +201,9 @@ def delete( response.raise_for_status() # Return the response - return compute.DeleteGlobalOperationResponse.from_json(response.content) + return compute.DeleteGlobalOperationResponse.from_json( + response.content, ignore_unknown_fields=True + ) def get( self, @@ -276,7 +280,7 @@ def get( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -333,7 +337,9 @@ def list( response.raise_for_status() # Return the response - return compute.OperationList.from_json(response.content) + return compute.OperationList.from_json( + response.content, ignore_unknown_fields=True + ) def wait( self, @@ -410,7 +416,7 @@ def wait( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("GlobalOperationsRestTransport",) 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 5909c89a5349..1f275a59d88b 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 @@ -146,7 +146,7 @@ def delete( # Return the response return compute.DeleteGlobalOrganizationOperationResponse.from_json( - response.content + response.content, ignore_unknown_fields=True ) def get( @@ -226,7 +226,7 @@ def get( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -284,7 +284,9 @@ def list( response.raise_for_status() # Return the response - return compute.OperationList.from_json(response.content) + return compute.OperationList.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("GlobalOrganizationOperationsRestTransport",) 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 1c785f29a103..97bc8ce964ab 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.HealthChecksAggregatedList.from_json(response.content) + return compute.HealthChecksAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -226,7 +228,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -303,7 +305,9 @@ def get( response.raise_for_status() # Return the response - return compute.HealthCheck.from_json(response.content) + return compute.HealthCheck.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -389,7 +393,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -446,7 +450,9 @@ def list( response.raise_for_status() # Return the response - return compute.HealthCheckList.from_json(response.content) + return compute.HealthCheckList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -532,7 +538,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def update( self, @@ -618,7 +624,7 @@ def update( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("HealthChecksRestTransport",) 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 79a1180033bb..9ab03daebb3b 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 @@ -169,7 +169,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def deprecate( self, @@ -255,7 +255,7 @@ def deprecate( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -308,7 +308,7 @@ def get( response.raise_for_status() # Return the response - return compute.Image.from_json(response.content) + return compute.Image.from_json(response.content, ignore_unknown_fields=True) def get_from_family( self, @@ -362,7 +362,7 @@ def get_from_family( response.raise_for_status() # Return the response - return compute.Image.from_json(response.content) + return compute.Image.from_json(response.content, ignore_unknown_fields=True) def get_iam_policy( self, @@ -463,7 +463,7 @@ def get_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -549,7 +549,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -603,7 +603,7 @@ def list( response.raise_for_status() # Return the response - return compute.ImageList.from_json(response.content) + return compute.ImageList.from_json(response.content, ignore_unknown_fields=True) def patch( self, @@ -688,7 +688,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_iam_policy( self, @@ -794,7 +794,7 @@ def set_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def set_labels( self, @@ -878,7 +878,7 @@ def set_labels( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def test_iam_permissions( self, @@ -934,7 +934,9 @@ def test_iam_permissions( response.raise_for_status() # Return the response - return compute.TestPermissionsResponse.from_json(response.content) + return compute.TestPermissionsResponse.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("ImagesRestTransport",) 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 c3b5f1bc30ae..a3783aa93d6e 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 @@ -180,7 +180,7 @@ def abandon_instances( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def aggregated_list( self, @@ -236,7 +236,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.InstanceGroupManagerAggregatedList.from_json(response.content) + return compute.InstanceGroupManagerAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def apply_updates_to_instances( self, @@ -324,7 +326,7 @@ def apply_updates_to_instances( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def create_instances( self, @@ -413,7 +415,7 @@ def create_instances( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def delete( self, @@ -495,7 +497,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def delete_instances( self, @@ -584,7 +586,7 @@ def delete_instances( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def delete_per_instance_configs( self, @@ -672,7 +674,7 @@ def delete_per_instance_configs( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -738,7 +740,9 @@ def get( response.raise_for_status() # Return the response - return compute.InstanceGroupManager.from_json(response.content) + return compute.InstanceGroupManager.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -824,7 +828,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -879,7 +883,9 @@ def list( response.raise_for_status() # Return the response - return compute.InstanceGroupManagerList.from_json(response.content) + return compute.InstanceGroupManagerList.from_json( + response.content, ignore_unknown_fields=True + ) def list_errors( self, @@ -938,7 +944,7 @@ def list_errors( # Return the response return compute.InstanceGroupManagersListErrorsResponse.from_json( - response.content + response.content, ignore_unknown_fields=True ) def list_managed_instances( @@ -998,7 +1004,7 @@ def list_managed_instances( # Return the response return compute.InstanceGroupManagersListManagedInstancesResponse.from_json( - response.content + response.content, ignore_unknown_fields=True ) def list_per_instance_configs( @@ -1058,7 +1064,7 @@ def list_per_instance_configs( # Return the response return compute.InstanceGroupManagersListPerInstanceConfigsResp.from_json( - response.content + response.content, ignore_unknown_fields=True ) def patch( @@ -1148,7 +1154,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def patch_per_instance_configs( self, @@ -1238,7 +1244,7 @@ def patch_per_instance_configs( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def recreate_instances( self, @@ -1327,7 +1333,7 @@ def recreate_instances( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def resize( self, @@ -1410,7 +1416,7 @@ def resize( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_instance_template( self, @@ -1499,7 +1505,7 @@ def set_instance_template( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_target_pools( self, @@ -1588,7 +1594,7 @@ def set_target_pools( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def update_per_instance_configs( self, @@ -1678,7 +1684,7 @@ def update_per_instance_configs( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("InstanceGroupManagersRestTransport",) 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 c1dc1f2f4430..e91329549f47 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 @@ -180,7 +180,7 @@ def add_instances( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def aggregated_list( self, @@ -236,7 +236,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.InstanceGroupAggregatedList.from_json(response.content) + return compute.InstanceGroupAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -318,7 +320,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -390,7 +392,9 @@ def get( response.raise_for_status() # Return the response - return compute.InstanceGroup.from_json(response.content) + return compute.InstanceGroup.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -476,7 +480,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -531,7 +535,9 @@ def list( response.raise_for_status() # Return the response - return compute.InstanceGroupList.from_json(response.content) + return compute.InstanceGroupList.from_json( + response.content, ignore_unknown_fields=True + ) def list_instances( self, @@ -596,7 +602,9 @@ def list_instances( response.raise_for_status() # Return the response - return compute.InstanceGroupsListInstances.from_json(response.content) + return compute.InstanceGroupsListInstances.from_json( + response.content, ignore_unknown_fields=True + ) def remove_instances( self, @@ -685,7 +693,7 @@ def remove_instances( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_named_ports( self, @@ -774,7 +782,7 @@ def set_named_ports( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("InstanceGroupsRestTransport",) 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 97b0a2e8dfb8..5aeace4143e6 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 @@ -172,7 +172,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -229,7 +229,9 @@ def get( response.raise_for_status() # Return the response - return compute.InstanceTemplate.from_json(response.content) + return compute.InstanceTemplate.from_json( + response.content, ignore_unknown_fields=True + ) def get_iam_policy( self, @@ -330,7 +332,7 @@ def get_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -416,7 +418,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -471,7 +473,9 @@ def list( response.raise_for_status() # Return the response - return compute.InstanceTemplateList.from_json(response.content) + return compute.InstanceTemplateList.from_json( + response.content, ignore_unknown_fields=True + ) def set_iam_policy( self, @@ -577,7 +581,7 @@ def set_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def test_iam_permissions( self, @@ -633,7 +637,9 @@ def test_iam_permissions( response.raise_for_status() # Return the response - return compute.TestPermissionsResponse.from_json(response.content) + return compute.TestPermissionsResponse.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("InstanceTemplatesRestTransport",) 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 745de97d50e4..17120121dc8a 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 @@ -181,7 +181,7 @@ def add_access_config( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def add_resource_policies( self, @@ -270,7 +270,7 @@ def add_resource_policies( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def aggregated_list( self, @@ -326,7 +326,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.InstanceAggregatedList.from_json(response.content) + return compute.InstanceAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def attach_disk( self, @@ -416,7 +418,7 @@ def attach_disk( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def delete( self, @@ -498,7 +500,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def delete_access_config( self, @@ -582,7 +584,7 @@ def delete_access_config( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def detach_disk( self, @@ -665,7 +667,7 @@ def detach_disk( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -722,7 +724,7 @@ def get( response.raise_for_status() # Return the response - return compute.Instance.from_json(response.content) + return compute.Instance.from_json(response.content, ignore_unknown_fields=True) def get_guest_attributes( self, @@ -777,7 +779,9 @@ def get_guest_attributes( response.raise_for_status() # Return the response - return compute.GuestAttributes.from_json(response.content) + return compute.GuestAttributes.from_json( + response.content, ignore_unknown_fields=True + ) def get_iam_policy( self, @@ -881,7 +885,7 @@ def get_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def get_screenshot( self, @@ -933,7 +937,9 @@ def get_screenshot( response.raise_for_status() # Return the response - return compute.Screenshot.from_json(response.content) + return compute.Screenshot.from_json( + response.content, ignore_unknown_fields=True + ) def get_serial_port_output( self, @@ -988,7 +994,9 @@ def get_serial_port_output( response.raise_for_status() # Return the response - return compute.SerialPortOutput.from_json(response.content) + return compute.SerialPortOutput.from_json( + response.content, ignore_unknown_fields=True + ) def get_shielded_instance_identity( self, @@ -1041,7 +1049,9 @@ def get_shielded_instance_identity( response.raise_for_status() # Return the response - return compute.ShieldedInstanceIdentity.from_json(response.content) + return compute.ShieldedInstanceIdentity.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -1128,7 +1138,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -1182,7 +1192,9 @@ def list( response.raise_for_status() # Return the response - return compute.InstanceList.from_json(response.content) + return compute.InstanceList.from_json( + response.content, ignore_unknown_fields=True + ) def list_referrers( self, @@ -1242,7 +1254,9 @@ def list_referrers( response.raise_for_status() # Return the response - return compute.InstanceListReferrers.from_json(response.content) + return compute.InstanceListReferrers.from_json( + response.content, ignore_unknown_fields=True + ) def remove_resource_policies( self, @@ -1331,7 +1345,7 @@ def remove_resource_policies( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def reset( self, @@ -1413,7 +1427,7 @@ def reset( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_deletion_protection( self, @@ -1496,7 +1510,7 @@ def set_deletion_protection( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_disk_auto_delete( self, @@ -1580,7 +1594,7 @@ def set_disk_auto_delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_iam_policy( self, @@ -1689,7 +1703,7 @@ def set_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def set_labels( self, @@ -1778,7 +1792,7 @@ def set_labels( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_machine_resources( self, @@ -1867,7 +1881,7 @@ def set_machine_resources( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_machine_type( self, @@ -1956,7 +1970,7 @@ def set_machine_type( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_metadata( self, @@ -2045,7 +2059,7 @@ def set_metadata( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_min_cpu_platform( self, @@ -2134,7 +2148,7 @@ def set_min_cpu_platform( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_scheduling( self, @@ -2223,7 +2237,7 @@ def set_scheduling( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_service_account( self, @@ -2312,7 +2326,7 @@ def set_service_account( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_shielded_instance_integrity_policy( self, @@ -2402,7 +2416,7 @@ def set_shielded_instance_integrity_policy( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_tags( self, @@ -2491,7 +2505,7 @@ def set_tags( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def simulate_maintenance_event( self, @@ -2572,7 +2586,7 @@ def simulate_maintenance_event( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def start( self, @@ -2654,7 +2668,7 @@ def start( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def start_with_encryption_key( self, @@ -2743,7 +2757,7 @@ def start_with_encryption_key( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def stop( self, @@ -2824,7 +2838,7 @@ def stop( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def test_iam_permissions( self, @@ -2883,7 +2897,9 @@ def test_iam_permissions( response.raise_for_status() # Return the response - return compute.TestPermissionsResponse.from_json(response.content) + return compute.TestPermissionsResponse.from_json( + response.content, ignore_unknown_fields=True + ) def update( self, @@ -2974,7 +2990,7 @@ def update( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def update_access_config( self, @@ -3064,7 +3080,7 @@ def update_access_config( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def update_display_device( self, @@ -3153,7 +3169,7 @@ def update_display_device( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def update_network_interface( self, @@ -3243,7 +3259,7 @@ def update_network_interface( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def update_shielded_instance_config( self, @@ -3333,7 +3349,7 @@ def update_shielded_instance_config( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("InstancesRestTransport",) 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 4e4f1b9a1964..3b0be04ebfa4 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.InterconnectAttachmentAggregatedList.from_json(response.content) + return compute.InterconnectAttachmentAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -229,7 +231,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -288,7 +290,9 @@ def get( response.raise_for_status() # Return the response - return compute.InterconnectAttachment.from_json(response.content) + return compute.InterconnectAttachment.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -375,7 +379,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -433,7 +437,9 @@ def list( response.raise_for_status() # Return the response - return compute.InterconnectAttachmentList.from_json(response.content) + return compute.InterconnectAttachmentList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -522,7 +528,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("InterconnectAttachmentsRestTransport",) 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 7a860089892b..1dd38c4b4b9d 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 @@ -149,7 +149,9 @@ def get( response.raise_for_status() # Return the response - return compute.InterconnectLocation.from_json(response.content) + return compute.InterconnectLocation.from_json( + response.content, ignore_unknown_fields=True + ) def list( self, @@ -207,7 +209,9 @@ def list( response.raise_for_status() # Return the response - return compute.InterconnectLocationList.from_json(response.content) + return compute.InterconnectLocationList.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("InterconnectLocationsRestTransport",) 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 b56e966f2551..e76972813b9d 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 @@ -170,7 +170,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -226,7 +226,9 @@ def get( response.raise_for_status() # Return the response - return compute.Interconnect.from_json(response.content) + return compute.Interconnect.from_json( + response.content, ignore_unknown_fields=True + ) def get_diagnostics( self, @@ -277,7 +279,9 @@ def get_diagnostics( response.raise_for_status() # Return the response - return compute.InterconnectsGetDiagnosticsResponse.from_json(response.content) + return compute.InterconnectsGetDiagnosticsResponse.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -363,7 +367,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -420,7 +424,9 @@ def list( response.raise_for_status() # Return the response - return compute.InterconnectList.from_json(response.content) + return compute.InterconnectList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -506,7 +512,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("InterconnectsRestTransport",) 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 bb0746b91816..3b3730e53d66 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 @@ -147,7 +147,9 @@ def get( response.raise_for_status() # Return the response - return compute.LicenseCode.from_json(response.content) + return compute.LicenseCode.from_json( + response.content, ignore_unknown_fields=True + ) def test_iam_permissions( self, @@ -203,7 +205,9 @@ def test_iam_permissions( response.raise_for_status() # Return the response - return compute.TestPermissionsResponse.from_json(response.content) + return compute.TestPermissionsResponse.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("LicenseCodesRestTransport",) 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 cba33ef8d868..1369503ed7ec 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 @@ -171,7 +171,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -228,7 +228,7 @@ def get( response.raise_for_status() # Return the response - return compute.License.from_json(response.content) + return compute.License.from_json(response.content, ignore_unknown_fields=True) def get_iam_policy( self, @@ -329,7 +329,7 @@ def get_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -415,7 +415,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -469,7 +469,9 @@ def list( response.raise_for_status() # Return the response - return compute.LicensesListResponse.from_json(response.content) + return compute.LicensesListResponse.from_json( + response.content, ignore_unknown_fields=True + ) def set_iam_policy( self, @@ -575,7 +577,7 @@ def set_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def test_iam_permissions( self, @@ -631,7 +633,9 @@ def test_iam_permissions( response.raise_for_status() # Return the response - return compute.TestPermissionsResponse.from_json(response.content) + return compute.TestPermissionsResponse.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("LicensesRestTransport",) 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 e20b1f06b46f..518203bbb4c5 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.MachineTypeAggregatedList.from_json(response.content) + return compute.MachineTypeAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def get( self, @@ -205,7 +207,9 @@ def get( response.raise_for_status() # Return the response - return compute.MachineType.from_json(response.content) + return compute.MachineType.from_json( + response.content, ignore_unknown_fields=True + ) def list( self, @@ -260,7 +264,9 @@ def list( response.raise_for_status() # Return the response - return compute.MachineTypeList.from_json(response.content) + return compute.MachineTypeList.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("MachineTypesRestTransport",) 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 105a67afece5..0c61fe85f4ee 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.NetworkEndpointGroupAggregatedList.from_json(response.content) + return compute.NetworkEndpointGroupAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def attach_network_endpoints( self, @@ -236,7 +238,7 @@ def attach_network_endpoints( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def delete( self, @@ -318,7 +320,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def detach_network_endpoints( self, @@ -407,7 +409,7 @@ def detach_network_endpoints( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -472,7 +474,9 @@ def get( response.raise_for_status() # Return the response - return compute.NetworkEndpointGroup.from_json(response.content) + return compute.NetworkEndpointGroup.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -558,7 +562,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -613,7 +617,9 @@ def list( response.raise_for_status() # Return the response - return compute.NetworkEndpointGroupList.from_json(response.content) + return compute.NetworkEndpointGroupList.from_json( + response.content, ignore_unknown_fields=True + ) def list_network_endpoints( self, @@ -679,7 +685,7 @@ def list_network_endpoints( # Return the response return compute.NetworkEndpointGroupsListNetworkEndpoints.from_json( - response.content + response.content, ignore_unknown_fields=True ) def test_iam_permissions( @@ -739,7 +745,9 @@ def test_iam_permissions( response.raise_for_status() # Return the response - return compute.TestPermissionsResponse.from_json(response.content) + return compute.TestPermissionsResponse.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("NetworkEndpointGroupsRestTransport",) 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 3615fc004e5b..7c83b6f63c84 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 @@ -177,7 +177,7 @@ def add_peering( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def delete( self, @@ -256,7 +256,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -310,7 +310,7 @@ def get( response.raise_for_status() # Return the response - return compute.Network.from_json(response.content) + return compute.Network.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -396,7 +396,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -450,7 +450,9 @@ def list( response.raise_for_status() # Return the response - return compute.NetworkList.from_json(response.content) + return compute.NetworkList.from_json( + response.content, ignore_unknown_fields=True + ) def list_peering_routes( self, @@ -508,7 +510,9 @@ def list_peering_routes( response.raise_for_status() # Return the response - return compute.ExchangedPeeringRoutesList.from_json(response.content) + return compute.ExchangedPeeringRoutesList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -593,7 +597,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def remove_peering( self, @@ -679,7 +683,7 @@ def remove_peering( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def switch_to_custom_mode( self, @@ -758,7 +762,7 @@ def switch_to_custom_mode( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def update_peering( self, @@ -844,7 +848,7 @@ def update_peering( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("NetworksRestTransport",) 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 5494762011b5..24ac14073a1d 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 @@ -180,7 +180,7 @@ def add_nodes( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def aggregated_list( self, @@ -236,7 +236,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.NodeGroupAggregatedList.from_json(response.content) + return compute.NodeGroupAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -318,7 +320,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def delete_nodes( self, @@ -407,7 +409,7 @@ def delete_nodes( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -467,7 +469,7 @@ def get( response.raise_for_status() # Return the response - return compute.NodeGroup.from_json(response.content) + return compute.NodeGroup.from_json(response.content, ignore_unknown_fields=True) def get_iam_policy( self, @@ -571,7 +573,7 @@ def get_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -658,7 +660,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -713,7 +715,9 @@ def list( response.raise_for_status() # Return the response - return compute.NodeGroupList.from_json(response.content) + return compute.NodeGroupList.from_json( + response.content, ignore_unknown_fields=True + ) def list_nodes( self, @@ -771,7 +775,9 @@ def list_nodes( response.raise_for_status() # Return the response - return compute.NodeGroupsListNodes.from_json(response.content) + return compute.NodeGroupsListNodes.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -860,7 +866,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_iam_policy( self, @@ -969,7 +975,7 @@ def set_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def set_node_template( self, @@ -1058,7 +1064,7 @@ def set_node_template( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def test_iam_permissions( self, @@ -1117,7 +1123,9 @@ def test_iam_permissions( response.raise_for_status() # Return the response - return compute.TestPermissionsResponse.from_json(response.content) + return compute.TestPermissionsResponse.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("NodeGroupsRestTransport",) 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 840c034ddb74..14e4adf7812a 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.NodeTemplateAggregatedList.from_json(response.content) + return compute.NodeTemplateAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -229,7 +231,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -287,7 +289,9 @@ def get( response.raise_for_status() # Return the response - return compute.NodeTemplate.from_json(response.content) + return compute.NodeTemplate.from_json( + response.content, ignore_unknown_fields=True + ) def get_iam_policy( self, @@ -391,7 +395,7 @@ def get_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -477,7 +481,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -532,7 +536,9 @@ def list( response.raise_for_status() # Return the response - return compute.NodeTemplateList.from_json(response.content) + return compute.NodeTemplateList.from_json( + response.content, ignore_unknown_fields=True + ) def set_iam_policy( self, @@ -641,7 +647,7 @@ def set_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def test_iam_permissions( self, @@ -700,7 +706,9 @@ def test_iam_permissions( response.raise_for_status() # Return the response - return compute.TestPermissionsResponse.from_json(response.content) + return compute.TestPermissionsResponse.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("NodeTemplatesRestTransport",) 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 711ddebb02ef..f6fd58338b65 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.NodeTypeAggregatedList.from_json(response.content) + return compute.NodeTypeAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def get( self, @@ -207,7 +209,7 @@ def get( response.raise_for_status() # Return the response - return compute.NodeType.from_json(response.content) + return compute.NodeType.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -261,7 +263,9 @@ def list( response.raise_for_status() # Return the response - return compute.NodeTypeList.from_json(response.content) + return compute.NodeTypeList.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("NodeTypesRestTransport",) 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 a73754a93f22..a7935411c42e 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.PacketMirroringAggregatedList.from_json(response.content) + return compute.PacketMirroringAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -229,7 +231,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -290,7 +292,9 @@ def get( response.raise_for_status() # Return the response - return compute.PacketMirroring.from_json(response.content) + return compute.PacketMirroring.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -376,7 +380,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -433,7 +437,9 @@ def list( response.raise_for_status() # Return the response - return compute.PacketMirroringList.from_json(response.content) + return compute.PacketMirroringList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -522,7 +528,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def test_iam_permissions( self, @@ -581,7 +587,9 @@ def test_iam_permissions( response.raise_for_status() # Return the response - return compute.TestPermissionsResponse.from_json(response.content) + return compute.TestPermissionsResponse.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("PacketMirroringsRestTransport",) 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 b33374d53402..5ea6661d47d3 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 @@ -170,7 +170,7 @@ def disable_xpn_host( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def disable_xpn_resource( self, @@ -256,7 +256,7 @@ def disable_xpn_resource( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def enable_xpn_host( self, @@ -335,7 +335,7 @@ def enable_xpn_host( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def enable_xpn_resource( self, @@ -421,7 +421,7 @@ def enable_xpn_resource( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -475,7 +475,7 @@ def get( response.raise_for_status() # Return the response - return compute.Project.from_json(response.content) + return compute.Project.from_json(response.content, ignore_unknown_fields=True) def get_xpn_host( self, @@ -530,7 +530,7 @@ def get_xpn_host( response.raise_for_status() # Return the response - return compute.Project.from_json(response.content) + return compute.Project.from_json(response.content, ignore_unknown_fields=True) def get_xpn_resources( self, @@ -585,7 +585,9 @@ def get_xpn_resources( response.raise_for_status() # Return the response - return compute.ProjectsGetXpnResources.from_json(response.content) + return compute.ProjectsGetXpnResources.from_json( + response.content, ignore_unknown_fields=True + ) def list_xpn_hosts( self, @@ -647,7 +649,9 @@ def list_xpn_hosts( response.raise_for_status() # Return the response - return compute.XpnHostList.from_json(response.content) + return compute.XpnHostList.from_json( + response.content, ignore_unknown_fields=True + ) def move_disk( self, @@ -733,7 +737,7 @@ def move_disk( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def move_instance( self, @@ -819,7 +823,7 @@ def move_instance( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_common_instance_metadata( self, @@ -906,7 +910,7 @@ def set_common_instance_metadata( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_default_network_tier( self, @@ -992,7 +996,7 @@ def set_default_network_tier( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_usage_export_bucket( self, @@ -1078,7 +1082,7 @@ def set_usage_export_bucket( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("ProjectsRestTransport",) 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 3a39dd6a21f7..f49e288e21b6 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 @@ -173,7 +173,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -245,7 +245,9 @@ def get( response.raise_for_status() # Return the response - return compute.Autoscaler.from_json(response.content) + return compute.Autoscaler.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -331,7 +333,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -386,7 +388,9 @@ def list( response.raise_for_status() # Return the response - return compute.RegionAutoscalerList.from_json(response.content) + return compute.RegionAutoscalerList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -473,7 +477,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def update( self, @@ -560,7 +564,7 @@ def update( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("RegionAutoscalersRestTransport",) 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 0e30895e725c..267627dbb077 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 @@ -173,7 +173,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -247,7 +247,9 @@ def get( response.raise_for_status() # Return the response - return compute.BackendService.from_json(response.content) + return compute.BackendService.from_json( + response.content, ignore_unknown_fields=True + ) def get_health( self, @@ -306,7 +308,9 @@ def get_health( response.raise_for_status() # Return the response - return compute.BackendServiceGroupHealth.from_json(response.content) + return compute.BackendServiceGroupHealth.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -392,7 +396,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -449,7 +453,9 @@ def list( response.raise_for_status() # Return the response - return compute.BackendServiceList.from_json(response.content) + return compute.BackendServiceList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -538,7 +544,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def update( self, @@ -627,7 +633,7 @@ def update( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("RegionBackendServicesRestTransport",) 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 6b2d56cc5ef4..00649a8600cb 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.CommitmentAggregatedList.from_json(response.content) + return compute.CommitmentAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def get( self, @@ -208,7 +210,9 @@ def get( response.raise_for_status() # Return the response - return compute.Commitment.from_json(response.content) + return compute.Commitment.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -294,7 +298,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -351,7 +355,9 @@ def list( response.raise_for_status() # Return the response - return compute.CommitmentList.from_json(response.content) + return compute.CommitmentList.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("RegionCommitmentsRestTransport",) 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 77cb03576ded..1c49dc89a7dd 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 @@ -163,7 +163,7 @@ def get( response.raise_for_status() # Return the response - return compute.DiskType.from_json(response.content) + return compute.DiskType.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -218,7 +218,9 @@ def list( response.raise_for_status() # Return the response - return compute.RegionDiskTypeList.from_json(response.content) + return compute.RegionDiskTypeList.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("RegionDiskTypesRestTransport",) 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 693cf83b38e9..297326dd4c6b 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 @@ -180,7 +180,7 @@ def add_resource_policies( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def create_snapshot( self, @@ -269,7 +269,7 @@ def create_snapshot( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def delete( self, @@ -351,7 +351,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -423,7 +423,7 @@ def get( response.raise_for_status() # Return the response - return compute.Disk.from_json(response.content) + return compute.Disk.from_json(response.content, ignore_unknown_fields=True) def get_iam_policy( self, @@ -527,7 +527,7 @@ def get_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -614,7 +614,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -669,7 +669,7 @@ def list( response.raise_for_status() # Return the response - return compute.DiskList.from_json(response.content) + return compute.DiskList.from_json(response.content, ignore_unknown_fields=True) def remove_resource_policies( self, @@ -758,7 +758,7 @@ def remove_resource_policies( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def resize( self, @@ -847,7 +847,7 @@ def resize( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_iam_policy( self, @@ -956,7 +956,7 @@ def set_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def set_labels( self, @@ -1045,7 +1045,7 @@ def set_labels( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def test_iam_permissions( self, @@ -1104,7 +1104,9 @@ def test_iam_permissions( response.raise_for_status() # Return the response - return compute.TestPermissionsResponse.from_json(response.content) + return compute.TestPermissionsResponse.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("RegionDisksRestTransport",) 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 28b958da5cd6..e816245165e6 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 @@ -173,7 +173,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -229,7 +229,9 @@ def get( response.raise_for_status() # Return the response - return compute.HealthCheckService.from_json(response.content) + return compute.HealthCheckService.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -315,7 +317,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -370,7 +372,9 @@ def list( response.raise_for_status() # Return the response - return compute.HealthCheckServicesList.from_json(response.content) + return compute.HealthCheckServicesList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -459,7 +463,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("RegionHealthCheckServicesRestTransport",) 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 05c7c23821fd..57a27f08ceb7 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 @@ -173,7 +173,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -253,7 +253,9 @@ def get( response.raise_for_status() # Return the response - return compute.HealthCheck.from_json(response.content) + return compute.HealthCheck.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -339,7 +341,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -396,7 +398,9 @@ def list( response.raise_for_status() # Return the response - return compute.HealthCheckList.from_json(response.content) + return compute.HealthCheckList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -485,7 +489,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def update( self, @@ -574,7 +578,7 @@ def update( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("RegionHealthChecksRestTransport",) 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 af94f0a4807a..a6d45afa192a 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 @@ -180,7 +180,7 @@ def abandon_instances( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def apply_updates_to_instances( self, @@ -268,7 +268,7 @@ def apply_updates_to_instances( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def create_instances( self, @@ -357,7 +357,7 @@ def create_instances( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def delete( self, @@ -439,7 +439,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def delete_instances( self, @@ -528,7 +528,7 @@ def delete_instances( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def delete_per_instance_configs( self, @@ -616,7 +616,7 @@ def delete_per_instance_configs( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -682,7 +682,9 @@ def get( response.raise_for_status() # Return the response - return compute.InstanceGroupManager.from_json(response.content) + return compute.InstanceGroupManager.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -768,7 +770,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -825,7 +827,9 @@ def list( response.raise_for_status() # Return the response - return compute.RegionInstanceGroupManagerList.from_json(response.content) + return compute.RegionInstanceGroupManagerList.from_json( + response.content, ignore_unknown_fields=True + ) def list_errors( self, @@ -884,7 +888,7 @@ def list_errors( # Return the response return compute.RegionInstanceGroupManagersListErrorsResponse.from_json( - response.content + response.content, ignore_unknown_fields=True ) def list_managed_instances( @@ -944,7 +948,7 @@ def list_managed_instances( # Return the response return compute.RegionInstanceGroupManagersListInstancesResponse.from_json( - response.content + response.content, ignore_unknown_fields=True ) def list_per_instance_configs( @@ -1004,7 +1008,7 @@ def list_per_instance_configs( # Return the response return compute.RegionInstanceGroupManagersListInstanceConfigsResp.from_json( - response.content + response.content, ignore_unknown_fields=True ) def patch( @@ -1094,7 +1098,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def patch_per_instance_configs( self, @@ -1184,7 +1188,7 @@ def patch_per_instance_configs( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def recreate_instances( self, @@ -1273,7 +1277,7 @@ def recreate_instances( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def resize( self, @@ -1356,7 +1360,7 @@ def resize( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_instance_template( self, @@ -1445,7 +1449,7 @@ def set_instance_template( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_target_pools( self, @@ -1534,7 +1538,7 @@ def set_target_pools( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def update_per_instance_configs( self, @@ -1624,7 +1628,7 @@ def update_per_instance_configs( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("RegionInstanceGroupManagersRestTransport",) 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 5a9bbd38ae8c..93d71f00aebd 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 @@ -163,7 +163,9 @@ def get( response.raise_for_status() # Return the response - return compute.InstanceGroup.from_json(response.content) + return compute.InstanceGroup.from_json( + response.content, ignore_unknown_fields=True + ) def list( self, @@ -220,7 +222,9 @@ def list( response.raise_for_status() # Return the response - return compute.RegionInstanceGroupList.from_json(response.content) + return compute.RegionInstanceGroupList.from_json( + response.content, ignore_unknown_fields=True + ) def list_instances( self, @@ -285,7 +289,9 @@ def list_instances( response.raise_for_status() # Return the response - return compute.RegionInstanceGroupsListInstances.from_json(response.content) + return compute.RegionInstanceGroupsListInstances.from_json( + response.content, ignore_unknown_fields=True + ) def set_named_ports( self, @@ -374,7 +380,7 @@ def set_named_ports( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("RegionInstanceGroupsRestTransport",) 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 a395f4264cd7..5992e7ef506c 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 @@ -173,7 +173,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -238,7 +238,9 @@ def get( response.raise_for_status() # Return the response - return compute.NetworkEndpointGroup.from_json(response.content) + return compute.NetworkEndpointGroup.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -324,7 +326,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -379,7 +381,9 @@ def list( response.raise_for_status() # Return the response - return compute.NetworkEndpointGroupList.from_json(response.content) + return compute.NetworkEndpointGroupList.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("RegionNetworkEndpointGroupsRestTransport",) 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 b1af05fbe3a8..57e1f587f1e2 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 @@ -173,7 +173,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -235,7 +235,9 @@ def get( response.raise_for_status() # Return the response - return compute.NotificationEndpoint.from_json(response.content) + return compute.NotificationEndpoint.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -321,7 +323,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -376,7 +378,9 @@ def list( response.raise_for_status() # Return the response - return compute.NotificationEndpointList.from_json(response.content) + return compute.NotificationEndpointList.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("RegionNotificationEndpointsRestTransport",) 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 037c2c31f1fa..a718d29efc4e 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 @@ -146,7 +146,9 @@ def delete( response.raise_for_status() # Return the response - return compute.DeleteRegionOperationResponse.from_json(response.content) + return compute.DeleteRegionOperationResponse.from_json( + response.content, ignore_unknown_fields=True + ) def get( self, @@ -226,7 +228,7 @@ def get( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -283,7 +285,9 @@ def list( response.raise_for_status() # Return the response - return compute.OperationList.from_json(response.content) + return compute.OperationList.from_json( + response.content, ignore_unknown_fields=True + ) def wait( self, @@ -363,7 +367,7 @@ def wait( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("RegionOperationsRestTransport",) 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 6878e48c3c46..9ad60de09179 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 @@ -173,7 +173,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -251,7 +251,9 @@ def get( response.raise_for_status() # Return the response - return compute.SslCertificate.from_json(response.content) + return compute.SslCertificate.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -337,7 +339,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -394,7 +396,9 @@ def list( response.raise_for_status() # Return the response - return compute.SslCertificateList.from_json(response.content) + return compute.SslCertificateList.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("RegionSslCertificatesRestTransport",) 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 c7d1662ddf24..253befd2062c 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 @@ -173,7 +173,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -248,7 +248,9 @@ def get( response.raise_for_status() # Return the response - return compute.TargetHttpProxy.from_json(response.content) + return compute.TargetHttpProxy.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -334,7 +336,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -389,7 +391,9 @@ def list( response.raise_for_status() # Return the response - return compute.TargetHttpProxyList.from_json(response.content) + return compute.TargetHttpProxyList.from_json( + response.content, ignore_unknown_fields=True + ) def set_url_map( self, @@ -478,7 +482,7 @@ def set_url_map( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("RegionTargetHttpProxiesRestTransport",) 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 861a7215050c..be05ba83ee97 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 @@ -173,7 +173,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -247,7 +247,9 @@ def get( response.raise_for_status() # Return the response - return compute.TargetHttpsProxy.from_json(response.content) + return compute.TargetHttpsProxy.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -333,7 +335,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -390,7 +392,9 @@ def list( response.raise_for_status() # Return the response - return compute.TargetHttpsProxyList.from_json(response.content) + return compute.TargetHttpsProxyList.from_json( + response.content, ignore_unknown_fields=True + ) def set_ssl_certificates( self, @@ -479,7 +483,7 @@ def set_ssl_certificates( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_url_map( self, @@ -568,7 +572,7 @@ def set_url_map( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("RegionTargetHttpsProxiesRestTransport",) 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 a01cc8d55c0a..1a57cfdcea64 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 @@ -173,7 +173,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -257,7 +257,7 @@ def get( response.raise_for_status() # Return the response - return compute.UrlMap.from_json(response.content) + return compute.UrlMap.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -343,7 +343,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -398,7 +398,9 @@ def list( response.raise_for_status() # Return the response - return compute.UrlMapList.from_json(response.content) + return compute.UrlMapList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -487,7 +489,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def update( self, @@ -576,7 +578,7 @@ def update( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def validate( self, @@ -635,7 +637,9 @@ def validate( response.raise_for_status() # Return the response - return compute.UrlMapsValidateResponse.from_json(response.content) + return compute.UrlMapsValidateResponse.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("RegionUrlMapsRestTransport",) 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 5902801b3706..616b3ddd446a 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 @@ -144,7 +144,7 @@ def get( response.raise_for_status() # Return the response - return compute.Region.from_json(response.content) + return compute.Region.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -198,7 +198,9 @@ def list( response.raise_for_status() # Return the response - return compute.RegionList.from_json(response.content) + return compute.RegionList.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("RegionsRestTransport",) 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 96a8aa664484..29119aeeccb9 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.ReservationAggregatedList.from_json(response.content) + return compute.ReservationAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -229,7 +231,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -286,7 +288,9 @@ def get( response.raise_for_status() # Return the response - return compute.Reservation.from_json(response.content) + return compute.Reservation.from_json( + response.content, ignore_unknown_fields=True + ) def get_iam_policy( self, @@ -390,7 +394,7 @@ def get_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -476,7 +480,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -531,7 +535,9 @@ def list( response.raise_for_status() # Return the response - return compute.ReservationList.from_json(response.content) + return compute.ReservationList.from_json( + response.content, ignore_unknown_fields=True + ) def resize( self, @@ -620,7 +626,7 @@ def resize( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_iam_policy( self, @@ -729,7 +735,7 @@ def set_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def test_iam_permissions( self, @@ -788,7 +794,9 @@ def test_iam_permissions( response.raise_for_status() # Return the response - return compute.TestPermissionsResponse.from_json(response.content) + return compute.TestPermissionsResponse.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("ReservationsRestTransport",) 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 3336db8de65a..805ab2ae4cb9 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.ResourcePolicyAggregatedList.from_json(response.content) + return compute.ResourcePolicyAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -229,7 +231,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -287,7 +289,9 @@ def get( response.raise_for_status() # Return the response - return compute.ResourcePolicy.from_json(response.content) + return compute.ResourcePolicy.from_json( + response.content, ignore_unknown_fields=True + ) def get_iam_policy( self, @@ -391,7 +395,7 @@ def get_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -477,7 +481,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -532,7 +536,9 @@ def list( response.raise_for_status() # Return the response - return compute.ResourcePolicyList.from_json(response.content) + return compute.ResourcePolicyList.from_json( + response.content, ignore_unknown_fields=True + ) def set_iam_policy( self, @@ -641,7 +647,7 @@ def set_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def test_iam_permissions( self, @@ -700,7 +706,9 @@ def test_iam_permissions( response.raise_for_status() # Return the response - return compute.TestPermissionsResponse.from_json(response.content) + return compute.TestPermissionsResponse.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("ResourcePoliciesRestTransport",) 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 16e5806e40d0..57f51f7ae88d 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.RouterAggregatedList.from_json(response.content) + return compute.RouterAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -228,7 +230,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -282,7 +284,7 @@ def get( response.raise_for_status() # Return the response - return compute.Router.from_json(response.content) + return compute.Router.from_json(response.content, ignore_unknown_fields=True) def get_nat_mapping_info( self, @@ -342,7 +344,9 @@ def get_nat_mapping_info( response.raise_for_status() # Return the response - return compute.VmEndpointNatMappingsList.from_json(response.content) + return compute.VmEndpointNatMappingsList.from_json( + response.content, ignore_unknown_fields=True + ) def get_router_status( self, @@ -394,7 +398,9 @@ def get_router_status( response.raise_for_status() # Return the response - return compute.RouterStatusResponse.from_json(response.content) + return compute.RouterStatusResponse.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -479,7 +485,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -533,7 +539,9 @@ def list( response.raise_for_status() # Return the response - return compute.RouterList.from_json(response.content) + return compute.RouterList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -621,7 +629,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def preview( self, @@ -680,7 +688,9 @@ def preview( response.raise_for_status() # Return the response - return compute.RoutersPreviewResponse.from_json(response.content) + return compute.RoutersPreviewResponse.from_json( + response.content, ignore_unknown_fields=True + ) def update( self, @@ -768,7 +778,7 @@ def update( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("RoutersRestTransport",) 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 e2d2e6332f08..51aef96c46ab 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 @@ -169,7 +169,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -224,7 +224,7 @@ def get( response.raise_for_status() # Return the response - return compute.Route.from_json(response.content) + return compute.Route.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -309,7 +309,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -363,7 +363,7 @@ def list( response.raise_for_status() # Return the response - return compute.RouteList.from_json(response.content) + return compute.RouteList.from_json(response.content, ignore_unknown_fields=True) __all__ = ("RoutesRestTransport",) 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 fc361f3aacff..0446288ea80f 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 @@ -177,7 +177,7 @@ def add_rule( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def delete( self, @@ -258,7 +258,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -316,7 +316,9 @@ def get( response.raise_for_status() # Return the response - return compute.SecurityPolicy.from_json(response.content) + return compute.SecurityPolicy.from_json( + response.content, ignore_unknown_fields=True + ) def get_rule( self, @@ -373,7 +375,9 @@ def get_rule( response.raise_for_status() # Return the response - return compute.SecurityPolicyRule.from_json(response.content) + return compute.SecurityPolicyRule.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -459,7 +463,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -514,7 +518,9 @@ def list( response.raise_for_status() # Return the response - return compute.SecurityPolicyList.from_json(response.content) + return compute.SecurityPolicyList.from_json( + response.content, ignore_unknown_fields=True + ) def list_preconfigured_expression_sets( self, @@ -571,7 +577,7 @@ def list_preconfigured_expression_sets( # Return the response return compute.SecurityPoliciesListPreconfiguredExpressionSetsResponse.from_json( - response.content + response.content, ignore_unknown_fields=True ) def patch( @@ -660,7 +666,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def patch_rule( self, @@ -748,7 +754,7 @@ def patch_rule( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def remove_rule( self, @@ -829,7 +835,7 @@ def remove_rule( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("SecurityPoliciesRestTransport",) 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 e8778613516c..7d0866c43c92 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 @@ -170,7 +170,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -224,7 +224,7 @@ def get( response.raise_for_status() # Return the response - return compute.Snapshot.from_json(response.content) + return compute.Snapshot.from_json(response.content, ignore_unknown_fields=True) def get_iam_policy( self, @@ -325,7 +325,7 @@ def get_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -381,7 +381,9 @@ def list( response.raise_for_status() # Return the response - return compute.SnapshotList.from_json(response.content) + return compute.SnapshotList.from_json( + response.content, ignore_unknown_fields=True + ) def set_iam_policy( self, @@ -487,7 +489,7 @@ def set_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def set_labels( self, @@ -571,7 +573,7 @@ def set_labels( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def test_iam_permissions( self, @@ -627,7 +629,9 @@ def test_iam_permissions( response.raise_for_status() # Return the response - return compute.TestPermissionsResponse.from_json(response.content) + return compute.TestPermissionsResponse.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("SnapshotsRestTransport",) 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 c5278af9c295..ed73ca621f91 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.SslCertificateAggregatedList.from_json(response.content) + return compute.SslCertificateAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -228,7 +230,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -305,7 +307,9 @@ def get( response.raise_for_status() # Return the response - return compute.SslCertificate.from_json(response.content) + return compute.SslCertificate.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -391,7 +395,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -448,7 +452,9 @@ def list( response.raise_for_status() # Return the response - return compute.SslCertificateList.from_json(response.content) + return compute.SslCertificateList.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("SslCertificatesRestTransport",) 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 8a86a8290170..b2b03b60a8a3 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 @@ -170,7 +170,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -226,7 +226,7 @@ def get( response.raise_for_status() # Return the response - return compute.SslPolicy.from_json(response.content) + return compute.SslPolicy.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -312,7 +312,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -367,7 +367,9 @@ def list( response.raise_for_status() # Return the response - return compute.SslPoliciesList.from_json(response.content) + return compute.SslPoliciesList.from_json( + response.content, ignore_unknown_fields=True + ) def list_available_features( self, @@ -423,7 +425,7 @@ def list_available_features( # Return the response return compute.SslPoliciesListAvailableFeaturesResponse.from_json( - response.content + response.content, ignore_unknown_fields=True ) def patch( @@ -510,7 +512,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("SslPoliciesRestTransport",) 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 4310a2c62745..7302da40546c 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.SubnetworkAggregatedList.from_json(response.content) + return compute.SubnetworkAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -229,7 +231,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def expand_ip_cidr_range( self, @@ -318,7 +320,7 @@ def expand_ip_cidr_range( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -377,7 +379,9 @@ def get( response.raise_for_status() # Return the response - return compute.Subnetwork.from_json(response.content) + return compute.Subnetwork.from_json( + response.content, ignore_unknown_fields=True + ) def get_iam_policy( self, @@ -481,7 +485,7 @@ def get_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -567,7 +571,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -624,7 +628,9 @@ def list( response.raise_for_status() # Return the response - return compute.SubnetworkList.from_json(response.content) + return compute.SubnetworkList.from_json( + response.content, ignore_unknown_fields=True + ) def list_usable( self, @@ -679,7 +685,9 @@ def list_usable( response.raise_for_status() # Return the response - return compute.UsableSubnetworksAggregatedList.from_json(response.content) + return compute.UsableSubnetworksAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -769,7 +777,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_iam_policy( self, @@ -878,7 +886,7 @@ def set_iam_policy( response.raise_for_status() # Return the response - return compute.Policy.from_json(response.content) + return compute.Policy.from_json(response.content, ignore_unknown_fields=True) def set_private_ip_google_access( self, @@ -968,7 +976,7 @@ def set_private_ip_google_access( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def test_iam_permissions( self, @@ -1027,7 +1035,9 @@ def test_iam_permissions( response.raise_for_status() # Return the response - return compute.TestPermissionsResponse.from_json(response.content) + return compute.TestPermissionsResponse.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("SubnetworksRestTransport",) 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 29f236e8d4fb..ec7e8d6e4305 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 @@ -172,7 +172,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -231,7 +231,9 @@ def get( response.raise_for_status() # Return the response - return compute.TargetGrpcProxy.from_json(response.content) + return compute.TargetGrpcProxy.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -317,7 +319,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -372,7 +374,9 @@ def list( response.raise_for_status() # Return the response - return compute.TargetGrpcProxyList.from_json(response.content) + return compute.TargetGrpcProxyList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -460,7 +464,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("TargetGrpcProxiesRestTransport",) 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 5b9cd80ccb66..8c62a79fcfa8 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.TargetHttpProxyAggregatedList.from_json(response.content) + return compute.TargetHttpProxyAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -228,7 +230,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -302,7 +304,9 @@ def get( response.raise_for_status() # Return the response - return compute.TargetHttpProxy.from_json(response.content) + return compute.TargetHttpProxy.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -388,7 +392,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -443,7 +447,9 @@ def list( response.raise_for_status() # Return the response - return compute.TargetHttpProxyList.from_json(response.content) + return compute.TargetHttpProxyList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -531,7 +537,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_url_map( self, @@ -619,7 +625,7 @@ def set_url_map( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("TargetHttpProxiesRestTransport",) 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 13e0bedf350d..25977e2246c5 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.TargetHttpsProxyAggregatedList.from_json(response.content) + return compute.TargetHttpsProxyAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -228,7 +230,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -301,7 +303,9 @@ def get( response.raise_for_status() # Return the response - return compute.TargetHttpsProxy.from_json(response.content) + return compute.TargetHttpsProxy.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -387,7 +391,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -444,7 +448,9 @@ def list( response.raise_for_status() # Return the response - return compute.TargetHttpsProxyList.from_json(response.content) + return compute.TargetHttpsProxyList.from_json( + response.content, ignore_unknown_fields=True + ) def set_quic_override( self, @@ -532,7 +538,7 @@ def set_quic_override( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_ssl_certificates( self, @@ -620,7 +626,7 @@ def set_ssl_certificates( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_ssl_policy( self, @@ -708,7 +714,7 @@ def set_ssl_policy( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_url_map( self, @@ -796,7 +802,7 @@ def set_url_map( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("TargetHttpsProxiesRestTransport",) 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 965535ef99f5..fb2589eb5171 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.TargetInstanceAggregatedList.from_json(response.content) + return compute.TargetInstanceAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -229,7 +231,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -289,7 +291,9 @@ def get( response.raise_for_status() # Return the response - return compute.TargetInstance.from_json(response.content) + return compute.TargetInstance.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -375,7 +379,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -432,7 +436,9 @@ def list( response.raise_for_status() # Return the response - return compute.TargetInstanceList.from_json(response.content) + return compute.TargetInstanceList.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("TargetInstancesRestTransport",) 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 557e16548cc6..14bfda449787 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 @@ -180,7 +180,7 @@ def add_health_check( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def add_instance( self, @@ -269,7 +269,7 @@ def add_instance( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def aggregated_list( self, @@ -325,7 +325,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.TargetPoolAggregatedList.from_json(response.content) + return compute.TargetPoolAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -407,7 +409,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -467,7 +469,9 @@ def get( response.raise_for_status() # Return the response - return compute.TargetPool.from_json(response.content) + return compute.TargetPool.from_json( + response.content, ignore_unknown_fields=True + ) def get_health( self, @@ -526,7 +530,9 @@ def get_health( response.raise_for_status() # Return the response - return compute.TargetPoolInstanceHealth.from_json(response.content) + return compute.TargetPoolInstanceHealth.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -612,7 +618,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -669,7 +675,9 @@ def list( response.raise_for_status() # Return the response - return compute.TargetPoolList.from_json(response.content) + return compute.TargetPoolList.from_json( + response.content, ignore_unknown_fields=True + ) def remove_health_check( self, @@ -758,7 +766,7 @@ def remove_health_check( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def remove_instance( self, @@ -847,7 +855,7 @@ def remove_instance( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_backup( self, @@ -937,7 +945,7 @@ def set_backup( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("TargetPoolsRestTransport",) 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 8e0e23db317b..92c2e43dbdf1 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 @@ -172,7 +172,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -231,7 +231,9 @@ def get( response.raise_for_status() # Return the response - return compute.TargetSslProxy.from_json(response.content) + return compute.TargetSslProxy.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -317,7 +319,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -374,7 +376,9 @@ def list( response.raise_for_status() # Return the response - return compute.TargetSslProxyList.from_json(response.content) + return compute.TargetSslProxyList.from_json( + response.content, ignore_unknown_fields=True + ) def set_backend_service( self, @@ -462,7 +466,7 @@ def set_backend_service( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_proxy_header( self, @@ -550,7 +554,7 @@ def set_proxy_header( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_ssl_certificates( self, @@ -638,7 +642,7 @@ def set_ssl_certificates( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_ssl_policy( self, @@ -726,7 +730,7 @@ def set_ssl_policy( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("TargetSslProxiesRestTransport",) 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 51ebec033d7e..23986003e6e5 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 @@ -172,7 +172,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -231,7 +231,9 @@ def get( response.raise_for_status() # Return the response - return compute.TargetTcpProxy.from_json(response.content) + return compute.TargetTcpProxy.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -317,7 +319,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -374,7 +376,9 @@ def list( response.raise_for_status() # Return the response - return compute.TargetTcpProxyList.from_json(response.content) + return compute.TargetTcpProxyList.from_json( + response.content, ignore_unknown_fields=True + ) def set_backend_service( self, @@ -462,7 +466,7 @@ def set_backend_service( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def set_proxy_header( self, @@ -550,7 +554,7 @@ def set_proxy_header( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("TargetTcpProxiesRestTransport",) 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 89f504e61086..adede88b3ebd 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.TargetVpnGatewayAggregatedList.from_json(response.content) + return compute.TargetVpnGatewayAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -229,7 +231,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -287,7 +289,9 @@ def get( response.raise_for_status() # Return the response - return compute.TargetVpnGateway.from_json(response.content) + return compute.TargetVpnGateway.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -373,7 +377,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -430,7 +434,9 @@ def list( response.raise_for_status() # Return the response - return compute.TargetVpnGatewayList.from_json(response.content) + return compute.TargetVpnGatewayList.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("TargetVpnGatewaysRestTransport",) 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 49143112f5f5..f19acf1bfc08 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.UrlMapsAggregatedList.from_json(response.content) + return compute.UrlMapsAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -225,7 +227,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -305,7 +307,7 @@ def get( response.raise_for_status() # Return the response - return compute.UrlMap.from_json(response.content) + return compute.UrlMap.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -390,7 +392,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def invalidate_cache( self, @@ -476,7 +478,7 @@ def invalidate_cache( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -530,7 +532,9 @@ def list( response.raise_for_status() # Return the response - return compute.UrlMapList.from_json(response.content) + return compute.UrlMapList.from_json( + response.content, ignore_unknown_fields=True + ) def patch( self, @@ -615,7 +619,7 @@ def patch( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def update( self, @@ -700,7 +704,7 @@ def update( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def validate( self, @@ -756,7 +760,9 @@ def validate( response.raise_for_status() # Return the response - return compute.UrlMapsValidateResponse.from_json(response.content) + return compute.UrlMapsValidateResponse.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("UrlMapsRestTransport",) 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 73327dfe4311..2b48bc276ece 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.VpnGatewayAggregatedList.from_json(response.content) + return compute.VpnGatewayAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -229,7 +231,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -290,7 +292,9 @@ def get( response.raise_for_status() # Return the response - return compute.VpnGateway.from_json(response.content) + return compute.VpnGateway.from_json( + response.content, ignore_unknown_fields=True + ) def get_status( self, @@ -342,7 +346,9 @@ def get_status( response.raise_for_status() # Return the response - return compute.VpnGatewaysGetStatusResponse.from_json(response.content) + return compute.VpnGatewaysGetStatusResponse.from_json( + response.content, ignore_unknown_fields=True + ) def insert( self, @@ -428,7 +434,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -485,7 +491,9 @@ def list( response.raise_for_status() # Return the response - return compute.VpnGatewayList.from_json(response.content) + return compute.VpnGatewayList.from_json( + response.content, ignore_unknown_fields=True + ) def set_labels( self, @@ -574,7 +582,7 @@ def set_labels( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def test_iam_permissions( self, @@ -633,7 +641,9 @@ def test_iam_permissions( response.raise_for_status() # Return the response - return compute.TestPermissionsResponse.from_json(response.content) + return compute.TestPermissionsResponse.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("VpnGatewaysRestTransport",) 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 b68a8729aab2..a0e9d43d3842 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 @@ -147,7 +147,9 @@ def aggregated_list( response.raise_for_status() # Return the response - return compute.VpnTunnelAggregatedList.from_json(response.content) + return compute.VpnTunnelAggregatedList.from_json( + response.content, ignore_unknown_fields=True + ) def delete( self, @@ -229,7 +231,7 @@ def delete( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def get( self, @@ -284,7 +286,7 @@ def get( response.raise_for_status() # Return the response - return compute.VpnTunnel.from_json(response.content) + return compute.VpnTunnel.from_json(response.content, ignore_unknown_fields=True) def insert( self, @@ -370,7 +372,7 @@ def insert( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -427,7 +429,9 @@ def list( response.raise_for_status() # Return the response - return compute.VpnTunnelList.from_json(response.content) + return compute.VpnTunnelList.from_json( + response.content, ignore_unknown_fields=True + ) __all__ = ("VpnTunnelsRestTransport",) 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 444772246c38..016f53020f68 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 @@ -146,7 +146,9 @@ def delete( response.raise_for_status() # Return the response - return compute.DeleteZoneOperationResponse.from_json(response.content) + return compute.DeleteZoneOperationResponse.from_json( + response.content, ignore_unknown_fields=True + ) def get( self, @@ -226,7 +228,7 @@ def get( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -283,7 +285,9 @@ def list( response.raise_for_status() # Return the response - return compute.OperationList.from_json(response.content) + return compute.OperationList.from_json( + response.content, ignore_unknown_fields=True + ) def wait( self, @@ -363,7 +367,7 @@ def wait( response.raise_for_status() # Return the response - return compute.Operation.from_json(response.content) + return compute.Operation.from_json(response.content, ignore_unknown_fields=True) __all__ = ("ZoneOperationsRestTransport",) 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 a7ed4ab98932..523ef11837bf 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 @@ -146,7 +146,7 @@ def get( response.raise_for_status() # Return the response - return compute.Zone.from_json(response.content) + return compute.Zone.from_json(response.content, ignore_unknown_fields=True) def list( self, @@ -200,7 +200,7 @@ def list( response.raise_for_status() # Return the response - return compute.ZoneList.from_json(response.content) + return compute.ZoneList.from_json(response.content, ignore_unknown_fields=True) __all__ = ("ZonesRestTransport",) diff --git a/packages/google-cloud-compute/noxfile.py b/packages/google-cloud-compute/noxfile.py index e23015f2c5e3..6fd80b539a6b 100644 --- a/packages/google-cloud-compute/noxfile.py +++ b/packages/google-cloud-compute/noxfile.py @@ -139,10 +139,6 @@ def system(session): ) session.install("-e", ".") - # mTLS test needs pyopenssl - if os.environ.get("GOOGLE_API_USE_CLIENT_CERTIFICATE", "") == "true": - session.install("pyopenssl") - # Run py.test against the system tests. if system_test_exists: session.run("py.test", "--quiet", system_test_path, *session.posargs) diff --git a/packages/google-cloud-compute/scripts/fixup_compute_v1_keywords.py b/packages/google-cloud-compute/scripts/fixup_compute_v1_keywords.py index e70d3c3fda45..8170f8aa353f 100644 --- a/packages/google-cloud-compute/scripts/fixup_compute_v1_keywords.py +++ b/packages/google-cloud-compute/scripts/fixup_compute_v1_keywords.py @@ -54,10 +54,10 @@ class computeCallTransformer(cst.CSTTransformer): 'aggregated_list': ('project', 'filter', 'include_all_scopes', 'max_results', 'order_by', 'page_token', 'return_partial_success', ), 'apply_updates_to_instances': ('instance_group_manager', 'instance_group_managers_apply_updates_request_resource', 'project', 'zone', ), 'attach_disk': ('attached_disk_resource', 'instance', 'project', 'zone', 'force_attach', 'request_id', ), - 'attach_network_endpoints': ('network_endpoint_group', 'network_endpoint_groups_attach_endpoints_request_resource', 'project', 'zone', 'request_id', ), + 'attach_network_endpoints': ('global_network_endpoint_groups_attach_endpoints_request_resource', 'network_endpoint_group', 'project', 'request_id', ), 'create_instances': ('instance_group_manager', 'instance_group_managers_create_instances_request_resource', 'project', 'zone', 'request_id', ), 'create_snapshot': ('disk', 'project', 'snapshot_resource', 'zone', 'guest_flush', 'request_id', ), - 'delete': ('project', 'url_map', 'request_id', ), + 'delete': ('forwarding_rule', 'project', 'request_id', ), 'delete_access_config': ('access_config', 'instance', 'network_interface', 'project', 'zone', 'request_id', ), 'delete_instances': ('instance_group_manager', 'instance_group_managers_delete_instances_request_resource', 'project', 'zone', 'request_id', ), 'delete_nodes': ('node_group', 'node_groups_delete_nodes_request_resource', 'project', 'zone', 'request_id', ), @@ -65,18 +65,18 @@ class computeCallTransformer(cst.CSTTransformer): 'delete_signed_url_key': ('backend_service', 'key_name', 'project', 'request_id', ), 'deprecate': ('deprecation_status_resource', 'image', 'project', 'request_id', ), 'detach_disk': ('device_name', 'instance', 'project', 'zone', 'request_id', ), - 'detach_network_endpoints': ('network_endpoint_group', 'network_endpoint_groups_detach_endpoints_request_resource', 'project', 'zone', 'request_id', ), + 'detach_network_endpoints': ('global_network_endpoint_groups_detach_endpoints_request_resource', 'network_endpoint_group', 'project', 'request_id', ), 'disable_xpn_host': ('project', 'request_id', ), 'disable_xpn_resource': ('project', 'projects_disable_xpn_resource_request_resource', 'request_id', ), 'enable_xpn_host': ('project', 'request_id', ), 'enable_xpn_resource': ('project', 'projects_enable_xpn_resource_request_resource', 'request_id', ), 'expand_ip_cidr_range': ('project', 'region', 'subnetwork', 'subnetworks_expand_ip_cidr_range_request_resource', 'request_id', ), - 'get': ('project', 'url_map', ), + 'get': ('forwarding_rule', 'project', ), 'get_diagnostics': ('interconnect', 'project', ), 'get_from_family': ('family', 'project', ), 'get_guest_attributes': ('instance', 'project', 'zone', 'query_path', 'variable_key', ), - 'get_health': ('backend_service', 'project', 'resource_group_reference_resource', ), - 'get_iam_policy': ('project', 'region', 'resource', 'options_requested_policy_version', ), + 'get_health': ('instance_reference_resource', 'project', 'region', 'target_pool', ), + 'get_iam_policy': ('project', 'resource', 'zone', 'options_requested_policy_version', ), 'get_nat_mapping_info': ('project', 'region', 'router', 'filter', 'max_results', 'order_by', 'page_token', 'return_partial_success', ), 'get_router_status': ('project', 'region', 'router', ), 'get_rule': ('project', 'security_policy', 'priority', ), @@ -86,14 +86,14 @@ class computeCallTransformer(cst.CSTTransformer): 'get_status': ('project', 'region', 'vpn_gateway', ), 'get_xpn_host': ('project', ), 'get_xpn_resources': ('project', 'filter', 'max_results', 'order_by', 'page_token', 'return_partial_success', ), - 'insert': ('project', 'url_map_resource', 'request_id', ), + 'insert': ('forwarding_rule_resource', 'project', 'request_id', ), 'invalidate_cache': ('cache_invalidation_rule_resource', 'project', 'url_map', 'request_id', ), 'list': ('project', 'filter', 'max_results', 'order_by', 'page_token', 'return_partial_success', ), 'list_available_features': ('project', 'filter', 'max_results', 'order_by', 'page_token', 'return_partial_success', ), 'list_errors': ('instance_group_manager', 'project', 'zone', 'filter', 'max_results', 'order_by', 'page_token', 'return_partial_success', ), 'list_instances': ('instance_group', 'project', 'region', 'region_instance_groups_list_instances_request_resource', 'filter', 'max_results', 'order_by', 'page_token', 'return_partial_success', ), 'list_managed_instances': ('instance_group_manager', 'project', 'zone', 'filter', 'max_results', 'order_by', 'page_token', 'return_partial_success', ), - 'list_network_endpoints': ('network_endpoint_group', 'network_endpoint_groups_list_endpoints_request_resource', 'project', 'zone', 'filter', 'max_results', 'order_by', 'page_token', 'return_partial_success', ), + 'list_network_endpoints': ('network_endpoint_group', 'project', 'filter', 'max_results', 'order_by', 'page_token', 'return_partial_success', ), 'list_nodes': ('node_group', 'project', 'zone', 'filter', 'max_results', 'order_by', 'page_token', 'return_partial_success', ), 'list_peering_routes': ('network', 'project', 'direction', 'filter', 'max_results', 'order_by', 'page_token', 'peering_name', 'region', 'return_partial_success', ), 'list_per_instance_configs': ('instance_group_manager', 'project', 'zone', 'filter', 'max_results', 'order_by', 'page_token', 'return_partial_success', ), @@ -103,7 +103,7 @@ class computeCallTransformer(cst.CSTTransformer): 'list_xpn_hosts': ('project', 'projects_list_xpn_hosts_request_resource', 'filter', 'max_results', 'order_by', 'page_token', 'return_partial_success', ), 'move_disk': ('disk_move_request_resource', 'project', 'request_id', ), 'move_instance': ('instance_move_request_resource', 'project', 'request_id', ), - 'patch': ('project', 'url_map', 'url_map_resource', 'request_id', ), + 'patch': ('forwarding_rule', 'forwarding_rule_resource', 'project', 'request_id', ), 'patch_per_instance_configs': ('instance_group_manager', 'instance_group_managers_patch_per_instance_configs_req_resource', 'project', 'zone', 'request_id', ), 'patch_rule': ('project', 'security_policy', 'security_policy_rule_resource', 'priority', ), 'preview': ('project', 'region', 'router', 'router_resource', ), @@ -115,16 +115,16 @@ class computeCallTransformer(cst.CSTTransformer): 'remove_resource_policies': ('disk', 'disks_remove_resource_policies_request_resource', 'project', 'zone', 'request_id', ), 'remove_rule': ('project', 'security_policy', 'priority', ), 'reset': ('instance', 'project', 'zone', 'request_id', ), - 'resize': ('project', 'reservation', 'reservations_resize_request_resource', 'zone', 'request_id', ), - 'set_backend_service': ('project', 'target_ssl_proxies_set_backend_service_request_resource', 'target_ssl_proxy', 'request_id', ), + 'resize': ('disk', 'disks_resize_request_resource', 'project', 'zone', 'request_id', ), + 'set_backend_service': ('project', 'target_tcp_proxies_set_backend_service_request_resource', 'target_tcp_proxy', 'request_id', ), 'set_backup': ('project', 'region', 'target_pool', 'target_reference_resource', 'failover_ratio', 'request_id', ), 'set_common_instance_metadata': ('metadata_resource', 'project', 'request_id', ), 'set_default_network_tier': ('project', 'projects_set_default_network_tier_request_resource', 'request_id', ), 'set_deletion_protection': ('project', 'resource', 'zone', 'deletion_protection', 'request_id', ), 'set_disk_auto_delete': ('auto_delete', 'device_name', 'instance', 'project', 'zone', 'request_id', ), - 'set_iam_policy': ('project', 'region', 'region_set_policy_request_resource', 'resource', ), + 'set_iam_policy': ('project', 'resource', 'zone', 'zone_set_policy_request_resource', ), 'set_instance_template': ('instance_group_manager', 'instance_group_managers_set_instance_template_request_resource', 'project', 'zone', 'request_id', ), - 'set_labels': ('project', 'region', 'region_set_labels_request_resource', 'resource', 'request_id', ), + 'set_labels': ('project', 'resource', 'zone', 'zone_set_labels_request_resource', 'request_id', ), 'set_machine_resources': ('instance', 'instances_set_machine_resources_request_resource', 'project', 'zone', 'request_id', ), 'set_machine_type': ('instance', 'instances_set_machine_type_request_resource', 'project', 'zone', 'request_id', ), 'set_metadata': ('instance', 'metadata_resource', 'project', 'zone', 'request_id', ), @@ -132,16 +132,16 @@ class computeCallTransformer(cst.CSTTransformer): 'set_named_ports': ('instance_group', 'project', 'region', 'region_instance_groups_set_named_ports_request_resource', 'request_id', ), 'set_node_template': ('node_group', 'node_groups_set_node_template_request_resource', 'project', 'zone', 'request_id', ), 'set_private_ip_google_access': ('project', 'region', 'subnetwork', 'subnetworks_set_private_ip_google_access_request_resource', 'request_id', ), - 'set_proxy_header': ('project', 'target_ssl_proxies_set_proxy_header_request_resource', 'target_ssl_proxy', 'request_id', ), + 'set_proxy_header': ('project', 'target_tcp_proxies_set_proxy_header_request_resource', 'target_tcp_proxy', 'request_id', ), 'set_quic_override': ('project', 'target_https_proxies_set_quic_override_request_resource', 'target_https_proxy', 'request_id', ), 'set_scheduling': ('instance', 'project', 'scheduling_resource', 'zone', 'request_id', ), 'set_security_policy': ('backend_service', 'project', 'security_policy_reference_resource', 'request_id', ), 'set_service_account': ('instance', 'instances_set_service_account_request_resource', 'project', 'zone', 'request_id', ), 'set_shielded_instance_integrity_policy': ('instance', 'project', 'shielded_instance_integrity_policy_resource', 'zone', 'request_id', ), - 'set_ssl_certificates': ('project', 'region', 'region_target_https_proxies_set_ssl_certificates_request_resource', 'target_https_proxy', 'request_id', ), - 'set_ssl_policy': ('project', 'ssl_policy_reference_resource', 'target_ssl_proxy', 'request_id', ), + 'set_ssl_certificates': ('project', 'target_https_proxies_set_ssl_certificates_request_resource', 'target_https_proxy', 'request_id', ), + 'set_ssl_policy': ('project', 'ssl_policy_reference_resource', 'target_https_proxy', 'request_id', ), 'set_tags': ('instance', 'project', 'tags_resource', 'zone', 'request_id', ), - 'set_target': ('forwarding_rule', 'project', 'region', 'target_reference_resource', 'request_id', ), + 'set_target': ('forwarding_rule', 'project', 'target_reference_resource', 'request_id', ), 'set_target_pools': ('instance_group_manager', 'instance_group_managers_set_target_pools_request_resource', 'project', 'zone', 'request_id', ), 'set_url_map': ('project', 'target_http_proxy', 'url_map_reference_resource', 'request_id', ), 'set_usage_export_bucket': ('project', 'usage_export_location_resource', 'request_id', ), @@ -150,15 +150,15 @@ class computeCallTransformer(cst.CSTTransformer): 'start_with_encryption_key': ('instance', 'instances_start_with_encryption_key_request_resource', 'project', 'zone', 'request_id', ), 'stop': ('instance', 'project', 'zone', 'request_id', ), 'switch_to_custom_mode': ('network', 'project', 'request_id', ), - 'test_iam_permissions': ('project', 'region', 'resource', 'test_permissions_request_resource', ), - 'update': ('project', 'url_map', 'url_map_resource', 'request_id', ), + 'test_iam_permissions': ('project', 'resource', 'test_permissions_request_resource', 'zone', ), + 'update': ('health_check', 'health_check_resource', 'project', 'request_id', ), 'update_access_config': ('access_config_resource', 'instance', 'network_interface', 'project', 'zone', 'request_id', ), 'update_display_device': ('display_device_resource', 'instance', 'project', 'zone', 'request_id', ), 'update_network_interface': ('instance', 'network_interface', 'network_interface_resource', 'project', 'zone', 'request_id', ), 'update_peering': ('network', 'networks_update_peering_request_resource', 'project', 'request_id', ), 'update_per_instance_configs': ('instance_group_manager', 'instance_group_managers_update_per_instance_configs_req_resource', 'project', 'zone', 'request_id', ), 'update_shielded_instance_config': ('instance', 'project', 'shielded_instance_config_resource', 'zone', 'request_id', ), - 'validate': ('project', 'url_map', 'url_maps_validate_request_resource', ), + 'validate': ('project', 'region', 'region_url_maps_validate_request_resource', 'url_map', ), 'wait': ('operation', 'project', 'zone', ), } diff --git a/packages/google-cloud-compute/synth.metadata b/packages/google-cloud-compute/synth.metadata index 24b69617ce47..0e82730d3f9d 100644 --- a/packages/google-cloud-compute/synth.metadata +++ b/packages/google-cloud-compute/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-compute.git", - "sha": "80bf3527cb9697e6f1a07b3a5ab8130cb77a7674" + "sha": "2122dbbcc78180246f7ea70f05bc7ef7af6149df" } }, { "git": { "name": "googleapis-discovery", "remote": "https://github.com/googleapis/googleapis-discovery.git", - "sha": "8bde5a64f149bd8f6a3b71efa20d232cb07a55de" + "sha": "806768fb4ee175390ce625331cdcb05293786c8f" } }, { 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 fc731eff731e..201d80a57ac0 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 @@ -86,15 +86,17 @@ def test__get_default_mtls_endpoint(): ) -def test_accelerator_types_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [AcceleratorTypesClient,]) +def test_accelerator_types_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = AcceleratorTypesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -108,9 +110,11 @@ def test_accelerator_types_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 3e2cf661108b..ab273cc7d944 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 @@ -80,15 +80,17 @@ def test__get_default_mtls_endpoint(): assert AddressesClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_addresses_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [AddressesClient,]) +def test_addresses_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = AddressesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -102,9 +104,11 @@ def test_addresses_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 b636e53ebfd9..3b96aa86319a 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 @@ -82,15 +82,17 @@ def test__get_default_mtls_endpoint(): assert AutoscalersClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_autoscalers_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [AutoscalersClient,]) +def test_autoscalers_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = AutoscalersClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -104,9 +106,11 @@ def test_autoscalers_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 35e3019a095d..7faad5b08cd0 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 @@ -85,15 +85,17 @@ def test__get_default_mtls_endpoint(): ) -def test_backend_buckets_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [BackendBucketsClient,]) +def test_backend_buckets_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = BackendBucketsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -107,9 +109,11 @@ def test_backend_buckets_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 5e180766b02c..59ec11d23b95 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 @@ -85,15 +85,17 @@ def test__get_default_mtls_endpoint(): ) -def test_backend_services_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [BackendServicesClient,]) +def test_backend_services_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = BackendServicesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -107,9 +109,11 @@ def test_backend_services_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 e46c41bc79f8..5139ae8141d3 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 @@ -80,15 +80,17 @@ def test__get_default_mtls_endpoint(): assert DiskTypesClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_disk_types_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [DiskTypesClient,]) +def test_disk_types_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = DiskTypesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -102,9 +104,11 @@ def test_disk_types_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 304dc6c8be36..c9709e1a6277 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 @@ -79,15 +79,17 @@ def test__get_default_mtls_endpoint(): assert DisksClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_disks_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [DisksClient,]) +def test_disks_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = DisksClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -101,9 +103,11 @@ def test_disks_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 212b049e251f..819beb928dbc 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 @@ -88,15 +88,17 @@ def test__get_default_mtls_endpoint(): ) -def test_external_vpn_gateways_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [ExternalVpnGatewaysClient,]) +def test_external_vpn_gateways_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = ExternalVpnGatewaysClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -110,9 +112,11 @@ def test_external_vpn_gateways_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 636f12c6b526..42b4c801bbae 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 @@ -80,15 +80,17 @@ def test__get_default_mtls_endpoint(): assert FirewallsClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_firewalls_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [FirewallsClient,]) +def test_firewalls_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = FirewallsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -102,9 +104,11 @@ def test_firewalls_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 af98e35bad43..9ca2660881b5 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 @@ -85,15 +85,17 @@ def test__get_default_mtls_endpoint(): ) -def test_forwarding_rules_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [ForwardingRulesClient,]) +def test_forwarding_rules_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = ForwardingRulesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -107,9 +109,11 @@ def test_forwarding_rules_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 90a94e2558ae..aa6b7534f181 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 @@ -85,15 +85,17 @@ def test__get_default_mtls_endpoint(): ) -def test_global_addresses_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [GlobalAddressesClient,]) +def test_global_addresses_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = GlobalAddressesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -107,9 +109,11 @@ def test_global_addresses_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 562428ea7be2..522424d58898 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 @@ -88,15 +88,17 @@ def test__get_default_mtls_endpoint(): ) -def test_global_forwarding_rules_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [GlobalForwardingRulesClient,]) +def test_global_forwarding_rules_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = GlobalForwardingRulesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -110,9 +112,11 @@ def test_global_forwarding_rules_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 dac41f62bf3b..c936e733d808 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 @@ -90,15 +90,17 @@ def test__get_default_mtls_endpoint(): ) -def test_global_network_endpoint_groups_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [GlobalNetworkEndpointGroupsClient,]) +def test_global_network_endpoint_groups_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = GlobalNetworkEndpointGroupsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -112,9 +114,11 @@ def test_global_network_endpoint_groups_client_from_service_account_file(client_ factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 6678196c0d19..03248ae0c385 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 @@ -86,15 +86,17 @@ def test__get_default_mtls_endpoint(): ) -def test_global_operations_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [GlobalOperationsClient,]) +def test_global_operations_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = GlobalOperationsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -108,9 +110,11 @@ def test_global_operations_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 8527031d659f..bf8189fab117 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 @@ -90,15 +90,17 @@ def test__get_default_mtls_endpoint(): ) -def test_global_organization_operations_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [GlobalOrganizationOperationsClient,]) +def test_global_organization_operations_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = GlobalOrganizationOperationsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -112,9 +114,11 @@ def test_global_organization_operations_client_from_service_account_file(client_ factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 112b5f21412d..9a15e64f369d 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 @@ -82,15 +82,17 @@ def test__get_default_mtls_endpoint(): assert HealthChecksClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_health_checks_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [HealthChecksClient,]) +def test_health_checks_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = HealthChecksClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -104,9 +106,11 @@ def test_health_checks_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 86b5bd7111e4..0c139489f769 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 @@ -79,15 +79,17 @@ def test__get_default_mtls_endpoint(): assert ImagesClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_images_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [ImagesClient,]) +def test_images_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = ImagesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -101,9 +103,11 @@ def test_images_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 49c9ae908693..2f4763a50e3c 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 @@ -88,15 +88,17 @@ def test__get_default_mtls_endpoint(): ) -def test_instance_group_managers_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [InstanceGroupManagersClient,]) +def test_instance_group_managers_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = InstanceGroupManagersClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -110,9 +112,11 @@ def test_instance_group_managers_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 e0d328caf004..702ec56cad4f 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 @@ -85,15 +85,17 @@ def test__get_default_mtls_endpoint(): ) -def test_instance_groups_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [InstanceGroupsClient,]) +def test_instance_groups_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = InstanceGroupsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -107,9 +109,11 @@ def test_instance_groups_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 35fde8f9fab9..9d0d78927ce8 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 @@ -86,15 +86,17 @@ def test__get_default_mtls_endpoint(): ) -def test_instance_templates_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [InstanceTemplatesClient,]) +def test_instance_templates_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = InstanceTemplatesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -108,9 +110,11 @@ def test_instance_templates_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 7e2d9d0be827..fbe11bb1f5a3 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 @@ -80,15 +80,17 @@ def test__get_default_mtls_endpoint(): assert InstancesClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_instances_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [InstancesClient,]) +def test_instances_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = InstancesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -102,9 +104,11 @@ def test_instances_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 14ee4caaa7e2..644843d71df3 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 @@ -88,15 +88,17 @@ def test__get_default_mtls_endpoint(): ) -def test_interconnect_attachments_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [InterconnectAttachmentsClient,]) +def test_interconnect_attachments_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = InterconnectAttachmentsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -110,9 +112,11 @@ def test_interconnect_attachments_client_from_service_account_file(client_class) factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 a8129229d963..8109b3448f36 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 @@ -88,15 +88,17 @@ def test__get_default_mtls_endpoint(): ) -def test_interconnect_locations_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [InterconnectLocationsClient,]) +def test_interconnect_locations_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = InterconnectLocationsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -110,9 +112,11 @@ def test_interconnect_locations_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 f0859ddb8670..86e749db90bf 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 @@ -85,15 +85,17 @@ def test__get_default_mtls_endpoint(): ) -def test_interconnects_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [InterconnectsClient,]) +def test_interconnects_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = InterconnectsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -107,9 +109,11 @@ def test_interconnects_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 f1c8749c8a8a..ea01780d65b2 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 @@ -81,15 +81,17 @@ def test__get_default_mtls_endpoint(): assert LicenseCodesClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_license_codes_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [LicenseCodesClient,]) +def test_license_codes_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = LicenseCodesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -103,9 +105,11 @@ def test_license_codes_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 794e8d7dd81b..ec59233bb108 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 @@ -80,15 +80,17 @@ def test__get_default_mtls_endpoint(): assert LicensesClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_licenses_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [LicensesClient,]) +def test_licenses_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = LicensesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -102,9 +104,11 @@ def test_licenses_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 b89798a9a655..ce3fdb0b1012 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 @@ -82,15 +82,17 @@ def test__get_default_mtls_endpoint(): assert MachineTypesClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_machine_types_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [MachineTypesClient,]) +def test_machine_types_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = MachineTypesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -104,9 +106,11 @@ def test_machine_types_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 e9016843ee3e..1cee30b2cbcc 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 @@ -88,15 +88,17 @@ def test__get_default_mtls_endpoint(): ) -def test_network_endpoint_groups_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [NetworkEndpointGroupsClient,]) +def test_network_endpoint_groups_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = NetworkEndpointGroupsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -110,9 +112,11 @@ def test_network_endpoint_groups_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 a2b70a6e2831..ba66e2ce981a 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 @@ -80,15 +80,17 @@ def test__get_default_mtls_endpoint(): assert NetworksClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_networks_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [NetworksClient,]) +def test_networks_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = NetworksClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -102,9 +104,11 @@ def test_networks_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 0b02a199b2ed..e94ca8628732 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 @@ -82,15 +82,17 @@ def test__get_default_mtls_endpoint(): assert NodeGroupsClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_node_groups_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [NodeGroupsClient,]) +def test_node_groups_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = NodeGroupsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -104,9 +106,11 @@ def test_node_groups_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 fc07d6298ee1..35348b22f1e4 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 @@ -85,15 +85,17 @@ def test__get_default_mtls_endpoint(): ) -def test_node_templates_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [NodeTemplatesClient,]) +def test_node_templates_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = NodeTemplatesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -107,9 +109,11 @@ def test_node_templates_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 63eb4e27ca4d..8d09b10bff0e 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 @@ -80,15 +80,17 @@ def test__get_default_mtls_endpoint(): assert NodeTypesClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_node_types_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [NodeTypesClient,]) +def test_node_types_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = NodeTypesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -102,9 +104,11 @@ def test_node_types_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 2c0379dac5aa..6d50f381ee78 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 @@ -86,15 +86,17 @@ def test__get_default_mtls_endpoint(): ) -def test_packet_mirrorings_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [PacketMirroringsClient,]) +def test_packet_mirrorings_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = PacketMirroringsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -108,9 +110,11 @@ def test_packet_mirrorings_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 53972df759d6..946e8d694b3b 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 @@ -80,15 +80,17 @@ def test__get_default_mtls_endpoint(): assert ProjectsClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_projects_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [ProjectsClient,]) +def test_projects_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = ProjectsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -102,9 +104,11 @@ def test_projects_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 a13fddcd12d6..dd7c822fff3a 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 @@ -86,15 +86,17 @@ def test__get_default_mtls_endpoint(): ) -def test_region_autoscalers_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RegionAutoscalersClient,]) +def test_region_autoscalers_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RegionAutoscalersClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -108,9 +110,11 @@ def test_region_autoscalers_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 1fb40fe1ab99..98be11a110a4 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 @@ -88,15 +88,17 @@ def test__get_default_mtls_endpoint(): ) -def test_region_backend_services_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RegionBackendServicesClient,]) +def test_region_backend_services_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RegionBackendServicesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -110,9 +112,11 @@ def test_region_backend_services_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 7bb9d516f43f..ae9d3bd8e8bf 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 @@ -86,15 +86,17 @@ def test__get_default_mtls_endpoint(): ) -def test_region_commitments_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RegionCommitmentsClient,]) +def test_region_commitments_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RegionCommitmentsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -108,9 +110,11 @@ def test_region_commitments_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 b43e39df9813..77acd6b82e27 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 @@ -85,15 +85,17 @@ def test__get_default_mtls_endpoint(): ) -def test_region_disk_types_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RegionDiskTypesClient,]) +def test_region_disk_types_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RegionDiskTypesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -107,9 +109,11 @@ def test_region_disk_types_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 3dac15c2468b..ca54bfd47902 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 @@ -82,15 +82,17 @@ def test__get_default_mtls_endpoint(): assert RegionDisksClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_region_disks_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RegionDisksClient,]) +def test_region_disks_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RegionDisksClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -104,9 +106,11 @@ def test_region_disks_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 320685c273c6..4778db294989 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 @@ -90,15 +90,17 @@ def test__get_default_mtls_endpoint(): ) -def test_region_health_check_services_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RegionHealthCheckServicesClient,]) +def test_region_health_check_services_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RegionHealthCheckServicesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -112,9 +114,11 @@ def test_region_health_check_services_client_from_service_account_file(client_cl factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 dbe1162c1de1..0b034e671038 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 @@ -88,15 +88,17 @@ def test__get_default_mtls_endpoint(): ) -def test_region_health_checks_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RegionHealthChecksClient,]) +def test_region_health_checks_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RegionHealthChecksClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -110,9 +112,11 @@ def test_region_health_checks_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 abf5c43bdb37..b69df2d45198 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 @@ -90,15 +90,17 @@ def test__get_default_mtls_endpoint(): ) -def test_region_instance_group_managers_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RegionInstanceGroupManagersClient,]) +def test_region_instance_group_managers_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RegionInstanceGroupManagersClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -112,9 +114,11 @@ def test_region_instance_group_managers_client_from_service_account_file(client_ factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 099eeeced09d..db2cb7dc9036 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 @@ -88,15 +88,17 @@ def test__get_default_mtls_endpoint(): ) -def test_region_instance_groups_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RegionInstanceGroupsClient,]) +def test_region_instance_groups_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RegionInstanceGroupsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -110,9 +112,11 @@ def test_region_instance_groups_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 4b095591e072..cf69099872c7 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 @@ -90,15 +90,17 @@ def test__get_default_mtls_endpoint(): ) -def test_region_network_endpoint_groups_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RegionNetworkEndpointGroupsClient,]) +def test_region_network_endpoint_groups_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RegionNetworkEndpointGroupsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -112,9 +114,11 @@ def test_region_network_endpoint_groups_client_from_service_account_file(client_ factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 940d8730e024..009a6c7bd9c5 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 @@ -90,15 +90,17 @@ def test__get_default_mtls_endpoint(): ) -def test_region_notification_endpoints_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RegionNotificationEndpointsClient,]) +def test_region_notification_endpoints_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RegionNotificationEndpointsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -112,9 +114,11 @@ def test_region_notification_endpoints_client_from_service_account_file(client_c factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 5ce7bdf38dc2..30d83bbe884d 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 @@ -86,15 +86,17 @@ def test__get_default_mtls_endpoint(): ) -def test_region_operations_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RegionOperationsClient,]) +def test_region_operations_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RegionOperationsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -108,9 +110,11 @@ def test_region_operations_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 0deb0805d11d..e95440e9d71d 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 @@ -88,15 +88,17 @@ def test__get_default_mtls_endpoint(): ) -def test_region_ssl_certificates_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RegionSslCertificatesClient,]) +def test_region_ssl_certificates_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RegionSslCertificatesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -110,9 +112,11 @@ def test_region_ssl_certificates_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 d2235532d2ef..650acbc9cec7 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 @@ -88,15 +88,17 @@ def test__get_default_mtls_endpoint(): ) -def test_region_target_http_proxies_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RegionTargetHttpProxiesClient,]) +def test_region_target_http_proxies_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RegionTargetHttpProxiesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -110,9 +112,11 @@ def test_region_target_http_proxies_client_from_service_account_file(client_clas factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 df3cab9b9ecd..7d81fd215010 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 @@ -88,15 +88,17 @@ def test__get_default_mtls_endpoint(): ) -def test_region_target_https_proxies_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RegionTargetHttpsProxiesClient,]) +def test_region_target_https_proxies_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RegionTargetHttpsProxiesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -110,9 +112,11 @@ def test_region_target_https_proxies_client_from_service_account_file(client_cla factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 41132a284587..0ec7507fa937 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 @@ -85,15 +85,17 @@ def test__get_default_mtls_endpoint(): ) -def test_region_url_maps_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RegionUrlMapsClient,]) +def test_region_url_maps_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RegionUrlMapsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -107,9 +109,11 @@ def test_region_url_maps_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 35598ef81d94..a7a50c876a8d 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 @@ -79,15 +79,17 @@ def test__get_default_mtls_endpoint(): assert RegionsClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_regions_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RegionsClient,]) +def test_regions_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RegionsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -101,9 +103,11 @@ def test_regions_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 7779697b620f..2c251b684cb7 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 @@ -82,15 +82,17 @@ def test__get_default_mtls_endpoint(): assert ReservationsClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_reservations_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [ReservationsClient,]) +def test_reservations_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = ReservationsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -104,9 +106,11 @@ def test_reservations_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 7bc23a452c0b..1741d029e128 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 @@ -86,15 +86,17 @@ def test__get_default_mtls_endpoint(): ) -def test_resource_policies_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [ResourcePoliciesClient,]) +def test_resource_policies_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = ResourcePoliciesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -108,9 +110,11 @@ def test_resource_policies_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 00d4348eff08..2b3d9ab3b0f1 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 @@ -79,15 +79,17 @@ def test__get_default_mtls_endpoint(): assert RoutersClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_routers_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RoutersClient,]) +def test_routers_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RoutersClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -101,9 +103,11 @@ def test_routers_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 d079d9e0baf0..b55c944ff8e6 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 @@ -79,15 +79,17 @@ def test__get_default_mtls_endpoint(): assert RoutesClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_routes_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [RoutesClient,]) +def test_routes_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = RoutesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -101,9 +103,11 @@ def test_routes_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 3d1f7b03a8a2..7b13a3ded7fb 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 @@ -86,15 +86,17 @@ def test__get_default_mtls_endpoint(): ) -def test_security_policies_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [SecurityPoliciesClient,]) +def test_security_policies_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = SecurityPoliciesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -108,9 +110,11 @@ def test_security_policies_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 92cee9796b04..e57542eacf5d 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 @@ -80,15 +80,17 @@ def test__get_default_mtls_endpoint(): assert SnapshotsClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_snapshots_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [SnapshotsClient,]) +def test_snapshots_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = SnapshotsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -102,9 +104,11 @@ def test_snapshots_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 cf106e007241..fffb64b51d86 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 @@ -85,15 +85,17 @@ def test__get_default_mtls_endpoint(): ) -def test_ssl_certificates_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [SslCertificatesClient,]) +def test_ssl_certificates_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = SslCertificatesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -107,9 +109,11 @@ def test_ssl_certificates_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 83e39611cc05..b616d865bb52 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 @@ -82,15 +82,17 @@ def test__get_default_mtls_endpoint(): assert SslPoliciesClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_ssl_policies_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [SslPoliciesClient,]) +def test_ssl_policies_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = SslPoliciesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -104,9 +106,11 @@ def test_ssl_policies_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 128c6d849fbf..2a4f056b0b59 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 @@ -82,15 +82,17 @@ def test__get_default_mtls_endpoint(): assert SubnetworksClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_subnetworks_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [SubnetworksClient,]) +def test_subnetworks_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = SubnetworksClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -104,9 +106,11 @@ def test_subnetworks_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 4b5bac2df056..7e44a27b4010 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 @@ -86,15 +86,17 @@ def test__get_default_mtls_endpoint(): ) -def test_target_grpc_proxies_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [TargetGrpcProxiesClient,]) +def test_target_grpc_proxies_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = TargetGrpcProxiesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -108,9 +110,11 @@ def test_target_grpc_proxies_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 683d2de43fd5..7e9f95478ed2 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 @@ -86,15 +86,17 @@ def test__get_default_mtls_endpoint(): ) -def test_target_http_proxies_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [TargetHttpProxiesClient,]) +def test_target_http_proxies_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = TargetHttpProxiesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -108,9 +110,11 @@ def test_target_http_proxies_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 743a4c848f0b..a3d5cbd167ce 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 @@ -88,15 +88,17 @@ def test__get_default_mtls_endpoint(): ) -def test_target_https_proxies_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [TargetHttpsProxiesClient,]) +def test_target_https_proxies_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = TargetHttpsProxiesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -110,9 +112,11 @@ def test_target_https_proxies_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 90696b2415f1..0ff77fe75c1a 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 @@ -85,15 +85,17 @@ def test__get_default_mtls_endpoint(): ) -def test_target_instances_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [TargetInstancesClient,]) +def test_target_instances_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = TargetInstancesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -107,9 +109,11 @@ def test_target_instances_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 d7cfacad7aee..db7f01f3d399 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 @@ -82,15 +82,17 @@ def test__get_default_mtls_endpoint(): assert TargetPoolsClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_target_pools_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [TargetPoolsClient,]) +def test_target_pools_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = TargetPoolsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -104,9 +106,11 @@ def test_target_pools_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 716a6404516d..ddaf513cd844 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 @@ -86,15 +86,17 @@ def test__get_default_mtls_endpoint(): ) -def test_target_ssl_proxies_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [TargetSslProxiesClient,]) +def test_target_ssl_proxies_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = TargetSslProxiesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -108,9 +110,11 @@ def test_target_ssl_proxies_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 e06fba947571..ab0dad99a97d 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 @@ -86,15 +86,17 @@ def test__get_default_mtls_endpoint(): ) -def test_target_tcp_proxies_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [TargetTcpProxiesClient,]) +def test_target_tcp_proxies_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = TargetTcpProxiesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -108,9 +110,11 @@ def test_target_tcp_proxies_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 8e696dc655bc..bebb3ab541d9 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 @@ -86,15 +86,17 @@ def test__get_default_mtls_endpoint(): ) -def test_target_vpn_gateways_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [TargetVpnGatewaysClient,]) +def test_target_vpn_gateways_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = TargetVpnGatewaysClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -108,9 +110,11 @@ def test_target_vpn_gateways_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 6a1d79757932..ecd2fccf8361 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 @@ -79,15 +79,17 @@ def test__get_default_mtls_endpoint(): assert UrlMapsClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_url_maps_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [UrlMapsClient,]) +def test_url_maps_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = UrlMapsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -101,9 +103,11 @@ def test_url_maps_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 cbd4ba4bf8b2..157af53ecfde 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 @@ -82,15 +82,17 @@ def test__get_default_mtls_endpoint(): assert VpnGatewaysClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_vpn_gateways_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [VpnGatewaysClient,]) +def test_vpn_gateways_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = VpnGatewaysClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -104,9 +106,11 @@ def test_vpn_gateways_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 b3d1b1068ce2..0dd5be44655a 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 @@ -82,15 +82,17 @@ def test__get_default_mtls_endpoint(): assert VpnTunnelsClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_vpn_tunnels_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [VpnTunnelsClient,]) +def test_vpn_tunnels_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = VpnTunnelsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -104,9 +106,11 @@ def test_vpn_tunnels_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 5fccf058ad33..544dd93eb82e 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 @@ -85,15 +85,17 @@ def test__get_default_mtls_endpoint(): ) -def test_zone_operations_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [ZoneOperationsClient,]) +def test_zone_operations_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = ZoneOperationsClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -107,9 +109,11 @@ def test_zone_operations_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" 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 25d3ec804546..ff94d158c02c 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 @@ -79,15 +79,17 @@ def test__get_default_mtls_endpoint(): assert ZonesClient._get_default_mtls_endpoint(non_googleapi) == non_googleapi -def test_zones_client_from_service_account_info(): +@pytest.mark.parametrize("client_class", [ZonesClient,]) +def test_zones_client_from_service_account_info(client_class): creds = credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = ZonesClient.from_service_account_info(info) + client = client_class.from_service_account_info(info) assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443" @@ -101,9 +103,11 @@ def test_zones_client_from_service_account_file(client_class): factory.return_value = creds client = client_class.from_service_account_file("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) client = client_class.from_service_account_json("dummy/file/path.json") assert client.transport._credentials == creds + assert isinstance(client, client_class) assert client.transport._host == "compute.googleapis.com:443"