Skip to content

Commit ea0679e

Browse files
yoshi-automationsofisl
authored andcommitted
feat(cloudasset)!: update the API
BREAKING CHANGE: This release has breaking changes. #### cloudasset:v1 The following keys were deleted: - resources.operations.methods.cancel.description - resources.operations.methods.cancel.flatPath - resources.operations.methods.cancel.httpMethod - resources.operations.methods.cancel.id - resources.operations.methods.cancel.parameterOrder - resources.operations.methods.cancel.parameters.name.description - resources.operations.methods.cancel.parameters.name.location - resources.operations.methods.cancel.parameters.name.pattern - resources.operations.methods.cancel.parameters.name.required - resources.operations.methods.cancel.parameters.name.type - resources.operations.methods.cancel.path - resources.operations.methods.cancel.request.$ref - resources.operations.methods.cancel.response.$ref - resources.operations.methods.cancel.scopes - resources.operations.methods.delete.description - resources.operations.methods.delete.flatPath - resources.operations.methods.delete.httpMethod - resources.operations.methods.delete.id - resources.operations.methods.delete.parameterOrder - resources.operations.methods.delete.parameters.name.description - resources.operations.methods.delete.parameters.name.location - resources.operations.methods.delete.parameters.name.pattern - resources.operations.methods.delete.parameters.name.required - resources.operations.methods.delete.parameters.name.type - resources.operations.methods.delete.path - resources.operations.methods.delete.response.$ref - resources.operations.methods.delete.scopes - schemas.CancelOperationRequest.description - schemas.CancelOperationRequest.id - schemas.CancelOperationRequest.type The following keys were changed: - schemas.Item.properties.type.enumDescriptions - schemas.ResourceSearchResult.properties.enrichments.description
1 parent efa4237 commit ea0679e

File tree

2 files changed

+4
-256
lines changed

2 files changed

+4
-256
lines changed

discovery/cloudasset-v1.json

Lines changed: 3 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -358,59 +358,6 @@
358358
},
359359
"operations": {
360360
"methods": {
361-
"cancel": {
362-
"description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.",
363-
"flatPath": "v1/operations/{operationsId}:cancel",
364-
"httpMethod": "POST",
365-
"id": "cloudasset.operations.cancel",
366-
"parameterOrder": [
367-
"name"
368-
],
369-
"parameters": {
370-
"name": {
371-
"description": "The name of the operation resource to be cancelled.",
372-
"location": "path",
373-
"pattern": "^operations/.*$",
374-
"required": true,
375-
"type": "string"
376-
}
377-
},
378-
"path": "v1/{+name}:cancel",
379-
"request": {
380-
"$ref": "CancelOperationRequest"
381-
},
382-
"response": {
383-
"$ref": "Empty"
384-
},
385-
"scopes": [
386-
"https://www.googleapis.com/auth/cloud-platform"
387-
]
388-
},
389-
"delete": {
390-
"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.",
391-
"flatPath": "v1/operations/{operationsId}",
392-
"httpMethod": "DELETE",
393-
"id": "cloudasset.operations.delete",
394-
"parameterOrder": [
395-
"name"
396-
],
397-
"parameters": {
398-
"name": {
399-
"description": "The name of the operation resource to be deleted.",
400-
"location": "path",
401-
"pattern": "^operations/.*$",
402-
"required": true,
403-
"type": "string"
404-
}
405-
},
406-
"path": "v1/{+name}",
407-
"response": {
408-
"$ref": "Empty"
409-
},
410-
"scopes": [
411-
"https://www.googleapis.com/auth/cloud-platform"
412-
]
413-
},
414361
"get": {
415362
"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.",
416363
"flatPath": "v1/{v1Id}/{v1Id1}/operations/{operationsId}/{operationsId1}",
@@ -1148,7 +1095,7 @@
11481095
}
11491096
}
11501097
},
1151-
"revision": "20240823",
1098+
"revision": "20240831",
11521099
"rootUrl": "https://cloudasset.googleapis.com/",
11531100
"schemas": {
11541101
"AccessSelector": {
@@ -1578,12 +1525,6 @@
15781525
},
15791526
"type": "object"
15801527
},
1581-
"CancelOperationRequest": {
1582-
"description": "The request message for Operations.CancelOperation.",
1583-
"id": "CancelOperationRequest",
1584-
"properties": {},
1585-
"type": "object"
1586-
},
15871528
"ConditionContext": {
15881529
"description": "The IAM conditions context.",
15891530
"id": "ConditionContext",
@@ -3526,7 +3467,7 @@
35263467
"AVAILABLE_PACKAGE"
35273468
],
35283469
"enumDescriptions": [
3529-
"Invalid. An type must be specified.",
3470+
"Invalid. A type must be specified.",
35303471
"This represents a package that is installed on the VM.",
35313472
"This represents an update that is available for a package."
35323473
],
@@ -4207,7 +4148,7 @@
42074148
"type": "array"
42084149
},
42094150
"enrichments": {
4210-
"description": "Enrichments of the asset. Currently supported enrichment types with SearchAllResources API: * RESOURCE_OWNERS The corresponding read masks in order to get the enrichment: * enrichments.resource_owners The corresponding required permissions: * cloudasset.assets.searchEnrichmentResourceOwners Example query to get resource owner enrichment: scope: \"projects/my-project\" query: \"name: my-project\" assetTypes: \"cloudresourcemanager.googleapis.com/Project\" readMask: { paths: \"asset_type\" paths: \"name\" paths: \"enrichments.resource_owners\" }",
4151+
"description": "Enrichments of the asset. Currently supported enrichment types with SearchAllResources API: * RESOURCE_OWNERS The corresponding read masks in order to get the enrichment: * enrichments.resource_owners The corresponding required permissions: * cloudasset.assets.searchEnrichmentResourceOwners Example query to get resource owner enrichment: ``` scope: \"projects/my-project\" query: \"name: my-project\" assetTypes: \"cloudresourcemanager.googleapis.com/Project\" readMask: { paths: \"asset_type\" paths: \"name\" paths: \"enrichments.resource_owners\" } ```",
42114152
"items": {
42124153
"$ref": "AssetEnrichment"
42134154
},

src/apis/cloudasset/v1.ts

Lines changed: 1 addition & 194 deletions
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,6 @@ export namespace cloudasset_v1 {
459459
*/
460460
role?: string | null;
461461
}
462-
/**
463-
* The request message for Operations.CancelOperation.
464-
*/
465-
export interface Schema$CancelOperationRequest {}
466462
/**
467463
* The IAM conditions context.
468464
*/
@@ -2338,7 +2334,7 @@ export namespace cloudasset_v1 {
23382334
*/
23392335
effectiveTags?: Schema$EffectiveTagDetails[];
23402336
/**
2341-
* Enrichments of the asset. Currently supported enrichment types with SearchAllResources API: * RESOURCE_OWNERS The corresponding read masks in order to get the enrichment: * enrichments.resource_owners The corresponding required permissions: * cloudasset.assets.searchEnrichmentResourceOwners Example query to get resource owner enrichment: scope: "projects/my-project" query: "name: my-project" assetTypes: "cloudresourcemanager.googleapis.com/Project" readMask: { paths: "asset_type" paths: "name" paths: "enrichments.resource_owners" \}
2337+
* Enrichments of the asset. Currently supported enrichment types with SearchAllResources API: * RESOURCE_OWNERS The corresponding read masks in order to get the enrichment: * enrichments.resource_owners The corresponding required permissions: * cloudasset.assets.searchEnrichmentResourceOwners Example query to get resource owner enrichment: ``` scope: "projects/my-project" query: "name: my-project" assetTypes: "cloudresourcemanager.googleapis.com/Project" readMask: { paths: "asset_type" paths: "name" paths: "enrichments.resource_owners" \} ```
23422338
*/
23432339
enrichments?: Schema$AssetEnrichment[];
23442340
/**
@@ -3532,176 +3528,6 @@ export namespace cloudasset_v1 {
35323528
this.context = context;
35333529
}
35343530

3535-
/**
3536-
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
3537-
*
3538-
* @param params - Parameters for request
3539-
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3540-
* @param callback - Optional callback that handles the response.
3541-
* @returns A promise if used with async/await, or void if used with a callback.
3542-
*/
3543-
cancel(
3544-
params: Params$Resource$Operations$Cancel,
3545-
options: StreamMethodOptions
3546-
): GaxiosPromise<Readable>;
3547-
cancel(
3548-
params?: Params$Resource$Operations$Cancel,
3549-
options?: MethodOptions
3550-
): GaxiosPromise<Schema$Empty>;
3551-
cancel(
3552-
params: Params$Resource$Operations$Cancel,
3553-
options: StreamMethodOptions | BodyResponseCallback<Readable>,
3554-
callback: BodyResponseCallback<Readable>
3555-
): void;
3556-
cancel(
3557-
params: Params$Resource$Operations$Cancel,
3558-
options: MethodOptions | BodyResponseCallback<Schema$Empty>,
3559-
callback: BodyResponseCallback<Schema$Empty>
3560-
): void;
3561-
cancel(
3562-
params: Params$Resource$Operations$Cancel,
3563-
callback: BodyResponseCallback<Schema$Empty>
3564-
): void;
3565-
cancel(callback: BodyResponseCallback<Schema$Empty>): void;
3566-
cancel(
3567-
paramsOrCallback?:
3568-
| Params$Resource$Operations$Cancel
3569-
| BodyResponseCallback<Schema$Empty>
3570-
| BodyResponseCallback<Readable>,
3571-
optionsOrCallback?:
3572-
| MethodOptions
3573-
| StreamMethodOptions
3574-
| BodyResponseCallback<Schema$Empty>
3575-
| BodyResponseCallback<Readable>,
3576-
callback?:
3577-
| BodyResponseCallback<Schema$Empty>
3578-
| BodyResponseCallback<Readable>
3579-
): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
3580-
let params = (paramsOrCallback ||
3581-
{}) as Params$Resource$Operations$Cancel;
3582-
let options = (optionsOrCallback || {}) as MethodOptions;
3583-
3584-
if (typeof paramsOrCallback === 'function') {
3585-
callback = paramsOrCallback;
3586-
params = {} as Params$Resource$Operations$Cancel;
3587-
options = {};
3588-
}
3589-
3590-
if (typeof optionsOrCallback === 'function') {
3591-
callback = optionsOrCallback;
3592-
options = {};
3593-
}
3594-
3595-
const rootUrl = options.rootUrl || 'https://cloudasset.googleapis.com/';
3596-
const parameters = {
3597-
options: Object.assign(
3598-
{
3599-
url: (rootUrl + '/v1/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'),
3600-
method: 'POST',
3601-
apiVersion: '',
3602-
},
3603-
options
3604-
),
3605-
params,
3606-
requiredParams: ['name'],
3607-
pathParams: ['name'],
3608-
context: this.context,
3609-
};
3610-
if (callback) {
3611-
createAPIRequest<Schema$Empty>(
3612-
parameters,
3613-
callback as BodyResponseCallback<unknown>
3614-
);
3615-
} else {
3616-
return createAPIRequest<Schema$Empty>(parameters);
3617-
}
3618-
}
3619-
3620-
/**
3621-
* Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
3622-
*
3623-
* @param params - Parameters for request
3624-
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3625-
* @param callback - Optional callback that handles the response.
3626-
* @returns A promise if used with async/await, or void if used with a callback.
3627-
*/
3628-
delete(
3629-
params: Params$Resource$Operations$Delete,
3630-
options: StreamMethodOptions
3631-
): GaxiosPromise<Readable>;
3632-
delete(
3633-
params?: Params$Resource$Operations$Delete,
3634-
options?: MethodOptions
3635-
): GaxiosPromise<Schema$Empty>;
3636-
delete(
3637-
params: Params$Resource$Operations$Delete,
3638-
options: StreamMethodOptions | BodyResponseCallback<Readable>,
3639-
callback: BodyResponseCallback<Readable>
3640-
): void;
3641-
delete(
3642-
params: Params$Resource$Operations$Delete,
3643-
options: MethodOptions | BodyResponseCallback<Schema$Empty>,
3644-
callback: BodyResponseCallback<Schema$Empty>
3645-
): void;
3646-
delete(
3647-
params: Params$Resource$Operations$Delete,
3648-
callback: BodyResponseCallback<Schema$Empty>
3649-
): void;
3650-
delete(callback: BodyResponseCallback<Schema$Empty>): void;
3651-
delete(
3652-
paramsOrCallback?:
3653-
| Params$Resource$Operations$Delete
3654-
| BodyResponseCallback<Schema$Empty>
3655-
| BodyResponseCallback<Readable>,
3656-
optionsOrCallback?:
3657-
| MethodOptions
3658-
| StreamMethodOptions
3659-
| BodyResponseCallback<Schema$Empty>
3660-
| BodyResponseCallback<Readable>,
3661-
callback?:
3662-
| BodyResponseCallback<Schema$Empty>
3663-
| BodyResponseCallback<Readable>
3664-
): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
3665-
let params = (paramsOrCallback ||
3666-
{}) as Params$Resource$Operations$Delete;
3667-
let options = (optionsOrCallback || {}) as MethodOptions;
3668-
3669-
if (typeof paramsOrCallback === 'function') {
3670-
callback = paramsOrCallback;
3671-
params = {} as Params$Resource$Operations$Delete;
3672-
options = {};
3673-
}
3674-
3675-
if (typeof optionsOrCallback === 'function') {
3676-
callback = optionsOrCallback;
3677-
options = {};
3678-
}
3679-
3680-
const rootUrl = options.rootUrl || 'https://cloudasset.googleapis.com/';
3681-
const parameters = {
3682-
options: Object.assign(
3683-
{
3684-
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3685-
method: 'DELETE',
3686-
apiVersion: '',
3687-
},
3688-
options
3689-
),
3690-
params,
3691-
requiredParams: ['name'],
3692-
pathParams: ['name'],
3693-
context: this.context,
3694-
};
3695-
if (callback) {
3696-
createAPIRequest<Schema$Empty>(
3697-
parameters,
3698-
callback as BodyResponseCallback<unknown>
3699-
);
3700-
} else {
3701-
return createAPIRequest<Schema$Empty>(parameters);
3702-
}
3703-
}
3704-
37053531
/**
37063532
* 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.
37073533
*
@@ -3787,25 +3613,6 @@ export namespace cloudasset_v1 {
37873613
}
37883614
}
37893615

3790-
export interface Params$Resource$Operations$Cancel
3791-
extends StandardParameters {
3792-
/**
3793-
* The name of the operation resource to be cancelled.
3794-
*/
3795-
name?: string;
3796-
3797-
/**
3798-
* Request body metadata
3799-
*/
3800-
requestBody?: Schema$CancelOperationRequest;
3801-
}
3802-
export interface Params$Resource$Operations$Delete
3803-
extends StandardParameters {
3804-
/**
3805-
* The name of the operation resource to be deleted.
3806-
*/
3807-
name?: string;
3808-
}
38093616
export interface Params$Resource$Operations$Get extends StandardParameters {
38103617
/**
38113618
* The name of the operation resource.

0 commit comments

Comments
 (0)