diff --git a/google/cloud/bigquery_datatransfer/__init__.py b/google/cloud/bigquery_datatransfer/__init__.py index 9d6ca4d..709e170 100644 --- a/google/cloud/bigquery_datatransfer/__init__.py +++ b/google/cloud/bigquery_datatransfer/__init__.py @@ -52,6 +52,7 @@ ) from google.cloud.bigquery_datatransfer_v1.types.transfer import ( EmailPreferences, + EncryptionConfiguration, ScheduleOptions, TransferConfig, TransferMessage, @@ -89,6 +90,7 @@ "StartManualTransferRunsResponse", "UpdateTransferConfigRequest", "EmailPreferences", + "EncryptionConfiguration", "ScheduleOptions", "TransferConfig", "TransferMessage", diff --git a/google/cloud/bigquery_datatransfer_v1/__init__.py b/google/cloud/bigquery_datatransfer_v1/__init__.py index 15ec03c..79c9ec3 100644 --- a/google/cloud/bigquery_datatransfer_v1/__init__.py +++ b/google/cloud/bigquery_datatransfer_v1/__init__.py @@ -50,6 +50,7 @@ ) from .types.transfer import ( EmailPreferences, + EncryptionConfiguration, ScheduleOptions, TransferConfig, TransferMessage, @@ -70,6 +71,7 @@ "DeleteTransferConfigRequest", "DeleteTransferRunRequest", "EmailPreferences", + "EncryptionConfiguration", "EnrollDataSourcesRequest", "GetDataSourceRequest", "GetTransferConfigRequest", diff --git a/google/cloud/bigquery_datatransfer_v1/types/__init__.py b/google/cloud/bigquery_datatransfer_v1/types/__init__.py index 42133c2..51d83e9 100644 --- a/google/cloud/bigquery_datatransfer_v1/types/__init__.py +++ b/google/cloud/bigquery_datatransfer_v1/types/__init__.py @@ -41,6 +41,7 @@ ) from .transfer import ( EmailPreferences, + EncryptionConfiguration, ScheduleOptions, TransferConfig, TransferMessage, @@ -76,6 +77,7 @@ "StartManualTransferRunsResponse", "UpdateTransferConfigRequest", "EmailPreferences", + "EncryptionConfiguration", "ScheduleOptions", "TransferConfig", "TransferMessage", diff --git a/google/cloud/bigquery_datatransfer_v1/types/datatransfer.py b/google/cloud/bigquery_datatransfer_v1/types/datatransfer.py index 8aeeb33..6ef903b 100644 --- a/google/cloud/bigquery_datatransfer_v1/types/datatransfer.py +++ b/google/cloud/bigquery_datatransfer_v1/types/datatransfer.py @@ -122,6 +122,8 @@ class Type(proto.Enum): Deprecated. This field has no effect. PLUS_PAGE (6): Page ID for a Google+ Page. + LIST (7): + List of strings parameter. """ TYPE_UNSPECIFIED = 0 STRING = 1 @@ -130,6 +132,7 @@ class Type(proto.Enum): BOOLEAN = 4 RECORD = 5 PLUS_PAGE = 6 + LIST = 7 param_id: str = proto.Field( proto.STRING, @@ -1064,13 +1067,17 @@ class StartManualTransferRunsRequest(proto.Message): ``projects/{project_id}/transferConfigs/{config_id}`` or ``projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}``. requested_time_range (google.cloud.bigquery_datatransfer_v1.types.StartManualTransferRunsRequest.TimeRange): - Time range for the transfer runs that should - be started. + A time_range start and end timestamp for historical data + files or reports that are scheduled to be transferred by the + scheduled transfer run. requested_time_range must be a past + time and cannot include future time values. This field is a member of `oneof`_ ``time``. requested_run_time (google.protobuf.timestamp_pb2.Timestamp): - Specific run_time for a transfer run to be started. The - requested_run_time must not be in the future. + A run_time timestamp for historical data files or reports + that are scheduled to be transferred by the scheduled + transfer run. requested_run_time must be a past time and + cannot include future time values. This field is a member of `oneof`_ ``time``. """ diff --git a/google/cloud/bigquery_datatransfer_v1/types/transfer.py b/google/cloud/bigquery_datatransfer_v1/types/transfer.py index f4f5aff..e7c1eff 100644 --- a/google/cloud/bigquery_datatransfer_v1/types/transfer.py +++ b/google/cloud/bigquery_datatransfer_v1/types/transfer.py @@ -19,6 +19,7 @@ from google.protobuf import struct_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore +from google.protobuf import wrappers_pb2 # type: ignore from google.rpc import status_pb2 # type: ignore import proto # type: ignore @@ -31,6 +32,7 @@ "ScheduleOptions", "UserInfo", "TransferConfig", + "EncryptionConfiguration", "TransferRun", "TransferMessage", }, @@ -262,6 +264,15 @@ class TransferConfig(proto.Message): populated. This field is a member of `oneof`_ ``_owner_info``. + encryption_configuration (google.cloud.bigquery_datatransfer_v1.types.EncryptionConfiguration): + The encryption configuration part. Currently, + it is only used for the optional KMS key name. + The BigQuery service account of your project + must be granted permissions to use the key. Read + methods will return the key name applied in + effect. Write methods will apply the key if it + is present, or otherwise try to apply project + default keys if it is absent. """ name: str = proto.Field( @@ -341,6 +352,27 @@ class TransferConfig(proto.Message): optional=True, message="UserInfo", ) + encryption_configuration: "EncryptionConfiguration" = proto.Field( + proto.MESSAGE, + number=28, + message="EncryptionConfiguration", + ) + + +class EncryptionConfiguration(proto.Message): + r"""Represents the encryption configuration for a transfer. + + Attributes: + kms_key_name (google.protobuf.wrappers_pb2.StringValue): + The name of the KMS key used for encrypting + BigQuery data. + """ + + kms_key_name: wrappers_pb2.StringValue = proto.Field( + proto.MESSAGE, + number=1, + message=wrappers_pb2.StringValue, + ) class TransferRun(proto.Message): diff --git a/tests/unit/gapic/bigquery_datatransfer_v1/test_data_transfer_service.py b/tests/unit/gapic/bigquery_datatransfer_v1/test_data_transfer_service.py index b9d67e1..faa28f6 100644 --- a/tests/unit/gapic/bigquery_datatransfer_v1/test_data_transfer_service.py +++ b/tests/unit/gapic/bigquery_datatransfer_v1/test_data_transfer_service.py @@ -39,6 +39,7 @@ from google.protobuf import json_format from google.protobuf import struct_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore +from google.protobuf import wrappers_pb2 # type: ignore from google.rpc import status_pb2 # type: ignore import grpc from grpc.experimental import aio @@ -5923,6 +5924,7 @@ def test_create_transfer_config_rest(request_type): "notification_pubsub_topic": "notification_pubsub_topic_value", "email_preferences": {"enable_failure_email": True}, "owner_info": {"email": "email_value"}, + "encryption_configuration": {"kms_key_name": {"value": "value_value"}}, } request = request_type(**request_init) @@ -6165,6 +6167,7 @@ def test_create_transfer_config_rest_bad_request( "notification_pubsub_topic": "notification_pubsub_topic_value", "email_preferences": {"enable_failure_email": True}, "owner_info": {"email": "email_value"}, + "encryption_configuration": {"kms_key_name": {"value": "value_value"}}, } request = request_type(**request_init) @@ -6285,6 +6288,7 @@ def test_update_transfer_config_rest(request_type): "notification_pubsub_topic": "notification_pubsub_topic_value", "email_preferences": {"enable_failure_email": True}, "owner_info": {"email": "email_value"}, + "encryption_configuration": {"kms_key_name": {"value": "value_value"}}, } request = request_type(**request_init) @@ -6528,6 +6532,7 @@ def test_update_transfer_config_rest_bad_request( "notification_pubsub_topic": "notification_pubsub_topic_value", "email_preferences": {"enable_failure_email": True}, "owner_info": {"email": "email_value"}, + "encryption_configuration": {"kms_key_name": {"value": "value_value"}}, } request = request_type(**request_init)