Skip to content

Commit e35550f

Browse files
feat: [google-cloud-privilegedaccessmanager] Introducing new Grant states for Withdrawal operation (#14168)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 789206965 Source-Link: googleapis/googleapis@fb0d2d7 Source-Link: googleapis/googleapis-gen@fc7a38c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXByaXZpbGVnZWRhY2Nlc3NtYW5hZ2VyLy5Pd2xCb3QueWFtbCIsImgiOiJmYzdhMzhjM2I3ZmIwOGQzN2E2MTNmMjI5NTQzNDNkYzMwNDQzODMyIn0= --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent e964bd1 commit e35550f

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

packages/google-cloud-privilegedaccessmanager/google/cloud/privilegedaccessmanager_v1/types/privilegedaccessmanager.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -967,6 +967,11 @@ class State(proto.Enum):
967967
ENDED (11):
968968
System took back access as the requested
969969
duration was over. This is a terminal state.
970+
WITHDRAWING (12):
971+
Access is being withdrawn.
972+
WITHDRAWN (13):
973+
Grant was withdrawn by the grant owner. This
974+
is a terminal state.
970975
"""
971976
STATE_UNSPECIFIED = 0
972977
APPROVAL_AWAITED = 1
@@ -979,6 +984,8 @@ class State(proto.Enum):
979984
REVOKING = 9
980985
REVOKED = 10
981986
ENDED = 11
987+
WITHDRAWING = 12
988+
WITHDRAWN = 13
982989

983990
class Timeline(proto.Message):
984991
r"""Timeline of a grant describing what happened to it and when.
@@ -1046,6 +1053,10 @@ class Event(proto.Message):
10461053
The policy bindings made by grant have been
10471054
modified outside of PAM.
10481055
1056+
This field is a member of `oneof`_ ``event``.
1057+
withdrawn (google.cloud.privilegedaccessmanager_v1.types.Grant.Timeline.Event.Withdrawn):
1058+
The grant was withdrawn.
1059+
10491060
This field is a member of `oneof`_ ``event``.
10501061
event_time (google.protobuf.timestamp_pb2.Timestamp):
10511062
Output only. The time (as recorded at server)
@@ -1131,6 +1142,9 @@ class Revoked(proto.Message):
11311142
number=2,
11321143
)
11331144

1145+
class Withdrawn(proto.Message):
1146+
r"""An event representing that the grant was withdrawn."""
1147+
11341148
class Scheduled(proto.Message):
11351149
r"""An event representing that the grant has been scheduled to be
11361150
activated later.
@@ -1242,6 +1256,12 @@ class ExternallyModified(proto.Message):
12421256
message="Grant.Timeline.Event.ExternallyModified",
12431257
)
12441258
)
1259+
withdrawn: "Grant.Timeline.Event.Withdrawn" = proto.Field(
1260+
proto.MESSAGE,
1261+
number=13,
1262+
oneof="event",
1263+
message="Grant.Timeline.Event.Withdrawn",
1264+
)
12451265
event_time: timestamp_pb2.Timestamp = proto.Field(
12461266
proto.MESSAGE,
12471267
number=1,

packages/google-cloud-privilegedaccessmanager/tests/unit/gapic/privilegedaccessmanager_v1/test_privileged_access_manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11372,6 +11372,7 @@ def test_create_grant_rest_call_success(request_type):
1137211372
"expired": {},
1137311373
"ended": {},
1137411374
"externally_modified": {},
11375+
"withdrawn": {},
1137511376
"event_time": {},
1137611377
}
1137711378
]

0 commit comments

Comments
 (0)