Skip to content

Commit

Permalink
feat(bigqueryreservation)!: update the API
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This release has breaking changes.

#### bigqueryreservation:v1beta1

The following keys were deleted:
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.description
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.flatPath
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.httpMethod
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.id
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameterOrder
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameters.name.description
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameters.name.location
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameters.name.pattern
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameters.name.required
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameters.name.type
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameters.updateMask.description
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameters.updateMask.format
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameters.updateMask.location
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameters.updateMask.type
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.path
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.request.$ref
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.response.$ref
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.scopes

#### bigqueryreservation:v1

The following keys were deleted:
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.description
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.flatPath
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.httpMethod
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.id
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameterOrder
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameters.name.description
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameters.name.location
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameters.name.pattern
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameters.name.required
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameters.name.type
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameters.updateMask.description
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameters.updateMask.format
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameters.updateMask.location
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.parameters.updateMask.type
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.path
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.request.$ref
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.response.$ref
- resources.projects.resources.locations.resources.reservations.resources.assignments.methods.patch.scopes

The following keys were changed:
- schemas.Reservation.properties.ignoreIdleSlots.description
  • Loading branch information
yoshi-automation authored and bcoe committed May 3, 2021
1 parent bb66bdb commit d060bea
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 404 deletions.
39 changes: 2 additions & 37 deletions discovery/bigqueryreservation-v1.json
Expand Up @@ -773,41 +773,6 @@
"https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform"
]
},
"patch": {
"description": "Updates an existing assignment. Only the `priority` field can be updated.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/reservations/{reservationsId}/assignments/{assignmentsId}",
"httpMethod": "PATCH",
"id": "bigqueryreservation.projects.locations.reservations.assignments.patch",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Output only. Name of the resource. E.g.: `projects/myproject/locations/US/reservations/team1-prod/assignments/123`.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+$",
"required": true,
"type": "string"
},
"updateMask": {
"description": "Standard field mask for the set of fields to be updated.",
"format": "google-fieldmask",
"location": "query",
"type": "string"
}
},
"path": "v1/{+name}",
"request": {
"$ref": "Assignment"
},
"response": {
"$ref": "Assignment"
},
"scopes": [
"https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
}
Expand All @@ -818,7 +783,7 @@
}
}
},
"revision": "20210416",
"revision": "20210423",
"rootUrl": "https://bigqueryreservation.googleapis.com/",
"schemas": {
"Assignment": {
Expand Down Expand Up @@ -1073,7 +1038,7 @@
"type": "string"
},
"ignoreIdleSlots": {
"description": "If false, any query using this reservation will use idle slots from other reservations within the same admin project. If true, a query using this reservation will execute with the slot capacity specified above at most.",
"description": "If false, any query or pipeline job using this reservation will use idle slots from other reservations within the same admin project. If true, a query or pipeline job using this reservation will execute with the slot capacity specified above at most.",
"type": "boolean"
},
"name": {
Expand Down
37 changes: 1 addition & 36 deletions discovery/bigqueryreservation-v1beta1.json
Expand Up @@ -736,41 +736,6 @@
"https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform"
]
},
"patch": {
"description": "Updates an existing assignment. Only the `priority` field can be updated.",
"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/reservations/{reservationsId}/assignments/{assignmentsId}",
"httpMethod": "PATCH",
"id": "bigqueryreservation.projects.locations.reservations.assignments.patch",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Output only. Name of the resource. E.g.: `projects/myproject/locations/US/reservations/team1-prod/assignments/123`.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+$",
"required": true,
"type": "string"
},
"updateMask": {
"description": "Standard field mask for the set of fields to be updated.",
"format": "google-fieldmask",
"location": "query",
"type": "string"
}
},
"path": "v1beta1/{+name}",
"request": {
"$ref": "Assignment"
},
"response": {
"$ref": "Assignment"
},
"scopes": [
"https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
}
Expand All @@ -781,7 +746,7 @@
}
}
},
"revision": "20210416",
"revision": "20210423",
"rootUrl": "https://bigqueryreservation.googleapis.com/",
"schemas": {
"Assignment": {
Expand Down
167 changes: 1 addition & 166 deletions src/apis/bigqueryreservation/v1.ts
Expand Up @@ -270,7 +270,7 @@ export namespace bigqueryreservation_v1 {
*/
creationTime?: string | null;
/**
* If false, any query using this reservation will use idle slots from other reservations within the same admin project. If true, a query using this reservation will execute with the slot capacity specified above at most.
* If false, any query or pipeline job using this reservation will use idle slots from other reservations within the same admin project. If true, a query or pipeline job using this reservation will execute with the slot capacity specified above at most.
*/
ignoreIdleSlots?: boolean | null;
/**
Expand Down Expand Up @@ -3522,155 +3522,6 @@ export namespace bigqueryreservation_v1 {
return createAPIRequest<Schema$Assignment>(parameters);
}
}

/**
* Updates an existing assignment. Only the `priority` field can be updated.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/bigqueryreservation.googleapis.com
* // - Login into gcloud by running:
* // `$ gcloud auth application-default login`
* // - Install the npm module by running:
* // `$ npm install googleapis`
*
* const {google} = require('googleapis');
* const bigqueryreservation = google.bigqueryreservation('v1');
*
* async function main() {
* const auth = new google.auth.GoogleAuth({
* // Scopes can be specified either as an array or as a single, space-delimited string.
* scopes: [
* 'https://www.googleapis.com/auth/bigquery',
* 'https://www.googleapis.com/auth/cloud-platform',
* ],
* });
*
* // Acquire an auth client, and bind it to all future calls
* const authClient = await auth.getClient();
* google.options({auth: authClient});
*
* // Do the magic
* const res = await bigqueryreservation.projects.locations.reservations.assignments.patch(
* {
* // Output only. Name of the resource. E.g.: `projects/myproject/locations/US/reservations/team1-prod/assignments/123`.
* name:
* 'projects/my-project/locations/my-location/reservations/my-reservation/assignments/my-assignment',
* // Standard field mask for the set of fields to be updated.
* updateMask: 'placeholder-value',
*
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "assignee": "my_assignee",
* // "jobType": "my_jobType",
* // "name": "my_name",
* // "state": "my_state"
* // }
* },
* }
* );
* console.log(res.data);
*
* // Example response
* // {
* // "assignee": "my_assignee",
* // "jobType": "my_jobType",
* // "name": "my_name",
* // "state": "my_state"
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* ```
*
* @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.
*/
patch(
params: Params$Resource$Projects$Locations$Reservations$Assignments$Patch,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
patch(
params?: Params$Resource$Projects$Locations$Reservations$Assignments$Patch,
options?: MethodOptions
): GaxiosPromise<Schema$Assignment>;
patch(
params: Params$Resource$Projects$Locations$Reservations$Assignments$Patch,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
patch(
params: Params$Resource$Projects$Locations$Reservations$Assignments$Patch,
options: MethodOptions | BodyResponseCallback<Schema$Assignment>,
callback: BodyResponseCallback<Schema$Assignment>
): void;
patch(
params: Params$Resource$Projects$Locations$Reservations$Assignments$Patch,
callback: BodyResponseCallback<Schema$Assignment>
): void;
patch(callback: BodyResponseCallback<Schema$Assignment>): void;
patch(
paramsOrCallback?:
| Params$Resource$Projects$Locations$Reservations$Assignments$Patch
| BodyResponseCallback<Schema$Assignment>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Assignment>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Assignment>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Assignment> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Projects$Locations$Reservations$Assignments$Patch;
let options = (optionsOrCallback || {}) as MethodOptions;

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Projects$Locations$Reservations$Assignments$Patch;
options = {};
}

if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}

const rootUrl =
options.rootUrl || 'https://bigqueryreservation.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
},
options
),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Assignment>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Assignment>(parameters);
}
}
}

export interface Params$Resource$Projects$Locations$Reservations$Assignments$Create
Expand Down Expand Up @@ -3723,20 +3574,4 @@ export namespace bigqueryreservation_v1 {
*/
requestBody?: Schema$MoveAssignmentRequest;
}
export interface Params$Resource$Projects$Locations$Reservations$Assignments$Patch
extends StandardParameters {
/**
* Output only. Name of the resource. E.g.: `projects/myproject/locations/US/reservations/team1-prod/assignments/123`.
*/
name?: string;
/**
* Standard field mask for the set of fields to be updated.
*/
updateMask?: string;

/**
* Request body metadata
*/
requestBody?: Schema$Assignment;
}
}

0 comments on commit d060bea

Please sign in to comment.