Skip to content

Commit

Permalink
feat: added stable account identifier to related group membership res…
Browse files Browse the repository at this point in the history
…ources, and deprecated hashed identifier field

docs: noted applicable fields as resource identifiers

PiperOrigin-RevId: 588509751
  • Loading branch information
Google APIs authored and copybara-github committed Dec 6, 2023
1 parent 037ad21 commit f4ea986
Showing 1 changed file with 40 additions and 16 deletions.
56 changes: 40 additions & 16 deletions google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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"
Expand Down

0 comments on commit f4ea986

Please sign in to comment.