From c75601a6c12a49df38bf363de2ea45abc9b85278 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 6 Aug 2019 09:24:29 -0700 Subject: [PATCH] Remove send/recv msg size limit (via synth). (#8953) --- .../cloud/dlp_v2/gapic/dlp_service_client.py | 120 +++++++++--------- .../transports/dlp_service_grpc_transport.py | 9 +- packages/google-cloud-dlp/synth.metadata | 10 +- 3 files changed, 73 insertions(+), 66 deletions(-) diff --git a/packages/google-cloud-dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py b/packages/google-cloud-dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py index cd5414ee781f..d44f76ef23c7 100644 --- a/packages/google-cloud-dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py +++ b/packages/google-cloud-dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py @@ -328,8 +328,8 @@ def inspect_content( the template. Repeated fields are appended. Singular sub-messages and groups are recursively merged. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -427,8 +427,8 @@ def redact_image( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dlp_v2.types.ByteContentItem` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -539,8 +539,8 @@ def deidentify_content( fields in the template. Repeated fields are appended. Singular sub-messages and groups are recursively merged. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -653,8 +653,8 @@ def reidentify_content( their corresponding fields in the template. Repeated fields are appended. Singular sub-messages and groups are recursively merged. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -734,8 +734,8 @@ def list_info_types( filter_ (str): Optional filter to only return infoTypes supported by certain parts of the API. Defaults to supported\_by=INSPECT. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -805,8 +805,8 @@ def create_inspect_template( ``[a-zA-Z\\d-_]+``. The maximum length is 100 characters. Can be empty to allow the system to generate one. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -889,8 +889,8 @@ def update_inspect_template( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dlp_v2.types.FieldMask` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -961,8 +961,8 @@ def get_inspect_template( example ``organizations/433245324/inspectTemplates/432452342`` or projects/project-id/inspectTemplates/432452342. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -1063,8 +1063,8 @@ def list_inspect_templates( - ``name``: corresponds to template's name. - ``display_name``: corresponds to template's display name. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -1151,8 +1151,8 @@ def delete_inspect_template( example ``organizations/433245324/inspectTemplates/432452342`` or projects/project-id/inspectTemplates/432452342. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -1231,8 +1231,8 @@ def create_deidentify_template( ``[a-zA-Z\\d-_]+``. The maximum length is 100 characters. Can be empty to allow the system to generate one. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -1320,8 +1320,8 @@ def update_deidentify_template( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dlp_v2.types.FieldMask` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -1397,8 +1397,8 @@ def get_deidentify_template( for example ``organizations/433245324/deidentifyTemplates/432452342`` or projects/project-id/deidentifyTemplates/432452342. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -1500,8 +1500,8 @@ def list_deidentify_templates( - ``name``: corresponds to template's name. - ``display_name``: corresponds to template's display name. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -1589,8 +1589,8 @@ def delete_deidentify_template( for example ``organizations/433245324/deidentifyTemplates/432452342`` or projects/project-id/deidentifyTemplates/432452342. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -1676,8 +1676,8 @@ def create_dlp_job( ``[a-zA-Z\\d-_]+``. The maximum length is 100 characters. Can be empty to allow the system to generate one. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -1823,8 +1823,8 @@ def list_dlp_jobs( - ``name``: corresponds to job's name. - ``state``: corresponds to ``state`` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -1914,8 +1914,8 @@ def get_dlp_job( Args: name (str): The name of the DlpJob resource. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -1987,8 +1987,8 @@ def delete_dlp_job( Args: name (str): The name of the DlpJob resource to be deleted. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -2057,8 +2057,8 @@ def cancel_dlp_job( Args: name (str): The name of the DlpJob resource to be cancelled. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -2188,8 +2188,8 @@ def list_job_triggers( The length of this field should be no more than 500 characters. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -2275,8 +2275,8 @@ def get_job_trigger( name (str): Resource name of the project and the triggeredJob, for example ``projects/dlp-test-project/jobTriggers/53234423``. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -2347,8 +2347,8 @@ def delete_job_trigger( name (str): Resource name of the project and the triggeredJob, for example ``projects/dlp-test-project/jobTriggers/53234423``. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -2425,8 +2425,8 @@ def update_job_trigger( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dlp_v2.types.FieldMask` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -2508,8 +2508,8 @@ def create_job_trigger( ``[a-zA-Z\\d-_]+``. The maximum length is 100 characters. Can be empty to allow the system to generate one. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -2592,8 +2592,8 @@ def create_stored_info_type( ``[a-zA-Z\\d-_]+``. The maximum length is 100 characters. Can be empty to allow the system to generate one. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -2680,8 +2680,8 @@ def update_stored_info_type( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dlp_v2.types.FieldMask` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -2755,8 +2755,8 @@ def get_stored_info_type( example ``organizations/433245324/storedInfoTypes/432452342`` or projects/project-id/storedInfoTypes/432452342. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -2859,8 +2859,8 @@ def list_stored_info_types( - ``name``: corresponds to resource name. - ``display_name``: corresponds to info type's display name. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -2948,8 +2948,8 @@ def delete_stored_info_type( example ``organizations/433245324/storedInfoTypes/432452342`` or projects/project-id/storedInfoTypes/432452342. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. diff --git a/packages/google-cloud-dlp/google/cloud/dlp_v2/gapic/transports/dlp_service_grpc_transport.py b/packages/google-cloud-dlp/google/cloud/dlp_v2/gapic/transports/dlp_service_grpc_transport.py index 4622c588d8f8..ad5e2e8d4957 100644 --- a/packages/google-cloud-dlp/google/cloud/dlp_v2/gapic/transports/dlp_service_grpc_transport.py +++ b/packages/google-cloud-dlp/google/cloud/dlp_v2/gapic/transports/dlp_service_grpc_transport.py @@ -58,7 +58,14 @@ def __init__( # Create the channel. if channel is None: - channel = self.create_channel(address=address, credentials=credentials) + channel = self.create_channel( + address=address, + credentials=credentials, + options={ + "grpc.max_send_message_length": -1, + "grpc.max_receive_message_length": -1, + }.items(), + ) self._channel = channel diff --git a/packages/google-cloud-dlp/synth.metadata b/packages/google-cloud-dlp/synth.metadata index a21c2c086963..6ed9ce34fb47 100644 --- a/packages/google-cloud-dlp/synth.metadata +++ b/packages/google-cloud-dlp/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-07-04T12:19:26.170968Z", + "updateTime": "2019-08-06T12:23:29.991839Z", "sources": [ { "generator": { "name": "artman", - "version": "0.29.3", - "dockerImage": "googleapis/artman@sha256:8900f94a81adaab0238965aa8a7b3648791f4f3a95ee65adc6a56cfcc3753101" + "version": "0.32.1", + "dockerImage": "googleapis/artman@sha256:a684d40ba9a4e15946f5f2ca6b4bd9fe301192f522e9de4fff622118775f309b" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "b4c73face84fefb967ef6c72f0eae64faf67895f", - "internalRef": "256453142" + "sha": "e699b0cba64ffddfae39633417180f1f65875896", + "internalRef": "261759677" } }, {