Skip to content

Commit

Permalink
feat: [google-cloud-recaptcha-enterprise] added stable account identi…
Browse files Browse the repository at this point in the history
…fier to related group membership resources, and deprecated hashed identifier field (#12093)

- [ ] Regenerate this pull request now.

BEGIN_COMMIT_OVERRIDE
feat: added stable account identifier to related group membership
resources, and deprecated hashed identifier field
docs: noted applicable fields as resource identifiers
END_COMMIT_OVERRIDE



PiperOrigin-RevId: 588509751

Source-Link:
googleapis/googleapis@f4ea986

Source-Link:
googleapis/googleapis-gen@acf6d7f
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJlY2FwdGNoYS1lbnRlcnByaXNlLy5Pd2xCb3QueWFtbCIsImgiOiJhY2Y2ZDdmNTg5ZWUyYmEwYjFhYWFlNjk4YmYxZTgzYzA2YTY1ZGM0In0=

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Dec 7, 2023
1 parent 51e1478 commit f942e71
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2160,10 +2160,13 @@ async def sample_search_related_account_group_memberships():
on the ``request`` instance; if ``request`` is provided, this
should not be set.
hashed_account_id (:class:`bytes`):
Optional. The unique stable hashed user identifier used
to search connections. The identifier should correspond
to a ``hashed_account_id`` provided in a previous
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.
This corresponds to the ``hashed_account_id`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2458,10 +2458,13 @@ def sample_search_related_account_group_memberships():
on the ``request`` instance; if ``request`` is provided, this
should not be set.
hashed_account_id (bytes):
Optional. The unique stable hashed user identifier used
to search connections. The identifier should correspond
to a ``hashed_account_id`` provided in a previous
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.
This corresponds to the ``hashed_account_id`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,8 +638,9 @@ class Assessment(proto.Message):
Attributes:
name (str):
Output only. The resource name for the Assessment in the
format ``projects/{project}/assessments/{assessment}``.
Output only. Identifier. The resource name for the
Assessment in the format
``projects/{project}/assessments/{assessment}``.
event (google.cloud.recaptchaenterprise_v1.types.Event):
Optional. The event being assessed.
risk_analysis (google.cloud.recaptchaenterprise_v1.types.RiskAnalysis):
Expand Down Expand Up @@ -1956,8 +1957,8 @@ class Metrics(proto.Message):
Attributes:
name (str):
Output only. The name of the metrics, in the format
``projects/{project}/keys/{key}/metrics``.
Output only. Identifier. The name of the metrics, in the
format ``projects/{project}/keys/{key}/metrics``.
start_time (google.protobuf.timestamp_pb2.Timestamp):
Inclusive start time aligned to a day (UTC).
score_metrics (MutableSequence[google.cloud.recaptchaenterprise_v1.types.ScoreMetrics]):
Expand Down Expand Up @@ -2025,7 +2026,7 @@ class Key(proto.Message):
Attributes:
name (str):
The resource name for the Key in the format
Identifier. The resource name for the Key in the format
``projects/{project}/keys/{key}``.
display_name (str):
Required. Human-readable display name of this
Expand Down Expand Up @@ -2603,7 +2604,8 @@ class FirewallPolicy(proto.Message):
Attributes:
name (str):
The resource name for the FirewallPolicy in the format
Identifier. The resource name for the FirewallPolicy in the
format
``projects/{project}/firewallpolicies/{firewallpolicy}``.
description (str):
Optional. A description of what this policy
Expand Down Expand Up @@ -2804,11 +2806,19 @@ class SearchRelatedAccountGroupMembershipsRequest(proto.Message):
Required. The name of the project to search related account
group memberships from. Specify the project name in the
following format: ``projects/{project}``.
account_id (str):
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.
hashed_account_id (bytes):
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.
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.
page_size (int):
Optional. The maximum number of groups to
return. The service might return fewer than this
Expand All @@ -2829,6 +2839,10 @@ class SearchRelatedAccountGroupMembershipsRequest(proto.Message):
proto.STRING,
number=1,
)
account_id: str = proto.Field(
proto.STRING,
number=5,
)
hashed_account_id: bytes = proto.Field(
proto.BYTES,
number=2,
Expand Down Expand Up @@ -2877,20 +2891,30 @@ class RelatedAccountGroupMembership(proto.Message):
Attributes:
name (str):
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}``.
account_id (str):
The unique stable account identifier of the member. The
identifier corresponds to an ``account_id`` provided in a
previous ``CreateAssessment`` or ``AnnotateAssessment``
call.
hashed_account_id (bytes):
The unique stable hashed user identifier of the member. The
identifier corresponds to a ``hashed_account_id`` provided
in a previous ``CreateAssessment`` or ``AnnotateAssessment``
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.
"""

name: str = proto.Field(
proto.STRING,
number=1,
)
account_id: str = proto.Field(
proto.STRING,
number=4,
)
hashed_account_id: bytes = proto.Field(
proto.BYTES,
number=2,
Expand All @@ -2902,8 +2926,8 @@ class RelatedAccountGroup(proto.Message):
Attributes:
name (str):
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}``.
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class recaptchaenterpriseCallTransformer(cst.CSTTransformer):
'list_related_account_groups': ('parent', 'page_size', 'page_token', ),
'migrate_key': ('name', 'skip_billing_check', ),
'retrieve_legacy_secret_key': ('key', ),
'search_related_account_group_memberships': ('project', 'hashed_account_id', 'page_size', 'page_token', ),
'search_related_account_group_memberships': ('project', 'account_id', 'hashed_account_id', 'page_size', 'page_token', ),
'update_firewall_policy': ('firewall_policy', 'update_mask', ),
'update_key': ('key', 'update_mask', ),
}
Expand Down

0 comments on commit f942e71

Please sign in to comment.