Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
chore: use gapic-generator-python 0.51.2 (#107)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

fix: add 'dict' annotation type to 'request'

Committer: @busunkim96
PiperOrigin-RevId: 398509016

Source-Link: googleapis/googleapis@b224dfa

Source-Link: googleapis/googleapis-gen@63a1db7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9
  • Loading branch information
gcf-owl-bot[bot] committed Sep 24, 2021
1 parent 4cd5881 commit 594f8d1
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 51 deletions.
58 changes: 29 additions & 29 deletions grafeas/grafeas_v1/services/grafeas/client.py
Expand Up @@ -17,7 +17,7 @@
from distutils import util
import os
import re
from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib # type: ignore
Expand Down Expand Up @@ -272,7 +272,7 @@ def __init__(self, *, transport: Union[str, GrafeasTransport] = None,) -> None:

def get_occurrence(
self,
request: grafeas.GetOccurrenceRequest = None,
request: Union[grafeas.GetOccurrenceRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -282,7 +282,7 @@ def get_occurrence(
r"""Gets the specified occurrence.
Args:
request (grafeas.grafeas_v1.types.GetOccurrenceRequest):
request (Union[grafeas.grafeas_v1.types.GetOccurrenceRequest, dict]):
The request object. Request to get an occurrence.
name (str):
The name of the occurrence in the form of
Expand Down Expand Up @@ -342,7 +342,7 @@ def get_occurrence(

def list_occurrences(
self,
request: grafeas.ListOccurrencesRequest = None,
request: Union[grafeas.ListOccurrencesRequest, dict] = None,
*,
parent: str = None,
filter: str = None,
Expand All @@ -353,7 +353,7 @@ def list_occurrences(
r"""Lists occurrences for the specified project.
Args:
request (grafeas.grafeas_v1.types.ListOccurrencesRequest):
request (Union[grafeas.grafeas_v1.types.ListOccurrencesRequest, dict]):
The request object. Request to list occurrences.
parent (str):
The name of the project to list occurrences for in the
Expand Down Expand Up @@ -428,7 +428,7 @@ def list_occurrences(

def delete_occurrence(
self,
request: grafeas.DeleteOccurrenceRequest = None,
request: Union[grafeas.DeleteOccurrenceRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -440,7 +440,7 @@ def delete_occurrence(
is no longer applicable for the given resource.
Args:
request (grafeas.grafeas_v1.types.DeleteOccurrenceRequest):
request (Union[grafeas.grafeas_v1.types.DeleteOccurrenceRequest, dict]):
The request object. Request to delete an occurrence.
name (str):
The name of the occurrence in the form of
Expand Down Expand Up @@ -493,7 +493,7 @@ def delete_occurrence(

def create_occurrence(
self,
request: grafeas.CreateOccurrenceRequest = None,
request: Union[grafeas.CreateOccurrenceRequest, dict] = None,
*,
parent: str = None,
occurrence: grafeas.Occurrence = None,
Expand All @@ -504,7 +504,7 @@ def create_occurrence(
r"""Creates a new occurrence.
Args:
request (grafeas.grafeas_v1.types.CreateOccurrenceRequest):
request (Union[grafeas.grafeas_v1.types.CreateOccurrenceRequest, dict]):
The request object. Request to create a new occurrence.
parent (str):
The name of the project in the form of
Expand Down Expand Up @@ -572,7 +572,7 @@ def create_occurrence(

def batch_create_occurrences(
self,
request: grafeas.BatchCreateOccurrencesRequest = None,
request: Union[grafeas.BatchCreateOccurrencesRequest, dict] = None,
*,
parent: str = None,
occurrences: Sequence[grafeas.Occurrence] = None,
Expand All @@ -583,7 +583,7 @@ def batch_create_occurrences(
r"""Creates new occurrences in batch.
Args:
request (grafeas.grafeas_v1.types.BatchCreateOccurrencesRequest):
request (Union[grafeas.grafeas_v1.types.BatchCreateOccurrencesRequest, dict]):
The request object. Request to create occurrences in
batch.
parent (str):
Expand Down Expand Up @@ -654,7 +654,7 @@ def batch_create_occurrences(

def update_occurrence(
self,
request: grafeas.UpdateOccurrenceRequest = None,
request: Union[grafeas.UpdateOccurrenceRequest, dict] = None,
*,
name: str = None,
occurrence: grafeas.Occurrence = None,
Expand All @@ -666,7 +666,7 @@ def update_occurrence(
r"""Updates the specified occurrence.
Args:
request (grafeas.grafeas_v1.types.UpdateOccurrenceRequest):
request (Union[grafeas.grafeas_v1.types.UpdateOccurrenceRequest, dict]):
The request object. Request to update an occurrence.
name (str):
The name of the occurrence in the form of
Expand Down Expand Up @@ -740,7 +740,7 @@ def update_occurrence(

def get_occurrence_note(
self,
request: grafeas.GetOccurrenceNoteRequest = None,
request: Union[grafeas.GetOccurrenceNoteRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -752,7 +752,7 @@ def get_occurrence_note(
belongs to a provider project.
Args:
request (grafeas.grafeas_v1.types.GetOccurrenceNoteRequest):
request (Union[grafeas.grafeas_v1.types.GetOccurrenceNoteRequest, dict]):
The request object. Request to get the note to which the
specified occurrence is attached.
name (str):
Expand Down Expand Up @@ -813,7 +813,7 @@ def get_occurrence_note(

def get_note(
self,
request: grafeas.GetNoteRequest = None,
request: Union[grafeas.GetNoteRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -823,7 +823,7 @@ def get_note(
r"""Gets the specified note.
Args:
request (grafeas.grafeas_v1.types.GetNoteRequest):
request (Union[grafeas.grafeas_v1.types.GetNoteRequest, dict]):
The request object. Request to get a note.
name (str):
The name of the note in the form of
Expand Down Expand Up @@ -883,7 +883,7 @@ def get_note(

def list_notes(
self,
request: grafeas.ListNotesRequest = None,
request: Union[grafeas.ListNotesRequest, dict] = None,
*,
parent: str = None,
filter: str = None,
Expand All @@ -894,7 +894,7 @@ def list_notes(
r"""Lists notes for the specified project.
Args:
request (grafeas.grafeas_v1.types.ListNotesRequest):
request (Union[grafeas.grafeas_v1.types.ListNotesRequest, dict]):
The request object. Request to list notes.
parent (str):
The name of the project to list notes for in the form of
Expand Down Expand Up @@ -969,7 +969,7 @@ def list_notes(

def delete_note(
self,
request: grafeas.DeleteNoteRequest = None,
request: Union[grafeas.DeleteNoteRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -979,7 +979,7 @@ def delete_note(
r"""Deletes the specified note.
Args:
request (grafeas.grafeas_v1.types.DeleteNoteRequest):
request (Union[grafeas.grafeas_v1.types.DeleteNoteRequest, dict]):
The request object. Request to delete a note.
name (str):
The name of the note in the form of
Expand Down Expand Up @@ -1032,7 +1032,7 @@ def delete_note(

def create_note(
self,
request: grafeas.CreateNoteRequest = None,
request: Union[grafeas.CreateNoteRequest, dict] = None,
*,
parent: str = None,
note_id: str = None,
Expand All @@ -1044,7 +1044,7 @@ def create_note(
r"""Creates a new note.
Args:
request (grafeas.grafeas_v1.types.CreateNoteRequest):
request (Union[grafeas.grafeas_v1.types.CreateNoteRequest, dict]):
The request object. Request to create a new note.
parent (str):
The name of the project in the form of
Expand Down Expand Up @@ -1119,7 +1119,7 @@ def create_note(

def batch_create_notes(
self,
request: grafeas.BatchCreateNotesRequest = None,
request: Union[grafeas.BatchCreateNotesRequest, dict] = None,
*,
parent: str = None,
notes: Sequence[grafeas.BatchCreateNotesRequest.NotesEntry] = None,
Expand All @@ -1130,7 +1130,7 @@ def batch_create_notes(
r"""Creates new notes in batch.
Args:
request (grafeas.grafeas_v1.types.BatchCreateNotesRequest):
request (Union[grafeas.grafeas_v1.types.BatchCreateNotesRequest, dict]):
The request object. Request to create notes in batch.
parent (str):
The name of the project in the form of
Expand Down Expand Up @@ -1198,7 +1198,7 @@ def batch_create_notes(

def update_note(
self,
request: grafeas.UpdateNoteRequest = None,
request: Union[grafeas.UpdateNoteRequest, dict] = None,
*,
name: str = None,
note: grafeas.Note = None,
Expand All @@ -1210,7 +1210,7 @@ def update_note(
r"""Updates the specified note.
Args:
request (grafeas.grafeas_v1.types.UpdateNoteRequest):
request (Union[grafeas.grafeas_v1.types.UpdateNoteRequest, dict]):
The request object. Request to update a note.
name (str):
The name of the note in the form of
Expand Down Expand Up @@ -1284,7 +1284,7 @@ def update_note(

def list_note_occurrences(
self,
request: grafeas.ListNoteOccurrencesRequest = None,
request: Union[grafeas.ListNoteOccurrencesRequest, dict] = None,
*,
name: str = None,
filter: str = None,
Expand All @@ -1298,7 +1298,7 @@ def list_note_occurrences(
specified note.
Args:
request (grafeas.grafeas_v1.types.ListNoteOccurrencesRequest):
request (Union[grafeas.grafeas_v1.types.ListNoteOccurrencesRequest, dict]):
The request object. Request to list occurrences for a
note.
name (str):
Expand Down
2 changes: 1 addition & 1 deletion grafeas/grafeas_v1/services/grafeas/transports/base.py
Expand Up @@ -116,7 +116,7 @@ def __init__(
**scopes_kwargs, quota_project_id=quota_project_id
)

# If the credentials is service account credentials, then always try to use self signed JWT.
# If the credentials are service account credentials, then always try to use self signed JWT.
if (
always_use_jwt_access
and isinstance(credentials, service_account.Credentials)
Expand Down
6 changes: 3 additions & 3 deletions grafeas/grafeas_v1/services/grafeas/transports/grpc.py
Expand Up @@ -96,16 +96,16 @@ def __init__(
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
If provided, it overrides the ``host`` argument and tries to create
a mutual TLS channel with client SSL credentials from
``client_cert_source`` or applicatin default SSL credentials.
``client_cert_source`` or application default SSL credentials.
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
Deprecated. A callback to provide client SSL certificate bytes and
private key bytes, both in PEM format. It is ignored if
``api_mtls_endpoint`` is None.
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
for grpc channel. It is ignored if ``channel`` is provided.
for the grpc channel. It is ignored if ``channel`` is provided.
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
A callback to provide client certificate bytes and private key bytes,
both in PEM format. It is used to configure mutual TLS channel. It is
both in PEM format. It is used to configure a mutual TLS channel. It is
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
quota_project_id (Optional[str]): An optional project to use for billing
and quota.
Expand Down
Expand Up @@ -143,16 +143,16 @@ def __init__(
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
If provided, it overrides the ``host`` argument and tries to create
a mutual TLS channel with client SSL credentials from
``client_cert_source`` or applicatin default SSL credentials.
``client_cert_source`` or application default SSL credentials.
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
Deprecated. A callback to provide client SSL certificate bytes and
private key bytes, both in PEM format. It is ignored if
``api_mtls_endpoint`` is None.
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
for grpc channel. It is ignored if ``channel`` is provided.
for the grpc channel. It is ignored if ``channel`` is provided.
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
A callback to provide client certificate bytes and private key bytes,
both in PEM format. It is used to configure mutual TLS channel. It is
both in PEM format. It is used to configure a mutual TLS channel. It is
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
quota_project_id (Optional[str]): An optional project to use for billing
and quota.
Expand Down
30 changes: 15 additions & 15 deletions scripts/fixup_grafeas_v1_keywords.py
Expand Up @@ -39,20 +39,20 @@ def partition(
class grafeasCallTransformer(cst.CSTTransformer):
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
'batch_create_notes': ('parent', 'notes', ),
'batch_create_occurrences': ('parent', 'occurrences', ),
'create_note': ('parent', 'note_id', 'note', ),
'create_occurrence': ('parent', 'occurrence', ),
'delete_note': ('name', ),
'delete_occurrence': ('name', ),
'get_note': ('name', ),
'get_occurrence': ('name', ),
'get_occurrence_note': ('name', ),
'list_note_occurrences': ('name', 'filter', 'page_size', 'page_token', ),
'list_notes': ('parent', 'filter', 'page_size', 'page_token', ),
'list_occurrences': ('parent', 'filter', 'page_size', 'page_token', ),
'update_note': ('name', 'note', 'update_mask', ),
'update_occurrence': ('name', 'occurrence', 'update_mask', ),
'batch_create_notes': ('parent', 'notes', ),
'batch_create_occurrences': ('parent', 'occurrences', ),
'create_note': ('parent', 'note_id', 'note', ),
'create_occurrence': ('parent', 'occurrence', ),
'delete_note': ('name', ),
'delete_occurrence': ('name', ),
'get_note': ('name', ),
'get_occurrence': ('name', ),
'get_occurrence_note': ('name', ),
'list_note_occurrences': ('name', 'filter', 'page_size', 'page_token', ),
'list_notes': ('parent', 'filter', 'page_size', 'page_token', ),
'list_occurrences': ('parent', 'filter', 'page_size', 'page_token', ),
'update_note': ('name', 'note', 'update_mask', ),
'update_occurrence': ('name', 'occurrence', 'update_mask', ),
}

def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
Expand All @@ -71,7 +71,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
return updated

kwargs, ctrl_kwargs = partition(
lambda a: not a.keyword.value in self.CTRL_PARAMS,
lambda a: a.keyword.value not in self.CTRL_PARAMS,
kwargs
)

Expand Down

0 comments on commit 594f8d1

Please sign in to comment.