Skip to content

Commit eabe5cd

Browse files
fix: preserve default values in x-goog-request-params header (#94)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 474338479 Source-Link: googleapis/googleapis@d5d35e0 Source-Link: googleapis/googleapis-gen@efcd3f9 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 feat: add default retry configuration feat: add DeleteTransferJob operation feat: add AWS S3 compatible data source PiperOrigin-RevId: 473348271 Source-Link: googleapis/googleapis@56f2049 Source-Link: googleapis/googleapis-gen@4f0ba4f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGYwYmE0ZmYxMWMxMjkwMDZmNzZiZTY4NDY1ZjhlNjhhNGEzMjgxNCJ9
1 parent ec82df8 commit eabe5cd

12 files changed

+3201
-667
lines changed

packages/google-storagetransfer/protos/google/storagetransfer/v1/transfer.proto

+19-1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ service StorageTransferService {
120120
};
121121
}
122122

123+
// Deletes a transfer job. Deleting a transfer job sets its status to
124+
// [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED].
125+
rpc DeleteTransferJob(DeleteTransferJobRequest) returns (google.protobuf.Empty) {
126+
option (google.api.http) = {
127+
delete: "/v1/{job_name=transferJobs/**}"
128+
};
129+
}
130+
123131
// Creates an agent pool resource.
124132
rpc CreateAgentPool(CreateAgentPoolRequest) returns (AgentPool) {
125133
option (google.api.http) = {
@@ -194,7 +202,7 @@ message UpdateTransferJobRequest {
194202
// other fields are rejected with the error
195203
// [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a job status
196204
// to [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires
197-
// `storagetransfer.jobs.delete` permissions.
205+
// `storagetransfer.jobs.delete` permission.
198206
TransferJob transfer_job = 3 [(google.api.field_behavior) = REQUIRED];
199207

200208
// The field mask of the fields in `transferJob` that are to be updated in
@@ -220,6 +228,16 @@ message GetTransferJobRequest {
220228
string project_id = 2 [(google.api.field_behavior) = REQUIRED];
221229
}
222230

231+
// Request passed to DeleteTransferJob.
232+
message DeleteTransferJobRequest {
233+
// Required. The job to delete.
234+
string job_name = 1 [(google.api.field_behavior) = REQUIRED];
235+
236+
// Required. The ID of the Google Cloud project that owns the
237+
// job.
238+
string project_id = 2 [(google.api.field_behavior) = REQUIRED];
239+
}
240+
223241
// `projectId`, `jobNames`, and `jobStatuses` are query parameters that can
224242
// be specified when listing transfer jobs.
225243
message ListTransferJobsRequest {

packages/google-storagetransfer/protos/google/storagetransfer/v1/transfer_types.proto

+114-8
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,108 @@ message PosixFilesystem {
319319
string root_directory = 1;
320320
}
321321

322+
// An AwsS3CompatibleData resource.
323+
message AwsS3CompatibleData {
324+
// Required. Specifies the name of the bucket.
325+
string bucket_name = 1 [(google.api.field_behavior) = REQUIRED];
326+
327+
// Specifies the root path to transfer objects.
328+
//
329+
// Must be an empty string or full path name that ends with a '/'. This
330+
// field is treated as an object prefix. As such, it should generally not
331+
// begin with a '/'.
332+
string path = 2;
333+
334+
// Required. Specifies the endpoint of the storage service.
335+
string endpoint = 3 [(google.api.field_behavior) = REQUIRED];
336+
337+
// Specifies the region to sign requests with. This can be left blank if
338+
// requests should be signed with an empty region.
339+
string region = 5;
340+
341+
// Specifies the metadata of the S3 compatible data provider. Each provider
342+
// may contain some attributes that do not apply to all S3-compatible data
343+
// providers. When not specified, S3CompatibleMetadata is used by default.
344+
oneof data_provider {
345+
// A S3 compatible metadata.
346+
S3CompatibleMetadata s3_metadata = 4;
347+
}
348+
}
349+
350+
// S3CompatibleMetadata contains the metadata fields that apply to the basic
351+
// types of S3-compatible data providers.
352+
message S3CompatibleMetadata {
353+
// The authentication and authorization method used by the storage service.
354+
enum AuthMethod {
355+
// AuthMethod is not specified.
356+
AUTH_METHOD_UNSPECIFIED = 0;
357+
358+
// Auth requests with AWS SigV4.
359+
AUTH_METHOD_AWS_SIGNATURE_V4 = 1;
360+
361+
// Auth requests with AWS SigV2.
362+
AUTH_METHOD_AWS_SIGNATURE_V2 = 2;
363+
}
364+
365+
// The request model of the API.
366+
enum RequestModel {
367+
// RequestModel is not specified.
368+
REQUEST_MODEL_UNSPECIFIED = 0;
369+
370+
// Perform requests using Virtual Hosted Style.
371+
// Example: https://bucket-name.s3.region.amazonaws.com/key-name
372+
REQUEST_MODEL_VIRTUAL_HOSTED_STYLE = 1;
373+
374+
// Perform requests using Path Style.
375+
// Example: https://s3.region.amazonaws.com/bucket-name/key-name
376+
REQUEST_MODEL_PATH_STYLE = 2;
377+
}
378+
379+
// The agent network protocol to access the storage service.
380+
enum NetworkProtocol {
381+
// NetworkProtocol is not specified.
382+
NETWORK_PROTOCOL_UNSPECIFIED = 0;
383+
384+
// Perform requests using HTTPS.
385+
NETWORK_PROTOCOL_HTTPS = 1;
386+
387+
// Not recommended: This sends data in clear-text. This is only
388+
// appropriate within a closed network or for publicly available data.
389+
// Perform requests using HTTP.
390+
NETWORK_PROTOCOL_HTTP = 2;
391+
}
392+
393+
// The Listing API to use for discovering objects.
394+
enum ListApi {
395+
// ListApi is not specified.
396+
LIST_API_UNSPECIFIED = 0;
397+
398+
// Perform listing using ListObjectsV2 API.
399+
LIST_OBJECTS_V2 = 1;
400+
401+
// Legacy ListObjects API.
402+
LIST_OBJECTS = 2;
403+
}
404+
405+
// Specifies the authentication and authorization method used by the storage
406+
// service. When not specified, Transfer Service will attempt to determine
407+
// right auth method to use.
408+
AuthMethod auth_method = 1;
409+
410+
// Specifies the API request model used to call the storage service. When not
411+
// specified, the default value of RequestModel
412+
// REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used.
413+
RequestModel request_model = 2;
414+
415+
// Specifies the network protocol of the agent. When not specified, the
416+
// default value of NetworkProtocol NETWORK_PROTOCOL_HTTPS is used.
417+
NetworkProtocol protocol = 3;
418+
419+
// The Listing API to use for discovering objects. When not specified,
420+
// Transfer Service will attempt to determine the right API to use.
421+
ListApi list_api = 4;
422+
}
423+
322424
// Represents an On-Premises Agent pool.
323425
message AgentPool {
324426
option (google.api.resource) = {
@@ -372,17 +474,19 @@ message TransferOptions {
372474
// Specifies when to overwrite an object in the sink when an object with
373475
// matching name is found in the source.
374476
enum OverwriteWhen {
375-
// Indicate the option is not set.
477+
// Overwrite behavior is unspecified.
376478
OVERWRITE_WHEN_UNSPECIFIED = 0;
377479

378-
// Overwrite destination object with source if the two objects are
379-
// different.
480+
// Overwrites destination objects with the source objects, only if the
481+
// objects have the same name but different HTTP ETags or checksum values.
380482
DIFFERENT = 1;
381483

382-
// Never overwrite destination object.
484+
// Never overwrites a destination object if a source object has the
485+
// same name. In this case, the source object is not transferred.
383486
NEVER = 2;
384487

385-
// Always overwrite destination object.
488+
// Always overwrite the destination object with the source object, even if
489+
// the HTTP Etags or checksum values are the same.
386490
ALWAYS = 3;
387491
}
388492

@@ -405,13 +509,12 @@ message TransferOptions {
405509
// exclusive.
406510
bool delete_objects_from_source_after_transfer = 3;
407511

408-
// When to overwrite objects that already exist in the sink. If not set
512+
// When to overwrite objects that already exist in the sink. If not set,
409513
// overwrite behavior is determined by
410514
// [overwrite_objects_already_existing_in_sink][google.storagetransfer.v1.TransferOptions.overwrite_objects_already_existing_in_sink].
411515
OverwriteWhen overwrite_when = 4;
412516

413-
// Represents the selected metadata options for a transfer job. This feature
414-
// is in Preview.
517+
// Represents the selected metadata options for a transfer job.
415518
MetadataOptions metadata_options = 5;
416519
}
417520

@@ -442,6 +545,9 @@ message TransferSpec {
442545

443546
// An Azure Blob Storage data source.
444547
AzureBlobStorageData azure_blob_storage_data_source = 8;
548+
549+
// An AWS S3 compatible data source.
550+
AwsS3CompatibleData aws_s3_compatible_data_source = 19;
445551
}
446552

447553
// Represents a supported data container type which is required for transfer

0 commit comments

Comments
 (0)