google-cloud-storage_transfer-v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +167 -0
- data/LICENSE.md +201 -0
- data/README.md +139 -0
- data/lib/google-cloud-storage_transfer-v1.rb +21 -0
- data/lib/google/cloud/storage_transfer/v1.rb +38 -0
- data/lib/google/cloud/storage_transfer/v1/storage_transfer_service.rb +51 -0
- data/lib/google/cloud/storage_transfer/v1/storage_transfer_service/client.rb +964 -0
- data/lib/google/cloud/storage_transfer/v1/storage_transfer_service/credentials.rb +47 -0
- data/lib/google/cloud/storage_transfer/v1/storage_transfer_service/operations.rb +664 -0
- data/lib/google/cloud/storage_transfer/v1/version.rb +28 -0
- data/lib/google/storagetransfer/v1/transfer_pb.rb +70 -0
- data/lib/google/storagetransfer/v1/transfer_services_pb.rb +77 -0
- data/lib/google/storagetransfer/v1/transfer_types_pb.rb +193 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/resource.rb +283 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/google/rpc/code.rb +185 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/storagetransfer/v1/transfer.rb +167 -0
- data/proto_docs/google/storagetransfer/v1/transfer_types.rb +790 -0
- data/proto_docs/google/type/date.rb +53 -0
- data/proto_docs/google/type/timeofday.rb +45 -0
- metadata +222 -0
@@ -0,0 +1,185 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Rpc
|
22
|
+
# The canonical error codes for gRPC APIs.
|
23
|
+
#
|
24
|
+
#
|
25
|
+
# Sometimes multiple error codes may apply. Services should return
|
26
|
+
# the most specific error code that applies. For example, prefer
|
27
|
+
# `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.
|
28
|
+
# Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.
|
29
|
+
module Code
|
30
|
+
# Not an error; returned on success
|
31
|
+
#
|
32
|
+
# HTTP Mapping: 200 OK
|
33
|
+
OK = 0
|
34
|
+
|
35
|
+
# The operation was cancelled, typically by the caller.
|
36
|
+
#
|
37
|
+
# HTTP Mapping: 499 Client Closed Request
|
38
|
+
CANCELLED = 1
|
39
|
+
|
40
|
+
# Unknown error. For example, this error may be returned when
|
41
|
+
# a `Status` value received from another address space belongs to
|
42
|
+
# an error space that is not known in this address space. Also
|
43
|
+
# errors raised by APIs that do not return enough error information
|
44
|
+
# may be converted to this error.
|
45
|
+
#
|
46
|
+
# HTTP Mapping: 500 Internal Server Error
|
47
|
+
UNKNOWN = 2
|
48
|
+
|
49
|
+
# The client specified an invalid argument. Note that this differs
|
50
|
+
# from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments
|
51
|
+
# that are problematic regardless of the state of the system
|
52
|
+
# (e.g., a malformed file name).
|
53
|
+
#
|
54
|
+
# HTTP Mapping: 400 Bad Request
|
55
|
+
INVALID_ARGUMENT = 3
|
56
|
+
|
57
|
+
# The deadline expired before the operation could complete. For operations
|
58
|
+
# that change the state of the system, this error may be returned
|
59
|
+
# even if the operation has completed successfully. For example, a
|
60
|
+
# successful response from a server could have been delayed long
|
61
|
+
# enough for the deadline to expire.
|
62
|
+
#
|
63
|
+
# HTTP Mapping: 504 Gateway Timeout
|
64
|
+
DEADLINE_EXCEEDED = 4
|
65
|
+
|
66
|
+
# Some requested entity (e.g., file or directory) was not found.
|
67
|
+
#
|
68
|
+
# Note to server developers: if a request is denied for an entire class
|
69
|
+
# of users, such as gradual feature rollout or undocumented whitelist,
|
70
|
+
# `NOT_FOUND` may be used. If a request is denied for some users within
|
71
|
+
# a class of users, such as user-based access control, `PERMISSION_DENIED`
|
72
|
+
# must be used.
|
73
|
+
#
|
74
|
+
# HTTP Mapping: 404 Not Found
|
75
|
+
NOT_FOUND = 5
|
76
|
+
|
77
|
+
# The entity that a client attempted to create (e.g., file or directory)
|
78
|
+
# already exists.
|
79
|
+
#
|
80
|
+
# HTTP Mapping: 409 Conflict
|
81
|
+
ALREADY_EXISTS = 6
|
82
|
+
|
83
|
+
# The caller does not have permission to execute the specified
|
84
|
+
# operation. `PERMISSION_DENIED` must not be used for rejections
|
85
|
+
# caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
|
86
|
+
# instead for those errors). `PERMISSION_DENIED` must not be
|
87
|
+
# used if the caller can not be identified (use `UNAUTHENTICATED`
|
88
|
+
# instead for those errors). This error code does not imply the
|
89
|
+
# request is valid or the requested entity exists or satisfies
|
90
|
+
# other pre-conditions.
|
91
|
+
#
|
92
|
+
# HTTP Mapping: 403 Forbidden
|
93
|
+
PERMISSION_DENIED = 7
|
94
|
+
|
95
|
+
# The request does not have valid authentication credentials for the
|
96
|
+
# operation.
|
97
|
+
#
|
98
|
+
# HTTP Mapping: 401 Unauthorized
|
99
|
+
UNAUTHENTICATED = 16
|
100
|
+
|
101
|
+
# Some resource has been exhausted, perhaps a per-user quota, or
|
102
|
+
# perhaps the entire file system is out of space.
|
103
|
+
#
|
104
|
+
# HTTP Mapping: 429 Too Many Requests
|
105
|
+
RESOURCE_EXHAUSTED = 8
|
106
|
+
|
107
|
+
# The operation was rejected because the system is not in a state
|
108
|
+
# required for the operation's execution. For example, the directory
|
109
|
+
# to be deleted is non-empty, an rmdir operation is applied to
|
110
|
+
# a non-directory, etc.
|
111
|
+
#
|
112
|
+
# Service implementors can use the following guidelines to decide
|
113
|
+
# between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
|
114
|
+
# (a) Use `UNAVAILABLE` if the client can retry just the failing call.
|
115
|
+
# (b) Use `ABORTED` if the client should retry at a higher level
|
116
|
+
# (e.g., when a client-specified test-and-set fails, indicating the
|
117
|
+
# client should restart a read-modify-write sequence).
|
118
|
+
# (c) Use `FAILED_PRECONDITION` if the client should not retry until
|
119
|
+
# the system state has been explicitly fixed. E.g., if an "rmdir"
|
120
|
+
# fails because the directory is non-empty, `FAILED_PRECONDITION`
|
121
|
+
# should be returned since the client should not retry unless
|
122
|
+
# the files are deleted from the directory.
|
123
|
+
#
|
124
|
+
# HTTP Mapping: 400 Bad Request
|
125
|
+
FAILED_PRECONDITION = 9
|
126
|
+
|
127
|
+
# The operation was aborted, typically due to a concurrency issue such as
|
128
|
+
# a sequencer check failure or transaction abort.
|
129
|
+
#
|
130
|
+
# See the guidelines above for deciding between `FAILED_PRECONDITION`,
|
131
|
+
# `ABORTED`, and `UNAVAILABLE`.
|
132
|
+
#
|
133
|
+
# HTTP Mapping: 409 Conflict
|
134
|
+
ABORTED = 10
|
135
|
+
|
136
|
+
# The operation was attempted past the valid range. E.g., seeking or
|
137
|
+
# reading past end-of-file.
|
138
|
+
#
|
139
|
+
# Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
|
140
|
+
# be fixed if the system state changes. For example, a 32-bit file
|
141
|
+
# system will generate `INVALID_ARGUMENT` if asked to read at an
|
142
|
+
# offset that is not in the range [0,2^32-1], but it will generate
|
143
|
+
# `OUT_OF_RANGE` if asked to read from an offset past the current
|
144
|
+
# file size.
|
145
|
+
#
|
146
|
+
# There is a fair bit of overlap between `FAILED_PRECONDITION` and
|
147
|
+
# `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific
|
148
|
+
# error) when it applies so that callers who are iterating through
|
149
|
+
# a space can easily look for an `OUT_OF_RANGE` error to detect when
|
150
|
+
# they are done.
|
151
|
+
#
|
152
|
+
# HTTP Mapping: 400 Bad Request
|
153
|
+
OUT_OF_RANGE = 11
|
154
|
+
|
155
|
+
# The operation is not implemented or is not supported/enabled in this
|
156
|
+
# service.
|
157
|
+
#
|
158
|
+
# HTTP Mapping: 501 Not Implemented
|
159
|
+
UNIMPLEMENTED = 12
|
160
|
+
|
161
|
+
# Internal errors. This means that some invariants expected by the
|
162
|
+
# underlying system have been broken. This error code is reserved
|
163
|
+
# for serious errors.
|
164
|
+
#
|
165
|
+
# HTTP Mapping: 500 Internal Server Error
|
166
|
+
INTERNAL = 13
|
167
|
+
|
168
|
+
# The service is currently unavailable. This is most likely a
|
169
|
+
# transient condition, which can be corrected by retrying with
|
170
|
+
# a backoff. Note that it is not always safe to retry
|
171
|
+
# non-idempotent operations.
|
172
|
+
#
|
173
|
+
# See the guidelines above for deciding between `FAILED_PRECONDITION`,
|
174
|
+
# `ABORTED`, and `UNAVAILABLE`.
|
175
|
+
#
|
176
|
+
# HTTP Mapping: 503 Service Unavailable
|
177
|
+
UNAVAILABLE = 14
|
178
|
+
|
179
|
+
# Unrecoverable data loss or corruption.
|
180
|
+
#
|
181
|
+
# HTTP Mapping: 500 Internal Server Error
|
182
|
+
DATA_LOSS = 15
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Rpc
|
22
|
+
# The `Status` type defines a logical error model that is suitable for
|
23
|
+
# different programming environments, including REST APIs and RPC APIs. It is
|
24
|
+
# used by [gRPC](https://github.com/grpc). Each `Status` message contains
|
25
|
+
# three pieces of data: error code, error message, and error details.
|
26
|
+
#
|
27
|
+
# You can find out more about this error model and how to work with it in the
|
28
|
+
# [API Design Guide](https://cloud.google.com/apis/design/errors).
|
29
|
+
# @!attribute [rw] code
|
30
|
+
# @return [::Integer]
|
31
|
+
# The status code, which should be an enum value of {::Google::Rpc::Code google.rpc.Code}.
|
32
|
+
# @!attribute [rw] message
|
33
|
+
# @return [::String]
|
34
|
+
# A developer-facing error message, which should be in English. Any
|
35
|
+
# user-facing error message should be localized and sent in the
|
36
|
+
# {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized by the client.
|
37
|
+
# @!attribute [rw] details
|
38
|
+
# @return [::Array<::Google::Protobuf::Any>]
|
39
|
+
# A list of messages that carry the error details. There is a common set of
|
40
|
+
# message types for APIs to use.
|
41
|
+
class Status
|
42
|
+
include ::Google::Protobuf::MessageExts
|
43
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,167 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module StorageTransfer
|
23
|
+
module V1
|
24
|
+
# Request passed to GetGoogleServiceAccount.
|
25
|
+
# @!attribute [rw] project_id
|
26
|
+
# @return [::String]
|
27
|
+
# Required. The ID of the Google Cloud Platform Console project that the
|
28
|
+
# Google service account is associated with.
|
29
|
+
class GetGoogleServiceAccountRequest
|
30
|
+
include ::Google::Protobuf::MessageExts
|
31
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
32
|
+
end
|
33
|
+
|
34
|
+
# Request passed to CreateTransferJob.
|
35
|
+
# @!attribute [rw] transfer_job
|
36
|
+
# @return [::Google::Cloud::StorageTransfer::V1::TransferJob]
|
37
|
+
# Required. The job to create.
|
38
|
+
class CreateTransferJobRequest
|
39
|
+
include ::Google::Protobuf::MessageExts
|
40
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
41
|
+
end
|
42
|
+
|
43
|
+
# Request passed to UpdateTransferJob.
|
44
|
+
# @!attribute [rw] job_name
|
45
|
+
# @return [::String]
|
46
|
+
# Required. The name of job to update.
|
47
|
+
# @!attribute [rw] project_id
|
48
|
+
# @return [::String]
|
49
|
+
# Required. The ID of the Google Cloud Platform Console project that owns the
|
50
|
+
# job.
|
51
|
+
# @!attribute [rw] transfer_job
|
52
|
+
# @return [::Google::Cloud::StorageTransfer::V1::TransferJob]
|
53
|
+
# Required. The job to update. `transferJob` is expected to specify only
|
54
|
+
# four fields:
|
55
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferJob#description description},
|
56
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferJob#transfer_spec transfer_spec},
|
57
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferJob#notification_config notification_config},
|
58
|
+
# and {::Google::Cloud::StorageTransfer::V1::TransferJob#status status}. An
|
59
|
+
# `UpdateTransferJobRequest` that specifies other fields are rejected with
|
60
|
+
# the error {::Google::Rpc::Code::INVALID_ARGUMENT INVALID_ARGUMENT}. Updating a
|
61
|
+
# job status to
|
62
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::DELETED DELETED} requires
|
63
|
+
# `storagetransfer.jobs.delete` permissions.
|
64
|
+
# @!attribute [rw] update_transfer_job_field_mask
|
65
|
+
# @return [::Google::Protobuf::FieldMask]
|
66
|
+
# The field mask of the fields in `transferJob` that are to be updated in
|
67
|
+
# this request. Fields in `transferJob` that can be updated are:
|
68
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferJob#description description},
|
69
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferJob#transfer_spec transfer_spec},
|
70
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferJob#notification_config notification_config},
|
71
|
+
# and {::Google::Cloud::StorageTransfer::V1::TransferJob#status status}. To update the
|
72
|
+
# `transfer_spec` of the job, a complete transfer specification must be
|
73
|
+
# provided. An incomplete specification missing any required fields is
|
74
|
+
# rejected with the error
|
75
|
+
# {::Google::Rpc::Code::INVALID_ARGUMENT INVALID_ARGUMENT}.
|
76
|
+
class UpdateTransferJobRequest
|
77
|
+
include ::Google::Protobuf::MessageExts
|
78
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
79
|
+
end
|
80
|
+
|
81
|
+
# Request passed to GetTransferJob.
|
82
|
+
# @!attribute [rw] job_name
|
83
|
+
# @return [::String]
|
84
|
+
# Required.
|
85
|
+
# The job to get.
|
86
|
+
# @!attribute [rw] project_id
|
87
|
+
# @return [::String]
|
88
|
+
# Required. The ID of the Google Cloud Platform Console project that owns the
|
89
|
+
# job.
|
90
|
+
class GetTransferJobRequest
|
91
|
+
include ::Google::Protobuf::MessageExts
|
92
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
93
|
+
end
|
94
|
+
|
95
|
+
# `projectId`, `jobNames`, and `jobStatuses` are query parameters that can
|
96
|
+
# be specified when listing transfer jobs.
|
97
|
+
# @!attribute [rw] filter
|
98
|
+
# @return [::String]
|
99
|
+
# Required. A list of query parameters specified as JSON text in the form of:
|
100
|
+
# `{"projectId":"my_project_id",
|
101
|
+
# "jobNames":["jobid1","jobid2",...],
|
102
|
+
# "jobStatuses":["status1","status2",...]}`
|
103
|
+
#
|
104
|
+
# Since `jobNames` and `jobStatuses` support multiple values, their values
|
105
|
+
# must be specified with array notation. `projectId` is required.
|
106
|
+
# `jobNames` and `jobStatuses` are optional. The valid values for
|
107
|
+
# `jobStatuses` are case-insensitive:
|
108
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::ENABLED ENABLED},
|
109
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::DISABLED DISABLED}, and
|
110
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::DELETED DELETED}.
|
111
|
+
# @!attribute [rw] page_size
|
112
|
+
# @return [::Integer]
|
113
|
+
# The list page size. The max allowed value is 256.
|
114
|
+
# @!attribute [rw] page_token
|
115
|
+
# @return [::String]
|
116
|
+
# The list page token.
|
117
|
+
class ListTransferJobsRequest
|
118
|
+
include ::Google::Protobuf::MessageExts
|
119
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
120
|
+
end
|
121
|
+
|
122
|
+
# Response from ListTransferJobs.
|
123
|
+
# @!attribute [rw] transfer_jobs
|
124
|
+
# @return [::Array<::Google::Cloud::StorageTransfer::V1::TransferJob>]
|
125
|
+
# A list of transfer jobs.
|
126
|
+
# @!attribute [rw] next_page_token
|
127
|
+
# @return [::String]
|
128
|
+
# The list next page token.
|
129
|
+
class ListTransferJobsResponse
|
130
|
+
include ::Google::Protobuf::MessageExts
|
131
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
132
|
+
end
|
133
|
+
|
134
|
+
# Request passed to PauseTransferOperation.
|
135
|
+
# @!attribute [rw] name
|
136
|
+
# @return [::String]
|
137
|
+
# Required. The name of the transfer operation.
|
138
|
+
class PauseTransferOperationRequest
|
139
|
+
include ::Google::Protobuf::MessageExts
|
140
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
141
|
+
end
|
142
|
+
|
143
|
+
# Request passed to ResumeTransferOperation.
|
144
|
+
# @!attribute [rw] name
|
145
|
+
# @return [::String]
|
146
|
+
# Required. The name of the transfer operation.
|
147
|
+
class ResumeTransferOperationRequest
|
148
|
+
include ::Google::Protobuf::MessageExts
|
149
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
150
|
+
end
|
151
|
+
|
152
|
+
# Request passed to RunTransferJob.
|
153
|
+
# @!attribute [rw] job_name
|
154
|
+
# @return [::String]
|
155
|
+
# Required. The name of the transfer job.
|
156
|
+
# @!attribute [rw] project_id
|
157
|
+
# @return [::String]
|
158
|
+
# Required. The ID of the Google Cloud Platform Console project that owns the
|
159
|
+
# transfer job.
|
160
|
+
class RunTransferJobRequest
|
161
|
+
include ::Google::Protobuf::MessageExts
|
162
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
@@ -0,0 +1,790 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module StorageTransfer
|
23
|
+
module V1
|
24
|
+
# Google service account
|
25
|
+
# @!attribute [rw] account_email
|
26
|
+
# @return [::String]
|
27
|
+
# Email address of the service account.
|
28
|
+
# @!attribute [rw] subject_id
|
29
|
+
# @return [::String]
|
30
|
+
# Unique identifier for the service account.
|
31
|
+
class GoogleServiceAccount
|
32
|
+
include ::Google::Protobuf::MessageExts
|
33
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
34
|
+
end
|
35
|
+
|
36
|
+
# AWS access key (see
|
37
|
+
# [AWS Security
|
38
|
+
# Credentials](https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)).
|
39
|
+
#
|
40
|
+
# For information on our data retention policy for user credentials, see
|
41
|
+
# [User credentials](/storage-transfer/docs/data-retention#user-credentials).
|
42
|
+
# @!attribute [rw] access_key_id
|
43
|
+
# @return [::String]
|
44
|
+
# Required. AWS access key ID.
|
45
|
+
# @!attribute [rw] secret_access_key
|
46
|
+
# @return [::String]
|
47
|
+
# Required. AWS secret access key. This field is not returned in RPC
|
48
|
+
# responses.
|
49
|
+
class AwsAccessKey
|
50
|
+
include ::Google::Protobuf::MessageExts
|
51
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
52
|
+
end
|
53
|
+
|
54
|
+
# Azure credentials
|
55
|
+
#
|
56
|
+
# For information on our data retention policy for user credentials, see
|
57
|
+
# [User credentials](/storage-transfer/docs/data-retention#user-credentials).
|
58
|
+
# @!attribute [rw] sas_token
|
59
|
+
# @return [::String]
|
60
|
+
# Required. Azure shared access signature (SAS).
|
61
|
+
#
|
62
|
+
# <aside class="note">
|
63
|
+
# <strong>Note:</strong>Copying data from Azure Data Lake
|
64
|
+
# Storage (ADLS) Gen 2 is in [Preview](/products/#product-launch-stages).
|
65
|
+
# During Preview, if you are copying data from ADLS Gen 2, you must use an
|
66
|
+
# account SAS.
|
67
|
+
# </aside>
|
68
|
+
#
|
69
|
+
# For more information about SAS, see
|
70
|
+
# [Grant limited access to Azure Storage resources using shared access
|
71
|
+
# signatures
|
72
|
+
# (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview).
|
73
|
+
class AzureCredentials
|
74
|
+
include ::Google::Protobuf::MessageExts
|
75
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
76
|
+
end
|
77
|
+
|
78
|
+
# Conditions that determine which objects will be transferred. Applies only
|
79
|
+
# to Cloud Data Sources such as S3, Azure, and Cloud Storage.
|
80
|
+
#
|
81
|
+
# The "last modification time" refers to the time of the
|
82
|
+
# last change to the object's content or metadata — specifically, this is
|
83
|
+
# the `updated` property of Cloud Storage objects, the `LastModified` field
|
84
|
+
# of S3 objects, and the `Last-Modified` header of Azure blobs.
|
85
|
+
# @!attribute [rw] min_time_elapsed_since_last_modification
|
86
|
+
# @return [::Google::Protobuf::Duration]
|
87
|
+
# If specified, only objects with a "last modification time" before
|
88
|
+
# `NOW` - `min_time_elapsed_since_last_modification` and objects that don't
|
89
|
+
# have a "last modification time" are transferred.
|
90
|
+
#
|
91
|
+
# For each {::Google::Cloud::StorageTransfer::V1::TransferOperation TransferOperation}
|
92
|
+
# started by this {::Google::Cloud::StorageTransfer::V1::TransferJob TransferJob}, `NOW`
|
93
|
+
# refers to the [start_time]
|
94
|
+
# [google.storagetransfer.v1.TransferOperation.start_time] of the
|
95
|
+
# `TransferOperation`.
|
96
|
+
# @!attribute [rw] max_time_elapsed_since_last_modification
|
97
|
+
# @return [::Google::Protobuf::Duration]
|
98
|
+
# If specified, only objects with a "last modification time" on or after
|
99
|
+
# `NOW` - `max_time_elapsed_since_last_modification` and objects that don't
|
100
|
+
# have a "last modification time" are transferred.
|
101
|
+
#
|
102
|
+
# For each {::Google::Cloud::StorageTransfer::V1::TransferOperation TransferOperation}
|
103
|
+
# started by this {::Google::Cloud::StorageTransfer::V1::TransferJob TransferJob},
|
104
|
+
# `NOW` refers to the [start_time]
|
105
|
+
# [google.storagetransfer.v1.TransferOperation.start_time] of the
|
106
|
+
# `TransferOperation`.
|
107
|
+
# @!attribute [rw] include_prefixes
|
108
|
+
# @return [::Array<::String>]
|
109
|
+
# If you specify `include_prefixes`, Storage Transfer Service uses the items
|
110
|
+
# in the `include_prefixes` array to determine which objects to include in a
|
111
|
+
# transfer. Objects must start with one of the matching `include_prefixes`
|
112
|
+
# for inclusion in the transfer. If [exclude_prefixes]
|
113
|
+
# [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified,
|
114
|
+
# objects must not start with any of the `exclude_prefixes` specified for
|
115
|
+
# inclusion in the transfer.
|
116
|
+
#
|
117
|
+
# The following are requirements of `include_prefixes`:
|
118
|
+
#
|
119
|
+
# * Each include-prefix can contain any sequence of Unicode characters, to
|
120
|
+
# a max length of 1024 bytes when UTF8-encoded, and must not contain
|
121
|
+
# Carriage Return or Line Feed characters. Wildcard matching and regular
|
122
|
+
# expression matching are not supported.
|
123
|
+
#
|
124
|
+
# * Each include-prefix must omit the leading slash. For example, to
|
125
|
+
# include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
|
126
|
+
# specify the include-prefix as `logs/y=2015/requests.gz`.
|
127
|
+
#
|
128
|
+
# * None of the include-prefix values can be empty, if specified.
|
129
|
+
#
|
130
|
+
# * Each include-prefix must include a distinct portion of the object
|
131
|
+
# namespace. No include-prefix may be a prefix of another
|
132
|
+
# include-prefix.
|
133
|
+
#
|
134
|
+
# The max size of `include_prefixes` is 1000.
|
135
|
+
#
|
136
|
+
# For more information, see [Filtering objects from
|
137
|
+
# transfers](/storage-transfer/docs/filtering-objects-from-transfers).
|
138
|
+
# @!attribute [rw] exclude_prefixes
|
139
|
+
# @return [::Array<::String>]
|
140
|
+
# If you specify `exclude_prefixes`, Storage Transfer Service uses the items
|
141
|
+
# in the `exclude_prefixes` array to determine which objects to exclude from
|
142
|
+
# a transfer. Objects must not start with one of the matching
|
143
|
+
# `exclude_prefixes` for inclusion in a transfer.
|
144
|
+
#
|
145
|
+
# The following are requirements of `exclude_prefixes`:
|
146
|
+
#
|
147
|
+
# * Each exclude-prefix can contain any sequence of Unicode characters, to
|
148
|
+
# a max length of 1024 bytes when UTF8-encoded, and must not contain
|
149
|
+
# Carriage Return or Line Feed characters. Wildcard matching and regular
|
150
|
+
# expression matching are not supported.
|
151
|
+
#
|
152
|
+
# * Each exclude-prefix must omit the leading slash. For example, to
|
153
|
+
# exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
|
154
|
+
# specify the exclude-prefix as `logs/y=2015/requests.gz`.
|
155
|
+
#
|
156
|
+
# * None of the exclude-prefix values can be empty, if specified.
|
157
|
+
#
|
158
|
+
# * Each exclude-prefix must exclude a distinct portion of the object
|
159
|
+
# namespace. No exclude-prefix may be a prefix of another
|
160
|
+
# exclude-prefix.
|
161
|
+
#
|
162
|
+
# * If [include_prefixes]
|
163
|
+
# [google.storagetransfer.v1.ObjectConditions.include_prefixes] is
|
164
|
+
# specified, then each exclude-prefix must start with the value of a path
|
165
|
+
# explicitly included by `include_prefixes`.
|
166
|
+
#
|
167
|
+
# The max size of `exclude_prefixes` is 1000.
|
168
|
+
#
|
169
|
+
# For more information, see [Filtering objects from
|
170
|
+
# transfers](/storage-transfer/docs/filtering-objects-from-transfers).
|
171
|
+
# @!attribute [rw] last_modified_since
|
172
|
+
# @return [::Google::Protobuf::Timestamp]
|
173
|
+
# If specified, only objects with a "last modification time" on or after
|
174
|
+
# this timestamp and objects that don't have a "last modification time" are
|
175
|
+
# transferred.
|
176
|
+
#
|
177
|
+
# The `last_modified_since` and `last_modified_before` fields can be used
|
178
|
+
# together for chunked data processing. For example, consider a script that
|
179
|
+
# processes each day's worth of data at a time. For that you'd set each
|
180
|
+
# of the fields as follows:
|
181
|
+
#
|
182
|
+
# * `last_modified_since` to the start of the day
|
183
|
+
#
|
184
|
+
# * `last_modified_before` to the end of the day
|
185
|
+
# @!attribute [rw] last_modified_before
|
186
|
+
# @return [::Google::Protobuf::Timestamp]
|
187
|
+
# If specified, only objects with a "last modification time" before this
|
188
|
+
# timestamp and objects that don't have a "last modification time" will be
|
189
|
+
# transferred.
|
190
|
+
class ObjectConditions
|
191
|
+
include ::Google::Protobuf::MessageExts
|
192
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
193
|
+
end
|
194
|
+
|
195
|
+
# In a GcsData resource, an object's name is the Cloud Storage object's
|
196
|
+
# name and its "last modification time" refers to the object's `updated`
|
197
|
+
# property of Cloud Storage objects, which changes when the content or the
|
198
|
+
# metadata of the object is updated.
|
199
|
+
# @!attribute [rw] bucket_name
|
200
|
+
# @return [::String]
|
201
|
+
# Required. Cloud Storage bucket name. Must meet
|
202
|
+
# [Bucket Name Requirements](/storage/docs/naming#requirements).
|
203
|
+
# @!attribute [rw] path
|
204
|
+
# @return [::String]
|
205
|
+
# Root path to transfer objects.
|
206
|
+
#
|
207
|
+
# Must be an empty string or full path name that ends with a '/'. This field
|
208
|
+
# is treated as an object prefix. As such, it should generally not begin with
|
209
|
+
# a '/'.
|
210
|
+
#
|
211
|
+
# The root path value must meet
|
212
|
+
# [Object Name Requirements](/storage/docs/naming#objectnames).
|
213
|
+
class GcsData
|
214
|
+
include ::Google::Protobuf::MessageExts
|
215
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
216
|
+
end
|
217
|
+
|
218
|
+
# An AwsS3Data resource can be a data source, but not a data sink.
|
219
|
+
# In an AwsS3Data resource, an object's name is the S3 object's key name.
|
220
|
+
# @!attribute [rw] bucket_name
|
221
|
+
# @return [::String]
|
222
|
+
# Required. S3 Bucket name (see
|
223
|
+
# [Creating a
|
224
|
+
# bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).
|
225
|
+
# @!attribute [rw] aws_access_key
|
226
|
+
# @return [::Google::Cloud::StorageTransfer::V1::AwsAccessKey]
|
227
|
+
# Input only. AWS access key used to sign the API requests to the AWS S3
|
228
|
+
# bucket. Permissions on the bucket must be granted to the access ID of the
|
229
|
+
# AWS access key. This field is required.
|
230
|
+
#
|
231
|
+
# For information on our data retention policy for user credentials, see
|
232
|
+
# [User credentials](/storage-transfer/docs/data-retention#user-credentials).
|
233
|
+
# @!attribute [rw] path
|
234
|
+
# @return [::String]
|
235
|
+
# Root path to transfer objects.
|
236
|
+
#
|
237
|
+
# Must be an empty string or full path name that ends with a '/'. This field
|
238
|
+
# is treated as an object prefix. As such, it should generally not begin with
|
239
|
+
# a '/'.
|
240
|
+
# @!attribute [rw] role_arn
|
241
|
+
# @return [::String]
|
242
|
+
# Input only. Role arn to support temporary credentials via
|
243
|
+
# AssumeRoleWithWebIdentity.
|
244
|
+
#
|
245
|
+
# When role arn is provided, transfer service will fetch temporary
|
246
|
+
# credentials for the session using AssumeRoleWithWebIdentity call for the
|
247
|
+
# provided role using the [GoogleServiceAccount] for this project.
|
248
|
+
class AwsS3Data
|
249
|
+
include ::Google::Protobuf::MessageExts
|
250
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
251
|
+
end
|
252
|
+
|
253
|
+
# An AzureBlobStorageData resource can be a data source, but not a data sink.
|
254
|
+
# An AzureBlobStorageData resource represents one Azure container. The storage
|
255
|
+
# account determines the [Azure
|
256
|
+
# endpoint](https://docs.microsoft.com/en-us/azure/storage/common/storage-create-storage-account#storage-account-endpoints).
|
257
|
+
# In an AzureBlobStorageData resource, a blobs's name is the [Azure Blob
|
258
|
+
# Storage blob's key
|
259
|
+
# name](https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#blob-names).
|
260
|
+
# @!attribute [rw] storage_account
|
261
|
+
# @return [::String]
|
262
|
+
# Required. The name of the Azure Storage account.
|
263
|
+
# @!attribute [rw] azure_credentials
|
264
|
+
# @return [::Google::Cloud::StorageTransfer::V1::AzureCredentials]
|
265
|
+
# Required. Input only. Credentials used to authenticate API requests to
|
266
|
+
# Azure.
|
267
|
+
#
|
268
|
+
# For information on our data retention policy for user credentials, see
|
269
|
+
# [User credentials](/storage-transfer/docs/data-retention#user-credentials).
|
270
|
+
# @!attribute [rw] container
|
271
|
+
# @return [::String]
|
272
|
+
# Required. The container to transfer from the Azure Storage account.
|
273
|
+
# @!attribute [rw] path
|
274
|
+
# @return [::String]
|
275
|
+
# Root path to transfer objects.
|
276
|
+
#
|
277
|
+
# Must be an empty string or full path name that ends with a '/'. This field
|
278
|
+
# is treated as an object prefix. As such, it should generally not begin with
|
279
|
+
# a '/'.
|
280
|
+
class AzureBlobStorageData
|
281
|
+
include ::Google::Protobuf::MessageExts
|
282
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
283
|
+
end
|
284
|
+
|
285
|
+
# An HttpData resource specifies a list of objects on the web to be transferred
|
286
|
+
# over HTTP. The information of the objects to be transferred is contained in
|
287
|
+
# a file referenced by a URL. The first line in the file must be
|
288
|
+
# `"TsvHttpData-1.0"`, which specifies the format of the file. Subsequent
|
289
|
+
# lines specify the information of the list of objects, one object per list
|
290
|
+
# entry. Each entry has the following tab-delimited fields:
|
291
|
+
#
|
292
|
+
# * **HTTP URL** — The location of the object.
|
293
|
+
#
|
294
|
+
# * **Length** — The size of the object in bytes.
|
295
|
+
#
|
296
|
+
# * **MD5** — The base64-encoded MD5 hash of the object.
|
297
|
+
#
|
298
|
+
# For an example of a valid TSV file, see
|
299
|
+
# [Transferring data from
|
300
|
+
# URLs](https://cloud.google.com/storage-transfer/docs/create-url-list).
|
301
|
+
#
|
302
|
+
# When transferring data based on a URL list, keep the following in mind:
|
303
|
+
#
|
304
|
+
# * When an object located at `http(s)://hostname:port/<URL-path>` is
|
305
|
+
# transferred to a data sink, the name of the object at the data sink is
|
306
|
+
# `<hostname>/<URL-path>`.
|
307
|
+
#
|
308
|
+
# * If the specified size of an object does not match the actual size of the
|
309
|
+
# object fetched, the object will not be transferred.
|
310
|
+
#
|
311
|
+
# * If the specified MD5 does not match the MD5 computed from the transferred
|
312
|
+
# bytes, the object transfer will fail.
|
313
|
+
#
|
314
|
+
# * Ensure that each URL you specify is publicly accessible. For
|
315
|
+
# example, in Cloud Storage you can
|
316
|
+
# [share an object publicly]
|
317
|
+
# (/storage/docs/cloud-console#_sharingdata) and get a link to it.
|
318
|
+
#
|
319
|
+
# * Storage Transfer Service obeys `robots.txt` rules and requires the source
|
320
|
+
# HTTP server to support `Range` requests and to return a `Content-Length`
|
321
|
+
# header in each response.
|
322
|
+
#
|
323
|
+
# * {::Google::Cloud::StorageTransfer::V1::ObjectConditions ObjectConditions} have no
|
324
|
+
# effect when filtering objects to transfer.
|
325
|
+
# @!attribute [rw] list_url
|
326
|
+
# @return [::String]
|
327
|
+
# Required. The URL that points to the file that stores the object list
|
328
|
+
# entries. This file must allow public access. Currently, only URLs with
|
329
|
+
# HTTP and HTTPS schemes are supported.
|
330
|
+
class HttpData
|
331
|
+
include ::Google::Protobuf::MessageExts
|
332
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
333
|
+
end
|
334
|
+
|
335
|
+
# TransferOptions define the actions to be performed on objects in a transfer.
|
336
|
+
# @!attribute [rw] overwrite_objects_already_existing_in_sink
|
337
|
+
# @return [::Boolean]
|
338
|
+
# When to overwrite objects that already exist in the sink. The default is
|
339
|
+
# that only objects that are different from the source are ovewritten. If
|
340
|
+
# true, all objects in the sink whose name matches an object in the source
|
341
|
+
# will be overwritten with the source object.
|
342
|
+
# @!attribute [rw] delete_objects_unique_in_sink
|
343
|
+
# @return [::Boolean]
|
344
|
+
# Whether objects that exist only in the sink should be deleted.
|
345
|
+
#
|
346
|
+
# **Note:** This option and [delete_objects_from_source_after_transfer]
|
347
|
+
# [google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer]
|
348
|
+
# are mutually exclusive.
|
349
|
+
# @!attribute [rw] delete_objects_from_source_after_transfer
|
350
|
+
# @return [::Boolean]
|
351
|
+
# Whether objects should be deleted from the source after they are
|
352
|
+
# transferred to the sink.
|
353
|
+
#
|
354
|
+
# **Note:** This option and [delete_objects_unique_in_sink]
|
355
|
+
# [google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
|
356
|
+
# are mutually exclusive.
|
357
|
+
class TransferOptions
|
358
|
+
include ::Google::Protobuf::MessageExts
|
359
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
360
|
+
end
|
361
|
+
|
362
|
+
# Configuration for running a transfer.
|
363
|
+
# @!attribute [rw] gcs_data_sink
|
364
|
+
# @return [::Google::Cloud::StorageTransfer::V1::GcsData]
|
365
|
+
# A Cloud Storage data sink.
|
366
|
+
# @!attribute [rw] gcs_data_source
|
367
|
+
# @return [::Google::Cloud::StorageTransfer::V1::GcsData]
|
368
|
+
# A Cloud Storage data source.
|
369
|
+
# @!attribute [rw] aws_s3_data_source
|
370
|
+
# @return [::Google::Cloud::StorageTransfer::V1::AwsS3Data]
|
371
|
+
# An AWS S3 data source.
|
372
|
+
# @!attribute [rw] http_data_source
|
373
|
+
# @return [::Google::Cloud::StorageTransfer::V1::HttpData]
|
374
|
+
# An HTTP URL data source.
|
375
|
+
# @!attribute [rw] azure_blob_storage_data_source
|
376
|
+
# @return [::Google::Cloud::StorageTransfer::V1::AzureBlobStorageData]
|
377
|
+
# An Azure Blob Storage data source.
|
378
|
+
# @!attribute [rw] object_conditions
|
379
|
+
# @return [::Google::Cloud::StorageTransfer::V1::ObjectConditions]
|
380
|
+
# Only objects that satisfy these object conditions are included in the set
|
381
|
+
# of data source and data sink objects. Object conditions based on
|
382
|
+
# objects' "last modification time" do not exclude objects in a data sink.
|
383
|
+
# @!attribute [rw] transfer_options
|
384
|
+
# @return [::Google::Cloud::StorageTransfer::V1::TransferOptions]
|
385
|
+
# If the option
|
386
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferOptions#delete_objects_unique_in_sink delete_objects_unique_in_sink}
|
387
|
+
# is `true` and time-based object conditions such as 'last modification time'
|
388
|
+
# are specified, the request fails with an
|
389
|
+
# {::Google::Rpc::Code::INVALID_ARGUMENT INVALID_ARGUMENT} error.
|
390
|
+
class TransferSpec
|
391
|
+
include ::Google::Protobuf::MessageExts
|
392
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
393
|
+
end
|
394
|
+
|
395
|
+
# Transfers can be scheduled to recur or to run just once.
|
396
|
+
# @!attribute [rw] schedule_start_date
|
397
|
+
# @return [::Google::Type::Date]
|
398
|
+
# Required. The start date of a transfer. Date boundaries are determined
|
399
|
+
# relative to UTC time. If `schedule_start_date` and
|
400
|
+
# {::Google::Cloud::StorageTransfer::V1::Schedule#start_time_of_day start_time_of_day}
|
401
|
+
# are in the past relative to the job's creation time, the transfer starts
|
402
|
+
# the day after you schedule the transfer request.
|
403
|
+
#
|
404
|
+
# **Note:** When starting jobs at or near midnight UTC it is possible that
|
405
|
+
# a job will start later than expected. For example, if you send an outbound
|
406
|
+
# request on June 1 one millisecond prior to midnight UTC and the Storage
|
407
|
+
# Transfer Service server receives the request on June 2, then it will create
|
408
|
+
# a TransferJob with `schedule_start_date` set to June 2 and a
|
409
|
+
# `start_time_of_day` set to midnight UTC. The first scheduled
|
410
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferOperation TransferOperation} will take
|
411
|
+
# place on June 3 at midnight UTC.
|
412
|
+
# @!attribute [rw] schedule_end_date
|
413
|
+
# @return [::Google::Type::Date]
|
414
|
+
# The last day a transfer runs. Date boundaries are determined relative to
|
415
|
+
# UTC time. A job will run once per 24 hours within the following guidelines:
|
416
|
+
#
|
417
|
+
# * If `schedule_end_date` and
|
418
|
+
# {::Google::Cloud::StorageTransfer::V1::Schedule#schedule_start_date schedule_start_date}
|
419
|
+
# are the same and in
|
420
|
+
# the future relative to UTC, the transfer is executed only one time.
|
421
|
+
# * If `schedule_end_date` is later than `schedule_start_date` and
|
422
|
+
# `schedule_end_date` is in the future relative to UTC, the job will
|
423
|
+
# run each day at
|
424
|
+
# {::Google::Cloud::StorageTransfer::V1::Schedule#start_time_of_day start_time_of_day}
|
425
|
+
# through `schedule_end_date`.
|
426
|
+
# @!attribute [rw] start_time_of_day
|
427
|
+
# @return [::Google::Type::TimeOfDay]
|
428
|
+
# The time in UTC that a transfer job is scheduled to run. Transfers may
|
429
|
+
# start later than this time.
|
430
|
+
#
|
431
|
+
# If `start_time_of_day` is not specified:
|
432
|
+
#
|
433
|
+
# * One-time transfers run immediately.
|
434
|
+
# * Recurring transfers run immediately, and each day at midnight UTC,
|
435
|
+
# through
|
436
|
+
# {::Google::Cloud::StorageTransfer::V1::Schedule#schedule_end_date schedule_end_date}.
|
437
|
+
#
|
438
|
+
# If `start_time_of_day` is specified:
|
439
|
+
#
|
440
|
+
# * One-time transfers run at the specified time.
|
441
|
+
# * Recurring transfers run at the specified time each day, through
|
442
|
+
# `schedule_end_date`.
|
443
|
+
# @!attribute [rw] end_time_of_day
|
444
|
+
# @return [::Google::Type::TimeOfDay]
|
445
|
+
# The time in UTC that no further transfer operations are scheduled. Combined
|
446
|
+
# with
|
447
|
+
# {::Google::Cloud::StorageTransfer::V1::Schedule#schedule_end_date schedule_end_date},
|
448
|
+
# `end_time_of_day` specifies the end date and time for starting new transfer
|
449
|
+
# operations. This field must be greater than or equal to the timestamp
|
450
|
+
# corresponding to the combintation of
|
451
|
+
# {::Google::Cloud::StorageTransfer::V1::Schedule#schedule_start_date schedule_start_date}
|
452
|
+
# and
|
453
|
+
# {::Google::Cloud::StorageTransfer::V1::Schedule#start_time_of_day start_time_of_day},
|
454
|
+
# and is subject to the following:
|
455
|
+
#
|
456
|
+
# * If `end_time_of_day` is not set and `schedule_end_date` is set, then
|
457
|
+
# a default value of `23:59:59` is used for `end_time_of_day`.
|
458
|
+
#
|
459
|
+
# * If `end_time_of_day` is set and `schedule_end_date` is not set, then
|
460
|
+
# {::Google::Rpc::Code::INVALID_ARGUMENT INVALID_ARGUMENT} is returned.
|
461
|
+
# @!attribute [rw] repeat_interval
|
462
|
+
# @return [::Google::Protobuf::Duration]
|
463
|
+
# Interval between the start of each scheduled TransferOperation. If
|
464
|
+
# unspecified, the default value is 24 hours. This value may not be less than
|
465
|
+
# 1 hour.
|
466
|
+
class Schedule
|
467
|
+
include ::Google::Protobuf::MessageExts
|
468
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
469
|
+
end
|
470
|
+
|
471
|
+
# This resource represents the configuration of a transfer job that runs
|
472
|
+
# periodically.
|
473
|
+
# @!attribute [rw] name
|
474
|
+
# @return [::String]
|
475
|
+
# A unique name (within the transfer project) assigned when the job is
|
476
|
+
# created. If this field is empty in a CreateTransferJobRequest, Storage
|
477
|
+
# Transfer Service will assign a unique name. Otherwise, the specified name
|
478
|
+
# is used as the unique name for this job.
|
479
|
+
#
|
480
|
+
# If the specified name is in use by a job, the creation request fails with
|
481
|
+
# an {::Google::Rpc::Code::ALREADY_EXISTS ALREADY_EXISTS} error.
|
482
|
+
#
|
483
|
+
# This name must start with `"transferJobs/"` prefix and end with a letter or
|
484
|
+
# a number, and should be no more than 128 characters. This name must not
|
485
|
+
# start with 'transferJobs/OPI'. 'transferJobs/OPI' is a reserved prefix.
|
486
|
+
# Example:
|
487
|
+
# `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"`
|
488
|
+
#
|
489
|
+
# Invalid job names will fail with an
|
490
|
+
# {::Google::Rpc::Code::INVALID_ARGUMENT INVALID_ARGUMENT} error.
|
491
|
+
# @!attribute [rw] description
|
492
|
+
# @return [::String]
|
493
|
+
# A description provided by the user for the job. Its max length is 1024
|
494
|
+
# bytes when Unicode-encoded.
|
495
|
+
# @!attribute [rw] project_id
|
496
|
+
# @return [::String]
|
497
|
+
# The ID of the Google Cloud Platform Project that owns the job.
|
498
|
+
# @!attribute [rw] transfer_spec
|
499
|
+
# @return [::Google::Cloud::StorageTransfer::V1::TransferSpec]
|
500
|
+
# Transfer specification.
|
501
|
+
# @!attribute [rw] notification_config
|
502
|
+
# @return [::Google::Cloud::StorageTransfer::V1::NotificationConfig]
|
503
|
+
# Notification configuration.
|
504
|
+
# @!attribute [rw] schedule
|
505
|
+
# @return [::Google::Cloud::StorageTransfer::V1::Schedule]
|
506
|
+
# Specifies schedule for the transfer job.
|
507
|
+
# This is an optional field. When the field is not set, the job will never
|
508
|
+
# execute a transfer, unless you invoke RunTransferJob or update the job to
|
509
|
+
# have a non-empty schedule.
|
510
|
+
# @!attribute [rw] status
|
511
|
+
# @return [::Google::Cloud::StorageTransfer::V1::TransferJob::Status]
|
512
|
+
# Status of the job. This value MUST be specified for
|
513
|
+
# `CreateTransferJobRequests`.
|
514
|
+
#
|
515
|
+
# **Note:** The effect of the new job status takes place during a subsequent
|
516
|
+
# job run. For example, if you change the job status from
|
517
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::ENABLED ENABLED} to
|
518
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::DISABLED DISABLED}, and an
|
519
|
+
# operation spawned by the transfer is running, the status change would not
|
520
|
+
# affect the current operation.
|
521
|
+
# @!attribute [r] creation_time
|
522
|
+
# @return [::Google::Protobuf::Timestamp]
|
523
|
+
# Output only. The time that the transfer job was created.
|
524
|
+
# @!attribute [r] last_modification_time
|
525
|
+
# @return [::Google::Protobuf::Timestamp]
|
526
|
+
# Output only. The time that the transfer job was last modified.
|
527
|
+
# @!attribute [r] deletion_time
|
528
|
+
# @return [::Google::Protobuf::Timestamp]
|
529
|
+
# Output only. The time that the transfer job was deleted.
|
530
|
+
# @!attribute [rw] latest_operation_name
|
531
|
+
# @return [::String]
|
532
|
+
# The name of the most recently started TransferOperation of this JobConfig.
|
533
|
+
# Present if a TransferOperation has been created for this JobConfig.
|
534
|
+
class TransferJob
|
535
|
+
include ::Google::Protobuf::MessageExts
|
536
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
537
|
+
|
538
|
+
# The status of the transfer job.
|
539
|
+
module Status
|
540
|
+
# Zero is an illegal value.
|
541
|
+
STATUS_UNSPECIFIED = 0
|
542
|
+
|
543
|
+
# New transfers will be performed based on the schedule.
|
544
|
+
ENABLED = 1
|
545
|
+
|
546
|
+
# New transfers will not be scheduled.
|
547
|
+
DISABLED = 2
|
548
|
+
|
549
|
+
# This is a soft delete state. After a transfer job is set to this
|
550
|
+
# state, the job and all the transfer executions are subject to
|
551
|
+
# garbage collection. Transfer jobs become eligible for garbage collection
|
552
|
+
# 30 days after their status is set to `DELETED`.
|
553
|
+
DELETED = 3
|
554
|
+
end
|
555
|
+
end
|
556
|
+
|
557
|
+
# An entry describing an error that has occurred.
|
558
|
+
# @!attribute [rw] url
|
559
|
+
# @return [::String]
|
560
|
+
# Required. A URL that refers to the target (a data source, a data sink,
|
561
|
+
# or an object) with which the error is associated.
|
562
|
+
# @!attribute [rw] error_details
|
563
|
+
# @return [::Array<::String>]
|
564
|
+
# A list of messages that carry the error details.
|
565
|
+
class ErrorLogEntry
|
566
|
+
include ::Google::Protobuf::MessageExts
|
567
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
568
|
+
end
|
569
|
+
|
570
|
+
# A summary of errors by error code, plus a count and sample error log
|
571
|
+
# entries.
|
572
|
+
# @!attribute [rw] error_code
|
573
|
+
# @return [::Google::Rpc::Code]
|
574
|
+
# Required.
|
575
|
+
# @!attribute [rw] error_count
|
576
|
+
# @return [::Integer]
|
577
|
+
# Required. Count of this type of error.
|
578
|
+
# @!attribute [rw] error_log_entries
|
579
|
+
# @return [::Array<::Google::Cloud::StorageTransfer::V1::ErrorLogEntry>]
|
580
|
+
# Error samples.
|
581
|
+
#
|
582
|
+
# At most 5 error log entries will be recorded for a given
|
583
|
+
# error code for a single transfer operation.
|
584
|
+
class ErrorSummary
|
585
|
+
include ::Google::Protobuf::MessageExts
|
586
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
587
|
+
end
|
588
|
+
|
589
|
+
# A collection of counters that report the progress of a transfer operation.
|
590
|
+
# @!attribute [rw] objects_found_from_source
|
591
|
+
# @return [::Integer]
|
592
|
+
# Objects found in the data source that are scheduled to be transferred,
|
593
|
+
# excluding any that are filtered based on object conditions or skipped due
|
594
|
+
# to sync.
|
595
|
+
# @!attribute [rw] bytes_found_from_source
|
596
|
+
# @return [::Integer]
|
597
|
+
# Bytes found in the data source that are scheduled to be transferred,
|
598
|
+
# excluding any that are filtered based on object conditions or skipped due
|
599
|
+
# to sync.
|
600
|
+
# @!attribute [rw] objects_found_only_from_sink
|
601
|
+
# @return [::Integer]
|
602
|
+
# Objects found only in the data sink that are scheduled to be deleted.
|
603
|
+
# @!attribute [rw] bytes_found_only_from_sink
|
604
|
+
# @return [::Integer]
|
605
|
+
# Bytes found only in the data sink that are scheduled to be deleted.
|
606
|
+
# @!attribute [rw] objects_from_source_skipped_by_sync
|
607
|
+
# @return [::Integer]
|
608
|
+
# Objects in the data source that are not transferred because they already
|
609
|
+
# exist in the data sink.
|
610
|
+
# @!attribute [rw] bytes_from_source_skipped_by_sync
|
611
|
+
# @return [::Integer]
|
612
|
+
# Bytes in the data source that are not transferred because they already
|
613
|
+
# exist in the data sink.
|
614
|
+
# @!attribute [rw] objects_copied_to_sink
|
615
|
+
# @return [::Integer]
|
616
|
+
# Objects that are copied to the data sink.
|
617
|
+
# @!attribute [rw] bytes_copied_to_sink
|
618
|
+
# @return [::Integer]
|
619
|
+
# Bytes that are copied to the data sink.
|
620
|
+
# @!attribute [rw] objects_deleted_from_source
|
621
|
+
# @return [::Integer]
|
622
|
+
# Objects that are deleted from the data source.
|
623
|
+
# @!attribute [rw] bytes_deleted_from_source
|
624
|
+
# @return [::Integer]
|
625
|
+
# Bytes that are deleted from the data source.
|
626
|
+
# @!attribute [rw] objects_deleted_from_sink
|
627
|
+
# @return [::Integer]
|
628
|
+
# Objects that are deleted from the data sink.
|
629
|
+
# @!attribute [rw] bytes_deleted_from_sink
|
630
|
+
# @return [::Integer]
|
631
|
+
# Bytes that are deleted from the data sink.
|
632
|
+
# @!attribute [rw] objects_from_source_failed
|
633
|
+
# @return [::Integer]
|
634
|
+
# Objects in the data source that failed to be transferred or that failed
|
635
|
+
# to be deleted after being transferred.
|
636
|
+
# @!attribute [rw] bytes_from_source_failed
|
637
|
+
# @return [::Integer]
|
638
|
+
# Bytes in the data source that failed to be transferred or that failed to
|
639
|
+
# be deleted after being transferred.
|
640
|
+
# @!attribute [rw] objects_failed_to_delete_from_sink
|
641
|
+
# @return [::Integer]
|
642
|
+
# Objects that failed to be deleted from the data sink.
|
643
|
+
# @!attribute [rw] bytes_failed_to_delete_from_sink
|
644
|
+
# @return [::Integer]
|
645
|
+
# Bytes that failed to be deleted from the data sink.
|
646
|
+
class TransferCounters
|
647
|
+
include ::Google::Protobuf::MessageExts
|
648
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
649
|
+
end
|
650
|
+
|
651
|
+
# Specification to configure notifications published to Cloud Pub/Sub.
|
652
|
+
# Notifications will be published to the customer-provided topic using the
|
653
|
+
# following `PubsubMessage.attributes`:
|
654
|
+
#
|
655
|
+
# * `"eventType"`: one of the
|
656
|
+
# {::Google::Cloud::StorageTransfer::V1::NotificationConfig::EventType EventType} values
|
657
|
+
# * `"payloadFormat"`: one of the
|
658
|
+
# {::Google::Cloud::StorageTransfer::V1::NotificationConfig::PayloadFormat PayloadFormat}
|
659
|
+
# values
|
660
|
+
# * `"projectId"`: the
|
661
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferOperation#project_id project_id} of the
|
662
|
+
# `TransferOperation`
|
663
|
+
# * `"transferJobName"`: the
|
664
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferOperation#transfer_job_name transfer_job_name}
|
665
|
+
# of the `TransferOperation`
|
666
|
+
# * `"transferOperationName"`: the
|
667
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferOperation#name name} of the
|
668
|
+
# `TransferOperation`
|
669
|
+
#
|
670
|
+
# The `PubsubMessage.data` will contain a
|
671
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferOperation TransferOperation} resource
|
672
|
+
# formatted according to the specified `PayloadFormat`.
|
673
|
+
# @!attribute [rw] pubsub_topic
|
674
|
+
# @return [::String]
|
675
|
+
# Required. The `Topic.name` of the Cloud Pub/Sub topic to which to publish
|
676
|
+
# notifications. Must be of the format: `projects/{project}/topics/{topic}`.
|
677
|
+
# Not matching this format will result in an
|
678
|
+
# {::Google::Rpc::Code::INVALID_ARGUMENT INVALID_ARGUMENT} error.
|
679
|
+
# @!attribute [rw] event_types
|
680
|
+
# @return [::Array<::Google::Cloud::StorageTransfer::V1::NotificationConfig::EventType>]
|
681
|
+
# Event types for which a notification is desired. If empty, send
|
682
|
+
# notifications for all event types.
|
683
|
+
# @!attribute [rw] payload_format
|
684
|
+
# @return [::Google::Cloud::StorageTransfer::V1::NotificationConfig::PayloadFormat]
|
685
|
+
# Required. The desired format of the notification message payloads.
|
686
|
+
class NotificationConfig
|
687
|
+
include ::Google::Protobuf::MessageExts
|
688
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
689
|
+
|
690
|
+
# Enum for specifying event types for which notifications are to be
|
691
|
+
# published.
|
692
|
+
#
|
693
|
+
# Additional event types may be added in the future. Clients should either
|
694
|
+
# safely ignore unrecognized event types or explicitly specify which event
|
695
|
+
# types they are prepared to accept.
|
696
|
+
module EventType
|
697
|
+
# Illegal value, to avoid allowing a default.
|
698
|
+
EVENT_TYPE_UNSPECIFIED = 0
|
699
|
+
|
700
|
+
# `TransferOperation` completed with status
|
701
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferOperation::Status::SUCCESS SUCCESS}.
|
702
|
+
TRANSFER_OPERATION_SUCCESS = 1
|
703
|
+
|
704
|
+
# `TransferOperation` completed with status
|
705
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferOperation::Status::FAILED FAILED}.
|
706
|
+
TRANSFER_OPERATION_FAILED = 2
|
707
|
+
|
708
|
+
# `TransferOperation` completed with status
|
709
|
+
# {::Google::Cloud::StorageTransfer::V1::TransferOperation::Status::ABORTED ABORTED}.
|
710
|
+
TRANSFER_OPERATION_ABORTED = 3
|
711
|
+
end
|
712
|
+
|
713
|
+
# Enum for specifying the format of a notification message's payload.
|
714
|
+
module PayloadFormat
|
715
|
+
# Illegal value, to avoid allowing a default.
|
716
|
+
PAYLOAD_FORMAT_UNSPECIFIED = 0
|
717
|
+
|
718
|
+
# No payload is included with the notification.
|
719
|
+
NONE = 1
|
720
|
+
|
721
|
+
# `TransferOperation` is [formatted as a JSON
|
722
|
+
# response](https://developers.google.com/protocol-buffers/docs/proto3#json),
|
723
|
+
# in application/json.
|
724
|
+
JSON = 2
|
725
|
+
end
|
726
|
+
end
|
727
|
+
|
728
|
+
# A description of the execution of a transfer.
|
729
|
+
# @!attribute [rw] name
|
730
|
+
# @return [::String]
|
731
|
+
# A globally unique ID assigned by the system.
|
732
|
+
# @!attribute [rw] project_id
|
733
|
+
# @return [::String]
|
734
|
+
# The ID of the Google Cloud Platform Project that owns the operation.
|
735
|
+
# @!attribute [rw] transfer_spec
|
736
|
+
# @return [::Google::Cloud::StorageTransfer::V1::TransferSpec]
|
737
|
+
# Transfer specification.
|
738
|
+
# @!attribute [rw] notification_config
|
739
|
+
# @return [::Google::Cloud::StorageTransfer::V1::NotificationConfig]
|
740
|
+
# Notification configuration.
|
741
|
+
# @!attribute [rw] start_time
|
742
|
+
# @return [::Google::Protobuf::Timestamp]
|
743
|
+
# Start time of this transfer execution.
|
744
|
+
# @!attribute [rw] end_time
|
745
|
+
# @return [::Google::Protobuf::Timestamp]
|
746
|
+
# End time of this transfer execution.
|
747
|
+
# @!attribute [rw] status
|
748
|
+
# @return [::Google::Cloud::StorageTransfer::V1::TransferOperation::Status]
|
749
|
+
# Status of the transfer operation.
|
750
|
+
# @!attribute [rw] counters
|
751
|
+
# @return [::Google::Cloud::StorageTransfer::V1::TransferCounters]
|
752
|
+
# Information about the progress of the transfer operation.
|
753
|
+
# @!attribute [rw] error_breakdowns
|
754
|
+
# @return [::Array<::Google::Cloud::StorageTransfer::V1::ErrorSummary>]
|
755
|
+
# Summarizes errors encountered with sample error log entries.
|
756
|
+
# @!attribute [rw] transfer_job_name
|
757
|
+
# @return [::String]
|
758
|
+
# The name of the transfer job that triggers this transfer operation.
|
759
|
+
class TransferOperation
|
760
|
+
include ::Google::Protobuf::MessageExts
|
761
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
762
|
+
|
763
|
+
# The status of a TransferOperation.
|
764
|
+
module Status
|
765
|
+
# Zero is an illegal value.
|
766
|
+
STATUS_UNSPECIFIED = 0
|
767
|
+
|
768
|
+
# In progress.
|
769
|
+
IN_PROGRESS = 1
|
770
|
+
|
771
|
+
# Paused.
|
772
|
+
PAUSED = 2
|
773
|
+
|
774
|
+
# Completed successfully.
|
775
|
+
SUCCESS = 3
|
776
|
+
|
777
|
+
# Terminated due to an unrecoverable failure.
|
778
|
+
FAILED = 4
|
779
|
+
|
780
|
+
# Aborted by the user.
|
781
|
+
ABORTED = 5
|
782
|
+
|
783
|
+
# Temporarily delayed by the system. No user action is required.
|
784
|
+
QUEUED = 6
|
785
|
+
end
|
786
|
+
end
|
787
|
+
end
|
788
|
+
end
|
789
|
+
end
|
790
|
+
end
|