From f4ea98654d4010cdadeacde0822d0aabbb2fc5dd Mon Sep 17 00:00:00 2001 From: Google APIs Date: Wed, 6 Dec 2023 12:31:42 -0800 Subject: [PATCH] feat: added stable account identifier to related group membership resources, and deprecated hashed identifier field docs: noted applicable fields as resource identifiers PiperOrigin-RevId: 588509751 --- .../v1/recaptchaenterprise.proto | 56 +++++++++++++------ 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto b/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto index cf054bd5f7..ea2dfba8e7 100644 --- a/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto +++ b/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto @@ -590,9 +590,12 @@ message Assessment { pattern: "projects/{project}/assessments/{assessment}" }; - // Output only. The resource name for the Assessment in the format + // Output only. Identifier. The resource name for the Assessment in the format // `projects/{project}/assessments/{assessment}`. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; // Optional. The event being assessed. Event event = 2 [(google.api.field_behavior) = OPTIONAL]; @@ -1317,9 +1320,12 @@ message Metrics { pattern: "projects/{project}/keys/{key}/metrics" }; - // Output only. The name of the metrics, in the format + // Output only. Identifier. The name of the metrics, in the format // `projects/{project}/keys/{key}/metrics`. - string name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 4 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; // Inclusive start time aligned to a day (UTC). google.protobuf.Timestamp start_time = 1; @@ -1352,9 +1358,9 @@ message Key { pattern: "projects/{project}/keys/{key}" }; - // The resource name for the Key in the format + // Identifier. The resource name for the Key in the format // `projects/{project}/keys/{key}`. - string name = 1; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Required. Human-readable display name of this key. Modifiable by user. string display_name = 2 [(google.api.field_behavior) = REQUIRED]; @@ -1645,9 +1651,9 @@ message FirewallPolicy { pattern: "projects/{project}/firewallpolicies/{firewallpolicy}" }; - // The resource name for the FirewallPolicy in the format + // Identifier. The resource name for the FirewallPolicy in the format // `projects/{project}/firewallpolicies/{firewallpolicy}`. - string name = 1; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Optional. A description of what this policy aims to achieve, for // convenience purposes. The description can at most include 256 UTF-8 @@ -1762,10 +1768,19 @@ message SearchRelatedAccountGroupMembershipsRequest { } ]; - // Optional. The unique stable hashed user identifier used to search - // connections. 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 unique stable account identifier used to search connections. + // The identifier should correspond to an `account_id` provided in a previous + // `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id + // or account_id must be set, but not both. + string account_id = 5 [(google.api.field_behavior) = OPTIONAL]; + + // 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 + // previous `CreateAssessment` or `AnnotateAssessment` call. Either + // hashed_account_id or account_id must be set, but not both. + bytes hashed_account_id = 2 + [deprecated = true, (google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of groups to return. The service might return // fewer than this value. If unspecified, at most 50 groups are returned. The @@ -1799,19 +1814,26 @@ message RelatedAccountGroupMembership { pattern: "projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}" }; - // Required. The resource name for this membership in the format + // Required. Identifier. The resource name for this membership in the format // `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`. string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "recaptchaenterprise.googleapis.com/RelatedAccountGroupMembership" } ]; - // The unique stable hashed user identifier of the member. The identifier + // The unique stable account identifier of the member. The identifier + // corresponds to an `account_id` provided in a previous `CreateAssessment` or + // `AnnotateAssessment` call. + string account_id = 4; + + // Deprecated: use `account_id` instead. + // The unique stable hashed account identifier of the member. The identifier // corresponds to a `hashed_account_id` provided in a previous // `CreateAssessment` or `AnnotateAssessment` call. - bytes hashed_account_id = 2; + bytes hashed_account_id = 2 [deprecated = true]; } // A group of related accounts. @@ -1821,9 +1843,11 @@ message RelatedAccountGroup { pattern: "projects/{project}/relatedaccountgroups/{relatedaccountgroup}" }; - // Required. The resource name for the related account group in the format + // Required. Identifier. The resource name for the related account group in + // the format // `projects/{project}/relatedaccountgroups/{related_account_group}`. string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "recaptchaenterprise.googleapis.com/RelatedAccountGroup"