diff --git a/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto b/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto index 7cf8073270a..0169ebbd382 100644 --- a/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto +++ b/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto @@ -36,7 +36,8 @@ option ruby_package = "Google::Cloud::RecaptchaEnterprise::V1"; // Service to determine the likelihood an event is legitimate. service RecaptchaEnterpriseService { option (google.api.default_host) = "recaptchaenterprise.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Creates an Assessment of the likelihood an event is legitimate. rpc CreateAssessment(CreateAssessmentRequest) returns (Assessment) { @@ -49,7 +50,8 @@ service RecaptchaEnterpriseService { // Annotates a previously created Assessment to provide additional information // on whether the event turned out to be authentic or fraudulent. - rpc AnnotateAssessment(AnnotateAssessmentRequest) returns (AnnotateAssessmentResponse) { + rpc AnnotateAssessment(AnnotateAssessmentRequest) + returns (AnnotateAssessmentResponse) { option (google.api.http) = { post: "/v1/{name=projects/*/assessments/*}:annotate" body: "*" @@ -117,7 +119,8 @@ service RecaptchaEnterpriseService { } // List groups of related accounts. - rpc ListRelatedAccountGroups(ListRelatedAccountGroupsRequest) returns (ListRelatedAccountGroupsResponse) { + rpc ListRelatedAccountGroups(ListRelatedAccountGroupsRequest) + returns (ListRelatedAccountGroupsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*}/relatedaccountgroups" }; @@ -125,7 +128,9 @@ service RecaptchaEnterpriseService { } // Get the memberships in a group of related accounts. - rpc ListRelatedAccountGroupMemberships(ListRelatedAccountGroupMembershipsRequest) returns (ListRelatedAccountGroupMembershipsResponse) { + rpc ListRelatedAccountGroupMemberships( + ListRelatedAccountGroupMembershipsRequest) + returns (ListRelatedAccountGroupMembershipsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/relatedaccountgroups/*}/memberships" }; @@ -133,7 +138,9 @@ service RecaptchaEnterpriseService { } // Search group memberships related to a given account. - rpc SearchRelatedAccountGroupMemberships(SearchRelatedAccountGroupMembershipsRequest) returns (SearchRelatedAccountGroupMembershipsResponse) { + rpc SearchRelatedAccountGroupMemberships( + SearchRelatedAccountGroupMembershipsRequest) + returns (SearchRelatedAccountGroupMembershipsResponse) { option (google.api.http) = { post: "/v1/{project=projects/*}/relatedaccountgroupmemberships:search" body: "*" @@ -234,16 +241,17 @@ message AnnotateAssessmentRequest { } ]; - // Optional. The annotation that will be assigned to the Event. This field can be left - // empty to provide reasons that apply to an event without concluding whether - // the event is legitimate or fraudulent. + // Optional. The annotation that will be assigned to the Event. This field can + // be left empty to provide reasons that apply to an event without concluding + // whether the event is legitimate or fraudulent. Annotation annotation = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Optional reasons for the annotation that will be assigned to the Event. + // Optional. Optional reasons for the annotation that will be assigned to the + // Event. repeated Reason reasons = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Optional unique stable hashed user identifier to apply to the assessment. - // This is an alternative to setting the hashed_account_id in + // Optional. Optional unique stable hashed user identifier to apply to the + // assessment. This is an alternative to setting the hashed_account_id in // CreateAssessment, for example when the account identifier is not yet known // in the initial request. It is recommended that the identifier is hashed // using hmac-sha256 with stable secret. @@ -251,9 +259,7 @@ message AnnotateAssessmentRequest { } // Empty response for AnnotateAssessment. -message AnnotateAssessmentResponse { - -} +message AnnotateAssessmentResponse {} // A recaptcha assessment resource. message Assessment { @@ -273,36 +279,41 @@ message Assessment { RiskAnalysis risk_analysis = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Properties of the provided event token. - TokenProperties token_properties = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + TokenProperties token_properties = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Assessment returned by Account Defender when a hashed_account_id is // provided. AccountDefenderAssessment account_defender_assessment = 6; + + // Password leak verification info. + PrivatePasswordLeakVerification private_password_leak_verification = 7; } message Event { - // Optional. The user response token provided by the reCAPTCHA client-side integration - // on your site. + // Optional. The user response token provided by the reCAPTCHA client-side + // integration on your site. string token = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The site key that was used to invoke reCAPTCHA on your site and generate - // the token. + // Optional. The site key that was used to invoke reCAPTCHA on your site and + // generate the token. string site_key = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The user agent present in the request from the user's device related to - // this event. + // Optional. The user agent present in the request from the user's device + // related to this event. string user_agent = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The IP address in the request from the user's device related to this event. + // Optional. The IP address in the request from the user's device related to + // this event. string user_ip_address = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The expected action for this type of event. This should be the same action - // provided at token generation time on client-side platforms already - // integrated with recaptcha enterprise. + // Optional. The expected action for this type of event. This should be the + // same action provided at token generation time on client-side platforms + // already integrated with recaptcha enterprise. string expected_action = 5 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Optional unique stable hashed user identifier for the request. The - // identifier should ideally be hashed using sha256 with stable secret. + // Optional. Optional unique stable hashed user identifier for the request. + // The identifier should ideally be hashed using sha256 with stable secret. bytes hashed_account_id = 6 [(google.api.field_behavior) = OPTIONAL]; } @@ -414,6 +425,31 @@ message AccountDefenderAssessment { repeated AccountDefenderLabel labels = 1; } +// Private password leak verification info. +message PrivatePasswordLeakVerification { + // Exactly 26-bit prefix of the SHA-256 hash of the canonicalized username. It + // is used to look up password leaks associated with that hash prefix. + bytes lookup_hash_prefix = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Encrypted Scrypt hash of the canonicalized username+password. It is + // re-encrypted by the server and returned through + // `reencrypted_user_credentials_hash`. + bytes encrypted_user_credentials_hash = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // List of prefixes of the encrypted potential password leaks that matched the + // given parameters. They should be compared with the client-side decryption + // prefix of `reencrypted_user_credentials_hash` + repeated bytes encrypted_leak_match_prefixes = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Corresponds to the re-encryption of the `encrypted_user_credentials_hash` + // field. Used to match potential password leaks within + // `encrypted_leak_match_prefixes`. + bytes reencrypted_user_credentials_hash = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // The create key request message. message CreateKeyRequest { // Required. The name of the project in which the key will be created, in the @@ -476,9 +512,10 @@ message UpdateKeyRequest { // Required. The key to update. Key key = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. The mask to control which fields of the key get updated. If the mask is not - // present, all fields will be updated. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The mask to control which fields of the key get updated. If the + // mask is not present, all fields will be updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; } // The delete key request message. @@ -740,14 +777,14 @@ message ListRelatedAccountGroupMembershipsRequest { } ]; - // Optional. The maximum number of accounts to return. The service may return fewer than - // this value. - // If unspecified, at most 50 accounts will be returned. - // The maximum value is 1000; values above 1000 will be coerced to 1000. + // Optional. The maximum number of accounts to return. The service may return + // fewer than this value. If unspecified, at most 50 accounts will be + // returned. The maximum value is 1000; values above 1000 will be coerced to + // 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A page token, received from a previous `ListRelatedAccountGroupMemberships` - // call. + // Optional. A page token, received from a previous + // `ListRelatedAccountGroupMemberships` call. // // When paginating, all other parameters provided to // `ListRelatedAccountGroupMemberships` must match the call that provided the @@ -767,8 +804,8 @@ message ListRelatedAccountGroupMembershipsResponse { // The request message to list related account groups. message ListRelatedAccountGroupsRequest { - // Required. The name of the project to list related account groups from, in the format - // "projects/{project}". + // Required. The name of the project to list related account groups from, in + // the format "projects/{project}". string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -776,14 +813,13 @@ message ListRelatedAccountGroupsRequest { } ]; - // Optional. The maximum number of groups to return. The service may return fewer than - // this value. - // If unspecified, at most 50 groups will be returned. + // Optional. The maximum number of groups to return. The service may return + // fewer than this value. If unspecified, at most 50 groups will be returned. // The maximum value is 1000; values above 1000 will be coerced to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A page token, received from a previous `ListRelatedAccountGroups` call. - // Provide this to retrieve the subsequent page. + // Optional. A page token, received from a previous `ListRelatedAccountGroups` + // call. Provide this to retrieve the subsequent page. // // When paginating, all other parameters provided to // `ListRelatedAccountGroups` must match the call that provided the page @@ -803,8 +839,8 @@ message ListRelatedAccountGroupsResponse { // The request message to search related account group memberships. message SearchRelatedAccountGroupMembershipsRequest { - // Required. The name of the project to search related account group memberships from, - // in the format "projects/{project}". + // Required. The name of the project to search related account group + // memberships from, in the format "projects/{project}". string project = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -812,14 +848,13 @@ message SearchRelatedAccountGroupMembershipsRequest { } ]; - // Optional. The unique stable hashed user identifier we should search connections to. - // The identifier should correspond to a `hashed_account_id` provided in a - // previous CreateAssessment or AnnotateAssessment call. + // Optional. The unique stable hashed user identifier we should search + // connections to. The identifier should correspond to a `hashed_account_id` + // provided in a previous CreateAssessment or AnnotateAssessment call. bytes hashed_account_id = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The maximum number of groups to return. The service may return fewer than - // this value. - // If unspecified, at most 50 groups will be returned. + // Optional. The maximum number of groups to return. The service may return + // fewer than this value. If unspecified, at most 50 groups will be returned. // The maximum value is 1000; values above 1000 will be coerced to 1000. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; diff --git a/packages/google-cloud-recaptchaenterprise/protos/protos.d.ts b/packages/google-cloud-recaptchaenterprise/protos/protos.d.ts index 8f8090dd336..01fb9764176 100644 --- a/packages/google-cloud-recaptchaenterprise/protos/protos.d.ts +++ b/packages/google-cloud-recaptchaenterprise/protos/protos.d.ts @@ -633,6 +633,9 @@ export namespace google { /** Assessment accountDefenderAssessment */ accountDefenderAssessment?: (google.cloud.recaptchaenterprise.v1.IAccountDefenderAssessment|null); + + /** Assessment privatePasswordLeakVerification */ + privatePasswordLeakVerification?: (google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification|null); } /** Represents an Assessment. */ @@ -659,6 +662,9 @@ export namespace google { /** Assessment accountDefenderAssessment. */ public accountDefenderAssessment?: (google.cloud.recaptchaenterprise.v1.IAccountDefenderAssessment|null); + /** Assessment privatePasswordLeakVerification. */ + public privatePasswordLeakVerification?: (google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification|null); + /** * Creates a new Assessment instance using the specified properties. * @param [properties] Properties to set @@ -1189,6 +1195,114 @@ export namespace google { } } + /** Properties of a PrivatePasswordLeakVerification. */ + interface IPrivatePasswordLeakVerification { + + /** PrivatePasswordLeakVerification lookupHashPrefix */ + lookupHashPrefix?: (Uint8Array|string|null); + + /** PrivatePasswordLeakVerification encryptedUserCredentialsHash */ + encryptedUserCredentialsHash?: (Uint8Array|string|null); + + /** PrivatePasswordLeakVerification encryptedLeakMatchPrefixes */ + encryptedLeakMatchPrefixes?: (Uint8Array[]|null); + + /** PrivatePasswordLeakVerification reencryptedUserCredentialsHash */ + reencryptedUserCredentialsHash?: (Uint8Array|string|null); + } + + /** Represents a PrivatePasswordLeakVerification. */ + class PrivatePasswordLeakVerification implements IPrivatePasswordLeakVerification { + + /** + * Constructs a new PrivatePasswordLeakVerification. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification); + + /** PrivatePasswordLeakVerification lookupHashPrefix. */ + public lookupHashPrefix: (Uint8Array|string); + + /** PrivatePasswordLeakVerification encryptedUserCredentialsHash. */ + public encryptedUserCredentialsHash: (Uint8Array|string); + + /** PrivatePasswordLeakVerification encryptedLeakMatchPrefixes. */ + public encryptedLeakMatchPrefixes: Uint8Array[]; + + /** PrivatePasswordLeakVerification reencryptedUserCredentialsHash. */ + public reencryptedUserCredentialsHash: (Uint8Array|string); + + /** + * Creates a new PrivatePasswordLeakVerification instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivatePasswordLeakVerification instance + */ + public static create(properties?: google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification): google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification; + + /** + * Encodes the specified PrivatePasswordLeakVerification message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.verify|verify} messages. + * @param message PrivatePasswordLeakVerification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivatePasswordLeakVerification message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.verify|verify} messages. + * @param message PrivatePasswordLeakVerification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivatePasswordLeakVerification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivatePasswordLeakVerification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification; + + /** + * Decodes a PrivatePasswordLeakVerification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivatePasswordLeakVerification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification; + + /** + * Verifies a PrivatePasswordLeakVerification message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivatePasswordLeakVerification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivatePasswordLeakVerification + */ + public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification; + + /** + * Creates a plain object from a PrivatePasswordLeakVerification message. Also converts values to other types if specified. + * @param message PrivatePasswordLeakVerification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivatePasswordLeakVerification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a CreateKeyRequest. */ interface ICreateKeyRequest { diff --git a/packages/google-cloud-recaptchaenterprise/protos/protos.js b/packages/google-cloud-recaptchaenterprise/protos/protos.js index ee437801e51..ac31c2c1f9a 100644 --- a/packages/google-cloud-recaptchaenterprise/protos/protos.js +++ b/packages/google-cloud-recaptchaenterprise/protos/protos.js @@ -1304,6 +1304,7 @@ * @property {google.cloud.recaptchaenterprise.v1.IRiskAnalysis|null} [riskAnalysis] Assessment riskAnalysis * @property {google.cloud.recaptchaenterprise.v1.ITokenProperties|null} [tokenProperties] Assessment tokenProperties * @property {google.cloud.recaptchaenterprise.v1.IAccountDefenderAssessment|null} [accountDefenderAssessment] Assessment accountDefenderAssessment + * @property {google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification|null} [privatePasswordLeakVerification] Assessment privatePasswordLeakVerification */ /** @@ -1361,6 +1362,14 @@ */ Assessment.prototype.accountDefenderAssessment = null; + /** + * Assessment privatePasswordLeakVerification. + * @member {google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification|null|undefined} privatePasswordLeakVerification + * @memberof google.cloud.recaptchaenterprise.v1.Assessment + * @instance + */ + Assessment.prototype.privatePasswordLeakVerification = null; + /** * Creates a new Assessment instance using the specified properties. * @function create @@ -1395,6 +1404,8 @@ $root.google.cloud.recaptchaenterprise.v1.TokenProperties.encode(message.tokenProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.accountDefenderAssessment != null && Object.hasOwnProperty.call(message, "accountDefenderAssessment")) $root.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.encode(message.accountDefenderAssessment, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.privatePasswordLeakVerification != null && Object.hasOwnProperty.call(message, "privatePasswordLeakVerification")) + $root.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.encode(message.privatePasswordLeakVerification, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -1444,6 +1455,9 @@ case 6: message.accountDefenderAssessment = $root.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.decode(reader, reader.uint32()); break; + case 7: + message.privatePasswordLeakVerification = $root.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -1502,6 +1516,11 @@ if (error) return "accountDefenderAssessment." + error; } + if (message.privatePasswordLeakVerification != null && message.hasOwnProperty("privatePasswordLeakVerification")) { + var error = $root.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.verify(message.privatePasswordLeakVerification); + if (error) + return "privatePasswordLeakVerification." + error; + } return null; }; @@ -1539,6 +1558,11 @@ throw TypeError(".google.cloud.recaptchaenterprise.v1.Assessment.accountDefenderAssessment: object expected"); message.accountDefenderAssessment = $root.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.fromObject(object.accountDefenderAssessment); } + if (object.privatePasswordLeakVerification != null) { + if (typeof object.privatePasswordLeakVerification !== "object") + throw TypeError(".google.cloud.recaptchaenterprise.v1.Assessment.privatePasswordLeakVerification: object expected"); + message.privatePasswordLeakVerification = $root.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.fromObject(object.privatePasswordLeakVerification); + } return message; }; @@ -1561,6 +1585,7 @@ object.riskAnalysis = null; object.tokenProperties = null; object.accountDefenderAssessment = null; + object.privatePasswordLeakVerification = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -1572,6 +1597,8 @@ object.tokenProperties = $root.google.cloud.recaptchaenterprise.v1.TokenProperties.toObject(message.tokenProperties, options); if (message.accountDefenderAssessment != null && message.hasOwnProperty("accountDefenderAssessment")) object.accountDefenderAssessment = $root.google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment.toObject(message.accountDefenderAssessment, options); + if (message.privatePasswordLeakVerification != null && message.hasOwnProperty("privatePasswordLeakVerification")) + object.privatePasswordLeakVerification = $root.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.toObject(message.privatePasswordLeakVerification, options); return object; }; @@ -2791,6 +2818,307 @@ return AccountDefenderAssessment; })(); + v1.PrivatePasswordLeakVerification = (function() { + + /** + * Properties of a PrivatePasswordLeakVerification. + * @memberof google.cloud.recaptchaenterprise.v1 + * @interface IPrivatePasswordLeakVerification + * @property {Uint8Array|null} [lookupHashPrefix] PrivatePasswordLeakVerification lookupHashPrefix + * @property {Uint8Array|null} [encryptedUserCredentialsHash] PrivatePasswordLeakVerification encryptedUserCredentialsHash + * @property {Array.|null} [encryptedLeakMatchPrefixes] PrivatePasswordLeakVerification encryptedLeakMatchPrefixes + * @property {Uint8Array|null} [reencryptedUserCredentialsHash] PrivatePasswordLeakVerification reencryptedUserCredentialsHash + */ + + /** + * Constructs a new PrivatePasswordLeakVerification. + * @memberof google.cloud.recaptchaenterprise.v1 + * @classdesc Represents a PrivatePasswordLeakVerification. + * @implements IPrivatePasswordLeakVerification + * @constructor + * @param {google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification=} [properties] Properties to set + */ + function PrivatePasswordLeakVerification(properties) { + this.encryptedLeakMatchPrefixes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivatePasswordLeakVerification lookupHashPrefix. + * @member {Uint8Array} lookupHashPrefix + * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification + * @instance + */ + PrivatePasswordLeakVerification.prototype.lookupHashPrefix = $util.newBuffer([]); + + /** + * PrivatePasswordLeakVerification encryptedUserCredentialsHash. + * @member {Uint8Array} encryptedUserCredentialsHash + * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification + * @instance + */ + PrivatePasswordLeakVerification.prototype.encryptedUserCredentialsHash = $util.newBuffer([]); + + /** + * PrivatePasswordLeakVerification encryptedLeakMatchPrefixes. + * @member {Array.} encryptedLeakMatchPrefixes + * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification + * @instance + */ + PrivatePasswordLeakVerification.prototype.encryptedLeakMatchPrefixes = $util.emptyArray; + + /** + * PrivatePasswordLeakVerification reencryptedUserCredentialsHash. + * @member {Uint8Array} reencryptedUserCredentialsHash + * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification + * @instance + */ + PrivatePasswordLeakVerification.prototype.reencryptedUserCredentialsHash = $util.newBuffer([]); + + /** + * Creates a new PrivatePasswordLeakVerification instance using the specified properties. + * @function create + * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification + * @static + * @param {google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification=} [properties] Properties to set + * @returns {google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification} PrivatePasswordLeakVerification instance + */ + PrivatePasswordLeakVerification.create = function create(properties) { + return new PrivatePasswordLeakVerification(properties); + }; + + /** + * Encodes the specified PrivatePasswordLeakVerification message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.verify|verify} messages. + * @function encode + * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification + * @static + * @param {google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification} message PrivatePasswordLeakVerification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivatePasswordLeakVerification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lookupHashPrefix != null && Object.hasOwnProperty.call(message, "lookupHashPrefix")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.lookupHashPrefix); + if (message.encryptedUserCredentialsHash != null && Object.hasOwnProperty.call(message, "encryptedUserCredentialsHash")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encryptedUserCredentialsHash); + if (message.encryptedLeakMatchPrefixes != null && message.encryptedLeakMatchPrefixes.length) + for (var i = 0; i < message.encryptedLeakMatchPrefixes.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encryptedLeakMatchPrefixes[i]); + if (message.reencryptedUserCredentialsHash != null && Object.hasOwnProperty.call(message, "reencryptedUserCredentialsHash")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.reencryptedUserCredentialsHash); + return writer; + }; + + /** + * Encodes the specified PrivatePasswordLeakVerification message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification + * @static + * @param {google.cloud.recaptchaenterprise.v1.IPrivatePasswordLeakVerification} message PrivatePasswordLeakVerification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivatePasswordLeakVerification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivatePasswordLeakVerification message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification} PrivatePasswordLeakVerification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivatePasswordLeakVerification.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.lookupHashPrefix = reader.bytes(); + break; + case 2: + message.encryptedUserCredentialsHash = reader.bytes(); + break; + case 3: + if (!(message.encryptedLeakMatchPrefixes && message.encryptedLeakMatchPrefixes.length)) + message.encryptedLeakMatchPrefixes = []; + message.encryptedLeakMatchPrefixes.push(reader.bytes()); + break; + case 4: + message.reencryptedUserCredentialsHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivatePasswordLeakVerification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification} PrivatePasswordLeakVerification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivatePasswordLeakVerification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivatePasswordLeakVerification message. + * @function verify + * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivatePasswordLeakVerification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lookupHashPrefix != null && message.hasOwnProperty("lookupHashPrefix")) + if (!(message.lookupHashPrefix && typeof message.lookupHashPrefix.length === "number" || $util.isString(message.lookupHashPrefix))) + return "lookupHashPrefix: buffer expected"; + if (message.encryptedUserCredentialsHash != null && message.hasOwnProperty("encryptedUserCredentialsHash")) + if (!(message.encryptedUserCredentialsHash && typeof message.encryptedUserCredentialsHash.length === "number" || $util.isString(message.encryptedUserCredentialsHash))) + return "encryptedUserCredentialsHash: buffer expected"; + if (message.encryptedLeakMatchPrefixes != null && message.hasOwnProperty("encryptedLeakMatchPrefixes")) { + if (!Array.isArray(message.encryptedLeakMatchPrefixes)) + return "encryptedLeakMatchPrefixes: array expected"; + for (var i = 0; i < message.encryptedLeakMatchPrefixes.length; ++i) + if (!(message.encryptedLeakMatchPrefixes[i] && typeof message.encryptedLeakMatchPrefixes[i].length === "number" || $util.isString(message.encryptedLeakMatchPrefixes[i]))) + return "encryptedLeakMatchPrefixes: buffer[] expected"; + } + if (message.reencryptedUserCredentialsHash != null && message.hasOwnProperty("reencryptedUserCredentialsHash")) + if (!(message.reencryptedUserCredentialsHash && typeof message.reencryptedUserCredentialsHash.length === "number" || $util.isString(message.reencryptedUserCredentialsHash))) + return "reencryptedUserCredentialsHash: buffer expected"; + return null; + }; + + /** + * Creates a PrivatePasswordLeakVerification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification} PrivatePasswordLeakVerification + */ + PrivatePasswordLeakVerification.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification) + return object; + var message = new $root.google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification(); + if (object.lookupHashPrefix != null) + if (typeof object.lookupHashPrefix === "string") + $util.base64.decode(object.lookupHashPrefix, message.lookupHashPrefix = $util.newBuffer($util.base64.length(object.lookupHashPrefix)), 0); + else if (object.lookupHashPrefix.length) + message.lookupHashPrefix = object.lookupHashPrefix; + if (object.encryptedUserCredentialsHash != null) + if (typeof object.encryptedUserCredentialsHash === "string") + $util.base64.decode(object.encryptedUserCredentialsHash, message.encryptedUserCredentialsHash = $util.newBuffer($util.base64.length(object.encryptedUserCredentialsHash)), 0); + else if (object.encryptedUserCredentialsHash.length) + message.encryptedUserCredentialsHash = object.encryptedUserCredentialsHash; + if (object.encryptedLeakMatchPrefixes) { + if (!Array.isArray(object.encryptedLeakMatchPrefixes)) + throw TypeError(".google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification.encryptedLeakMatchPrefixes: array expected"); + message.encryptedLeakMatchPrefixes = []; + for (var i = 0; i < object.encryptedLeakMatchPrefixes.length; ++i) + if (typeof object.encryptedLeakMatchPrefixes[i] === "string") + $util.base64.decode(object.encryptedLeakMatchPrefixes[i], message.encryptedLeakMatchPrefixes[i] = $util.newBuffer($util.base64.length(object.encryptedLeakMatchPrefixes[i])), 0); + else if (object.encryptedLeakMatchPrefixes[i].length) + message.encryptedLeakMatchPrefixes[i] = object.encryptedLeakMatchPrefixes[i]; + } + if (object.reencryptedUserCredentialsHash != null) + if (typeof object.reencryptedUserCredentialsHash === "string") + $util.base64.decode(object.reencryptedUserCredentialsHash, message.reencryptedUserCredentialsHash = $util.newBuffer($util.base64.length(object.reencryptedUserCredentialsHash)), 0); + else if (object.reencryptedUserCredentialsHash.length) + message.reencryptedUserCredentialsHash = object.reencryptedUserCredentialsHash; + return message; + }; + + /** + * Creates a plain object from a PrivatePasswordLeakVerification message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification + * @static + * @param {google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification} message PrivatePasswordLeakVerification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivatePasswordLeakVerification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.encryptedLeakMatchPrefixes = []; + if (options.defaults) { + if (options.bytes === String) + object.lookupHashPrefix = ""; + else { + object.lookupHashPrefix = []; + if (options.bytes !== Array) + object.lookupHashPrefix = $util.newBuffer(object.lookupHashPrefix); + } + if (options.bytes === String) + object.encryptedUserCredentialsHash = ""; + else { + object.encryptedUserCredentialsHash = []; + if (options.bytes !== Array) + object.encryptedUserCredentialsHash = $util.newBuffer(object.encryptedUserCredentialsHash); + } + if (options.bytes === String) + object.reencryptedUserCredentialsHash = ""; + else { + object.reencryptedUserCredentialsHash = []; + if (options.bytes !== Array) + object.reencryptedUserCredentialsHash = $util.newBuffer(object.reencryptedUserCredentialsHash); + } + } + if (message.lookupHashPrefix != null && message.hasOwnProperty("lookupHashPrefix")) + object.lookupHashPrefix = options.bytes === String ? $util.base64.encode(message.lookupHashPrefix, 0, message.lookupHashPrefix.length) : options.bytes === Array ? Array.prototype.slice.call(message.lookupHashPrefix) : message.lookupHashPrefix; + if (message.encryptedUserCredentialsHash != null && message.hasOwnProperty("encryptedUserCredentialsHash")) + object.encryptedUserCredentialsHash = options.bytes === String ? $util.base64.encode(message.encryptedUserCredentialsHash, 0, message.encryptedUserCredentialsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedUserCredentialsHash) : message.encryptedUserCredentialsHash; + if (message.encryptedLeakMatchPrefixes && message.encryptedLeakMatchPrefixes.length) { + object.encryptedLeakMatchPrefixes = []; + for (var j = 0; j < message.encryptedLeakMatchPrefixes.length; ++j) + object.encryptedLeakMatchPrefixes[j] = options.bytes === String ? $util.base64.encode(message.encryptedLeakMatchPrefixes[j], 0, message.encryptedLeakMatchPrefixes[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedLeakMatchPrefixes[j]) : message.encryptedLeakMatchPrefixes[j]; + } + if (message.reencryptedUserCredentialsHash != null && message.hasOwnProperty("reencryptedUserCredentialsHash")) + object.reencryptedUserCredentialsHash = options.bytes === String ? $util.base64.encode(message.reencryptedUserCredentialsHash, 0, message.reencryptedUserCredentialsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.reencryptedUserCredentialsHash) : message.reencryptedUserCredentialsHash; + return object; + }; + + /** + * Converts this PrivatePasswordLeakVerification to JSON. + * @function toJSON + * @memberof google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification + * @instance + * @returns {Object.} JSON object + */ + PrivatePasswordLeakVerification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PrivatePasswordLeakVerification; + })(); + v1.CreateKeyRequest = (function() { /** diff --git a/packages/google-cloud-recaptchaenterprise/protos/protos.json b/packages/google-cloud-recaptchaenterprise/protos/protos.json index cc2b5b071cf..bb5d252a25f 100644 --- a/packages/google-cloud-recaptchaenterprise/protos/protos.json +++ b/packages/google-cloud-recaptchaenterprise/protos/protos.json @@ -345,6 +345,10 @@ "accountDefenderAssessment": { "type": "AccountDefenderAssessment", "id": 6 + }, + "privatePasswordLeakVerification": { + "type": "PrivatePasswordLeakVerification", + "id": 7 } } }, @@ -476,6 +480,39 @@ } } }, + "PrivatePasswordLeakVerification": { + "fields": { + "lookupHashPrefix": { + "type": "bytes", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encryptedUserCredentialsHash": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encryptedLeakMatchPrefixes": { + "rule": "repeated", + "type": "bytes", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reencryptedUserCredentialsHash": { + "type": "bytes", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, "CreateKeyRequest": { "fields": { "parent": { diff --git a/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.annotate_assessment.js b/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.annotate_assessment.js index 0ed78fbf25f..4240c455f11 100644 --- a/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.annotate_assessment.js +++ b/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.annotate_assessment.js @@ -31,18 +31,19 @@ function main(name) { */ // const name = 'abc123' /** - * Optional. The annotation that will be assigned to the Event. This field can be left - * empty to provide reasons that apply to an event without concluding whether - * the event is legitimate or fraudulent. + * Optional. The annotation that will be assigned to the Event. This field can + * be left empty to provide reasons that apply to an event without concluding + * whether the event is legitimate or fraudulent. */ // const annotation = {} /** - * Optional. Optional reasons for the annotation that will be assigned to the Event. + * Optional. Optional reasons for the annotation that will be assigned to the + * Event. */ // const reasons = 1234 /** - * Optional. Optional unique stable hashed user identifier to apply to the assessment. - * This is an alternative to setting the hashed_account_id in + * Optional. Optional unique stable hashed user identifier to apply to the + * assessment. This is an alternative to setting the hashed_account_id in * CreateAssessment, for example when the account identifier is not yet known * in the initial request. It is recommended that the identifier is hashed * using hmac-sha256 with stable secret. diff --git a/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.list_related_account_group_memberships.js b/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.list_related_account_group_memberships.js index c2853cdb084..abef7ca2238 100644 --- a/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.list_related_account_group_memberships.js +++ b/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.list_related_account_group_memberships.js @@ -31,15 +31,15 @@ function main(parent) { */ // const parent = 'abc123' /** - * Optional. The maximum number of accounts to return. The service may return fewer than - * this value. - * If unspecified, at most 50 accounts will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. + * Optional. The maximum number of accounts to return. The service may return + * fewer than this value. If unspecified, at most 50 accounts will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. */ // const pageSize = 1234 /** - * Optional. A page token, received from a previous `ListRelatedAccountGroupMemberships` - * call. + * Optional. A page token, received from a previous + * `ListRelatedAccountGroupMemberships` call. * When paginating, all other parameters provided to * `ListRelatedAccountGroupMemberships` must match the call that provided the * page token. diff --git a/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.list_related_account_groups.js b/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.list_related_account_groups.js index c4972529135..9f79ded4268 100644 --- a/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.list_related_account_groups.js +++ b/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.list_related_account_groups.js @@ -26,20 +26,19 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the project to list related account groups from, in the format - * "projects/{project}". + * Required. The name of the project to list related account groups from, in + * the format "projects/{project}". */ // const parent = 'abc123' /** - * Optional. The maximum number of groups to return. The service may return fewer than - * this value. - * If unspecified, at most 50 groups will be returned. + * Optional. The maximum number of groups to return. The service may return + * fewer than this value. If unspecified, at most 50 groups will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. */ // const pageSize = 1234 /** - * Optional. A page token, received from a previous `ListRelatedAccountGroups` call. - * Provide this to retrieve the subsequent page. + * Optional. A page token, received from a previous `ListRelatedAccountGroups` + * call. Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to * `ListRelatedAccountGroups` must match the call that provided the page * token. diff --git a/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.search_related_account_group_memberships.js b/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.search_related_account_group_memberships.js index 863ac5b2d36..6f0a056154a 100644 --- a/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.search_related_account_group_memberships.js +++ b/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.search_related_account_group_memberships.js @@ -26,20 +26,19 @@ function main(project) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the project to search related account group memberships from, - * in the format "projects/{project}". + * Required. The name of the project to search related account group + * memberships from, in the format "projects/{project}". */ // const project = 'my-project' /** - * Optional. The unique stable hashed user identifier we should search connections to. - * The identifier should correspond to a `hashed_account_id` provided in a - * previous CreateAssessment or AnnotateAssessment call. + * Optional. The unique stable hashed user identifier we should search + * connections to. The identifier should correspond to a `hashed_account_id` + * provided in a previous CreateAssessment or AnnotateAssessment call. */ // const hashedAccountId = 'Buffer.from('string')' /** - * Optional. The maximum number of groups to return. The service may return fewer than - * this value. - * If unspecified, at most 50 groups will be returned. + * Optional. The maximum number of groups to return. The service may return + * fewer than this value. If unspecified, at most 50 groups will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. */ // const pageSize = 1234 diff --git a/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.update_key.js b/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.update_key.js index b4c91cd165b..8714d93b9fa 100644 --- a/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.update_key.js +++ b/packages/google-cloud-recaptchaenterprise/samples/generated/v1/recaptcha_enterprise_service.update_key.js @@ -30,8 +30,8 @@ function main(key) { */ // const key = {} /** - * Optional. The mask to control which fields of the key get updated. If the mask is not - * present, all fields will be updated. + * Optional. The mask to control which fields of the key get updated. If the + * mask is not present, all fields will be updated. */ // const updateMask = {} diff --git a/packages/google-cloud-recaptchaenterprise/samples/generated/v1/snippet_metadata.google.cloud.recaptchaenterprise.v1.json b/packages/google-cloud-recaptchaenterprise/samples/generated/v1/snippet_metadata.google.cloud.recaptchaenterprise.v1.json index 578b6b467f6..42ee0833041 100644 --- a/packages/google-cloud-recaptchaenterprise/samples/generated/v1/snippet_metadata.google.cloud.recaptchaenterprise.v1.json +++ b/packages/google-cloud-recaptchaenterprise/samples/generated/v1/snippet_metadata.google.cloud.recaptchaenterprise.v1.json @@ -66,7 +66,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 70, "type": "FULL" } ], @@ -414,7 +414,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 67, "type": "FULL" } ], @@ -510,7 +510,7 @@ "segments": [ { "start": 25, - "end": 75, + "end": 74, "type": "FULL" } ], diff --git a/packages/google-cloud-recaptchaenterprise/src/v1/recaptcha_enterprise_service_client.ts b/packages/google-cloud-recaptchaenterprise/src/v1/recaptcha_enterprise_service_client.ts index b4ed5ed0c59..308bb023f36 100644 --- a/packages/google-cloud-recaptchaenterprise/src/v1/recaptcha_enterprise_service_client.ts +++ b/packages/google-cloud-recaptchaenterprise/src/v1/recaptcha_enterprise_service_client.ts @@ -467,14 +467,15 @@ export class RecaptchaEnterpriseServiceClient { * Required. The resource name of the Assessment, in the format * "projects/{project}/assessments/{assessment}". * @param {google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation} [request.annotation] - * Optional. The annotation that will be assigned to the Event. This field can be left - * empty to provide reasons that apply to an event without concluding whether - * the event is legitimate or fraudulent. + * Optional. The annotation that will be assigned to the Event. This field can + * be left empty to provide reasons that apply to an event without concluding + * whether the event is legitimate or fraudulent. * @param {number[]} [request.reasons] - * Optional. Optional reasons for the annotation that will be assigned to the Event. + * Optional. Optional reasons for the annotation that will be assigned to the + * Event. * @param {Buffer} [request.hashedAccountId] - * Optional. Optional unique stable hashed user identifier to apply to the assessment. - * This is an alternative to setting the hashed_account_id in + * Optional. Optional unique stable hashed user identifier to apply to the + * assessment. This is an alternative to setting the hashed_account_id in * CreateAssessment, for example when the account identifier is not yet known * in the initial request. It is recommended that the identifier is hashed * using hmac-sha256 with stable secret. @@ -762,8 +763,8 @@ export class RecaptchaEnterpriseServiceClient { * @param {google.cloud.recaptchaenterprise.v1.Key} request.key * Required. The key to update. * @param {google.protobuf.FieldMask} [request.updateMask] - * Optional. The mask to control which fields of the key get updated. If the mask is not - * present, all fields will be updated. + * Optional. The mask to control which fields of the key get updated. If the + * mask is not present, all fields will be updated. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1335,16 +1336,15 @@ export class RecaptchaEnterpriseServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the project to list related account groups from, in the format - * "projects/{project}". + * Required. The name of the project to list related account groups from, in + * the format "projects/{project}". * @param {number} [request.pageSize] - * Optional. The maximum number of groups to return. The service may return fewer than - * this value. - * If unspecified, at most 50 groups will be returned. + * Optional. The maximum number of groups to return. The service may return + * fewer than this value. If unspecified, at most 50 groups will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListRelatedAccountGroups` call. - * Provide this to retrieve the subsequent page. + * Optional. A page token, received from a previous `ListRelatedAccountGroups` + * call. Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to * `ListRelatedAccountGroups` must match the call that provided the page @@ -1446,16 +1446,15 @@ export class RecaptchaEnterpriseServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the project to list related account groups from, in the format - * "projects/{project}". + * Required. The name of the project to list related account groups from, in + * the format "projects/{project}". * @param {number} [request.pageSize] - * Optional. The maximum number of groups to return. The service may return fewer than - * this value. - * If unspecified, at most 50 groups will be returned. + * Optional. The maximum number of groups to return. The service may return + * fewer than this value. If unspecified, at most 50 groups will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListRelatedAccountGroups` call. - * Provide this to retrieve the subsequent page. + * Optional. A page token, received from a previous `ListRelatedAccountGroups` + * call. Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to * `ListRelatedAccountGroups` must match the call that provided the page @@ -1501,16 +1500,15 @@ export class RecaptchaEnterpriseServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the project to list related account groups from, in the format - * "projects/{project}". + * Required. The name of the project to list related account groups from, in + * the format "projects/{project}". * @param {number} [request.pageSize] - * Optional. The maximum number of groups to return. The service may return fewer than - * this value. - * If unspecified, at most 50 groups will be returned. + * Optional. The maximum number of groups to return. The service may return + * fewer than this value. If unspecified, at most 50 groups will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListRelatedAccountGroups` call. - * Provide this to retrieve the subsequent page. + * Optional. A page token, received from a previous `ListRelatedAccountGroups` + * call. Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to * `ListRelatedAccountGroups` must match the call that provided the page @@ -1558,13 +1556,13 @@ export class RecaptchaEnterpriseServiceClient { * Required. The resource name for the related account group in the format * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. * @param {number} [request.pageSize] - * Optional. The maximum number of accounts to return. The service may return fewer than - * this value. - * If unspecified, at most 50 accounts will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. + * Optional. The maximum number of accounts to return. The service may return + * fewer than this value. If unspecified, at most 50 accounts will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListRelatedAccountGroupMemberships` - * call. + * Optional. A page token, received from a previous + * `ListRelatedAccountGroupMemberships` call. * * When paginating, all other parameters provided to * `ListRelatedAccountGroupMemberships` must match the call that provided the @@ -1669,13 +1667,13 @@ export class RecaptchaEnterpriseServiceClient { * Required. The resource name for the related account group in the format * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. * @param {number} [request.pageSize] - * Optional. The maximum number of accounts to return. The service may return fewer than - * this value. - * If unspecified, at most 50 accounts will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. + * Optional. The maximum number of accounts to return. The service may return + * fewer than this value. If unspecified, at most 50 accounts will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListRelatedAccountGroupMemberships` - * call. + * Optional. A page token, received from a previous + * `ListRelatedAccountGroupMemberships` call. * * When paginating, all other parameters provided to * `ListRelatedAccountGroupMemberships` must match the call that provided the @@ -1725,13 +1723,13 @@ export class RecaptchaEnterpriseServiceClient { * Required. The resource name for the related account group in the format * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`. * @param {number} [request.pageSize] - * Optional. The maximum number of accounts to return. The service may return fewer than - * this value. - * If unspecified, at most 50 accounts will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. + * Optional. The maximum number of accounts to return. The service may return + * fewer than this value. If unspecified, at most 50 accounts will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous `ListRelatedAccountGroupMemberships` - * call. + * Optional. A page token, received from a previous + * `ListRelatedAccountGroupMemberships` call. * * When paginating, all other parameters provided to * `ListRelatedAccountGroupMemberships` must match the call that provided the @@ -1777,16 +1775,15 @@ export class RecaptchaEnterpriseServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.project - * Required. The name of the project to search related account group memberships from, - * in the format "projects/{project}". + * Required. The name of the project to search related account group + * memberships from, in the format "projects/{project}". * @param {Buffer} [request.hashedAccountId] - * Optional. The unique stable hashed user identifier we should search connections to. - * The identifier should correspond to a `hashed_account_id` provided in a - * previous CreateAssessment or AnnotateAssessment call. + * Optional. The unique stable hashed user identifier we should search + * connections to. The identifier should correspond to a `hashed_account_id` + * provided in a previous CreateAssessment or AnnotateAssessment call. * @param {number} [request.pageSize] - * Optional. The maximum number of groups to return. The service may return fewer than - * this value. - * If unspecified, at most 50 groups will be returned. + * Optional. The maximum number of groups to return. The service may return + * fewer than this value. If unspecified, at most 50 groups will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous @@ -1893,16 +1890,15 @@ export class RecaptchaEnterpriseServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.project - * Required. The name of the project to search related account group memberships from, - * in the format "projects/{project}". + * Required. The name of the project to search related account group + * memberships from, in the format "projects/{project}". * @param {Buffer} [request.hashedAccountId] - * Optional. The unique stable hashed user identifier we should search connections to. - * The identifier should correspond to a `hashed_account_id` provided in a - * previous CreateAssessment or AnnotateAssessment call. + * Optional. The unique stable hashed user identifier we should search + * connections to. The identifier should correspond to a `hashed_account_id` + * provided in a previous CreateAssessment or AnnotateAssessment call. * @param {number} [request.pageSize] - * Optional. The maximum number of groups to return. The service may return fewer than - * this value. - * If unspecified, at most 50 groups will be returned. + * Optional. The maximum number of groups to return. The service may return + * fewer than this value. If unspecified, at most 50 groups will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous @@ -1954,16 +1950,15 @@ export class RecaptchaEnterpriseServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.project - * Required. The name of the project to search related account group memberships from, - * in the format "projects/{project}". + * Required. The name of the project to search related account group + * memberships from, in the format "projects/{project}". * @param {Buffer} [request.hashedAccountId] - * Optional. The unique stable hashed user identifier we should search connections to. - * The identifier should correspond to a `hashed_account_id` provided in a - * previous CreateAssessment or AnnotateAssessment call. + * Optional. The unique stable hashed user identifier we should search + * connections to. The identifier should correspond to a `hashed_account_id` + * provided in a previous CreateAssessment or AnnotateAssessment call. * @param {number} [request.pageSize] - * Optional. The maximum number of groups to return. The service may return fewer than - * this value. - * If unspecified, at most 50 groups will be returned. + * Optional. The maximum number of groups to return. The service may return + * fewer than this value. If unspecified, at most 50 groups will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous