Skip to content

Commit

Permalink
feat(bigquerydatatransfer): update the API
Browse files Browse the repository at this point in the history
#### bigquerydatatransfer:v1

The following keys were added:
- resources.projects.resources.locations.methods.unenrollDataSources.description
- resources.projects.resources.locations.methods.unenrollDataSources.flatPath
- resources.projects.resources.locations.methods.unenrollDataSources.httpMethod
- resources.projects.resources.locations.methods.unenrollDataSources.id
- resources.projects.resources.locations.methods.unenrollDataSources.parameterOrder
- resources.projects.resources.locations.methods.unenrollDataSources.parameters.name.description
- resources.projects.resources.locations.methods.unenrollDataSources.parameters.name.location
- resources.projects.resources.locations.methods.unenrollDataSources.parameters.name.pattern
- resources.projects.resources.locations.methods.unenrollDataSources.parameters.name.required
- resources.projects.resources.locations.methods.unenrollDataSources.parameters.name.type
- resources.projects.resources.locations.methods.unenrollDataSources.path
- resources.projects.resources.locations.methods.unenrollDataSources.request.$ref
- resources.projects.resources.locations.methods.unenrollDataSources.response.$ref
- resources.projects.resources.locations.methods.unenrollDataSources.scopes
- schemas.UnenrollDataSourcesRequest.description
- schemas.UnenrollDataSourcesRequest.id
- schemas.UnenrollDataSourcesRequest.properties.dataSourceIds.description
- schemas.UnenrollDataSourcesRequest.properties.dataSourceIds.items.type
- schemas.UnenrollDataSourcesRequest.properties.dataSourceIds.type
- schemas.UnenrollDataSourcesRequest.type
  • Loading branch information
yoshi-automation authored and sofisl committed Feb 7, 2024
1 parent e36b7d9 commit 1a70202
Show file tree
Hide file tree
Showing 2 changed files with 153 additions and 1 deletion.
45 changes: 44 additions & 1 deletion discovery/bigquerydatatransfer-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -1342,7 +1371,7 @@
}
}
},
"revision": "20230905",
"revision": "20240130",
"rootUrl": "https://bigquerydatatransfer.googleapis.com/",
"schemas": {
"CheckValidCredsRequest": {
Expand Down Expand Up @@ -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",
Expand Down
109 changes: 109 additions & 0 deletions src/apis/bigquerydatatransfer/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -1374,6 +1383,94 @@ export namespace bigquerydatatransfer_v1 {
return createAPIRequest<Schema$ListLocationsResponse>(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<Readable>;
unenrollDataSources(
params?: Params$Resource$Projects$Locations$Unenrolldatasources,
options?: MethodOptions
): GaxiosPromise<Schema$Empty>;
unenrollDataSources(
params: Params$Resource$Projects$Locations$Unenrolldatasources,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
unenrollDataSources(
params: Params$Resource$Projects$Locations$Unenrolldatasources,
options: MethodOptions | BodyResponseCallback<Schema$Empty>,
callback: BodyResponseCallback<Schema$Empty>
): void;
unenrollDataSources(
params: Params$Resource$Projects$Locations$Unenrolldatasources,
callback: BodyResponseCallback<Schema$Empty>
): void;
unenrollDataSources(callback: BodyResponseCallback<Schema$Empty>): void;
unenrollDataSources(
paramsOrCallback?:
| Params$Resource$Projects$Locations$Unenrolldatasources
| BodyResponseCallback<Schema$Empty>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Empty>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Empty>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
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<Schema$Empty>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Empty>(parameters);
}
}
}

export interface Params$Resource$Projects$Locations$Enrolldatasources
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1a70202

Please sign in to comment.