datatransfer.proto 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843
  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. // http://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. syntax = "proto3";
  15. package google.cloud.bigquery.datatransfer.v1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/cloud/bigquery/datatransfer/v1/transfer.proto";
  21. import "google/protobuf/duration.proto";
  22. import "google/protobuf/empty.proto";
  23. import "google/protobuf/field_mask.proto";
  24. import "google/protobuf/timestamp.proto";
  25. import "google/protobuf/wrappers.proto";
  26. option csharp_namespace = "Google.Cloud.BigQuery.DataTransfer.V1";
  27. option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1;datatransfer";
  28. option java_multiple_files = true;
  29. option java_outer_classname = "DataTransferProto";
  30. option java_package = "com.google.cloud.bigquery.datatransfer.v1";
  31. option php_namespace = "Google\\Cloud\\BigQuery\\DataTransfer\\V1";
  32. option ruby_package = "Google::Cloud::Bigquery::DataTransfer::V1";
  33. // The Google BigQuery Data Transfer Service API enables BigQuery users to
  34. // configure the transfer of their data from other Google Products into
  35. // BigQuery. This service contains methods that are end user exposed. It backs
  36. // up the frontend.
  37. service DataTransferService {
  38. option (google.api.default_host) = "bigquerydatatransfer.googleapis.com";
  39. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  40. // Retrieves a supported data source and returns its settings,
  41. // which can be used for UI rendering.
  42. rpc GetDataSource(GetDataSourceRequest) returns (DataSource) {
  43. option (google.api.http) = {
  44. get: "/v1/{name=projects/*/locations/*/dataSources/*}"
  45. additional_bindings {
  46. get: "/v1/{name=projects/*/dataSources/*}"
  47. }
  48. };
  49. option (google.api.method_signature) = "name";
  50. }
  51. // Lists supported data sources and returns their settings,
  52. // which can be used for UI rendering.
  53. rpc ListDataSources(ListDataSourcesRequest) returns (ListDataSourcesResponse) {
  54. option (google.api.http) = {
  55. get: "/v1/{parent=projects/*/locations/*}/dataSources"
  56. additional_bindings {
  57. get: "/v1/{parent=projects/*}/dataSources"
  58. }
  59. };
  60. option (google.api.method_signature) = "parent";
  61. }
  62. // Creates a new data transfer configuration.
  63. rpc CreateTransferConfig(CreateTransferConfigRequest) returns (TransferConfig) {
  64. option (google.api.http) = {
  65. post: "/v1/{parent=projects/*/locations/*}/transferConfigs"
  66. body: "transfer_config"
  67. additional_bindings {
  68. post: "/v1/{parent=projects/*}/transferConfigs"
  69. body: "transfer_config"
  70. }
  71. };
  72. option (google.api.method_signature) = "parent,transfer_config";
  73. }
  74. // Updates a data transfer configuration.
  75. // All fields must be set, even if they are not updated.
  76. rpc UpdateTransferConfig(UpdateTransferConfigRequest) returns (TransferConfig) {
  77. option (google.api.http) = {
  78. patch: "/v1/{transfer_config.name=projects/*/locations/*/transferConfigs/*}"
  79. body: "transfer_config"
  80. additional_bindings {
  81. patch: "/v1/{transfer_config.name=projects/*/transferConfigs/*}"
  82. body: "transfer_config"
  83. }
  84. };
  85. option (google.api.method_signature) = "transfer_config,update_mask";
  86. }
  87. // Deletes a data transfer configuration,
  88. // including any associated transfer runs and logs.
  89. rpc DeleteTransferConfig(DeleteTransferConfigRequest) returns (google.protobuf.Empty) {
  90. option (google.api.http) = {
  91. delete: "/v1/{name=projects/*/locations/*/transferConfigs/*}"
  92. additional_bindings {
  93. delete: "/v1/{name=projects/*/transferConfigs/*}"
  94. }
  95. };
  96. option (google.api.method_signature) = "name";
  97. }
  98. // Returns information about a data transfer config.
  99. rpc GetTransferConfig(GetTransferConfigRequest) returns (TransferConfig) {
  100. option (google.api.http) = {
  101. get: "/v1/{name=projects/*/locations/*/transferConfigs/*}"
  102. additional_bindings {
  103. get: "/v1/{name=projects/*/transferConfigs/*}"
  104. }
  105. };
  106. option (google.api.method_signature) = "name";
  107. }
  108. // Returns information about all data transfers in the project.
  109. rpc ListTransferConfigs(ListTransferConfigsRequest) returns (ListTransferConfigsResponse) {
  110. option (google.api.http) = {
  111. get: "/v1/{parent=projects/*/locations/*}/transferConfigs"
  112. additional_bindings {
  113. get: "/v1/{parent=projects/*}/transferConfigs"
  114. }
  115. };
  116. option (google.api.method_signature) = "parent";
  117. }
  118. // Creates transfer runs for a time range [start_time, end_time].
  119. // For each date - or whatever granularity the data source supports - in the
  120. // range, one transfer run is created.
  121. // Note that runs are created per UTC time in the time range.
  122. // DEPRECATED: use StartManualTransferRuns instead.
  123. rpc ScheduleTransferRuns(ScheduleTransferRunsRequest) returns (ScheduleTransferRunsResponse) {
  124. option deprecated = true;
  125. option (google.api.http) = {
  126. post: "/v1/{parent=projects/*/locations/*/transferConfigs/*}:scheduleRuns"
  127. body: "*"
  128. additional_bindings {
  129. post: "/v1/{parent=projects/*/transferConfigs/*}:scheduleRuns"
  130. body: "*"
  131. }
  132. };
  133. option (google.api.method_signature) = "parent,start_time,end_time";
  134. }
  135. // Start manual transfer runs to be executed now with schedule_time equal to
  136. // current time. The transfer runs can be created for a time range where the
  137. // run_time is between start_time (inclusive) and end_time (exclusive), or for
  138. // a specific run_time.
  139. rpc StartManualTransferRuns(StartManualTransferRunsRequest) returns (StartManualTransferRunsResponse) {
  140. option (google.api.http) = {
  141. post: "/v1/{parent=projects/*/locations/*/transferConfigs/*}:startManualRuns"
  142. body: "*"
  143. additional_bindings {
  144. post: "/v1/{parent=projects/*/transferConfigs/*}:startManualRuns"
  145. body: "*"
  146. }
  147. };
  148. }
  149. // Returns information about the particular transfer run.
  150. rpc GetTransferRun(GetTransferRunRequest) returns (TransferRun) {
  151. option (google.api.http) = {
  152. get: "/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}"
  153. additional_bindings {
  154. get: "/v1/{name=projects/*/transferConfigs/*/runs/*}"
  155. }
  156. };
  157. option (google.api.method_signature) = "name";
  158. }
  159. // Deletes the specified transfer run.
  160. rpc DeleteTransferRun(DeleteTransferRunRequest) returns (google.protobuf.Empty) {
  161. option (google.api.http) = {
  162. delete: "/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}"
  163. additional_bindings {
  164. delete: "/v1/{name=projects/*/transferConfigs/*/runs/*}"
  165. }
  166. };
  167. option (google.api.method_signature) = "name";
  168. }
  169. // Returns information about running and completed jobs.
  170. rpc ListTransferRuns(ListTransferRunsRequest) returns (ListTransferRunsResponse) {
  171. option (google.api.http) = {
  172. get: "/v1/{parent=projects/*/locations/*/transferConfigs/*}/runs"
  173. additional_bindings {
  174. get: "/v1/{parent=projects/*/transferConfigs/*}/runs"
  175. }
  176. };
  177. option (google.api.method_signature) = "parent";
  178. }
  179. // Returns user facing log messages for the data transfer run.
  180. rpc ListTransferLogs(ListTransferLogsRequest) returns (ListTransferLogsResponse) {
  181. option (google.api.http) = {
  182. get: "/v1/{parent=projects/*/locations/*/transferConfigs/*/runs/*}/transferLogs"
  183. additional_bindings {
  184. get: "/v1/{parent=projects/*/transferConfigs/*/runs/*}/transferLogs"
  185. }
  186. };
  187. option (google.api.method_signature) = "parent";
  188. }
  189. // Returns true if valid credentials exist for the given data source and
  190. // requesting user.
  191. // Some data sources doesn't support service account, so we need to talk to
  192. // them on behalf of the end user. This API just checks whether we have OAuth
  193. // token for the particular user, which is a pre-requisite before user can
  194. // create a transfer config.
  195. rpc CheckValidCreds(CheckValidCredsRequest) returns (CheckValidCredsResponse) {
  196. option (google.api.http) = {
  197. post: "/v1/{name=projects/*/locations/*/dataSources/*}:checkValidCreds"
  198. body: "*"
  199. additional_bindings {
  200. post: "/v1/{name=projects/*/dataSources/*}:checkValidCreds"
  201. body: "*"
  202. }
  203. };
  204. option (google.api.method_signature) = "name";
  205. }
  206. }
  207. // Represents a data source parameter with validation rules, so that
  208. // parameters can be rendered in the UI. These parameters are given to us by
  209. // supported data sources, and include all needed information for rendering
  210. // and validation.
  211. // Thus, whoever uses this api can decide to generate either generic ui,
  212. // or custom data source specific forms.
  213. message DataSourceParameter {
  214. // Parameter type.
  215. enum Type {
  216. // Type unspecified.
  217. TYPE_UNSPECIFIED = 0;
  218. // String parameter.
  219. STRING = 1;
  220. // Integer parameter (64-bits).
  221. // Will be serialized to json as string.
  222. INTEGER = 2;
  223. // Double precision floating point parameter.
  224. DOUBLE = 3;
  225. // Boolean parameter.
  226. BOOLEAN = 4;
  227. // Deprecated. This field has no effect.
  228. RECORD = 5;
  229. // Page ID for a Google+ Page.
  230. PLUS_PAGE = 6;
  231. }
  232. // Parameter identifier.
  233. string param_id = 1;
  234. // Parameter display name in the user interface.
  235. string display_name = 2;
  236. // Parameter description.
  237. string description = 3;
  238. // Parameter type.
  239. Type type = 4;
  240. // Is parameter required.
  241. bool required = 5;
  242. // Deprecated. This field has no effect.
  243. bool repeated = 6;
  244. // Regular expression which can be used for parameter validation.
  245. string validation_regex = 7;
  246. // All possible values for the parameter.
  247. repeated string allowed_values = 8;
  248. // For integer and double values specifies minimum allowed value.
  249. google.protobuf.DoubleValue min_value = 9;
  250. // For integer and double values specifies maxminum allowed value.
  251. google.protobuf.DoubleValue max_value = 10;
  252. // Deprecated. This field has no effect.
  253. repeated DataSourceParameter fields = 11;
  254. // Description of the requirements for this field, in case the user input does
  255. // not fulfill the regex pattern or min/max values.
  256. string validation_description = 12;
  257. // URL to a help document to further explain the naming requirements.
  258. string validation_help_url = 13;
  259. // Cannot be changed after initial creation.
  260. bool immutable = 14;
  261. // Deprecated. This field has no effect.
  262. bool recurse = 15;
  263. // If true, it should not be used in new transfers, and it should not be
  264. // visible to users.
  265. bool deprecated = 20;
  266. }
  267. // Represents data source metadata. Metadata is sufficient to
  268. // render UI and request proper OAuth tokens.
  269. message DataSource {
  270. option (google.api.resource) = {
  271. type: "bigquerydatatransfer.googleapis.com/DataSource"
  272. pattern: "projects/{project}/dataSources/{data_source}"
  273. pattern: "projects/{project}/locations/{location}/dataSources/{data_source}"
  274. };
  275. // The type of authorization needed for this data source.
  276. enum AuthorizationType {
  277. // Type unspecified.
  278. AUTHORIZATION_TYPE_UNSPECIFIED = 0;
  279. // Use OAuth 2 authorization codes that can be exchanged
  280. // for a refresh token on the backend.
  281. AUTHORIZATION_CODE = 1;
  282. // Return an authorization code for a given Google+ page that can then be
  283. // exchanged for a refresh token on the backend.
  284. GOOGLE_PLUS_AUTHORIZATION_CODE = 2;
  285. // Use First Party Client OAuth. First Party Client OAuth doesn't require a
  286. // refresh token to get an offline access token. Instead, it uses a
  287. // client-signed JWT assertion to retrieve an access token.
  288. FIRST_PARTY_OAUTH = 3;
  289. }
  290. // Represents how the data source supports data auto refresh.
  291. enum DataRefreshType {
  292. // The data source won't support data auto refresh, which is default value.
  293. DATA_REFRESH_TYPE_UNSPECIFIED = 0;
  294. // The data source supports data auto refresh, and runs will be scheduled
  295. // for the past few days. Does not allow custom values to be set for each
  296. // transfer config.
  297. SLIDING_WINDOW = 1;
  298. // The data source supports data auto refresh, and runs will be scheduled
  299. // for the past few days. Allows custom values to be set for each transfer
  300. // config.
  301. CUSTOM_SLIDING_WINDOW = 2;
  302. }
  303. // Output only. Data source resource name.
  304. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  305. // Data source id.
  306. string data_source_id = 2;
  307. // User friendly data source name.
  308. string display_name = 3;
  309. // User friendly data source description string.
  310. string description = 4;
  311. // Data source client id which should be used to receive refresh token.
  312. string client_id = 5;
  313. // Api auth scopes for which refresh token needs to be obtained. These are
  314. // scopes needed by a data source to prepare data and ingest them into
  315. // BigQuery, e.g., https://www.googleapis.com/auth/bigquery
  316. repeated string scopes = 6;
  317. // Deprecated. This field has no effect.
  318. TransferType transfer_type = 7 [deprecated = true];
  319. // Deprecated. This field has no effect.
  320. bool supports_multiple_transfers = 8 [deprecated = true];
  321. // The number of seconds to wait for an update from the data source
  322. // before the Data Transfer Service marks the transfer as FAILED.
  323. int32 update_deadline_seconds = 9;
  324. // Default data transfer schedule.
  325. // Examples of valid schedules include:
  326. // `1st,3rd monday of month 15:30`,
  327. // `every wed,fri of jan,jun 13:15`, and
  328. // `first sunday of quarter 00:00`.
  329. string default_schedule = 10;
  330. // Specifies whether the data source supports a user defined schedule, or
  331. // operates on the default schedule.
  332. // When set to `true`, user can override default schedule.
  333. bool supports_custom_schedule = 11;
  334. // Data source parameters.
  335. repeated DataSourceParameter parameters = 12;
  336. // Url for the help document for this data source.
  337. string help_url = 13;
  338. // Indicates the type of authorization.
  339. AuthorizationType authorization_type = 14;
  340. // Specifies whether the data source supports automatic data refresh for the
  341. // past few days, and how it's supported.
  342. // For some data sources, data might not be complete until a few days later,
  343. // so it's useful to refresh data automatically.
  344. DataRefreshType data_refresh_type = 15;
  345. // Default data refresh window on days.
  346. // Only meaningful when `data_refresh_type` = `SLIDING_WINDOW`.
  347. int32 default_data_refresh_window_days = 16;
  348. // Disables backfilling and manual run scheduling
  349. // for the data source.
  350. bool manual_runs_disabled = 17;
  351. // The minimum interval for scheduler to schedule runs.
  352. google.protobuf.Duration minimum_schedule_interval = 18;
  353. }
  354. // A request to get data source info.
  355. message GetDataSourceRequest {
  356. // Required. The field will contain name of the resource requested, for example:
  357. // `projects/{project_id}/dataSources/{data_source_id}` or
  358. // `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`
  359. string name = 1 [
  360. (google.api.field_behavior) = REQUIRED,
  361. (google.api.resource_reference) = {
  362. type: "bigquerydatatransfer.googleapis.com/DataSource"
  363. }
  364. ];
  365. }
  366. // Request to list supported data sources and their data transfer settings.
  367. message ListDataSourcesRequest {
  368. // Required. The BigQuery project id for which data sources should be returned.
  369. // Must be in the form: `projects/{project_id}` or
  370. // `projects/{project_id}/locations/{location_id}
  371. string parent = 1 [
  372. (google.api.field_behavior) = REQUIRED,
  373. (google.api.resource_reference) = {
  374. child_type: "bigquerydatatransfer.googleapis.com/DataSource"
  375. }
  376. ];
  377. // Pagination token, which can be used to request a specific page
  378. // of `ListDataSourcesRequest` list results. For multiple-page
  379. // results, `ListDataSourcesResponse` outputs
  380. // a `next_page` token, which can be used as the
  381. // `page_token` value to request the next page of list results.
  382. string page_token = 3;
  383. // Page size. The default page size is the maximum value of 1000 results.
  384. int32 page_size = 4;
  385. }
  386. // Returns list of supported data sources and their metadata.
  387. message ListDataSourcesResponse {
  388. // List of supported data sources and their transfer settings.
  389. repeated DataSource data_sources = 1;
  390. // Output only. The next-pagination token. For multiple-page list results,
  391. // this token can be used as the
  392. // `ListDataSourcesRequest.page_token`
  393. // to request the next page of list results.
  394. string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  395. }
  396. // A request to create a data transfer configuration. If new credentials are
  397. // needed for this transfer configuration, an authorization code must be
  398. // provided. If an authorization code is provided, the transfer configuration
  399. // will be associated with the user id corresponding to the
  400. // authorization code. Otherwise, the transfer configuration will be associated
  401. // with the calling user.
  402. message CreateTransferConfigRequest {
  403. // Required. The BigQuery project id where the transfer configuration should be created.
  404. // Must be in the format projects/{project_id}/locations/{location_id} or
  405. // projects/{project_id}. If specified location and location of the
  406. // destination bigquery dataset do not match - the request will fail.
  407. string parent = 1 [
  408. (google.api.field_behavior) = REQUIRED,
  409. (google.api.resource_reference) = {
  410. child_type: "bigquerydatatransfer.googleapis.com/TransferConfig"
  411. }
  412. ];
  413. // Required. Data transfer configuration to create.
  414. TransferConfig transfer_config = 2 [(google.api.field_behavior) = REQUIRED];
  415. // Optional OAuth2 authorization code to use with this transfer configuration.
  416. // This is required if new credentials are needed, as indicated by
  417. // `CheckValidCreds`.
  418. // In order to obtain authorization_code, please make a
  419. // request to
  420. // https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=<datatransferapiclientid>&scope=<data_source_scopes>&redirect_uri=<redirect_uri>
  421. //
  422. // * client_id should be OAuth client_id of BigQuery DTS API for the given
  423. // data source returned by ListDataSources method.
  424. // * data_source_scopes are the scopes returned by ListDataSources method.
  425. // * redirect_uri is an optional parameter. If not specified, then
  426. // authorization code is posted to the opener of authorization flow window.
  427. // Otherwise it will be sent to the redirect uri. A special value of
  428. // urn:ietf:wg:oauth:2.0:oob means that authorization code should be
  429. // returned in the title bar of the browser, with the page text prompting
  430. // the user to copy the code and paste it in the application.
  431. string authorization_code = 3;
  432. // Optional version info. If users want to find a very recent access token,
  433. // that is, immediately after approving access, users have to set the
  434. // version_info claim in the token request. To obtain the version_info, users
  435. // must use the "none+gsession" response type. which be return a
  436. // version_info back in the authorization response which be be put in a JWT
  437. // claim in the token request.
  438. string version_info = 5;
  439. // Optional service account name. If this field is set, transfer config will
  440. // be created with this service account credentials. It requires that
  441. // requesting user calling this API has permissions to act as this service
  442. // account.
  443. string service_account_name = 6;
  444. }
  445. // A request to update a transfer configuration. To update the user id of the
  446. // transfer configuration, an authorization code needs to be provided.
  447. message UpdateTransferConfigRequest {
  448. // Required. Data transfer configuration to create.
  449. TransferConfig transfer_config = 1 [(google.api.field_behavior) = REQUIRED];
  450. // Optional OAuth2 authorization code to use with this transfer configuration.
  451. // If it is provided, the transfer configuration will be associated with the
  452. // authorizing user.
  453. // In order to obtain authorization_code, please make a
  454. // request to
  455. // https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=<datatransferapiclientid>&scope=<data_source_scopes>&redirect_uri=<redirect_uri>
  456. //
  457. // * client_id should be OAuth client_id of BigQuery DTS API for the given
  458. // data source returned by ListDataSources method.
  459. // * data_source_scopes are the scopes returned by ListDataSources method.
  460. // * redirect_uri is an optional parameter. If not specified, then
  461. // authorization code is posted to the opener of authorization flow window.
  462. // Otherwise it will be sent to the redirect uri. A special value of
  463. // urn:ietf:wg:oauth:2.0:oob means that authorization code should be
  464. // returned in the title bar of the browser, with the page text prompting
  465. // the user to copy the code and paste it in the application.
  466. string authorization_code = 3;
  467. // Required. Required list of fields to be updated in this request.
  468. google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED];
  469. // Optional version info. If users want to find a very recent access token,
  470. // that is, immediately after approving access, users have to set the
  471. // version_info claim in the token request. To obtain the version_info, users
  472. // must use the "none+gsession" response type. which be return a
  473. // version_info back in the authorization response which be be put in a JWT
  474. // claim in the token request.
  475. string version_info = 5;
  476. // Optional service account name. If this field is set and
  477. // "service_account_name" is set in update_mask, transfer config will be
  478. // updated to use this service account credentials. It requires that
  479. // requesting user calling this API has permissions to act as this service
  480. // account.
  481. string service_account_name = 6;
  482. }
  483. // A request to get data transfer information.
  484. message GetTransferConfigRequest {
  485. // Required. The field will contain name of the resource requested, for example:
  486. // `projects/{project_id}/transferConfigs/{config_id}` or
  487. // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`
  488. string name = 1 [
  489. (google.api.field_behavior) = REQUIRED,
  490. (google.api.resource_reference) = {
  491. type: "bigquerydatatransfer.googleapis.com/TransferConfig"
  492. }
  493. ];
  494. }
  495. // A request to delete data transfer information. All associated transfer runs
  496. // and log messages will be deleted as well.
  497. message DeleteTransferConfigRequest {
  498. // Required. The field will contain name of the resource requested, for example:
  499. // `projects/{project_id}/transferConfigs/{config_id}` or
  500. // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`
  501. string name = 1 [
  502. (google.api.field_behavior) = REQUIRED,
  503. (google.api.resource_reference) = {
  504. type: "bigquerydatatransfer.googleapis.com/TransferConfig"
  505. }
  506. ];
  507. }
  508. // A request to get data transfer run information.
  509. message GetTransferRunRequest {
  510. // Required. The field will contain name of the resource requested, for example:
  511. // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
  512. // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
  513. string name = 1 [
  514. (google.api.field_behavior) = REQUIRED,
  515. (google.api.resource_reference) = {
  516. type: "bigquerydatatransfer.googleapis.com/Run"
  517. }
  518. ];
  519. }
  520. // A request to delete data transfer run information.
  521. message DeleteTransferRunRequest {
  522. // Required. The field will contain name of the resource requested, for example:
  523. // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
  524. // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
  525. string name = 1 [
  526. (google.api.field_behavior) = REQUIRED,
  527. (google.api.resource_reference) = {
  528. type: "bigquerydatatransfer.googleapis.com/Run"
  529. }
  530. ];
  531. }
  532. // A request to list data transfers configured for a BigQuery project.
  533. message ListTransferConfigsRequest {
  534. // Required. The BigQuery project id for which data sources
  535. // should be returned: `projects/{project_id}` or
  536. // `projects/{project_id}/locations/{location_id}`
  537. string parent = 1 [
  538. (google.api.field_behavior) = REQUIRED,
  539. (google.api.resource_reference) = {
  540. child_type: "bigquerydatatransfer.googleapis.com/TransferConfig"
  541. }
  542. ];
  543. // When specified, only configurations of requested data sources are returned.
  544. repeated string data_source_ids = 2;
  545. // Pagination token, which can be used to request a specific page
  546. // of `ListTransfersRequest` list results. For multiple-page
  547. // results, `ListTransfersResponse` outputs
  548. // a `next_page` token, which can be used as the
  549. // `page_token` value to request the next page of list results.
  550. string page_token = 3;
  551. // Page size. The default page size is the maximum value of 1000 results.
  552. int32 page_size = 4;
  553. }
  554. // The returned list of pipelines in the project.
  555. message ListTransferConfigsResponse {
  556. // Output only. The stored pipeline transfer configurations.
  557. repeated TransferConfig transfer_configs = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  558. // Output only. The next-pagination token. For multiple-page list results,
  559. // this token can be used as the
  560. // `ListTransferConfigsRequest.page_token`
  561. // to request the next page of list results.
  562. string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  563. }
  564. // A request to list data transfer runs. UI can use this method to show/filter
  565. // specific data transfer runs. The data source can use this method to request
  566. // all scheduled transfer runs.
  567. message ListTransferRunsRequest {
  568. // Represents which runs should be pulled.
  569. enum RunAttempt {
  570. // All runs should be returned.
  571. RUN_ATTEMPT_UNSPECIFIED = 0;
  572. // Only latest run per day should be returned.
  573. LATEST = 1;
  574. }
  575. // Required. Name of transfer configuration for which transfer runs should be retrieved.
  576. // Format of transfer configuration resource name is:
  577. // `projects/{project_id}/transferConfigs/{config_id}` or
  578. // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
  579. string parent = 1 [
  580. (google.api.field_behavior) = REQUIRED,
  581. (google.api.resource_reference) = {
  582. child_type: "bigquerydatatransfer.googleapis.com/Run"
  583. }
  584. ];
  585. // When specified, only transfer runs with requested states are returned.
  586. repeated TransferState states = 2;
  587. // Pagination token, which can be used to request a specific page
  588. // of `ListTransferRunsRequest` list results. For multiple-page
  589. // results, `ListTransferRunsResponse` outputs
  590. // a `next_page` token, which can be used as the
  591. // `page_token` value to request the next page of list results.
  592. string page_token = 3;
  593. // Page size. The default page size is the maximum value of 1000 results.
  594. int32 page_size = 4;
  595. // Indicates how run attempts are to be pulled.
  596. RunAttempt run_attempt = 5;
  597. }
  598. // The returned list of pipelines in the project.
  599. message ListTransferRunsResponse {
  600. // Output only. The stored pipeline transfer runs.
  601. repeated TransferRun transfer_runs = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  602. // Output only. The next-pagination token. For multiple-page list results,
  603. // this token can be used as the
  604. // `ListTransferRunsRequest.page_token`
  605. // to request the next page of list results.
  606. string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  607. }
  608. // A request to get user facing log messages associated with data transfer run.
  609. message ListTransferLogsRequest {
  610. // Required. Transfer run name in the form:
  611. // `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or
  612. // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}`
  613. string parent = 1 [
  614. (google.api.field_behavior) = REQUIRED,
  615. (google.api.resource_reference) = {
  616. type: "bigquerydatatransfer.googleapis.com/Run"
  617. }
  618. ];
  619. // Pagination token, which can be used to request a specific page
  620. // of `ListTransferLogsRequest` list results. For multiple-page
  621. // results, `ListTransferLogsResponse` outputs
  622. // a `next_page` token, which can be used as the
  623. // `page_token` value to request the next page of list results.
  624. string page_token = 4;
  625. // Page size. The default page size is the maximum value of 1000 results.
  626. int32 page_size = 5;
  627. // Message types to return. If not populated - INFO, WARNING and ERROR
  628. // messages are returned.
  629. repeated TransferMessage.MessageSeverity message_types = 6;
  630. }
  631. // The returned list transfer run messages.
  632. message ListTransferLogsResponse {
  633. // Output only. The stored pipeline transfer messages.
  634. repeated TransferMessage transfer_messages = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  635. // Output only. The next-pagination token. For multiple-page list results,
  636. // this token can be used as the
  637. // `GetTransferRunLogRequest.page_token`
  638. // to request the next page of list results.
  639. string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  640. }
  641. // A request to determine whether the user has valid credentials. This method
  642. // is used to limit the number of OAuth popups in the user interface. The
  643. // user id is inferred from the API call context.
  644. // If the data source has the Google+ authorization type, this method
  645. // returns false, as it cannot be determined whether the credentials are
  646. // already valid merely based on the user id.
  647. message CheckValidCredsRequest {
  648. // Required. The data source in the form:
  649. // `projects/{project_id}/dataSources/{data_source_id}` or
  650. // `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`.
  651. string name = 1 [
  652. (google.api.field_behavior) = REQUIRED,
  653. (google.api.resource_reference) = {
  654. type: "bigquerydatatransfer.googleapis.com/DataSource"
  655. }
  656. ];
  657. }
  658. // A response indicating whether the credentials exist and are valid.
  659. message CheckValidCredsResponse {
  660. // If set to `true`, the credentials exist and are valid.
  661. bool has_valid_creds = 1;
  662. }
  663. // A request to schedule transfer runs for a time range.
  664. message ScheduleTransferRunsRequest {
  665. // Required. Transfer configuration name in the form:
  666. // `projects/{project_id}/transferConfigs/{config_id}` or
  667. // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
  668. string parent = 1 [
  669. (google.api.field_behavior) = REQUIRED,
  670. (google.api.resource_reference) = {
  671. type: "bigquerydatatransfer.googleapis.com/TransferConfig"
  672. }
  673. ];
  674. // Required. Start time of the range of transfer runs. For example,
  675. // `"2017-05-25T00:00:00+00:00"`.
  676. google.protobuf.Timestamp start_time = 2 [(google.api.field_behavior) = REQUIRED];
  677. // Required. End time of the range of transfer runs. For example,
  678. // `"2017-05-30T00:00:00+00:00"`.
  679. google.protobuf.Timestamp end_time = 3 [(google.api.field_behavior) = REQUIRED];
  680. }
  681. // A response to schedule transfer runs for a time range.
  682. message ScheduleTransferRunsResponse {
  683. // The transfer runs that were scheduled.
  684. repeated TransferRun runs = 1;
  685. }
  686. // A request to start manual transfer runs.
  687. message StartManualTransferRunsRequest {
  688. // A specification for a time range, this will request transfer runs with
  689. // run_time between start_time (inclusive) and end_time (exclusive).
  690. message TimeRange {
  691. // Start time of the range of transfer runs. For example,
  692. // `"2017-05-25T00:00:00+00:00"`. The start_time must be strictly less than
  693. // the end_time. Creates transfer runs where run_time is in the range betwen
  694. // start_time (inclusive) and end_time (exlusive).
  695. google.protobuf.Timestamp start_time = 1;
  696. // End time of the range of transfer runs. For example,
  697. // `"2017-05-30T00:00:00+00:00"`. The end_time must not be in the future.
  698. // Creates transfer runs where run_time is in the range betwen start_time
  699. // (inclusive) and end_time (exlusive).
  700. google.protobuf.Timestamp end_time = 2;
  701. }
  702. // Transfer configuration name in the form:
  703. // `projects/{project_id}/transferConfigs/{config_id}` or
  704. // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`.
  705. string parent = 1 [(google.api.resource_reference) = {
  706. type: "bigquerydatatransfer.googleapis.com/TransferConfig"
  707. }];
  708. // The requested time specification - this can be a time range or a specific
  709. // run_time.
  710. oneof time {
  711. // Time range for the transfer runs that should be started.
  712. TimeRange requested_time_range = 3;
  713. // Specific run_time for a transfer run to be started. The
  714. // requested_run_time must not be in the future.
  715. google.protobuf.Timestamp requested_run_time = 4;
  716. }
  717. }
  718. // A response to start manual transfer runs.
  719. message StartManualTransferRunsResponse {
  720. // The transfer runs that were created.
  721. repeated TransferRun runs = 1;
  722. }