google-cloud-bigquery-data_transfer 0.9.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -1
  3. data/AUTHENTICATION.md +51 -54
  4. data/LICENSE.md +203 -0
  5. data/MIGRATING.md +301 -0
  6. data/README.md +33 -45
  7. data/lib/{google/cloud/bigquery/data_transfer/v1/doc/google/cloud/bigquery/datatransfer/v1/datasource.rb → google-cloud-bigquery-data_transfer.rb} +5 -11
  8. data/lib/google/cloud/bigquery/data_transfer.rb +82 -140
  9. data/lib/google/cloud/bigquery/data_transfer/version.rb +6 -2
  10. metadata +85 -65
  11. data/LICENSE +0 -201
  12. data/lib/google/cloud/bigquery/data_transfer/credentials.rb +0 -33
  13. data/lib/google/cloud/bigquery/data_transfer/v1.rb +0 -173
  14. data/lib/google/cloud/bigquery/data_transfer/v1/credentials.rb +0 -43
  15. data/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_pb.rb +0 -190
  16. data/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service_client.rb +0 -1230
  17. data/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service_client_config.json +0 -96
  18. data/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_services_pb.rb +0 -87
  19. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/cloud/bigquery/data_transfer/v1/data_transfer.rb +0 -500
  20. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/cloud/bigquery/data_transfer/v1/transfer.rb +0 -217
  21. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/cloud/bigquery/datatransfer/v1/datatransfer.rb +0 -570
  22. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/cloud/bigquery/datatransfer/v1/transfer.rb +0 -257
  23. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/protobuf/any.rb +0 -131
  24. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/protobuf/duration.rb +0 -91
  25. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/protobuf/empty.rb +0 -29
  26. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/protobuf/field_mask.rb +0 -222
  27. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/protobuf/struct.rb +0 -74
  28. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/protobuf/timestamp.rb +0 -113
  29. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/protobuf/wrappers.rb +0 -26
  30. data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/rpc/status.rb +0 -39
  31. data/lib/google/cloud/bigquery/data_transfer/v1/transfer_pb.rb +0 -83
  32. data/lib/google/cloud/bigquery/datatransfer/v1/datasource_pb.rb +0 -170
  33. data/lib/google/cloud/bigquery/datatransfer/v1/datasource_services_pb.rb +0 -103
  34. data/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb +0 -217
  35. data/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb +0 -94
  36. data/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb +0 -104
@@ -1,217 +0,0 @@
1
- # Copyright 2018 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Cloud
18
- module Bigquery
19
- module DataTransfer
20
- module V1
21
- # Represents a data transfer configuration. A transfer configuration
22
- # contains all metadata needed to perform a data transfer. For example,
23
- # +destination_dataset_id+ specifies where data should be stored.
24
- # When a new transfer configuration is created, the specified
25
- # +destination_dataset_id+ is created when needed and shared with the
26
- # appropriate data source service account.
27
- # Next id: 20
28
- # @!attribute [rw] name
29
- # @return [String]
30
- # The resource name of the transfer config.
31
- # Transfer config names have the form
32
- # +projects/\\{project_id}/transferConfigs/\\{config_id}+.
33
- # Where +config_id+ is usually a uuid, even though it is not
34
- # guaranteed or required. The name is ignored when creating a transfer
35
- # config.
36
- # @!attribute [rw] destination_dataset_id
37
- # @return [String]
38
- # The BigQuery target dataset id.
39
- # @!attribute [rw] display_name
40
- # @return [String]
41
- # User specified display name for the data transfer.
42
- # @!attribute [rw] data_source_id
43
- # @return [String]
44
- # Data source id. Cannot be changed once data transfer is created.
45
- # @!attribute [rw] params
46
- # @return [Google::Protobuf::Struct]
47
- # Data transfer specific parameters.
48
- # @!attribute [rw] schedule
49
- # @return [String]
50
- # Data transfer schedule.
51
- # If the data source does not support a custom schedule, this should be
52
- # empty. If it is empty, the default value for the data source will be
53
- # used.
54
- # The specified times are in UTC.
55
- # Examples of valid format:
56
- # +1st,3rd monday of month 15:30+,
57
- # +every wed,fri of jan,jun 13:15+, and
58
- # +first sunday of quarter 00:00+.
59
- # See more explanation about the format here:
60
- # https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format
61
- # NOTE: the granularity should be at least 8 hours, or less frequent.
62
- # @!attribute [rw] data_refresh_window_days
63
- # @return [Integer]
64
- # The number of days to look back to automatically refresh the data.
65
- # For example, if +data_refresh_window_days = 10+, then every day
66
- # BigQuery reingests data for [today-10, today-1], rather than ingesting data
67
- # for just [today-1].
68
- # Only valid if the data source supports the feature. Set the value to 0
69
- # to use the default value.
70
- # @!attribute [rw] disabled
71
- # @return [true, false]
72
- # Is this config disabled. When set to true, no runs are scheduled
73
- # for a given transfer.
74
- # @!attribute [rw] update_time
75
- # @return [Google::Protobuf::Timestamp]
76
- # Output only. Data transfer modification time. Ignored by server on input.
77
- # @!attribute [rw] next_run_time
78
- # @return [Google::Protobuf::Timestamp]
79
- # Output only. Next time when data transfer will run.
80
- # @!attribute [rw] state
81
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::TransferState]
82
- # Output only. State of the most recently updated transfer run.
83
- # @!attribute [rw] user_id
84
- # @return [Integer]
85
- # Output only. Unique ID of the user on whose behalf transfer is done.
86
- # Applicable only to data sources that do not support service accounts.
87
- # When set to 0, the data source service account credentials are used.
88
- # May be negative. Note, that this identifier is not stable.
89
- # It may change over time even for the same user.
90
- # @!attribute [rw] dataset_region
91
- # @return [String]
92
- # Output only. Region in which BigQuery dataset is located.
93
- class TransferConfig; end
94
-
95
- # Represents a data transfer run.
96
- # Next id: 27
97
- # @!attribute [rw] name
98
- # @return [String]
99
- # The resource name of the transfer run.
100
- # Transfer run names have the form
101
- # +projects/\\{project_id}/locations/\\{location}/transferConfigs/\\{config_id}/runs/\\{run_id}+.
102
- # The name is ignored when creating a transfer run.
103
- # @!attribute [rw] schedule_time
104
- # @return [Google::Protobuf::Timestamp]
105
- # Minimum time after which a transfer run can be started.
106
- # @!attribute [rw] run_time
107
- # @return [Google::Protobuf::Timestamp]
108
- # For batch transfer runs, specifies the date and time that
109
- # data should be ingested.
110
- # @!attribute [rw] error_status
111
- # @return [Google::Rpc::Status]
112
- # Status of the transfer run.
113
- # @!attribute [rw] start_time
114
- # @return [Google::Protobuf::Timestamp]
115
- # Output only. Time when transfer run was started.
116
- # Parameter ignored by server for input requests.
117
- # @!attribute [rw] end_time
118
- # @return [Google::Protobuf::Timestamp]
119
- # Output only. Time when transfer run ended.
120
- # Parameter ignored by server for input requests.
121
- # @!attribute [rw] update_time
122
- # @return [Google::Protobuf::Timestamp]
123
- # Output only. Last time the data transfer run state was updated.
124
- # @!attribute [rw] params
125
- # @return [Google::Protobuf::Struct]
126
- # Output only. Data transfer specific parameters.
127
- # @!attribute [rw] destination_dataset_id
128
- # @return [String]
129
- # Output only. The BigQuery target dataset id.
130
- # @!attribute [rw] data_source_id
131
- # @return [String]
132
- # Output only. Data source id.
133
- # @!attribute [rw] state
134
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::TransferState]
135
- # Data transfer run state. Ignored for input requests.
136
- # @!attribute [rw] user_id
137
- # @return [Integer]
138
- # Output only. Unique ID of the user on whose behalf transfer is done.
139
- # Applicable only to data sources that do not support service accounts.
140
- # When set to 0, the data source service account credentials are used.
141
- # May be negative. Note, that this identifier is not stable.
142
- # It may change over time even for the same user.
143
- # @!attribute [rw] schedule
144
- # @return [String]
145
- # Output only. Describes the schedule of this transfer run if it was
146
- # created as part of a regular schedule. For batch transfer runs that are
147
- # scheduled manually, this is empty.
148
- # NOTE: the system might choose to delay the schedule depending on the
149
- # current load, so +schedule_time+ doesn't always matches this.
150
- class TransferRun; end
151
-
152
- # Represents a user facing message for a particular data transfer run.
153
- # @!attribute [rw] message_time
154
- # @return [Google::Protobuf::Timestamp]
155
- # Time when message was logged.
156
- # @!attribute [rw] severity
157
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity]
158
- # Message severity.
159
- # @!attribute [rw] message_text
160
- # @return [String]
161
- # Message text.
162
- class TransferMessage
163
- # Represents data transfer user facing message severity.
164
- module MessageSeverity
165
- # No severity specified.
166
- MESSAGE_SEVERITY_UNSPECIFIED = 0
167
-
168
- # Informational message.
169
- INFO = 1
170
-
171
- # Warning message.
172
- WARNING = 2
173
-
174
- # Error message.
175
- ERROR = 3
176
- end
177
- end
178
-
179
- # Represents data transfer type.
180
- module TransferType
181
- # Invalid or Unknown transfer type placeholder.
182
- TRANSFER_TYPE_UNSPECIFIED = 0
183
-
184
- # Batch data transfer.
185
- BATCH = 1
186
-
187
- # Streaming data transfer. Streaming data source currently doesn't
188
- # support multiple transfer configs per project.
189
- STREAMING = 2
190
- end
191
-
192
- # Represents data transfer run state.
193
- module TransferState
194
- # State placeholder.
195
- TRANSFER_STATE_UNSPECIFIED = 0
196
-
197
- # Data transfer is scheduled and is waiting to be picked up by
198
- # data transfer backend.
199
- PENDING = 2
200
-
201
- # Data transfer is in progress.
202
- RUNNING = 3
203
-
204
- # Data transfer completed successsfully.
205
- SUCCEEDED = 4
206
-
207
- # Data transfer failed.
208
- FAILED = 5
209
-
210
- # Data transfer is cancelled.
211
- CANCELLED = 6
212
- end
213
- end
214
- end
215
- end
216
- end
217
- end
@@ -1,570 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Cloud
18
- module Bigquery
19
- module DataTransfer
20
- module V1
21
- # Represents a data source parameter with validation rules, so that
22
- # parameters can be rendered in the UI. These parameters are given to us by
23
- # supported data sources, and include all needed information for rendering
24
- # and validation.
25
- # Thus, whoever uses this api can decide to generate either generic ui,
26
- # or custom data source specific forms.
27
- # @!attribute [rw] param_id
28
- # @return [String]
29
- # Parameter identifier.
30
- # @!attribute [rw] display_name
31
- # @return [String]
32
- # Parameter display name in the user interface.
33
- # @!attribute [rw] description
34
- # @return [String]
35
- # Parameter description.
36
- # @!attribute [rw] type
37
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::DataSourceParameter::Type]
38
- # Parameter type.
39
- # @!attribute [rw] required
40
- # @return [true, false]
41
- # Is parameter required.
42
- # @!attribute [rw] repeated
43
- # @return [true, false]
44
- # Deprecated. This field has no effect.
45
- # @!attribute [rw] validation_regex
46
- # @return [String]
47
- # Regular expression which can be used for parameter validation.
48
- # @!attribute [rw] allowed_values
49
- # @return [Array<String>]
50
- # All possible values for the parameter.
51
- # @!attribute [rw] min_value
52
- # @return [Google::Protobuf::DoubleValue]
53
- # For integer and double values specifies minimum allowed value.
54
- # @!attribute [rw] max_value
55
- # @return [Google::Protobuf::DoubleValue]
56
- # For integer and double values specifies maxminum allowed value.
57
- # @!attribute [rw] fields
58
- # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::DataSourceParameter>]
59
- # Deprecated. This field has no effect.
60
- # @!attribute [rw] validation_description
61
- # @return [String]
62
- # Description of the requirements for this field, in case the user input does
63
- # not fulfill the regex pattern or min/max values.
64
- # @!attribute [rw] validation_help_url
65
- # @return [String]
66
- # URL to a help document to further explain the naming requirements.
67
- # @!attribute [rw] immutable
68
- # @return [true, false]
69
- # Cannot be changed after initial creation.
70
- # @!attribute [rw] recurse
71
- # @return [true, false]
72
- # Deprecated. This field has no effect.
73
- # @!attribute [rw] deprecated
74
- # @return [true, false]
75
- # If true, it should not be used in new transfers, and it should not be
76
- # visible to users.
77
- class DataSourceParameter
78
- # Parameter type.
79
- module Type
80
- # Type unspecified.
81
- TYPE_UNSPECIFIED = 0
82
-
83
- # String parameter.
84
- STRING = 1
85
-
86
- # Integer parameter (64-bits).
87
- # Will be serialized to json as string.
88
- INTEGER = 2
89
-
90
- # Double precision floating point parameter.
91
- DOUBLE = 3
92
-
93
- # Boolean parameter.
94
- BOOLEAN = 4
95
-
96
- # Deprecated. This field has no effect.
97
- RECORD = 5
98
-
99
- # Page ID for a Google+ Page.
100
- PLUS_PAGE = 6
101
- end
102
- end
103
-
104
- # Represents data source metadata. Metadata is sufficient to
105
- # render UI and request proper OAuth tokens.
106
- # @!attribute [rw] name
107
- # @return [String]
108
- # Output only. Data source resource name.
109
- # @!attribute [rw] data_source_id
110
- # @return [String]
111
- # Data source id.
112
- # @!attribute [rw] display_name
113
- # @return [String]
114
- # User friendly data source name.
115
- # @!attribute [rw] description
116
- # @return [String]
117
- # User friendly data source description string.
118
- # @!attribute [rw] client_id
119
- # @return [String]
120
- # Data source client id which should be used to receive refresh token.
121
- # @!attribute [rw] scopes
122
- # @return [Array<String>]
123
- # Api auth scopes for which refresh token needs to be obtained. These are
124
- # scopes needed by a data source to prepare data and ingest them into
125
- # BigQuery, e.g., https://www.googleapis.com/auth/bigquery
126
- # @!attribute [rw] transfer_type
127
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::TransferType]
128
- # Deprecated. This field has no effect.
129
- # @!attribute [rw] supports_multiple_transfers
130
- # @return [true, false]
131
- # Deprecated. This field has no effect.
132
- # @!attribute [rw] update_deadline_seconds
133
- # @return [Integer]
134
- # The number of seconds to wait for an update from the data source
135
- # before the Data Transfer Service marks the transfer as FAILED.
136
- # @!attribute [rw] default_schedule
137
- # @return [String]
138
- # Default data transfer schedule.
139
- # Examples of valid schedules include:
140
- # `1st,3rd monday of month 15:30`,
141
- # `every wed,fri of jan,jun 13:15`, and
142
- # `first sunday of quarter 00:00`.
143
- # @!attribute [rw] supports_custom_schedule
144
- # @return [true, false]
145
- # Specifies whether the data source supports a user defined schedule, or
146
- # operates on the default schedule.
147
- # When set to `true`, user can override default schedule.
148
- # @!attribute [rw] parameters
149
- # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::DataSourceParameter>]
150
- # Data source parameters.
151
- # @!attribute [rw] help_url
152
- # @return [String]
153
- # Url for the help document for this data source.
154
- # @!attribute [rw] authorization_type
155
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::DataSource::AuthorizationType]
156
- # Indicates the type of authorization.
157
- # @!attribute [rw] data_refresh_type
158
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::DataSource::DataRefreshType]
159
- # Specifies whether the data source supports automatic data refresh for the
160
- # past few days, and how it's supported.
161
- # For some data sources, data might not be complete until a few days later,
162
- # so it's useful to refresh data automatically.
163
- # @!attribute [rw] default_data_refresh_window_days
164
- # @return [Integer]
165
- # Default data refresh window on days.
166
- # Only meaningful when `data_refresh_type` = `SLIDING_WINDOW`.
167
- # @!attribute [rw] manual_runs_disabled
168
- # @return [true, false]
169
- # Disables backfilling and manual run scheduling
170
- # for the data source.
171
- # @!attribute [rw] minimum_schedule_interval
172
- # @return [Google::Protobuf::Duration]
173
- # The minimum interval for scheduler to schedule runs.
174
- class DataSource
175
- # The type of authorization needed for this data source.
176
- module AuthorizationType
177
- # Type unspecified.
178
- AUTHORIZATION_TYPE_UNSPECIFIED = 0
179
-
180
- # Use OAuth 2 authorization codes that can be exchanged
181
- # for a refresh token on the backend.
182
- AUTHORIZATION_CODE = 1
183
-
184
- # Return an authorization code for a given Google+ page that can then be
185
- # exchanged for a refresh token on the backend.
186
- GOOGLE_PLUS_AUTHORIZATION_CODE = 2
187
-
188
- # Use First Party Client OAuth. First Party Client OAuth doesn't require a
189
- # refresh token to get an offline access token. Instead, it uses a
190
- # client-signed JWT assertion to retrieve an access token.
191
- FIRST_PARTY_OAUTH = 3
192
- end
193
-
194
- # Represents how the data source supports data auto refresh.
195
- module DataRefreshType
196
- # The data source won't support data auto refresh, which is default value.
197
- DATA_REFRESH_TYPE_UNSPECIFIED = 0
198
-
199
- # The data source supports data auto refresh, and runs will be scheduled
200
- # for the past few days. Does not allow custom values to be set for each
201
- # transfer config.
202
- SLIDING_WINDOW = 1
203
-
204
- # The data source supports data auto refresh, and runs will be scheduled
205
- # for the past few days. Allows custom values to be set for each transfer
206
- # config.
207
- CUSTOM_SLIDING_WINDOW = 2
208
- end
209
- end
210
-
211
- # A request to get data source info.
212
- # @!attribute [rw] name
213
- # @return [String]
214
- # Required. The field will contain name of the resource requested, for example:
215
- # `projects/{project_id}/dataSources/{data_source_id}` or
216
- # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`
217
- class GetDataSourceRequest; end
218
-
219
- # Request to list supported data sources and their data transfer settings.
220
- # @!attribute [rw] parent
221
- # @return [String]
222
- # Required. The BigQuery project id for which data sources should be returned.
223
- # Must be in the form: `projects/{project_id}` or
224
- # `projects/{project_id}/locations/{location_id}
225
- # @!attribute [rw] page_token
226
- # @return [String]
227
- # Pagination token, which can be used to request a specific page
228
- # of `ListDataSourcesRequest` list results. For multiple-page
229
- # results, `ListDataSourcesResponse` outputs
230
- # a `next_page` token, which can be used as the
231
- # `page_token` value to request the next page of list results.
232
- # @!attribute [rw] page_size
233
- # @return [Integer]
234
- # Page size. The default page size is the maximum value of 1000 results.
235
- class ListDataSourcesRequest; end
236
-
237
- # Returns list of supported data sources and their metadata.
238
- # @!attribute [rw] data_sources
239
- # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::DataSource>]
240
- # List of supported data sources and their transfer settings.
241
- # @!attribute [rw] next_page_token
242
- # @return [String]
243
- # Output only. The next-pagination token. For multiple-page list results,
244
- # this token can be used as the
245
- # `ListDataSourcesRequest.page_token`
246
- # to request the next page of list results.
247
- class ListDataSourcesResponse; end
248
-
249
- # A request to create a data transfer configuration. If new credentials are
250
- # needed for this transfer configuration, an authorization code must be
251
- # provided. If an authorization code is provided, the transfer configuration
252
- # will be associated with the user id corresponding to the
253
- # authorization code. Otherwise, the transfer configuration will be associated
254
- # with the calling user.
255
- # @!attribute [rw] parent
256
- # @return [String]
257
- # Required. The BigQuery project id where the transfer configuration should be created.
258
- # Must be in the format projects/\\{project_id}/locations/\\{location_id} or
259
- # projects/\\{project_id}. If specified location and location of the
260
- # destination bigquery dataset do not match - the request will fail.
261
- # @!attribute [rw] transfer_config
262
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig]
263
- # Required. Data transfer configuration to create.
264
- # @!attribute [rw] authorization_code
265
- # @return [String]
266
- # Optional OAuth2 authorization code to use with this transfer configuration.
267
- # This is required if new credentials are needed, as indicated by
268
- # `CheckValidCreds`.
269
- # In order to obtain authorization_code, please make a
270
- # request to
271
- # https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=<datatransferapiclientid>&scope=<data_source_scopes>&redirect_uri=<redirect_uri>
272
- #
273
- # * client_id should be OAuth client_id of BigQuery DTS API for the given
274
- # data source returned by ListDataSources method.
275
- # * data_source_scopes are the scopes returned by ListDataSources method.
276
- # * redirect_uri is an optional parameter. If not specified, then
277
- # authorization code is posted to the opener of authorization flow window.
278
- # Otherwise it will be sent to the redirect uri. A special value of
279
- # urn:ietf:wg:oauth:2.0:oob means that authorization code should be
280
- # returned in the title bar of the browser, with the page text prompting
281
- # the user to copy the code and paste it in the application.
282
- # @!attribute [rw] version_info
283
- # @return [String]
284
- # Optional version info. If users want to find a very recent access token,
285
- # that is, immediately after approving access, users have to set the
286
- # version_info claim in the token request. To obtain the version_info, users
287
- # must use the "none+gsession" response type. which be return a
288
- # version_info back in the authorization response which be be put in a JWT
289
- # claim in the token request.
290
- # @!attribute [rw] service_account_name
291
- # @return [String]
292
- # Optional service account name. If this field is set, transfer config will
293
- # be created with this service account credentials. It requires that
294
- # requesting user calling this API has permissions to act as this service
295
- # account.
296
- class CreateTransferConfigRequest; end
297
-
298
- # A request to update a transfer configuration. To update the user id of the
299
- # transfer configuration, an authorization code needs to be provided.
300
- # @!attribute [rw] transfer_config
301
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig]
302
- # Required. Data transfer configuration to create.
303
- # @!attribute [rw] authorization_code
304
- # @return [String]
305
- # Optional OAuth2 authorization code to use with this transfer configuration.
306
- # If it is provided, the transfer configuration will be associated with the
307
- # authorizing user.
308
- # In order to obtain authorization_code, please make a
309
- # request to
310
- # https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=<datatransferapiclientid>&scope=<data_source_scopes>&redirect_uri=<redirect_uri>
311
- #
312
- # * client_id should be OAuth client_id of BigQuery DTS API for the given
313
- # data source returned by ListDataSources method.
314
- # * data_source_scopes are the scopes returned by ListDataSources method.
315
- # * redirect_uri is an optional parameter. If not specified, then
316
- # authorization code is posted to the opener of authorization flow window.
317
- # Otherwise it will be sent to the redirect uri. A special value of
318
- # urn:ietf:wg:oauth:2.0:oob means that authorization code should be
319
- # returned in the title bar of the browser, with the page text prompting
320
- # the user to copy the code and paste it in the application.
321
- # @!attribute [rw] update_mask
322
- # @return [Google::Protobuf::FieldMask]
323
- # Required. Required list of fields to be updated in this request.
324
- # @!attribute [rw] version_info
325
- # @return [String]
326
- # Optional version info. If users want to find a very recent access token,
327
- # that is, immediately after approving access, users have to set the
328
- # version_info claim in the token request. To obtain the version_info, users
329
- # must use the "none+gsession" response type. which be return a
330
- # version_info back in the authorization response which be be put in a JWT
331
- # claim in the token request.
332
- # @!attribute [rw] service_account_name
333
- # @return [String]
334
- # Optional service account name. If this field is set and
335
- # "service_account_name" is set in update_mask, transfer config will be
336
- # updated to use this service account credentials. It requires that
337
- # requesting user calling this API has permissions to act as this service
338
- # account.
339
- class UpdateTransferConfigRequest; end
340
-
341
- # A request to get data transfer information.
342
- # @!attribute [rw] name
343
- # @return [String]
344
- # Required. The field will contain name of the resource requested, for example:
345
- # `projects/{project_id}/transferConfigs/{config_id}` or
346
- # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`
347
- class GetTransferConfigRequest; end
348
-
349
- # A request to delete data transfer information. All associated transfer runs
350
- # and log messages will be deleted as well.
351
- # @!attribute [rw] name
352
- # @return [String]
353
- # Required. The field will contain name of the resource requested, for example:
354
- # `projects/{project_id}/transferConfigs/{config_id}` or
355
- # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`
356
- class DeleteTransferConfigRequest; end
357
-
358
- # A request to get data transfer run information.
359
- # @!attribute [rw] name
360
- # @return [String]
361
- # Required. The field will contain name of the resource requested, for example:
362
- # `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
363
- # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
364
- class GetTransferRunRequest; end
365
-
366
- # A request to delete data transfer run information.
367
- # @!attribute [rw] name
368
- # @return [String]
369
- # Required. The field will contain name of the resource requested, for example:
370
- # `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
371
- # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
372
- class DeleteTransferRunRequest; end
373
-
374
- # A request to list data transfers configured for a BigQuery project.
375
- # @!attribute [rw] parent
376
- # @return [String]
377
- # Required. The BigQuery project id for which data sources
378
- # should be returned: `projects/{project_id}` or
379
- # `projects/{project_id}/locations/{location_id}`
380
- # @!attribute [rw] data_source_ids
381
- # @return [Array<String>]
382
- # When specified, only configurations of requested data sources are returned.
383
- # @!attribute [rw] page_token
384
- # @return [String]
385
- # Pagination token, which can be used to request a specific page
386
- # of `ListTransfersRequest` list results. For multiple-page
387
- # results, `ListTransfersResponse` outputs
388
- # a `next_page` token, which can be used as the
389
- # `page_token` value to request the next page of list results.
390
- # @!attribute [rw] page_size
391
- # @return [Integer]
392
- # Page size. The default page size is the maximum value of 1000 results.
393
- class ListTransferConfigsRequest; end
394
-
395
- # The returned list of pipelines in the project.
396
- # @!attribute [rw] transfer_configs
397
- # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>]
398
- # Output only. The stored pipeline transfer configurations.
399
- # @!attribute [rw] next_page_token
400
- # @return [String]
401
- # Output only. The next-pagination token. For multiple-page list results,
402
- # this token can be used as the
403
- # `ListTransferConfigsRequest.page_token`
404
- # to request the next page of list results.
405
- class ListTransferConfigsResponse; end
406
-
407
- # A request to list data transfer runs. UI can use this method to show/filter
408
- # specific data transfer runs. The data source can use this method to request
409
- # all scheduled transfer runs.
410
- # @!attribute [rw] parent
411
- # @return [String]
412
- # Required. Name of transfer configuration for which transfer runs should be retrieved.
413
- # Format of transfer configuration resource name is:
414
- # `projects/{project_id}/transferConfigs/{config_id}` or
415
- # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
416
- # @!attribute [rw] states
417
- # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::TransferState>]
418
- # When specified, only transfer runs with requested states are returned.
419
- # @!attribute [rw] page_token
420
- # @return [String]
421
- # Pagination token, which can be used to request a specific page
422
- # of `ListTransferRunsRequest` list results. For multiple-page
423
- # results, `ListTransferRunsResponse` outputs
424
- # a `next_page` token, which can be used as the
425
- # `page_token` value to request the next page of list results.
426
- # @!attribute [rw] page_size
427
- # @return [Integer]
428
- # Page size. The default page size is the maximum value of 1000 results.
429
- # @!attribute [rw] run_attempt
430
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest::RunAttempt]
431
- # Indicates how run attempts are to be pulled.
432
- class ListTransferRunsRequest
433
- # Represents which runs should be pulled.
434
- module RunAttempt
435
- # All runs should be returned.
436
- RUN_ATTEMPT_UNSPECIFIED = 0
437
-
438
- # Only latest run per day should be returned.
439
- LATEST = 1
440
- end
441
- end
442
-
443
- # The returned list of pipelines in the project.
444
- # @!attribute [rw] transfer_runs
445
- # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>]
446
- # Output only. The stored pipeline transfer runs.
447
- # @!attribute [rw] next_page_token
448
- # @return [String]
449
- # Output only. The next-pagination token. For multiple-page list results,
450
- # this token can be used as the
451
- # `ListTransferRunsRequest.page_token`
452
- # to request the next page of list results.
453
- class ListTransferRunsResponse; end
454
-
455
- # A request to get user facing log messages associated with data transfer run.
456
- # @!attribute [rw] parent
457
- # @return [String]
458
- # Required. Transfer run name in the form:
459
- # `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
460
- # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
461
- # @!attribute [rw] page_token
462
- # @return [String]
463
- # Pagination token, which can be used to request a specific page
464
- # of `ListTransferLogsRequest` list results. For multiple-page
465
- # results, `ListTransferLogsResponse` outputs
466
- # a `next_page` token, which can be used as the
467
- # `page_token` value to request the next page of list results.
468
- # @!attribute [rw] page_size
469
- # @return [Integer]
470
- # Page size. The default page size is the maximum value of 1000 results.
471
- # @!attribute [rw] message_types
472
- # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity>]
473
- # Message types to return. If not populated - INFO, WARNING and ERROR
474
- # messages are returned.
475
- class ListTransferLogsRequest; end
476
-
477
- # The returned list transfer run messages.
478
- # @!attribute [rw] transfer_messages
479
- # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>]
480
- # Output only. The stored pipeline transfer messages.
481
- # @!attribute [rw] next_page_token
482
- # @return [String]
483
- # Output only. The next-pagination token. For multiple-page list results,
484
- # this token can be used as the
485
- # `GetTransferRunLogRequest.page_token`
486
- # to request the next page of list results.
487
- class ListTransferLogsResponse; end
488
-
489
- # A request to determine whether the user has valid credentials. This method
490
- # is used to limit the number of OAuth popups in the user interface. The
491
- # user id is inferred from the API call context.
492
- # If the data source has the Google+ authorization type, this method
493
- # returns false, as it cannot be determined whether the credentials are
494
- # already valid merely based on the user id.
495
- # @!attribute [rw] name
496
- # @return [String]
497
- # Required. The data source in the form:
498
- # `projects/{project_id}/dataSources/{data_source_id}` or
499
- # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`.
500
- class CheckValidCredsRequest; end
501
-
502
- # A response indicating whether the credentials exist and are valid.
503
- # @!attribute [rw] has_valid_creds
504
- # @return [true, false]
505
- # If set to `true`, the credentials exist and are valid.
506
- class CheckValidCredsResponse; end
507
-
508
- # A request to schedule transfer runs for a time range.
509
- # @!attribute [rw] parent
510
- # @return [String]
511
- # Required. Transfer configuration name in the form:
512
- # `projects/{project_id}/transferConfigs/{config_id}` or
513
- # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
514
- # @!attribute [rw] start_time
515
- # @return [Google::Protobuf::Timestamp]
516
- # Required. Start time of the range of transfer runs. For example,
517
- # `"2017-05-25T00:00:00+00:00"`.
518
- # @!attribute [rw] end_time
519
- # @return [Google::Protobuf::Timestamp]
520
- # Required. End time of the range of transfer runs. For example,
521
- # `"2017-05-30T00:00:00+00:00"`.
522
- class ScheduleTransferRunsRequest; end
523
-
524
- # A response to schedule transfer runs for a time range.
525
- # @!attribute [rw] runs
526
- # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>]
527
- # The transfer runs that were scheduled.
528
- class ScheduleTransferRunsResponse; end
529
-
530
- # A request to start manual transfer runs.
531
- # @!attribute [rw] parent
532
- # @return [String]
533
- # Transfer configuration name in the form:
534
- # `projects/{project_id}/transferConfigs/{config_id}` or
535
- # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
536
- # @!attribute [rw] requested_time_range
537
- # @return [Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange]
538
- # Time range for the transfer runs that should be started.
539
- # @!attribute [rw] requested_run_time
540
- # @return [Google::Protobuf::Timestamp]
541
- # Specific run_time for a transfer run to be started. The
542
- # requested_run_time must not be in the future.
543
- class StartManualTransferRunsRequest
544
- # A specification for a time range, this will request transfer runs with
545
- # run_time between start_time (inclusive) and end_time (exclusive).
546
- # @!attribute [rw] start_time
547
- # @return [Google::Protobuf::Timestamp]
548
- # Start time of the range of transfer runs. For example,
549
- # `"2017-05-25T00:00:00+00:00"`. The start_time must be strictly less than
550
- # the end_time. Creates transfer runs where run_time is in the range betwen
551
- # start_time (inclusive) and end_time (exlusive).
552
- # @!attribute [rw] end_time
553
- # @return [Google::Protobuf::Timestamp]
554
- # End time of the range of transfer runs. For example,
555
- # `"2017-05-30T00:00:00+00:00"`. The end_time must not be in the future.
556
- # Creates transfer runs where run_time is in the range betwen start_time
557
- # (inclusive) and end_time (exlusive).
558
- class TimeRange; end
559
- end
560
-
561
- # A response to start manual transfer runs.
562
- # @!attribute [rw] runs
563
- # @return [Array<Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>]
564
- # The transfer runs that were created.
565
- class StartManualTransferRunsResponse; end
566
- end
567
- end
568
- end
569
- end
570
- end