diff --git a/discovery/bigquerydatatransfer-v1.json b/discovery/bigquerydatatransfer-v1.json index 9ada68adb6..92dd041ba4 100644 --- a/discovery/bigquerydatatransfer-v1.json +++ b/discovery/bigquerydatatransfer-v1.json @@ -343,6 +343,35 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ] + }, + "unenrollDataSources": { + "description": "Unenroll data sources in a user project. This allows users to remove transfer configurations for these data sources. They will no longer appear in the ListDataSources RPC and will also no longer appear in the [BigQuery UI](https://console.cloud.google.com/bigquery).", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:unenrollDataSources", + "httpMethod": "POST", + "id": "bigquerydatatransfer.projects.locations.unenrollDataSources", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the project resource in the form: `projects/{project_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:unenrollDataSources", + "request": { + "$ref": "UnenrollDataSourcesRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -1342,7 +1371,7 @@ } } }, - "revision": "20230905", + "revision": "20240130", "rootUrl": "https://bigquerydatatransfer.googleapis.com/", "schemas": { "CheckValidCredsRequest": { @@ -2125,6 +2154,20 @@ }, "type": "object" }, + "UnenrollDataSourcesRequest": { + "description": "A request to unenroll a set of data sources so they are no longer visible in the BigQuery UI's `Transfer` tab.", + "id": "UnenrollDataSourcesRequest", + "properties": { + "dataSourceIds": { + "description": "Data sources that are unenrolled. It is required to provide at least one data source id.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "UserInfo": { "description": "Information about a user.", "id": "UserInfo", diff --git a/src/apis/bigquerydatatransfer/v1.ts b/src/apis/bigquerydatatransfer/v1.ts index 00c47cffac..a71d045966 100644 --- a/src/apis/bigquerydatatransfer/v1.ts +++ b/src/apis/bigquerydatatransfer/v1.ts @@ -654,6 +654,15 @@ export namespace bigquerydatatransfer_v1 { */ userId?: string | null; } + /** + * A request to unenroll a set of data sources so they are no longer visible in the BigQuery UI's `Transfer` tab. + */ + export interface Schema$UnenrollDataSourcesRequest { + /** + * Data sources that are unenrolled. It is required to provide at least one data source id. + */ + dataSourceIds?: string[] | null; + } /** * Information about a user. */ @@ -1374,6 +1383,94 @@ export namespace bigquerydatatransfer_v1 { return createAPIRequest(parameters); } } + + /** + * Unenroll data sources in a user project. This allows users to remove transfer configurations for these data sources. They will no longer appear in the ListDataSources RPC and will also no longer appear in the [BigQuery UI](https://console.cloud.google.com/bigquery). + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + unenrollDataSources( + params: Params$Resource$Projects$Locations$Unenrolldatasources, + options: StreamMethodOptions + ): GaxiosPromise; + unenrollDataSources( + params?: Params$Resource$Projects$Locations$Unenrolldatasources, + options?: MethodOptions + ): GaxiosPromise; + unenrollDataSources( + params: Params$Resource$Projects$Locations$Unenrolldatasources, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + unenrollDataSources( + params: Params$Resource$Projects$Locations$Unenrolldatasources, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + unenrollDataSources( + params: Params$Resource$Projects$Locations$Unenrolldatasources, + callback: BodyResponseCallback + ): void; + unenrollDataSources(callback: BodyResponseCallback): void; + unenrollDataSources( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Unenrolldatasources + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Unenrolldatasources; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Unenrolldatasources; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigquerydatatransfer.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:unenrollDataSources').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Projects$Locations$Enrolldatasources @@ -1414,6 +1511,18 @@ export namespace bigquerydatatransfer_v1 { */ pageToken?: string; } + export interface Params$Resource$Projects$Locations$Unenrolldatasources + extends StandardParameters { + /** + * The name of the project resource in the form: `projects/{project_id\}` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$UnenrollDataSourcesRequest; + } export class Resource$Projects$Locations$Datasources { context: APIRequestContext;