Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions grafeas/grafeas/grafeas_v1/gapic/grafeas_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,10 @@ def list_occurrences(
that is provided to the method.

Returns:
A :class:`~google.gax.PageIterator` instance. By default, this
is an iterable of :class:`~grafeas.grafeas_v1.types.Occurrence` instances.
This object can also be configured to iterate over the pages
of the response through the `options` parameter.
A :class:`~google.api_core.page_iterator.PageIterator` instance.
An iterable of :class:`~grafeas.grafeas_v1.types.Occurrence` instances.
You can also iterate over the pages of the response
using its `pages` property.

Raises:
google.api_core.exceptions.GoogleAPICallError: If the request
Expand Down Expand Up @@ -865,10 +865,10 @@ def list_notes(
that is provided to the method.

Returns:
A :class:`~google.gax.PageIterator` instance. By default, this
is an iterable of :class:`~grafeas.grafeas_v1.types.Note` instances.
This object can also be configured to iterate over the pages
of the response through the `options` parameter.
A :class:`~google.api_core.page_iterator.PageIterator` instance.
An iterable of :class:`~grafeas.grafeas_v1.types.Note` instances.
You can also iterate over the pages of the response
using its `pages` property.

Raises:
google.api_core.exceptions.GoogleAPICallError: If the request
Expand Down Expand Up @@ -1308,10 +1308,10 @@ def list_note_occurrences(
that is provided to the method.

Returns:
A :class:`~google.gax.PageIterator` instance. By default, this
is an iterable of :class:`~grafeas.grafeas_v1.types.Occurrence` instances.
This object can also be configured to iterate over the pages
of the response through the `options` parameter.
A :class:`~google.api_core.page_iterator.PageIterator` instance.
An iterable of :class:`~grafeas.grafeas_v1.types.Occurrence` instances.
You can also iterate over the pages of the response
using its `pages` property.

Raises:
google.api_core.exceptions.GoogleAPICallError: If the request
Expand Down
10 changes: 5 additions & 5 deletions grafeas/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-06-22T12:20:18.450419Z",
"updateTime": "2019-07-12T23:41:44.676676Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.29.0",
"dockerImage": "googleapis/artman@sha256:b79c8c20ee51e5302686c9d1294672d59290df1489be93749ef17d0172cc508d"
"version": "0.29.4",
"dockerImage": "googleapis/artman@sha256:63f21e83cb92680b7001dc381069e962c9e6dee314fd8365ac554c07c89221fb"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "de1150ccad2a3daa4e265a0948bec54fdf9c8b54",
"internalRef": "254446031"
"sha": "47bd0c2ba33c28dd624a65dad382e02bb61d1618",
"internalRef": "257690259"
}
},
{
Expand Down
24 changes: 22 additions & 2 deletions grafeas/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
s.replace(
"grafeas/**/grafeas_client.py",
r""" def __init__\(self, transport=None, channel=None, credentials=None,
client_config=None, client_info=None\):""",
client_config=None, client_info=None, client_options=None\):""",
" def __init__(self, transport, client_config=None, client_info=None):",
)

Expand All @@ -124,13 +124,32 @@
"",
)

# Remove client_options
# api_endpoint is currently the only option and doesn't make sense for Grafeas.
s.replace("grafeas/**/grafeas_client.py", "import google.api_core.client_options\n", "")
s.replace(
"grafeas/**/grafeas_client.py",
r""" client_options \(Union\[dict, google\.api_core\.client_options\.ClientOptions\]\):
Client options used to set user options on the client\. API Endpoint
should be set through client_options\.
\"\"\"""",
" \"\"\""
)

s.replace(
"grafeas/**/grafeas_client.py",
r"""if channel:
warnings\.warn\('The `channel` argument is deprecated; use '
'`transport` instead\.',
PendingDeprecationWarning, stacklevel=2\)

api_endpoint = self\.SERVICE_ADDRESS
if client_options:
if type\(client_options\) == dict:
client_options = google\.api_core\.client_options\.from_dict\(client_options\)
if client_options\.api_endpoint:
api_endpoint = client_options\.api_endpoint

\# Instantiate the transport\.
\# The transport is responsible for handling serialization and
\# deserialization and actually sending data to the service\.
Expand All @@ -139,6 +158,7 @@
self\.transport = transport\(
credentials=credentials,
default_class=grafeas_grpc_transport\.GrafeasGrpcTransport,
address=api_endpoint,
\)
else:
if credentials:
Expand All @@ -149,7 +169,7 @@
self\.transport = transport
else:
self\.transport = grafeas_grpc_transport\.GrafeasGrpcTransport\(
address=self\.SERVICE_ADDRESS,
address=api_endpoint,
channel=channel,
credentials=credentials,
\)""",
Expand Down