From 57f5d89570568d355f050704d6039eb6f510dffb Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 5 May 2020 16:45:28 -0700 Subject: [PATCH] fix: regen protos and tests, formatting --- protos/protos.js | 414 +++++++++--------- synth.metadata | 14 +- test/gapic_recaptcha_enterprise_service_v1.ts | 32 +- ...cha_enterprise_service_v1_beta1_v1beta1.ts | 32 +- 4 files changed, 226 insertions(+), 266 deletions(-) diff --git a/protos/protos.js b/protos/protos.js index 6ab2d1c..95df102 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -397,9 +397,9 @@ CreateAssessmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.assessment != null && Object.hasOwnProperty.call(message, "assessment")) + if (message.assessment != null && message.hasOwnProperty("assessment")) $root.google.cloud.recaptchaenterprise.v1.Assessment.encode(message.assessment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -612,9 +612,9 @@ AnnotateAssessmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.annotation != null && Object.hasOwnProperty.call(message, "annotation")) + if (message.annotation != null && message.hasOwnProperty("annotation")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.annotation); return writer; }; @@ -785,7 +785,7 @@ /** * Annotation enum. * @name google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation - * @enum {number} + * @enum {string} * @property {number} ANNOTATION_UNSPECIFIED=0 ANNOTATION_UNSPECIFIED value * @property {number} LEGITIMATE=1 LEGITIMATE value * @property {number} FRAUDULENT=2 FRAUDULENT value @@ -1048,13 +1048,13 @@ Assessment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) + if (message.event != null && message.hasOwnProperty("event")) $root.google.cloud.recaptchaenterprise.v1.Event.encode(message.event, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.riskAnalysis != null && Object.hasOwnProperty.call(message, "riskAnalysis")) + if (message.riskAnalysis != null && message.hasOwnProperty("riskAnalysis")) $root.google.cloud.recaptchaenterprise.v1.RiskAnalysis.encode(message.riskAnalysis, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.tokenProperties != null && Object.hasOwnProperty.call(message, "tokenProperties")) + if (message.tokenProperties != null && message.hasOwnProperty("tokenProperties")) $root.google.cloud.recaptchaenterprise.v1.TokenProperties.encode(message.tokenProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -1326,15 +1326,15 @@ Event.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.token != null && Object.hasOwnProperty.call(message, "token")) + if (message.token != null && message.hasOwnProperty("token")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.token); - if (message.siteKey != null && Object.hasOwnProperty.call(message, "siteKey")) + if (message.siteKey != null && message.hasOwnProperty("siteKey")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.siteKey); - if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent")) + if (message.userAgent != null && message.hasOwnProperty("userAgent")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.userAgent); - if (message.userIpAddress != null && Object.hasOwnProperty.call(message, "userIpAddress")) + if (message.userIpAddress != null && message.hasOwnProperty("userIpAddress")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.userIpAddress); - if (message.expectedAction != null && Object.hasOwnProperty.call(message, "expectedAction")) + if (message.expectedAction != null && message.hasOwnProperty("expectedAction")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.expectedAction); return writer; }; @@ -1576,7 +1576,7 @@ RiskAnalysis.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) + if (message.score != null && message.hasOwnProperty("score")) writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); if (message.reasons != null && message.reasons.length) { writer.uint32(/* id 2, wireType 2 =*/18).fork(); @@ -1779,7 +1779,7 @@ /** * ClassificationReason enum. * @name google.cloud.recaptchaenterprise.v1.RiskAnalysis.ClassificationReason - * @enum {number} + * @enum {string} * @property {number} CLASSIFICATION_REASON_UNSPECIFIED=0 CLASSIFICATION_REASON_UNSPECIFIED value * @property {number} AUTOMATION=1 AUTOMATION value * @property {number} UNEXPECTED_ENVIRONMENT=2 UNEXPECTED_ENVIRONMENT value @@ -1893,15 +1893,15 @@ TokenProperties.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.valid != null && Object.hasOwnProperty.call(message, "valid")) + if (message.valid != null && message.hasOwnProperty("valid")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.valid); - if (message.invalidReason != null && Object.hasOwnProperty.call(message, "invalidReason")) + if (message.invalidReason != null && message.hasOwnProperty("invalidReason")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.invalidReason); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + if (message.createTime != null && message.hasOwnProperty("createTime")) $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + if (message.hostname != null && message.hasOwnProperty("hostname")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.hostname); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) + if (message.action != null && message.hasOwnProperty("action")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.action); return writer; }; @@ -2115,7 +2115,7 @@ /** * InvalidReason enum. * @name google.cloud.recaptchaenterprise.v1.TokenProperties.InvalidReason - * @enum {number} + * @enum {string} * @property {number} INVALID_REASON_UNSPECIFIED=0 INVALID_REASON_UNSPECIFIED value * @property {number} UNKNOWN_INVALID_REASON=1 UNKNOWN_INVALID_REASON value * @property {number} MALFORMED=2 MALFORMED value @@ -2202,9 +2202,9 @@ CreateKeyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) + if (message.key != null && message.hasOwnProperty("key")) $root.google.cloud.recaptchaenterprise.v1.Key.encode(message.key, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -2426,11 +2426,11 @@ ListKeysRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; @@ -2653,7 +2653,7 @@ if (message.keys != null && message.keys.length) for (var i = 0; i < message.keys.length; ++i) $root.google.cloud.recaptchaenterprise.v1.Key.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -2871,7 +2871,7 @@ GetKeyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -3067,9 +3067,9 @@ UpdateKeyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) + if (message.key != null && message.hasOwnProperty("key")) $root.google.cloud.recaptchaenterprise.v1.Key.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + if (message.updateMask != null && message.hasOwnProperty("updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -3278,7 +3278,7 @@ DeleteKeyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -3534,20 +3534,20 @@ Key.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.webSettings != null && Object.hasOwnProperty.call(message, "webSettings")) + if (message.webSettings != null && message.hasOwnProperty("webSettings")) $root.google.cloud.recaptchaenterprise.v1.WebKeySettings.encode(message.webSettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.androidSettings != null && Object.hasOwnProperty.call(message, "androidSettings")) + if (message.androidSettings != null && message.hasOwnProperty("androidSettings")) $root.google.cloud.recaptchaenterprise.v1.AndroidKeySettings.encode(message.androidSettings, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.iosSettings != null && Object.hasOwnProperty.call(message, "iosSettings")) + if (message.iosSettings != null && message.hasOwnProperty("iosSettings")) $root.google.cloud.recaptchaenterprise.v1.IOSKeySettings.encode(message.iosSettings, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + if (message.labels != null && message.hasOwnProperty("labels")) for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + if (message.createTime != null && message.hasOwnProperty("createTime")) $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -3901,13 +3901,13 @@ if (message.allowedDomains != null && message.allowedDomains.length) for (var i = 0; i < message.allowedDomains.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowedDomains[i]); - if (message.allowAmpTraffic != null && Object.hasOwnProperty.call(message, "allowAmpTraffic")) + if (message.allowAmpTraffic != null && message.hasOwnProperty("allowAmpTraffic")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAmpTraffic); - if (message.allowAllDomains != null && Object.hasOwnProperty.call(message, "allowAllDomains")) + if (message.allowAllDomains != null && message.hasOwnProperty("allowAllDomains")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowAllDomains); - if (message.integrationType != null && Object.hasOwnProperty.call(message, "integrationType")) + if (message.integrationType != null && message.hasOwnProperty("integrationType")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.integrationType); - if (message.challengeSecurityPreference != null && Object.hasOwnProperty.call(message, "challengeSecurityPreference")) + if (message.challengeSecurityPreference != null && message.hasOwnProperty("challengeSecurityPreference")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.challengeSecurityPreference); return writer; }; @@ -4144,7 +4144,7 @@ /** * IntegrationType enum. * @name google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType - * @enum {number} + * @enum {string} * @property {number} INTEGRATION_TYPE_UNSPECIFIED=0 INTEGRATION_TYPE_UNSPECIFIED value * @property {number} SCORE=1 SCORE value * @property {number} CHECKBOX=2 CHECKBOX value @@ -4162,7 +4162,7 @@ /** * ChallengeSecurityPreference enum. * @name google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference - * @enum {number} + * @enum {string} * @property {number} CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED=0 CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED value * @property {number} USABILITY=1 USABILITY value * @property {number} BALANCE=2 BALANCE value @@ -4929,9 +4929,9 @@ CreateAssessmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.assessment != null && Object.hasOwnProperty.call(message, "assessment")) + if (message.assessment != null && message.hasOwnProperty("assessment")) $root.google.cloud.recaptchaenterprise.v1beta1.Assessment.encode(message.assessment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -5144,9 +5144,9 @@ AnnotateAssessmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.annotation != null && Object.hasOwnProperty.call(message, "annotation")) + if (message.annotation != null && message.hasOwnProperty("annotation")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.annotation); return writer; }; @@ -5307,7 +5307,7 @@ /** * Annotation enum. * @name google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation - * @enum {number} + * @enum {string} * @property {number} ANNOTATION_UNSPECIFIED=0 ANNOTATION_UNSPECIFIED value * @property {number} LEGITIMATE=1 LEGITIMATE value * @property {number} FRAUDULENT=2 FRAUDULENT value @@ -5576,13 +5576,13 @@ Assessment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.event != null && Object.hasOwnProperty.call(message, "event")) + if (message.event != null && message.hasOwnProperty("event")) $root.google.cloud.recaptchaenterprise.v1beta1.Event.encode(message.event, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) + if (message.score != null && message.hasOwnProperty("score")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.score); - if (message.tokenProperties != null && Object.hasOwnProperty.call(message, "tokenProperties")) + if (message.tokenProperties != null && message.hasOwnProperty("tokenProperties")) $root.google.cloud.recaptchaenterprise.v1beta1.TokenProperties.encode(message.tokenProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.reasons != null && message.reasons.length) { writer.uint32(/* id 5, wireType 2 =*/42).fork(); @@ -5829,7 +5829,7 @@ /** * ClassificationReason enum. * @name google.cloud.recaptchaenterprise.v1beta1.Assessment.ClassificationReason - * @enum {number} + * @enum {string} * @property {number} CLASSIFICATION_REASON_UNSPECIFIED=0 CLASSIFICATION_REASON_UNSPECIFIED value * @property {number} AUTOMATION=1 AUTOMATION value * @property {number} UNEXPECTED_ENVIRONMENT=2 UNEXPECTED_ENVIRONMENT value @@ -5943,15 +5943,15 @@ Event.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.token != null && Object.hasOwnProperty.call(message, "token")) + if (message.token != null && message.hasOwnProperty("token")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.token); - if (message.siteKey != null && Object.hasOwnProperty.call(message, "siteKey")) + if (message.siteKey != null && message.hasOwnProperty("siteKey")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.siteKey); - if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent")) + if (message.userAgent != null && message.hasOwnProperty("userAgent")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.userAgent); - if (message.userIpAddress != null && Object.hasOwnProperty.call(message, "userIpAddress")) + if (message.userIpAddress != null && message.hasOwnProperty("userIpAddress")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.userIpAddress); - if (message.expectedAction != null && Object.hasOwnProperty.call(message, "expectedAction")) + if (message.expectedAction != null && message.hasOwnProperty("expectedAction")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.expectedAction); return writer; }; @@ -6219,15 +6219,15 @@ TokenProperties.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.valid != null && Object.hasOwnProperty.call(message, "valid")) + if (message.valid != null && message.hasOwnProperty("valid")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.valid); - if (message.invalidReason != null && Object.hasOwnProperty.call(message, "invalidReason")) + if (message.invalidReason != null && message.hasOwnProperty("invalidReason")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.invalidReason); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + if (message.createTime != null && message.hasOwnProperty("createTime")) $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + if (message.hostname != null && message.hasOwnProperty("hostname")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.hostname); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) + if (message.action != null && message.hasOwnProperty("action")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.action); return writer; }; @@ -6446,7 +6446,7 @@ /** * InvalidReason enum. * @name google.cloud.recaptchaenterprise.v1beta1.TokenProperties.InvalidReason - * @enum {number} + * @enum {string} * @property {number} INVALID_REASON_UNSPECIFIED=0 INVALID_REASON_UNSPECIFIED value * @property {number} UNKNOWN_INVALID_REASON=1 UNKNOWN_INVALID_REASON value * @property {number} MALFORMED=2 MALFORMED value @@ -6535,9 +6535,9 @@ CreateKeyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) + if (message.key != null && message.hasOwnProperty("key")) $root.google.cloud.recaptchaenterprise.v1beta1.Key.encode(message.key, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -6759,11 +6759,11 @@ ListKeysRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + if (message.parent != null && message.hasOwnProperty("parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + if (message.pageSize != null && message.hasOwnProperty("pageSize")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + if (message.pageToken != null && message.hasOwnProperty("pageToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; @@ -6986,7 +6986,7 @@ if (message.keys != null && message.keys.length) for (var i = 0; i < message.keys.length; ++i) $root.google.cloud.recaptchaenterprise.v1beta1.Key.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -7204,7 +7204,7 @@ GetKeyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -7400,9 +7400,9 @@ UpdateKeyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) + if (message.key != null && message.hasOwnProperty("key")) $root.google.cloud.recaptchaenterprise.v1beta1.Key.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + if (message.updateMask != null && message.hasOwnProperty("updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -7611,7 +7611,7 @@ DeleteKeyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -7848,15 +7848,15 @@ Key.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.webSettings != null && Object.hasOwnProperty.call(message, "webSettings")) + if (message.webSettings != null && message.hasOwnProperty("webSettings")) $root.google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.encode(message.webSettings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.androidSettings != null && Object.hasOwnProperty.call(message, "androidSettings")) + if (message.androidSettings != null && message.hasOwnProperty("androidSettings")) $root.google.cloud.recaptchaenterprise.v1beta1.AndroidKeySettings.encode(message.androidSettings, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.iosSettings != null && Object.hasOwnProperty.call(message, "iosSettings")) + if (message.iosSettings != null && message.hasOwnProperty("iosSettings")) $root.google.cloud.recaptchaenterprise.v1beta1.IOSKeySettings.encode(message.iosSettings, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -8163,13 +8163,13 @@ if (message.allowedDomains != null && message.allowedDomains.length) for (var i = 0; i < message.allowedDomains.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowedDomains[i]); - if (message.allowAmpTraffic != null && Object.hasOwnProperty.call(message, "allowAmpTraffic")) + if (message.allowAmpTraffic != null && message.hasOwnProperty("allowAmpTraffic")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAmpTraffic); - if (message.enforceAllowedDomains != null && Object.hasOwnProperty.call(message, "enforceAllowedDomains")) + if (message.enforceAllowedDomains != null && message.hasOwnProperty("enforceAllowedDomains")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enforceAllowedDomains); - if (message.integrationType != null && Object.hasOwnProperty.call(message, "integrationType")) + if (message.integrationType != null && message.hasOwnProperty("integrationType")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.integrationType); - if (message.challengeSecurityPreference != null && Object.hasOwnProperty.call(message, "challengeSecurityPreference")) + if (message.challengeSecurityPreference != null && message.hasOwnProperty("challengeSecurityPreference")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.challengeSecurityPreference); return writer; }; @@ -8406,7 +8406,7 @@ /** * IntegrationType enum. * @name google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.IntegrationType - * @enum {number} + * @enum {string} * @property {number} INTEGRATION_TYPE_UNSPECIFIED=0 INTEGRATION_TYPE_UNSPECIFIED value * @property {number} SCORE_ONLY=1 SCORE_ONLY value * @property {number} CHECKBOX_CHALLENGE=2 CHECKBOX_CHALLENGE value @@ -8424,7 +8424,7 @@ /** * ChallengeSecurityPreference enum. * @name google.cloud.recaptchaenterprise.v1beta1.WebKeySettings.ChallengeSecurityPreference - * @enum {number} + * @enum {string} * @property {number} CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED=0 CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED value * @property {number} USABILITY=1 USABILITY value * @property {number} BALANCED=2 BALANCED value @@ -8935,7 +8935,7 @@ if (message.rules != null && message.rules.length) for (var i = 0; i < message.rules.length; ++i) $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; @@ -9249,26 +9249,26 @@ HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + if (message.selector != null && message.hasOwnProperty("selector")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) + if (message.get != null && message.hasOwnProperty("get")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) + if (message.put != null && message.hasOwnProperty("put")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) + if (message.post != null && message.hasOwnProperty("post")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + if (message["delete"] != null && message.hasOwnProperty("delete")) writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + if (message.patch != null && message.hasOwnProperty("patch")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) + if (message.body != null && message.hasOwnProperty("body")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + if (message.custom != null && message.hasOwnProperty("custom")) $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.additionalBindings != null && message.additionalBindings.length) for (var i = 0; i < message.additionalBindings.length; ++i) $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + if (message.responseBody != null && message.hasOwnProperty("responseBody")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; @@ -9625,9 +9625,9 @@ CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + if (message.kind != null && message.hasOwnProperty("kind")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) + if (message.path != null && message.hasOwnProperty("path")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; @@ -9773,7 +9773,7 @@ /** * FieldBehavior enum. * @name google.api.FieldBehavior - * @enum {number} + * @enum {string} * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value * @property {number} OPTIONAL=1 OPTIONAL value * @property {number} REQUIRED=2 REQUIRED value @@ -9894,18 +9894,18 @@ ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); if (message.pattern != null && message.pattern.length) for (var i = 0; i < message.pattern.length; ++i) writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + if (message.nameField != null && message.hasOwnProperty("nameField")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) + if (message.history != null && message.hasOwnProperty("history")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + if (message.plural != null && message.hasOwnProperty("plural")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + if (message.singular != null && message.hasOwnProperty("singular")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); return writer; }; @@ -10125,7 +10125,7 @@ /** * History enum. * @name google.api.ResourceDescriptor.History - * @enum {number} + * @enum {string} * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value @@ -10206,9 +10206,9 @@ ResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("type")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + if (message.childType != null && message.hasOwnProperty("childType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); return writer; }; @@ -10733,9 +10733,9 @@ FileDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + if (message["package"] != null && message.hasOwnProperty("package")) writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); if (message.dependency != null && message.dependency.length) for (var i = 0; i < message.dependency.length; ++i) @@ -10752,9 +10752,9 @@ if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) + if (message.options != null && message.hasOwnProperty("options")) $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.publicDependency != null && message.publicDependency.length) for (var i = 0; i < message.publicDependency.length; ++i) @@ -10762,7 +10762,7 @@ if (message.weakDependency != null && message.weakDependency.length) for (var i = 0; i < message.weakDependency.length; ++i) writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + if (message.syntax != null && message.hasOwnProperty("syntax")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); return writer; }; @@ -11300,7 +11300,7 @@ DescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.field != null && message.field.length) for (var i = 0; i < message.field.length; ++i) @@ -11317,7 +11317,7 @@ if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) + if (message.options != null && message.hasOwnProperty("options")) $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.oneofDecl != null && message.oneofDecl.length) for (var i = 0; i < message.oneofDecl.length; ++i) @@ -11782,11 +11782,11 @@ ExtensionRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (message.start != null && message.hasOwnProperty("start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && message.hasOwnProperty("end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) + if (message.options != null && message.hasOwnProperty("options")) $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -12010,9 +12010,9 @@ ReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (message.start != null && message.hasOwnProperty("start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && message.hasOwnProperty("end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); return writer; }; @@ -12503,25 +12503,25 @@ FieldDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + if (message.extendee != null && message.hasOwnProperty("extendee")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && message.hasOwnProperty("number")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) + if (message.label != null && message.hasOwnProperty("label")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) + if (message.type != null && message.hasOwnProperty("type")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + if (message.typeName != null && message.hasOwnProperty("typeName")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) + if (message.options != null && message.hasOwnProperty("options")) $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + if (message.jsonName != null && message.hasOwnProperty("jsonName")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); return writer; }; @@ -12868,7 +12868,7 @@ /** * Type enum. * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} + * @enum {string} * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value * @property {number} TYPE_INT64=3 TYPE_INT64 value @@ -12914,7 +12914,7 @@ /** * Label enum. * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} + * @enum {string} * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value @@ -12995,9 +12995,9 @@ OneofDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) + if (message.options != null && message.hasOwnProperty("options")) $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -13240,12 +13240,12 @@ EnumDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.value != null && message.value.length) for (var i = 0; i < message.value.length; ++i) $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) + if (message.options != null && message.hasOwnProperty("options")) $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.reservedRange != null && message.reservedRange.length) for (var i = 0; i < message.reservedRange.length; ++i) @@ -13548,9 +13548,9 @@ EnumReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) + if (message.start != null && message.hasOwnProperty("start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && message.hasOwnProperty("end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); return writer; }; @@ -13770,11 +13770,11 @@ EnumValueDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) + if (message.number != null && message.hasOwnProperty("number")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) + if (message.options != null && message.hasOwnProperty("options")) $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -14008,12 +14008,12 @@ ServiceDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.method != null && message.method.length) for (var i = 0; i < message.method.length; ++i) $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) + if (message.options != null && message.hasOwnProperty("options")) $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -14293,17 +14293,17 @@ MethodDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) + if (message.name != null && message.hasOwnProperty("name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + if (message.inputType != null && message.hasOwnProperty("inputType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + if (message.outputType != null && message.hasOwnProperty("outputType")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) + if (message.options != null && message.hasOwnProperty("options")) $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); return writer; }; @@ -14742,45 +14742,45 @@ FileOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + if (message.goPackage != null && message.hasOwnProperty("goPackage")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) @@ -15207,7 +15207,7 @@ /** * OptimizeMode enum. * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} + * @enum {string} * @property {number} SPEED=1 SPEED value * @property {number} CODE_SIZE=2 CODE_SIZE value * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value @@ -15325,18 +15325,18 @@ MessageOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); return writer; }; @@ -15678,17 +15678,17 @@ FieldOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + if (message.ctype != null && message.hasOwnProperty("ctype")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + if (message.packed != null && message.hasOwnProperty("packed")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + if (message.lazy != null && message.hasOwnProperty("lazy")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + if (message.jstype != null && message.hasOwnProperty("jstype")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + if (message.weak != null && message.hasOwnProperty("weak")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) @@ -15699,7 +15699,7 @@ writer.int32(message[".google.api.fieldBehavior"][i]); writer.ldelim(); } - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); return writer; }; @@ -16035,7 +16035,7 @@ /** * CType enum. * @name google.protobuf.FieldOptions.CType - * @enum {number} + * @enum {string} * @property {number} STRING=0 STRING value * @property {number} CORD=1 CORD value * @property {number} STRING_PIECE=2 STRING_PIECE value @@ -16051,7 +16051,7 @@ /** * JSType enum. * @name google.protobuf.FieldOptions.JSType - * @enum {number} + * @enum {string} * @property {number} JS_NORMAL=0 JS_NORMAL value * @property {number} JS_STRING=1 JS_STRING value * @property {number} JS_NUMBER=2 JS_NUMBER value @@ -16350,9 +16350,9 @@ EnumOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) @@ -16595,7 +16595,7 @@ EnumValueOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) @@ -16844,14 +16844,14 @@ ServiceOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); return writer; }; @@ -17130,9 +17130,9 @@ MethodOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + if (message.deprecated != null && message.hasOwnProperty("deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) @@ -17140,7 +17140,7 @@ if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); return writer; }; @@ -17374,7 +17374,7 @@ /** * IdempotencyLevel enum. * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} + * @enum {string} * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value * @property {number} IDEMPOTENT=2 IDEMPOTENT value @@ -17504,17 +17504,17 @@ if (message.name != null && message.name.length) for (var i = 0; i < message.name.length; ++i) $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + if (message.stringValue != null && message.hasOwnProperty("stringValue")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); return writer; }; @@ -18291,9 +18291,9 @@ writer.int32(message.span[i]); writer.ldelim(); } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) for (var i = 0; i < message.leadingDetachedComments.length; ++i) @@ -18824,11 +18824,11 @@ writer.int32(message.path[i]); writer.ldelim(); } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + if (message.begin != null && message.hasOwnProperty("begin")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) + if (message.end != null && message.hasOwnProperty("end")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); return writer; }; @@ -19444,9 +19444,9 @@ Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + if (message.seconds != null && message.hasOwnProperty("seconds")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + if (message.nanos != null && message.hasOwnProperty("nanos")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; diff --git a/synth.metadata b/synth.metadata index 584e9cd..b757263 100644 --- a/synth.metadata +++ b/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-recaptcha-enterprise.git", - "sha": "e05cfb84b4f46841a19b2b6dfb81ef3ac9668451" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "42ee97c1b93a0e3759bbba3013da309f670a90ab", - "internalRef": "307114445" + "remote": "git@github.com:googleapis/nodejs-recaptcha-enterprise.git", + "sha": "e2c52184c758b9c080eb41f0082fbc50de2ff147" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "19465d3ec5e5acdb01521d8f3bddd311bcbee28d" + "sha": "ab883569eb0257bbf16a6d825fd018b3adde3912" } } ], diff --git a/test/gapic_recaptcha_enterprise_service_v1.ts b/test/gapic_recaptcha_enterprise_service_v1.ts index 6a28b28..64ac17a 100644 --- a/test/gapic_recaptcha_enterprise_service_v1.ts +++ b/test/gapic_recaptcha_enterprise_service_v1.ts @@ -318,9 +318,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createAssessment(request); - }, expectedError); + await assert.rejects(client.createAssessment(request), expectedError); assert( (client.innerApiCalls.createAssessment as SinonStub) .getCall(0) @@ -440,9 +438,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.annotateAssessment(request); - }, expectedError); + await assert.rejects(client.annotateAssessment(request), expectedError); assert( (client.innerApiCalls.annotateAssessment as SinonStub) .getCall(0) @@ -557,9 +553,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.createKey = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.createKey(request); - }, expectedError); + await assert.rejects(client.createKey(request), expectedError); assert( (client.innerApiCalls.createKey as SinonStub) .getCall(0) @@ -674,9 +668,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.getKey = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.getKey(request); - }, expectedError); + await assert.rejects(client.getKey(request), expectedError); assert( (client.innerApiCalls.getKey as SinonStub) .getCall(0) @@ -794,9 +786,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.updateKey = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.updateKey(request); - }, expectedError); + await assert.rejects(client.updateKey(request), expectedError); assert( (client.innerApiCalls.updateKey as SinonStub) .getCall(0) @@ -911,9 +901,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.deleteKey = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.deleteKey(request); - }, expectedError); + await assert.rejects(client.deleteKey(request), expectedError); assert( (client.innerApiCalls.deleteKey as SinonStub) .getCall(0) @@ -1044,9 +1032,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.listKeys = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.listKeys(request); - }, expectedError); + await assert.rejects(client.listKeys(request), expectedError); assert( (client.innerApiCalls.listKeys as SinonStub) .getCall(0) @@ -1145,9 +1131,7 @@ describe('v1.RecaptchaEnterpriseServiceClient', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listKeys.createStream as SinonStub) .getCall(0) diff --git a/test/gapic_recaptcha_enterprise_service_v1_beta1_v1beta1.ts b/test/gapic_recaptcha_enterprise_service_v1_beta1_v1beta1.ts index da6ed02..2023e4f 100644 --- a/test/gapic_recaptcha_enterprise_service_v1_beta1_v1beta1.ts +++ b/test/gapic_recaptcha_enterprise_service_v1_beta1_v1beta1.ts @@ -319,9 +319,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createAssessment(request); - }, expectedError); + await assert.rejects(client.createAssessment(request), expectedError); assert( (client.innerApiCalls.createAssessment as SinonStub) .getCall(0) @@ -441,9 +439,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.annotateAssessment(request); - }, expectedError); + await assert.rejects(client.annotateAssessment(request), expectedError); assert( (client.innerApiCalls.annotateAssessment as SinonStub) .getCall(0) @@ -558,9 +554,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.createKey = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.createKey(request); - }, expectedError); + await assert.rejects(client.createKey(request), expectedError); assert( (client.innerApiCalls.createKey as SinonStub) .getCall(0) @@ -675,9 +669,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.getKey = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.getKey(request); - }, expectedError); + await assert.rejects(client.getKey(request), expectedError); assert( (client.innerApiCalls.getKey as SinonStub) .getCall(0) @@ -795,9 +787,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.updateKey = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.updateKey(request); - }, expectedError); + await assert.rejects(client.updateKey(request), expectedError); assert( (client.innerApiCalls.updateKey as SinonStub) .getCall(0) @@ -912,9 +902,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.deleteKey = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.deleteKey(request); - }, expectedError); + await assert.rejects(client.deleteKey(request), expectedError); assert( (client.innerApiCalls.deleteKey as SinonStub) .getCall(0) @@ -1047,9 +1035,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.listKeys = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.listKeys(request); - }, expectedError); + await assert.rejects(client.listKeys(request), expectedError); assert( (client.innerApiCalls.listKeys as SinonStub) .getCall(0) @@ -1148,9 +1134,7 @@ describe('v1beta1.RecaptchaEnterpriseServiceV1Beta1Client', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listKeys.createStream as SinonStub) .getCall(0)