From 85748387bed4dd1dece6dee255f9efe801f2dbd2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 27 Mar 2024 13:03:12 -0400 Subject: [PATCH] feat: Existing resource_reference option of the field name is removed from message `google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMemberShip` (#7175) feat: Existing resource_reference option of the field name is removed from message `google.cloud.recaptchaenterprise.v1.RelatedAccountGroup` --- feat: add Cloudflare key creation support --- chore: update go_package and Go importpath PiperOrigin-RevId: 618268077 Source-Link: https://github.com/googleapis/googleapis/commit/0bf3720b22f359e98083e6246ec839d1a8f8bbf8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8a0ffab6fe0c6bfa08355b64462697df48efd648 Copy-Tag: eyJwIjoiUmVjYXB0Y2hhRW50ZXJwcmlzZS8uT3dsQm90LnlhbWwiLCJoIjoiOGEwZmZhYjZmZTBjNmJmYTA4MzU1YjY0NDYyNjk3ZGY0OGVmZDY0OCJ9 --- .../metadata/V1/Recaptchaenterprise.php | Bin 21967 -> 22123 bytes ...arch_related_account_group_memberships.php | 7 ++----- RecaptchaEnterprise/src/V1/Event.php | 6 +++--- .../RecaptchaEnterpriseServiceGapicClient.php | 2 +- .../src/V1/RelatedAccountGroup.php | 6 +++--- .../src/V1/RelatedAccountGroupMembership.php | 6 +++--- ...hRelatedAccountGroupMembershipsRequest.php | 2 +- .../src/V1/WafSettings/WafService.php | 7 +++++++ .../RecaptchaEnterpriseServiceClientTest.php | 4 ++-- .../RecaptchaEnterpriseServiceClientTest.php | 4 ++-- 10 files changed, 24 insertions(+), 20 deletions(-) diff --git a/RecaptchaEnterprise/metadata/V1/Recaptchaenterprise.php b/RecaptchaEnterprise/metadata/V1/Recaptchaenterprise.php index 7b088130d958e4cdb1fff37588c85c1d508c0ae9..8d57cc36a40b48c11be8a9239ed089fd2c164ea0 100644 GIT binary patch delta 519 zcmX@Vn(_4-#tk!=INdT+b5cC>(()%SVA9$=g~@`EY5J1M=a?6WNvG%Mr{|>VCl+Mt zr-4+(X9AUNPG?ExW_-N)G=DZTTg5BKQZC)eifYP}6NJsBwYU?Di&Kk>b5rw5ijBAs z9Hq~bXA1kOs&Mg_7N-`)XBNaKrlb@BRZ6fZFlul*aX)ZmeAILPItLR6%VuVgXbHxv zljC*XvShq+Or30~qcgciSDjmnJvX(aC^Na(h<)-LT{p∈+|zFtLQbatxX*uck4% z*+8CKizPd?ve<|jNN!$au%CxeUQBb+BAOf5FzLlLP|+Q!JGIXN*pH0M7nY_Lmk7CVu@@BOXQd`j zZd9?|yw_fpk>vyvm+WLmM>$auE|$E++*Aohu-DigIC4C2WSSi3Xu@$9=!~0;Tn=Do zytk2?eA_XcSxc^H^1~omW+Pb;EyJpGg^^1bXppe15LT0{mH|y!#5j3@Q#rGi2vARe zu(*+MQEEfOi3w9EiRT|QDD^IbYgzs$hf&& zBwB*;@Z`%nZ`s0LIRVcKQwUP zY;3rni*e!P&(>R6a$Y%RPTrtxJo%xG8LQGZMlQ|Ci9t%66Kva=SiUfFX-_^Ftj#49 z$;Dn!l%JKFJh{L&XmhNCDkIA|CN9~@AMItOfRZeEiMgo~j9_`=^B7+_&SHe{&78uSlpak!=OixSkD}2LrqNstring user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { */ private $user_ip_address = ''; /** @@ -268,7 +268,7 @@ public function setUserAgent($var) * Optional. The IP address in the request from the user's device related to * this event. * - * Generated from protobuf field string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { * @return string */ public function getUserIpAddress() @@ -280,7 +280,7 @@ public function getUserIpAddress() * Optional. The IP address in the request from the user's device related to * this event. * - * Generated from protobuf field string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { * @param string $var * @return $this */ diff --git a/RecaptchaEnterprise/src/V1/Gapic/RecaptchaEnterpriseServiceGapicClient.php b/RecaptchaEnterprise/src/V1/Gapic/RecaptchaEnterpriseServiceGapicClient.php index 34fd8bbed17..1f79522236a 100644 --- a/RecaptchaEnterprise/src/V1/Gapic/RecaptchaEnterpriseServiceGapicClient.php +++ b/RecaptchaEnterprise/src/V1/Gapic/RecaptchaEnterpriseServiceGapicClient.php @@ -1448,7 +1448,7 @@ public function retrieveLegacySecretKey($key, array $optionalArgs = []) * ``` * $recaptchaEnterpriseServiceClient = new RecaptchaEnterpriseServiceClient(); * try { - * $formattedProject = $recaptchaEnterpriseServiceClient->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); + * $formattedProject = $recaptchaEnterpriseServiceClient->projectName('[PROJECT]'); * // Iterate over pages of elements * $pagedResponse = $recaptchaEnterpriseServiceClient->searchRelatedAccountGroupMemberships($formattedProject); * foreach ($pagedResponse->iteratePages() as $page) { diff --git a/RecaptchaEnterprise/src/V1/RelatedAccountGroup.php b/RecaptchaEnterprise/src/V1/RelatedAccountGroup.php index 9401d996322..06d5a8ae95b 100644 --- a/RecaptchaEnterprise/src/V1/RelatedAccountGroup.php +++ b/RecaptchaEnterprise/src/V1/RelatedAccountGroup.php @@ -20,7 +20,7 @@ class RelatedAccountGroup extends \Google\Protobuf\Internal\Message * the format * `projects/{project}/relatedaccountgroups/{related_account_group}`. * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; */ private $name = ''; @@ -46,7 +46,7 @@ public function __construct($data = NULL) { * the format * `projects/{project}/relatedaccountgroups/{related_account_group}`. * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; * @return string */ public function getName() @@ -59,7 +59,7 @@ public function getName() * the format * `projects/{project}/relatedaccountgroups/{related_account_group}`. * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; * @param string $var * @return $this */ diff --git a/RecaptchaEnterprise/src/V1/RelatedAccountGroupMembership.php b/RecaptchaEnterprise/src/V1/RelatedAccountGroupMembership.php index 382cbf4a22e..16d1725c50d 100644 --- a/RecaptchaEnterprise/src/V1/RelatedAccountGroupMembership.php +++ b/RecaptchaEnterprise/src/V1/RelatedAccountGroupMembership.php @@ -19,7 +19,7 @@ class RelatedAccountGroupMembership extends \Google\Protobuf\Internal\Message * Required. Identifier. The resource name for this membership in the format * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`. * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; */ private $name = ''; /** @@ -70,7 +70,7 @@ public function __construct($data = NULL) { * Required. Identifier. The resource name for this membership in the format * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`. * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; * @return string */ public function getName() @@ -82,7 +82,7 @@ public function getName() * Required. Identifier. The resource name for this membership in the format * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`. * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; * @param string $var * @return $this */ diff --git a/RecaptchaEnterprise/src/V1/SearchRelatedAccountGroupMembershipsRequest.php b/RecaptchaEnterprise/src/V1/SearchRelatedAccountGroupMembershipsRequest.php index 29ba1a859a1..4c514b6f500 100644 --- a/RecaptchaEnterprise/src/V1/SearchRelatedAccountGroupMembershipsRequest.php +++ b/RecaptchaEnterprise/src/V1/SearchRelatedAccountGroupMembershipsRequest.php @@ -67,7 +67,7 @@ class SearchRelatedAccountGroupMembershipsRequest extends \Google\Protobuf\Inter * @param string $project Required. The name of the project to search related account group * memberships from. Specify the project name in the following format: * `projects/{project}`. Please see - * {@see RecaptchaEnterpriseServiceClient::relatedAccountGroupName()} for help formatting this field. + * {@see RecaptchaEnterpriseServiceClient::projectName()} for help formatting this field. * @param string $hashedAccountId Optional. Deprecated: use `account_id` instead. * The unique stable hashed account identifier used to search connections. The * identifier should correspond to a `hashed_account_id` provided in a diff --git a/RecaptchaEnterprise/src/V1/WafSettings/WafService.php b/RecaptchaEnterprise/src/V1/WafSettings/WafService.php index b89f29a25f5..dce26932185 100644 --- a/RecaptchaEnterprise/src/V1/WafSettings/WafService.php +++ b/RecaptchaEnterprise/src/V1/WafSettings/WafService.php @@ -31,11 +31,18 @@ class WafService * Generated from protobuf enum FASTLY = 3; */ const FASTLY = 3; + /** + * Cloudflare + * + * Generated from protobuf enum CLOUDFLARE = 4; + */ + const CLOUDFLARE = 4; private static $valueToName = [ self::WAF_SERVICE_UNSPECIFIED => 'WAF_SERVICE_UNSPECIFIED', self::CA => 'CA', self::FASTLY => 'FASTLY', + self::CLOUDFLARE => 'CLOUDFLARE', ]; public static function name($value) diff --git a/RecaptchaEnterprise/tests/Unit/V1/Client/RecaptchaEnterpriseServiceClientTest.php b/RecaptchaEnterprise/tests/Unit/V1/Client/RecaptchaEnterpriseServiceClientTest.php index 847f6d5503f..eaf42200cfd 100644 --- a/RecaptchaEnterprise/tests/Unit/V1/Client/RecaptchaEnterpriseServiceClientTest.php +++ b/RecaptchaEnterprise/tests/Unit/V1/Client/RecaptchaEnterpriseServiceClientTest.php @@ -1214,7 +1214,7 @@ public function searchRelatedAccountGroupMembershipsTest() $expectedResponse->setRelatedAccountGroupMemberships($relatedAccountGroupMemberships); $transport->addResponse($expectedResponse); // Mock request - $formattedProject = $gapicClient->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); + $formattedProject = $gapicClient->projectName('[PROJECT]'); $request = (new SearchRelatedAccountGroupMembershipsRequest()) ->setProject($formattedProject); $response = $gapicClient->searchRelatedAccountGroupMemberships($request); @@ -1251,7 +1251,7 @@ public function searchRelatedAccountGroupMembershipsExceptionTest() ], JSON_PRETTY_PRINT); $transport->addResponse(null, $status); // Mock request - $formattedProject = $gapicClient->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); + $formattedProject = $gapicClient->projectName('[PROJECT]'); $request = (new SearchRelatedAccountGroupMembershipsRequest()) ->setProject($formattedProject); try { diff --git a/RecaptchaEnterprise/tests/Unit/V1/RecaptchaEnterpriseServiceClientTest.php b/RecaptchaEnterprise/tests/Unit/V1/RecaptchaEnterpriseServiceClientTest.php index 5e95b64526a..860222c278c 100644 --- a/RecaptchaEnterprise/tests/Unit/V1/RecaptchaEnterpriseServiceClientTest.php +++ b/RecaptchaEnterprise/tests/Unit/V1/RecaptchaEnterpriseServiceClientTest.php @@ -1121,7 +1121,7 @@ public function searchRelatedAccountGroupMembershipsTest() $expectedResponse->setRelatedAccountGroupMemberships($relatedAccountGroupMemberships); $transport->addResponse($expectedResponse); // Mock request - $formattedProject = $gapicClient->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); + $formattedProject = $gapicClient->projectName('[PROJECT]'); $response = $gapicClient->searchRelatedAccountGroupMemberships($formattedProject); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -1156,7 +1156,7 @@ public function searchRelatedAccountGroupMembershipsExceptionTest() ], JSON_PRETTY_PRINT); $transport->addResponse(null, $status); // Mock request - $formattedProject = $gapicClient->relatedAccountGroupName('[PROJECT]', '[RELATEDACCOUNTGROUP]'); + $formattedProject = $gapicClient->projectName('[PROJECT]'); try { $gapicClient->searchRelatedAccountGroupMemberships($formattedProject); // If the $gapicClient method call did not throw, fail the test