Skip to content

Commit f4ea986

Browse files
Google APIscopybara-github
authored andcommitted
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
1 parent 037ad21 commit f4ea986

File tree

1 file changed

+40
-16
lines changed

1 file changed

+40
-16
lines changed

google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto

Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -590,9 +590,12 @@ message Assessment {
590590
pattern: "projects/{project}/assessments/{assessment}"
591591
};
592592

593-
// Output only. The resource name for the Assessment in the format
593+
// Output only. Identifier. The resource name for the Assessment in the format
594594
// `projects/{project}/assessments/{assessment}`.
595-
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
595+
string name = 1 [
596+
(google.api.field_behavior) = OUTPUT_ONLY,
597+
(google.api.field_behavior) = IDENTIFIER
598+
];
596599

597600
// Optional. The event being assessed.
598601
Event event = 2 [(google.api.field_behavior) = OPTIONAL];
@@ -1317,9 +1320,12 @@ message Metrics {
13171320
pattern: "projects/{project}/keys/{key}/metrics"
13181321
};
13191322

1320-
// Output only. The name of the metrics, in the format
1323+
// Output only. Identifier. The name of the metrics, in the format
13211324
// `projects/{project}/keys/{key}/metrics`.
1322-
string name = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
1325+
string name = 4 [
1326+
(google.api.field_behavior) = IDENTIFIER,
1327+
(google.api.field_behavior) = OUTPUT_ONLY
1328+
];
13231329

13241330
// Inclusive start time aligned to a day (UTC).
13251331
google.protobuf.Timestamp start_time = 1;
@@ -1352,9 +1358,9 @@ message Key {
13521358
pattern: "projects/{project}/keys/{key}"
13531359
};
13541360

1355-
// The resource name for the Key in the format
1361+
// Identifier. The resource name for the Key in the format
13561362
// `projects/{project}/keys/{key}`.
1357-
string name = 1;
1363+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
13581364

13591365
// Required. Human-readable display name of this key. Modifiable by user.
13601366
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
@@ -1645,9 +1651,9 @@ message FirewallPolicy {
16451651
pattern: "projects/{project}/firewallpolicies/{firewallpolicy}"
16461652
};
16471653

1648-
// The resource name for the FirewallPolicy in the format
1654+
// Identifier. The resource name for the FirewallPolicy in the format
16491655
// `projects/{project}/firewallpolicies/{firewallpolicy}`.
1650-
string name = 1;
1656+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
16511657

16521658
// Optional. A description of what this policy aims to achieve, for
16531659
// convenience purposes. The description can at most include 256 UTF-8
@@ -1762,10 +1768,19 @@ message SearchRelatedAccountGroupMembershipsRequest {
17621768
}
17631769
];
17641770

1765-
// Optional. The unique stable hashed user identifier used to search
1766-
// connections. The identifier should correspond to a `hashed_account_id`
1767-
// provided in a previous `CreateAssessment` or `AnnotateAssessment` call.
1768-
bytes hashed_account_id = 2 [(google.api.field_behavior) = OPTIONAL];
1771+
// Optional. The unique stable account identifier used to search connections.
1772+
// The identifier should correspond to an `account_id` provided in a previous
1773+
// `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id
1774+
// or account_id must be set, but not both.
1775+
string account_id = 5 [(google.api.field_behavior) = OPTIONAL];
1776+
1777+
// Optional. Deprecated: use `account_id` instead.
1778+
// The unique stable hashed account identifier used to search connections. The
1779+
// identifier should correspond to a `hashed_account_id` provided in a
1780+
// previous `CreateAssessment` or `AnnotateAssessment` call. Either
1781+
// hashed_account_id or account_id must be set, but not both.
1782+
bytes hashed_account_id = 2
1783+
[deprecated = true, (google.api.field_behavior) = OPTIONAL];
17691784

17701785
// Optional. The maximum number of groups to return. The service might return
17711786
// fewer than this value. If unspecified, at most 50 groups are returned. The
@@ -1799,19 +1814,26 @@ message RelatedAccountGroupMembership {
17991814
pattern: "projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}"
18001815
};
18011816

1802-
// Required. The resource name for this membership in the format
1817+
// Required. Identifier. The resource name for this membership in the format
18031818
// `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`.
18041819
string name = 1 [
1820+
(google.api.field_behavior) = IDENTIFIER,
18051821
(google.api.field_behavior) = REQUIRED,
18061822
(google.api.resource_reference) = {
18071823
type: "recaptchaenterprise.googleapis.com/RelatedAccountGroupMembership"
18081824
}
18091825
];
18101826

1811-
// The unique stable hashed user identifier of the member. The identifier
1827+
// The unique stable account identifier of the member. The identifier
1828+
// corresponds to an `account_id` provided in a previous `CreateAssessment` or
1829+
// `AnnotateAssessment` call.
1830+
string account_id = 4;
1831+
1832+
// Deprecated: use `account_id` instead.
1833+
// The unique stable hashed account identifier of the member. The identifier
18121834
// corresponds to a `hashed_account_id` provided in a previous
18131835
// `CreateAssessment` or `AnnotateAssessment` call.
1814-
bytes hashed_account_id = 2;
1836+
bytes hashed_account_id = 2 [deprecated = true];
18151837
}
18161838

18171839
// A group of related accounts.
@@ -1821,9 +1843,11 @@ message RelatedAccountGroup {
18211843
pattern: "projects/{project}/relatedaccountgroups/{relatedaccountgroup}"
18221844
};
18231845

1824-
// Required. The resource name for the related account group in the format
1846+
// Required. Identifier. The resource name for the related account group in
1847+
// the format
18251848
// `projects/{project}/relatedaccountgroups/{related_account_group}`.
18261849
string name = 1 [
1850+
(google.api.field_behavior) = IDENTIFIER,
18271851
(google.api.field_behavior) = REQUIRED,
18281852
(google.api.resource_reference) = {
18291853
type: "recaptchaenterprise.googleapis.com/RelatedAccountGroup"

0 commit comments

Comments
 (0)