Skip to content

Commit 125ab02

Browse files
yoshi-automationbusunkim96
authored andcommitted
[CHANGE ME] Re-generated irm to pick up changes in the API or client library generator. (googleapis#8513)
1 parent 2543407 commit 125ab02

2 files changed

Lines changed: 53 additions & 38 deletions

File tree

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

Lines changed: 48 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import warnings
2222

2323
from google.oauth2 import service_account
24+
import google.api_core.client_options
2425
import google.api_core.gapic_v1.client_info
2526
import google.api_core.gapic_v1.config
2627
import google.api_core.gapic_v1.method
@@ -154,6 +155,7 @@ def __init__(
154155
credentials=None,
155156
client_config=None,
156157
client_info=None,
158+
client_options=None,
157159
):
158160
"""Constructor.
159161
@@ -184,6 +186,9 @@ def __init__(
184186
API requests. If ``None``, then default info will be used.
185187
Generally, you only need to set this if you're developing
186188
your own client library.
189+
client_options (Union[dict, google.api_core.client_options.ClientOptions]):
190+
Client options used to set user options on the client. API Endpoint
191+
should be set through client_options.
187192
"""
188193
# Raise deprecation warnings for things we want to go away.
189194
if client_config is not None:
@@ -202,6 +207,15 @@ def __init__(
202207
stacklevel=2,
203208
)
204209

210+
api_endpoint = self.SERVICE_ADDRESS
211+
if client_options:
212+
if type(client_options) == dict:
213+
client_options = google.api_core.client_options.from_dict(
214+
client_options
215+
)
216+
if client_options.api_endpoint:
217+
api_endpoint = client_options.api_endpoint
218+
205219
# Instantiate the transport.
206220
# The transport is responsible for handling serialization and
207221
# deserialization and actually sending data to the service.
@@ -210,6 +224,7 @@ def __init__(
210224
self.transport = transport(
211225
credentials=credentials,
212226
default_class=incident_service_grpc_transport.IncidentServiceGrpcTransport,
227+
address=api_endpoint,
213228
)
214229
else:
215230
if credentials:
@@ -220,7 +235,7 @@ def __init__(
220235
self.transport = transport
221236
else:
222237
self.transport = incident_service_grpc_transport.IncidentServiceGrpcTransport(
223-
address=self.SERVICE_ADDRESS, channel=channel, credentials=credentials
238+
address=api_endpoint, channel=channel, credentials=credentials
224239
)
225240

226241
if client_info is None:
@@ -515,10 +530,10 @@ def search_incidents(
515530
that is provided to the method.
516531
517532
Returns:
518-
A :class:`~google.gax.PageIterator` instance. By default, this
519-
is an iterable of :class:`~google.cloud.irm_v1alpha2.types.Incident` instances.
520-
This object can also be configured to iterate over the pages
521-
of the response through the `options` parameter.
533+
A :class:`~google.api_core.page_iterator.PageIterator` instance.
534+
An iterable of :class:`~google.cloud.irm_v1alpha2.types.Incident` instances.
535+
You can also iterate over the pages of the response
536+
using its `pages` property.
522537
523538
Raises:
524539
google.api_core.exceptions.GoogleAPICallError: If the request
@@ -701,10 +716,10 @@ def search_similar_incidents(
701716
that is provided to the method.
702717
703718
Returns:
704-
A :class:`~google.gax.PageIterator` instance. By default, this
705-
is an iterable of :class:`~google.cloud.irm_v1alpha2.types.Result` instances.
706-
This object can also be configured to iterate over the pages
707-
of the response through the `options` parameter.
719+
A :class:`~google.api_core.page_iterator.PageIterator` instance.
720+
An iterable of :class:`~google.cloud.irm_v1alpha2.types.Result` instances.
721+
You can also iterate over the pages of the response
722+
using its `pages` property.
708723
709724
Raises:
710725
google.api_core.exceptions.GoogleAPICallError: If the request
@@ -887,10 +902,10 @@ def list_annotations(
887902
that is provided to the method.
888903
889904
Returns:
890-
A :class:`~google.gax.PageIterator` instance. By default, this
891-
is an iterable of :class:`~google.cloud.irm_v1alpha2.types.Annotation` instances.
892-
This object can also be configured to iterate over the pages
893-
of the response through the `options` parameter.
905+
A :class:`~google.api_core.page_iterator.PageIterator` instance.
906+
An iterable of :class:`~google.cloud.irm_v1alpha2.types.Annotation` instances.
907+
You can also iterate over the pages of the response
908+
using its `pages` property.
894909
895910
Raises:
896911
google.api_core.exceptions.GoogleAPICallError: If the request
@@ -1135,10 +1150,10 @@ def list_tags(
11351150
that is provided to the method.
11361151
11371152
Returns:
1138-
A :class:`~google.gax.PageIterator` instance. By default, this
1139-
is an iterable of :class:`~google.cloud.irm_v1alpha2.types.Tag` instances.
1140-
This object can also be configured to iterate over the pages
1141-
of the response through the `options` parameter.
1153+
A :class:`~google.api_core.page_iterator.PageIterator` instance.
1154+
An iterable of :class:`~google.cloud.irm_v1alpha2.types.Tag` instances.
1155+
You can also iterate over the pages of the response
1156+
using its `pages` property.
11421157
11431158
Raises:
11441159
google.api_core.exceptions.GoogleAPICallError: If the request
@@ -1383,10 +1398,10 @@ def search_signals(
13831398
that is provided to the method.
13841399
13851400
Returns:
1386-
A :class:`~google.gax.PageIterator` instance. By default, this
1387-
is an iterable of :class:`~google.cloud.irm_v1alpha2.types.Signal` instances.
1388-
This object can also be configured to iterate over the pages
1389-
of the response through the `options` parameter.
1401+
A :class:`~google.api_core.page_iterator.PageIterator` instance.
1402+
An iterable of :class:`~google.cloud.irm_v1alpha2.types.Signal` instances.
1403+
You can also iterate over the pages of the response
1404+
using its `pages` property.
13901405
13911406
Raises:
13921407
google.api_core.exceptions.GoogleAPICallError: If the request
@@ -1892,10 +1907,10 @@ def list_artifacts(
18921907
that is provided to the method.
18931908
18941909
Returns:
1895-
A :class:`~google.gax.PageIterator` instance. By default, this
1896-
is an iterable of :class:`~google.cloud.irm_v1alpha2.types.Artifact` instances.
1897-
This object can also be configured to iterate over the pages
1898-
of the response through the `options` parameter.
1910+
A :class:`~google.api_core.page_iterator.PageIterator` instance.
1911+
An iterable of :class:`~google.cloud.irm_v1alpha2.types.Artifact` instances.
1912+
You can also iterate over the pages of the response
1913+
using its `pages` property.
18991914
19001915
Raises:
19011916
google.api_core.exceptions.GoogleAPICallError: If the request
@@ -2409,10 +2424,10 @@ def list_subscriptions(
24092424
that is provided to the method.
24102425
24112426
Returns:
2412-
A :class:`~google.gax.PageIterator` instance. By default, this
2413-
is an iterable of :class:`~google.cloud.irm_v1alpha2.types.Subscription` instances.
2414-
This object can also be configured to iterate over the pages
2415-
of the response through the `options` parameter.
2427+
A :class:`~google.api_core.page_iterator.PageIterator` instance.
2428+
An iterable of :class:`~google.cloud.irm_v1alpha2.types.Subscription` instances.
2429+
You can also iterate over the pages of the response
2430+
using its `pages` property.
24162431
24172432
Raises:
24182433
google.api_core.exceptions.GoogleAPICallError: If the request
@@ -2737,10 +2752,10 @@ def list_incident_role_assignments(
27372752
that is provided to the method.
27382753
27392754
Returns:
2740-
A :class:`~google.gax.PageIterator` instance. By default, this
2741-
is an iterable of :class:`~google.cloud.irm_v1alpha2.types.IncidentRoleAssignment` instances.
2742-
This object can also be configured to iterate over the pages
2743-
of the response through the `options` parameter.
2755+
A :class:`~google.api_core.page_iterator.PageIterator` instance.
2756+
An iterable of :class:`~google.cloud.irm_v1alpha2.types.IncidentRoleAssignment` instances.
2757+
You can also iterate over the pages of the response
2758+
using its `pages` property.
27442759
27452760
Raises:
27462761
google.api_core.exceptions.GoogleAPICallError: If the request

irm/synth.metadata

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
"updateTime": "2019-06-27T12:24:29.471529Z",
2+
"updateTime": "2019-06-28T12:26:28.856715Z",
33
"sources": [
44
{
55
"generator": {
66
"name": "artman",
7-
"version": "0.29.1",
8-
"dockerImage": "googleapis/artman@sha256:b2a73f4dda03ef8fcaa973e3ba26d0cf34091f6c22c70add663af325931aef4d"
7+
"version": "0.29.2",
8+
"dockerImage": "googleapis/artman@sha256:45263333b058a4b3c26a8b7680a2710f43eae3d250f791a6cb66423991dcb2df"
99
}
1010
},
1111
{
1212
"git": {
1313
"name": "googleapis",
1414
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "f46206aff84f4b2cde590f1e0791112214f07080",
16-
"internalRef": "255318896"
15+
"sha": "84c8ad4e52f8eec8f08a60636cfa597b86969b5c",
16+
"internalRef": "255474859"
1717
}
1818
},
1919
{

0 commit comments

Comments
 (0)