diff --git a/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery/datapolicies_v1/services/data_policy_service/transports/rest.py b/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery/datapolicies_v1/services/data_policy_service/transports/rest.py index d19492339f95..3614c5ac1e21 100644 --- a/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery/datapolicies_v1/services/data_policy_service/transports/rest.py +++ b/packages/google-cloud-bigquery-datapolicies/google/cloud/bigquery/datapolicies_v1/services/data_policy_service/transports/rest.py @@ -51,10 +51,6 @@ rest_version=requests_version, ) -# TODO (numeric enums): This file was generated with the option to -# request that the server respond with enums JSON-encoded as -# numbers. The code below does not implement that functionality yet. - class DataPolicyServiceRestInterceptor: """Interceptor for DataPolicyService. @@ -71,65 +67,73 @@ class DataPolicyServiceRestInterceptor: .. code-block:: python class MyCustomDataPolicyServiceInterceptor(DataPolicyServiceRestInterceptor): - def pre_create_data_policy(request, metadata): + def pre_create_data_policy(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata - def post_create_data_policy(response): + def post_create_data_policy(self, response): logging.log(f"Received response: {response}") + return response - def pre_delete_data_policy(request, metadata): + def pre_delete_data_policy(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata - def pre_get_data_policy(request, metadata): + def pre_get_data_policy(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata - def post_get_data_policy(response): + def post_get_data_policy(self, response): logging.log(f"Received response: {response}") + return response - def pre_get_iam_policy(request, metadata): + def pre_get_iam_policy(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata - def post_get_iam_policy(response): + def post_get_iam_policy(self, response): logging.log(f"Received response: {response}") + return response - def pre_list_data_policies(request, metadata): + def pre_list_data_policies(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata - def post_list_data_policies(response): + def post_list_data_policies(self, response): logging.log(f"Received response: {response}") + return response - def pre_rename_data_policy(request, metadata): + def pre_rename_data_policy(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata - def post_rename_data_policy(response): + def post_rename_data_policy(self, response): logging.log(f"Received response: {response}") + return response - def pre_set_iam_policy(request, metadata): + def pre_set_iam_policy(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata - def post_set_iam_policy(response): + def post_set_iam_policy(self, response): logging.log(f"Received response: {response}") + return response - def pre_test_iam_permissions(request, metadata): + def pre_test_iam_permissions(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata - def post_test_iam_permissions(response): + def post_test_iam_permissions(self, response): logging.log(f"Received response: {response}") + return response - def pre_update_data_policy(request, metadata): + def pre_update_data_policy(self, request, metadata): logging.log(f"Received request: {request}") return request, metadata - def post_update_data_policy(response): + def post_update_data_policy(self, response): logging.log(f"Received response: {response}") + return response transport = DataPolicyServiceRestTransport(interceptor=MyCustomDataPolicyServiceInterceptor()) client = DataPolicyServiceClient(transport=transport) diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json index 2e37f0a58d98..137ad417ee16 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-datapolicies", - "version": "0.2.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json index 83bcde8488db..007618ce5a7f 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-datapolicies", - "version": "0.2.0" + "version": "0.1.0" }, "snippets": [ {