From abe83f6639138f1eb5414d289e2f9332a3c6999e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Fri, 2 Feb 2024 01:30:43 +0000 Subject: [PATCH] feat(recaptchaenterprise): update the API #### recaptchaenterprise:v1 The following keys were added: - resources.projects.resources.firewallpolicies.methods.reorder.description - resources.projects.resources.firewallpolicies.methods.reorder.flatPath - resources.projects.resources.firewallpolicies.methods.reorder.httpMethod - resources.projects.resources.firewallpolicies.methods.reorder.id - resources.projects.resources.firewallpolicies.methods.reorder.parameterOrder - resources.projects.resources.firewallpolicies.methods.reorder.parameters.parent.description - resources.projects.resources.firewallpolicies.methods.reorder.parameters.parent.location - resources.projects.resources.firewallpolicies.methods.reorder.parameters.parent.pattern - resources.projects.resources.firewallpolicies.methods.reorder.parameters.parent.required - resources.projects.resources.firewallpolicies.methods.reorder.parameters.parent.type - resources.projects.resources.firewallpolicies.methods.reorder.path - resources.projects.resources.firewallpolicies.methods.reorder.request.$ref - resources.projects.resources.firewallpolicies.methods.reorder.response.$ref - resources.projects.resources.firewallpolicies.methods.reorder.scopes - schemas.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest.description - schemas.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest.id - schemas.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest.properties.names.description - schemas.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest.properties.names.items.type - schemas.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest.properties.names.type - schemas.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest.type - schemas.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse.description - schemas.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse.id - schemas.GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse.type The following keys were changed: - schemas.GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo.properties.username.description --- discovery/recaptchaenterprise-v1.json | 52 ++++++++++- src/apis/recaptchaenterprise/v1.ts | 124 +++++++++++++++++++++++++- 2 files changed, 173 insertions(+), 3 deletions(-) diff --git a/discovery/recaptchaenterprise-v1.json b/discovery/recaptchaenterprise-v1.json index 04f64dc273..fefb64e366 100644 --- a/discovery/recaptchaenterprise-v1.json +++ b/discovery/recaptchaenterprise-v1.json @@ -316,6 +316,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "reorder": { + "description": "Reorders all firewall policies.", + "flatPath": "v1/projects/{projectsId}/firewallpolicies:reorder", + "httpMethod": "POST", + "id": "recaptchaenterprise.projects.firewallpolicies.reorder", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the project to list the policies for, in the format `projects/{project}`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/firewallpolicies:reorder", + "request": { + "$ref": "GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest" + }, + "response": { + "$ref": "GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -666,7 +694,7 @@ } } }, - "revision": "20231214", + "revision": "20240120", "rootUrl": "https://recaptchaenterprise.googleapis.com/", "schemas": { "GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment": { @@ -744,7 +772,7 @@ }, "username": { "deprecated": true, - "description": "Username of the account that is being verified. Deprecated. Customers should now provide the hashed account ID field in Event.", + "description": "Username of the account that is being verified. Deprecated. Customers should now provide the `account_id` field in `event.user_info`.", "type": "string" } }, @@ -1554,6 +1582,26 @@ }, "type": "object" }, + "GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest": { + "description": "The reorder firewall policies request message.", + "id": "GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest", + "properties": { + "names": { + "description": "Required. A list containing all policy names, in the new order. Each name is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse": { + "description": "The reorder firewall policies response message.", + "id": "GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse": { "description": "Secret key is used only in legacy reCAPTCHA. It must be used in a 3rd party integration with legacy reCAPTCHA.", "id": "GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse", diff --git a/src/apis/recaptchaenterprise/v1.ts b/src/apis/recaptchaenterprise/v1.ts index ae6cb04bed..4334469df4 100644 --- a/src/apis/recaptchaenterprise/v1.ts +++ b/src/apis/recaptchaenterprise/v1.ts @@ -150,7 +150,7 @@ export namespace recaptchaenterprise_v1 { */ latestVerificationResult?: string | null; /** - * Username of the account that is being verified. Deprecated. Customers should now provide the hashed account ID field in Event. + * Username of the account that is being verified. Deprecated. Customers should now provide the `account_id` field in `event.user_info`. */ username?: string | null; } @@ -732,6 +732,19 @@ export namespace recaptchaenterprise_v1 { */ name?: string | null; } + /** + * The reorder firewall policies request message. + */ + export interface Schema$GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest { + /** + * Required. A list containing all policy names, in the new order. Each name is in the format `projects/{project\}/firewallpolicies/{firewallpolicy\}`. + */ + names?: string[] | null; + } + /** + * The reorder firewall policies response message. + */ + export interface Schema$GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse {} /** * Secret key is used only in legacy reCAPTCHA. It must be used in a 3rd party integration with legacy reCAPTCHA. */ @@ -1857,6 +1870,103 @@ export namespace recaptchaenterprise_v1 { ); } } + + /** + * Reorders all firewall policies. + * + * @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. + */ + reorder( + params: Params$Resource$Projects$Firewallpolicies$Reorder, + options: StreamMethodOptions + ): GaxiosPromise; + reorder( + params?: Params$Resource$Projects$Firewallpolicies$Reorder, + options?: MethodOptions + ): GaxiosPromise; + reorder( + params: Params$Resource$Projects$Firewallpolicies$Reorder, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + reorder( + params: Params$Resource$Projects$Firewallpolicies$Reorder, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + reorder( + params: Params$Resource$Projects$Firewallpolicies$Reorder, + callback: BodyResponseCallback + ): void; + reorder( + callback: BodyResponseCallback + ): void; + reorder( + paramsOrCallback?: + | Params$Resource$Projects$Firewallpolicies$Reorder + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Firewallpolicies$Reorder; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Firewallpolicies$Reorder; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://recaptchaenterprise.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/firewallpolicies:reorder').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } } export interface Params$Resource$Projects$Firewallpolicies$Create @@ -1916,6 +2026,18 @@ export namespace recaptchaenterprise_v1 { */ requestBody?: Schema$GoogleCloudRecaptchaenterpriseV1FirewallPolicy; } + export interface Params$Resource$Projects$Firewallpolicies$Reorder + extends StandardParameters { + /** + * Required. The name of the project to list the policies for, in the format `projects/{project\}`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest; + } export class Resource$Projects$Keys { context: APIRequestContext;