Skip to content

Commit 7df49de

Browse files
yoshi-automationbusunkim96
authored andcommitted
[Breaking] IRM: remove enums from Types, add Duplicate Stage, add communication venue (via synth) (googleapis#7395)
1 parent b319481 commit 7df49de

File tree

12 files changed

+2263
-1128
lines changed

12 files changed

+2263
-1128
lines changed

irm/google/cloud/irm_v1alpha2/gapic/enums.py

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,11 @@ class Type(enum.IntEnum):
2626
Attributes:
2727
TYPE_UNSPECIFIED (int): External type is unspecified.
2828
TYPE_URL (int): URL.
29-
TYPE_ISSUE (int): An issue.
30-
TYPE_SOURCE_CONTROL_CHANGE (int): A source control change.
3129
TYPE_JIRA_ISSUE (int): A JIRA issue.
3230
"""
3331

3432
TYPE_UNSPECIFIED = 0
3533
TYPE_URL = 1
36-
TYPE_ISSUE = 2
37-
TYPE_SOURCE_CONTROL_CHANGE = 3
3834
TYPE_JIRA_ISSUE = 4
3935

4036

@@ -89,6 +85,9 @@ class Stage(enum.IntEnum):
8985
STAGE_RESOLVED (int): This incident has been fully resolved, i.e. there are no immediate
9086
follow-up tasks.
9187
STAGE_DOCUMENTED (int): Postmortem for the incident was written.
88+
STAGE_DUPLICATE (int): Stage for an incident with ``duplicate_incident``. This incident is not
89+
authoritative anymore and the ``duplicate_incident`` should be used to
90+
determine the stage.
9291
"""
9392

9493
STAGE_UNSPECIFIED = 0
@@ -97,6 +96,22 @@ class Stage(enum.IntEnum):
9796
STAGE_MITIGATED = 2
9897
STAGE_RESOLVED = 3
9998
STAGE_DOCUMENTED = 5
99+
STAGE_DUPLICATE = 6
100+
101+
class CommunicationVenue(object):
102+
class ChannelType(enum.IntEnum):
103+
"""
104+
The type of channel/venue for incident communications.
105+
106+
Attributes:
107+
CHANNEL_TYPE_UNSPECIFIED (int): An unspecified communication channel.
108+
CHANNEL_TYPE_URI (int): A communication channel that is represented by a generic URI.
109+
CHANNEL_TYPE_SLACK (int): A communication channel that represents a Slack channel.
110+
"""
111+
112+
CHANNEL_TYPE_UNSPECIFIED = 0
113+
CHANNEL_TYPE_URI = 1
114+
CHANNEL_TYPE_SLACK = 5
100115

101116

102117
class IncidentRole(object):

irm/google/cloud/irm_v1alpha2/gapic/incident_service_client.py

Lines changed: 108 additions & 223 deletions
Large diffs are not rendered by default.

irm/google/cloud/irm_v1alpha2/gapic/incident_service_client_config.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@
5252
"retry_codes_name": "idempotent",
5353
"retry_params_name": "default",
5454
},
55-
"UpdateAnnotation": {
56-
"timeout_millis": 60000,
57-
"retry_codes_name": "non_idempotent",
58-
"retry_params_name": "default",
59-
},
6055
"CreateTag": {
6156
"timeout_millis": 60000,
6257
"retry_codes_name": "non_idempotent",
@@ -77,7 +72,7 @@
7772
"retry_codes_name": "non_idempotent",
7873
"retry_params_name": "default",
7974
},
80-
"ListSignals": {
75+
"SearchSignals": {
8176
"timeout_millis": 60000,
8277
"retry_codes_name": "idempotent",
8378
"retry_params_name": "default",
@@ -92,11 +87,6 @@
9287
"retry_codes_name": "non_idempotent",
9388
"retry_params_name": "default",
9489
},
95-
"AcknowledgeSignal": {
96-
"timeout_millis": 60000,
97-
"retry_codes_name": "non_idempotent",
98-
"retry_params_name": "default",
99-
},
10090
"EscalateIncident": {
10191
"timeout_millis": 60000,
10292
"retry_codes_name": "non_idempotent",
@@ -122,17 +112,17 @@
122112
"retry_codes_name": "idempotent",
123113
"retry_params_name": "default",
124114
},
125-
"GetShiftHandoffPresets": {
115+
"SendShiftHandoff": {
126116
"timeout_millis": 60000,
127-
"retry_codes_name": "idempotent",
117+
"retry_codes_name": "non_idempotent",
128118
"retry_params_name": "default",
129119
},
130-
"SendShiftHandoff": {
120+
"CreateSubscription": {
131121
"timeout_millis": 60000,
132122
"retry_codes_name": "non_idempotent",
133123
"retry_params_name": "default",
134124
},
135-
"CreateSubscription": {
125+
"UpdateSubscription": {
136126
"timeout_millis": 60000,
137127
"retry_codes_name": "non_idempotent",
138128
"retry_params_name": "default",

irm/google/cloud/irm_v1alpha2/gapic/transports/incident_service_grpc_transport.py

Lines changed: 17 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -193,19 +193,6 @@ def list_annotations(self):
193193
"""
194194
return self._stubs["incident_service_stub"].ListAnnotations
195195

196-
@property
197-
def update_annotation(self):
198-
"""Return the gRPC stub for :meth:`IncidentServiceClient.update_annotation`.
199-
200-
Updates an annotation on an existing incident.
201-
202-
Returns:
203-
Callable: A callable which accepts the appropriate
204-
deserialized request object and returns a
205-
deserialized response object.
206-
"""
207-
return self._stubs["incident_service_stub"].UpdateAnnotation
208-
209196
@property
210197
def create_tag(self):
211198
"""Return the gRPC stub for :meth:`IncidentServiceClient.create_tag`.
@@ -259,8 +246,8 @@ def create_signal(self):
259246
return self._stubs["incident_service_stub"].CreateSignal
260247

261248
@property
262-
def list_signals(self):
263-
"""Return the gRPC stub for :meth:`IncidentServiceClient.list_signals`.
249+
def search_signals(self):
250+
"""Return the gRPC stub for :meth:`IncidentServiceClient.search_signals`.
264251
265252
Lists signals that are part of an incident.
266253
Signals are returned in reverse chronological order.
@@ -270,7 +257,7 @@ def list_signals(self):
270257
deserialized request object and returns a
271258
deserialized response object.
272259
"""
273-
return self._stubs["incident_service_stub"].ListSignals
260+
return self._stubs["incident_service_stub"].SearchSignals
274261

275262
@property
276263
def get_signal(self):
@@ -289,7 +276,7 @@ def get_signal(self):
289276
def update_signal(self):
290277
"""Return the gRPC stub for :meth:`IncidentServiceClient.update_signal`.
291278
292-
Updates an existing signal (e.g. to assign/unassign it to an
279+
Updates an existing signal (for example, to assign/unassign it to an
293280
incident).
294281
295282
Returns:
@@ -299,20 +286,6 @@ def update_signal(self):
299286
"""
300287
return self._stubs["incident_service_stub"].UpdateSignal
301288

302-
@property
303-
def acknowledge_signal(self):
304-
"""Return the gRPC stub for :meth:`IncidentServiceClient.acknowledge_signal`.
305-
306-
Acks a signal. This acknowledges the signal in the underlying system,
307-
indicating that the caller takes responsibility for looking into this.
308-
309-
Returns:
310-
Callable: A callable which accepts the appropriate
311-
deserialized request object and returns a
312-
deserialized response object.
313-
"""
314-
return self._stubs["incident_service_stub"].AcknowledgeSignal
315-
316289
@property
317290
def escalate_incident(self):
318291
"""Return the gRPC stub for :meth:`IncidentServiceClient.escalate_incident`.
@@ -378,20 +351,6 @@ def delete_artifact(self):
378351
"""
379352
return self._stubs["incident_service_stub"].DeleteArtifact
380353

381-
@property
382-
def get_shift_handoff_presets(self):
383-
"""Return the gRPC stub for :meth:`IncidentServiceClient.get_shift_handoff_presets`.
384-
385-
Returns "presets" specific to shift handoff (see SendShiftHandoff), e.g.
386-
default values for handoff message fields.
387-
388-
Returns:
389-
Callable: A callable which accepts the appropriate
390-
deserialized request object and returns a
391-
deserialized response object.
392-
"""
393-
return self._stubs["incident_service_stub"].GetShiftHandoffPresets
394-
395354
@property
396355
def send_shift_handoff(self):
397356
"""Return the gRPC stub for :meth:`IncidentServiceClient.send_shift_handoff`.
@@ -421,6 +380,19 @@ def create_subscription(self):
421380
"""
422381
return self._stubs["incident_service_stub"].CreateSubscription
423382

383+
@property
384+
def update_subscription(self):
385+
"""Return the gRPC stub for :meth:`IncidentServiceClient.update_subscription`.
386+
387+
Updates a subscription.
388+
389+
Returns:
390+
Callable: A callable which accepts the appropriate
391+
deserialized request object and returns a
392+
deserialized response object.
393+
"""
394+
return self._stubs["incident_service_stub"].UpdateSubscription
395+
424396
@property
425397
def list_subscriptions(self):
426398
"""Return the gRPC stub for :meth:`IncidentServiceClient.list_subscriptions`.

0 commit comments

Comments
 (0)