Skip to content

Commit

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

The following keys were added:
- resources.accounts.resources.repos.resources.operations.methods.get.description
- resources.accounts.resources.repos.resources.operations.methods.get.flatPath
- resources.accounts.resources.repos.resources.operations.methods.get.httpMethod
- resources.accounts.resources.repos.resources.operations.methods.get.id
- resources.accounts.resources.repos.resources.operations.methods.get.parameterOrder
- resources.accounts.resources.repos.resources.operations.methods.get.parameters.name.description
- resources.accounts.resources.repos.resources.operations.methods.get.parameters.name.location
- resources.accounts.resources.repos.resources.operations.methods.get.parameters.name.pattern
- resources.accounts.resources.repos.resources.operations.methods.get.parameters.name.required
- resources.accounts.resources.repos.resources.operations.methods.get.parameters.name.type
- resources.accounts.resources.repos.resources.operations.methods.get.path
- resources.accounts.resources.repos.resources.operations.methods.get.response.$ref
  • Loading branch information
yoshi-automation authored and sofisl committed Oct 10, 2024
1 parent 0e9cbfa commit d58f064
Show file tree
Hide file tree
Showing 2 changed files with 142 additions and 1 deletion.
32 changes: 31 additions & 1 deletion discovery/checks-v1alpha.json
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,36 @@
}
}
}
},
"repos": {
"resources": {
"operations": {
"methods": {
"get": {
"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
"flatPath": "v1alpha/accounts/{accountsId}/repos/{reposId}/operations/{operationsId}",
"httpMethod": "GET",
"id": "checks.accounts.repos.operations.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The name of the operation resource.",
"location": "path",
"pattern": "^accounts/[^/]+/repos/[^/]+/operations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1alpha/{+name}",
"response": {
"$ref": "Operation"
}
}
}
}
}
}
}
},
Expand Down Expand Up @@ -414,7 +444,7 @@
}
}
},
"revision": "20240627",
"revision": "20240904",
"rootUrl": "https://checks.googleapis.com/",
"schemas": {
"CancelOperationRequest": {
Expand Down
111 changes: 111 additions & 0 deletions src/apis/checks/v1alpha.ts
Original file line number Diff line number Diff line change
Expand Up @@ -754,9 +754,11 @@ export namespace checks_v1alpha {
export class Resource$Accounts {
context: APIRequestContext;
apps: Resource$Accounts$Apps;
repos: Resource$Accounts$Repos;
constructor(context: APIRequestContext) {
this.context = context;
this.apps = new Resource$Accounts$Apps(this.context);
this.repos = new Resource$Accounts$Repos(this.context);
}
}

Expand Down Expand Up @@ -1722,6 +1724,115 @@ export namespace checks_v1alpha {
parent?: string;
}

export class Resource$Accounts$Repos {
context: APIRequestContext;
operations: Resource$Accounts$Repos$Operations;
constructor(context: APIRequestContext) {
this.context = context;
this.operations = new Resource$Accounts$Repos$Operations(this.context);
}
}

export class Resource$Accounts$Repos$Operations {
context: APIRequestContext;
constructor(context: APIRequestContext) {
this.context = context;
}

/**
* Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
*
* @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.
*/
get(
params: Params$Resource$Accounts$Repos$Operations$Get,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
get(
params?: Params$Resource$Accounts$Repos$Operations$Get,
options?: MethodOptions
): GaxiosPromise<Schema$Operation>;
get(
params: Params$Resource$Accounts$Repos$Operations$Get,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
get(
params: Params$Resource$Accounts$Repos$Operations$Get,
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
callback: BodyResponseCallback<Schema$Operation>
): void;
get(
params: Params$Resource$Accounts$Repos$Operations$Get,
callback: BodyResponseCallback<Schema$Operation>
): void;
get(callback: BodyResponseCallback<Schema$Operation>): void;
get(
paramsOrCallback?:
| Params$Resource$Accounts$Repos$Operations$Get
| BodyResponseCallback<Schema$Operation>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Operation>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Operation>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Accounts$Repos$Operations$Get;
let options = (optionsOrCallback || {}) as MethodOptions;

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Accounts$Repos$Operations$Get;
options = {};
}

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

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

export interface Params$Resource$Accounts$Repos$Operations$Get
extends StandardParameters {
/**
* The name of the operation resource.
*/
name?: string;
}

export class Resource$Media {
context: APIRequestContext;
constructor(context: APIRequestContext) {
Expand Down

0 comments on commit d58f064

Please sign in to comment.