1- // Copyright 2021 Google LLC
1+ // Copyright 2022 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -217,10 +217,12 @@ service DataTransferService {
217217
218218 // Enroll data sources in a user project. This allows users to create transfer
219219 // configurations for these data sources. They will also appear in the
220- // ListDataSources RPC and as such, will appear in the BigQuery UI
221- // 'https://bigquery.cloud.google.com' (and the documents can be found at
222- // https://cloud.google.com/bigquery/bigquery-web-ui and
223- // https://cloud.google.com/bigquery/docs/working-with-transfers).
220+ // ListDataSources RPC and as such, will appear in the
221+ // [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents
222+ // can be found in the public guide for
223+ // [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and
224+ // [Data Transfer
225+ // Service](https://cloud.google.com/bigquery/docs/working-with-transfers).
224226 rpc EnrollDataSources (EnrollDataSourcesRequest ) returns (google.protobuf.Empty ) {
225227 option (google.api.http ) = {
226228 post : "/v1/{name=projects/*/locations/*}:enrollDataSources"
@@ -287,7 +289,7 @@ message DataSourceParameter {
287289 // For integer and double values specifies minimum allowed value.
288290 google.protobuf.DoubleValue min_value = 9 ;
289291
290- // For integer and double values specifies maxminum allowed value.
292+ // For integer and double values specifies maximum allowed value.
291293 google.protobuf.DoubleValue max_value = 10 ;
292294
293295 // Deprecated. This field has no effect.
@@ -438,7 +440,7 @@ message GetDataSourceRequest {
438440message ListDataSourcesRequest {
439441 // Required. The BigQuery project id for which data sources should be returned.
440442 // Must be in the form: `projects/{project_id}` or
441- // `projects/{project_id}/locations/{location_id}
443+ // `projects/{project_id}/locations/{location_id}`
442444 string parent = 1 [
443445 (google.api.field_behavior ) = REQUIRED ,
444446 (google.api.resource_reference ) = {
@@ -470,9 +472,9 @@ message ListDataSourcesResponse {
470472}
471473
472474// A request to create a data transfer configuration. If new credentials are
473- // needed for this transfer configuration, an authorization code must be
474- // provided. If an authorization code is provided, the transfer configuration
475- // will be associated with the user id corresponding to the authorization code .
475+ // needed for this transfer configuration, authorization info must be provided.
476+ // If authorization info is provided, the transfer configuration will be
477+ // associated with the user id corresponding to the authorization info .
476478// Otherwise, the transfer configuration will be associated with the calling
477479// user.
478480message CreateTransferConfigRequest {
@@ -491,78 +493,99 @@ message CreateTransferConfigRequest {
491493 TransferConfig transfer_config = 2 [(google.api.field_behavior ) = REQUIRED ];
492494
493495 // Optional OAuth2 authorization code to use with this transfer configuration.
494- // This is required if new credentials are needed, as indicated by
495- // `CheckValidCreds`.
496- // In order to obtain authorization_code, please make a
497- // request to
498- // https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=<datatransferapiclientid>&scope=<data_source_scopes>&redirect_uri=<redirect_uri>
496+ // This is required only if `transferConfig.dataSourceId` is 'youtube_channel'
497+ // and new credentials are needed, as indicated by `CheckValidCreds`. In order
498+ // to obtain authorization_code, make a request to the following URL:
499+ // <pre class="prettyprint" suppresswarning="true">
500+ // https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=<var>client_id</var>&scope=<var>data_source_scopes</var>
501+ // </pre>
502+ // * The <var>client_id</var> is the OAuth client_id of the a data source as
503+ // returned by ListDataSources method.
504+ // * <var>data_source_scopes</var> are the scopes returned by ListDataSources
505+ // method.
499506 //
500- // * client_id should be OAuth client_id of BigQuery DTS API for the given
501- // data source returned by ListDataSources method.
502- // * data_source_scopes are the scopes returned by ListDataSources method.
503- // * redirect_uri is an optional parameter. If not specified, then
504- // authorization code is posted to the opener of authorization flow window.
505- // Otherwise it will be sent to the redirect uri. A special value of
506- // urn:ietf:wg:oauth:2.0:oob means that authorization code should be
507- // returned in the title bar of the browser, with the page text prompting
508- // the user to copy the code and paste it in the application.
507+ // Note that this should not be set when `service_account_name` is used to
508+ // create the transfer config.
509509 string authorization_code = 3 ;
510510
511- // Optional version info. If users want to find a very recent access token,
512- // that is, immediately after approving access, users have to set the
513- // version_info claim in the token request. To obtain the version_info, users
514- // must use the "none+gsession" response type. which be return a
515- // version_info back in the authorization response which be be put in a JWT
516- // claim in the token request.
511+ // Optional version info. This is required only if
512+ // `transferConfig.dataSourceId` is not 'youtube_channel' and new credentials
513+ // are needed, as indicated by `CheckValidCreds`. In order to obtain version
514+ // info, make a request to the following URL:
515+ // <pre class="prettyprint" suppresswarning="true">
516+ // https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=<var>client_id</var>&scope=<var>data_source_scopes</var>
517+ // </pre>
518+ // * The <var>client_id</var> is the OAuth client_id of the a data source as
519+ // returned by ListDataSources method.
520+ // * <var>data_source_scopes</var> are the scopes returned by ListDataSources
521+ // method.
522+ //
523+ // Note that this should not be set when `service_account_name` is used to
524+ // create the transfer config.
517525 string version_info = 5 ;
518526
519- // Optional service account name. If this field is set, transfer config will
520- // be created with this service account credentials. It requires that
521- // requesting user calling this API has permissions to act as this service
527+ // Optional service account name. If this field is set, the transfer config
528+ // will be created with this service account's credentials. It requires that
529+ // the requesting user calling this API has permissions to act as this service
522530 // account.
531+ //
532+ // Note that not all data sources support service account credentials when
533+ // creating a transfer config. For the latest list of data sources, read about
534+ // [using service
535+ // accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts).
523536 string service_account_name = 6 ;
524537}
525538
526539// A request to update a transfer configuration. To update the user id of the
527- // transfer configuration, an authorization code needs to be provided.
540+ // transfer configuration, authorization info needs to be provided.
528541message UpdateTransferConfigRequest {
529542 // Required. Data transfer configuration to create.
530543 TransferConfig transfer_config = 1 [(google.api.field_behavior ) = REQUIRED ];
531544
532545 // Optional OAuth2 authorization code to use with this transfer configuration.
533- // If it is provided, the transfer configuration will be associated with the
534- // authorizing user.
535- // In order to obtain authorization_code, please make a
536- // request to
537- // https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=<datatransferapiclientid>&scope=<data_source_scopes>&redirect_uri=<redirect_uri>
546+ // This is required only if `transferConfig.dataSourceId` is 'youtube_channel'
547+ // and new credentials are needed, as indicated by `CheckValidCreds`. In order
548+ // to obtain authorization_code, make a request to the following URL:
549+ // <pre class="prettyprint" suppresswarning="true">
550+ // https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=<var>client_id</var>&scope=<var>data_source_scopes</var>
551+ // </pre>
552+ // * The <var>client_id</var> is the OAuth client_id of the a data source as
553+ // returned by ListDataSources method.
554+ // * <var>data_source_scopes</var> are the scopes returned by ListDataSources
555+ // method.
538556 //
539- // * client_id should be OAuth client_id of BigQuery DTS API for the given
540- // data source returned by ListDataSources method.
541- // * data_source_scopes are the scopes returned by ListDataSources method.
542- // * redirect_uri is an optional parameter. If not specified, then
543- // authorization code is posted to the opener of authorization flow window.
544- // Otherwise it will be sent to the redirect uri. A special value of
545- // urn:ietf:wg:oauth:2.0:oob means that authorization code should be
546- // returned in the title bar of the browser, with the page text prompting
547- // the user to copy the code and paste it in the application.
557+ // Note that this should not be set when `service_account_name` is used to
558+ // update the transfer config.
548559 string authorization_code = 3 ;
549560
550561 // Required. Required list of fields to be updated in this request.
551562 google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior ) = REQUIRED ];
552563
553- // Optional version info. If users want to find a very recent access token,
554- // that is, immediately after approving access, users have to set the
555- // version_info claim in the token request. To obtain the version_info, users
556- // must use the "none+gsession" response type. which be return a
557- // version_info back in the authorization response which be be put in a JWT
558- // claim in the token request.
564+ // Optional version info. This is required only if
565+ // `transferConfig.dataSourceId` is not 'youtube_channel' and new credentials
566+ // are needed, as indicated by `CheckValidCreds`. In order to obtain version
567+ // info, make a request to the following URL:
568+ // <pre class="prettyprint" suppresswarning="true">
569+ // https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=<var>client_id</var>&scope=<var>data_source_scopes</var>
570+ // </pre>
571+ // * The <var>client_id</var> is the OAuth client_id of the a data source as
572+ // returned by ListDataSources method.
573+ // * <var>data_source_scopes</var> are the scopes returned by ListDataSources
574+ // method.
575+ //
576+ // Note that this should not be set when `service_account_name` is used to
577+ // update the transfer config.
559578 string version_info = 5 ;
560579
561- // Optional service account name. If this field is set and
562- // "service_account_name" is set in update_mask, transfer config will be
563- // updated to use this service account credentials. It requires that
564- // requesting user calling this API has permissions to act as this service
580+ // Optional service account name. If this field is set, the transfer config
581+ // will be created with this service account's credentials. It requires that
582+ // the requesting user calling this API has permissions to act as this service
565583 // account.
584+ //
585+ // Note that not all data sources support service account credentials when
586+ // creating a transfer config. For the latest list of data sources, read about
587+ // [using service
588+ // accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts).
566589 string service_account_name = 6 ;
567590}
568591
@@ -621,7 +644,7 @@ message DeleteTransferRunRequest {
621644
622645// A request to list data transfers configured for a BigQuery project.
623646message ListTransferConfigsRequest {
624- // Required. The BigQuery project id for which data sources
647+ // Required. The BigQuery project id for which transfer configs
625648 // should be returned: `projects/{project_id}` or
626649 // `projects/{project_id}/locations/{location_id}`
627650 string parent = 1 [
@@ -844,8 +867,7 @@ message StartManualTransferRunsResponse {
844867// A request to enroll a set of data sources so they are visible in the
845868// BigQuery UI's `Transfer` tab.
846869message EnrollDataSourcesRequest {
847- // The name of the project resource in the form:
848- // `projects/{project_id}`
870+ // The name of the project resource in the form: `projects/{project_id}`
849871 string name = 1 ;
850872
851873 // Data sources that are enrolled. It is required to provide at least one
0 commit comments