diff --git a/protos/google/cloud/bigquery/datatransfer/v1/datatransfer.proto b/protos/google/cloud/bigquery/datatransfer/v1/datatransfer.proto index 37accec..b04ff99 100644 --- a/protos/google/cloud/bigquery/datatransfer/v1/datatransfer.proto +++ b/protos/google/cloud/bigquery/datatransfer/v1/datatransfer.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -328,6 +327,11 @@ message DataSource { // Return an authorization code for a given Google+ page that can then be // exchanged for a refresh token on the backend. GOOGLE_PLUS_AUTHORIZATION_CODE = 2; + + // Use First Party Client OAuth. First Party Client OAuth doesn't require a + // refresh token to get an offline access token. Instead, it uses a + // client-signed JWT assertion to retrieve an access token. + FIRST_PARTY_OAUTH = 3; } // Represents how the data source supports data auto refresh. diff --git a/protos/google/cloud/bigquery/datatransfer/v1/transfer.proto b/protos/google/cloud/bigquery/datatransfer/v1/transfer.proto index 6e503b6..39e31ab 100644 --- a/protos/google/cloud/bigquery/datatransfer/v1/transfer.proto +++ b/protos/google/cloud/bigquery/datatransfer/v1/transfer.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 4d6a20b..f0db35f 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -739,7 +739,8 @@ export namespace google { enum AuthorizationType { AUTHORIZATION_TYPE_UNSPECIFIED = 0, AUTHORIZATION_CODE = 1, - GOOGLE_PLUS_AUTHORIZATION_CODE = 2 + GOOGLE_PLUS_AUTHORIZATION_CODE = 2, + FIRST_PARTY_OAUTH = 3 } /** DataRefreshType enum. */ diff --git a/protos/protos.js b/protos/protos.js index 9821648..bc1885d 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -1639,6 +1639,7 @@ case 0: case 1: case 2: + case 3: break; } if (message.dataRefreshType != null && message.hasOwnProperty("dataRefreshType")) @@ -1740,6 +1741,10 @@ case 2: message.authorizationType = 2; break; + case "FIRST_PARTY_OAUTH": + case 3: + message.authorizationType = 3; + break; } switch (object.dataRefreshType) { case "DATA_REFRESH_TYPE_UNSPECIFIED": @@ -1865,12 +1870,14 @@ * @property {number} AUTHORIZATION_TYPE_UNSPECIFIED=0 AUTHORIZATION_TYPE_UNSPECIFIED value * @property {number} AUTHORIZATION_CODE=1 AUTHORIZATION_CODE value * @property {number} GOOGLE_PLUS_AUTHORIZATION_CODE=2 GOOGLE_PLUS_AUTHORIZATION_CODE value + * @property {number} FIRST_PARTY_OAUTH=3 FIRST_PARTY_OAUTH value */ DataSource.AuthorizationType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "AUTHORIZATION_TYPE_UNSPECIFIED"] = 0; values[valuesById[1] = "AUTHORIZATION_CODE"] = 1; values[valuesById[2] = "GOOGLE_PLUS_AUTHORIZATION_CODE"] = 2; + values[valuesById[3] = "FIRST_PARTY_OAUTH"] = 3; return values; })(); diff --git a/protos/protos.json b/protos/protos.json index df96606..587c977 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -341,7 +341,8 @@ "values": { "AUTHORIZATION_TYPE_UNSPECIFIED": 0, "AUTHORIZATION_CODE": 1, - "GOOGLE_PLUS_AUTHORIZATION_CODE": 2 + "GOOGLE_PLUS_AUTHORIZATION_CODE": 2, + "FIRST_PARTY_OAUTH": 3 } }, "DataRefreshType": { diff --git a/src/v1/data_transfer_service_client.ts b/src/v1/data_transfer_service_client.ts index f4cecaf..91a6cc0 100644 --- a/src/v1/data_transfer_service_client.ts +++ b/src/v1/data_transfer_service_client.ts @@ -18,12 +18,12 @@ import * as gax from 'google-gax'; import { - GaxCall, Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, + GaxCall, } from 'google-gax'; import * as path from 'path'; diff --git a/synth.metadata b/synth.metadata index 28d29af..8cde129 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,22 @@ { - "updateTime": "2020-03-31T19:14:07.961639Z", + "updateTime": "2020-04-01T11:31:02.754106Z", + "sources": [ + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "dc65f39f33cb139b3a2244199a3e722a4d94b679", + "internalRef": "304035052" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "99820243d348191bc9c634f2b48ddf65096285ed" + } + } + ], "destinations": [ { "client": { diff --git a/system-test/fixtures/sample/src/index.ts b/system-test/fixtures/sample/src/index.ts index a00f0ba..25b8680 100644 --- a/system-test/fixtures/sample/src/index.ts +++ b/system-test/fixtures/sample/src/index.ts @@ -19,7 +19,7 @@ import {DataTransferServiceClient} from '@google-cloud/bigquery-data-transfer'; function main() { - const dataTransferServiceClient = new DataTransferServiceClient(); + new DataTransferServiceClient(); } main();