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

Commit 2f81e39

Browse files
fix(monolith): Bump microgenerator versions to monolith removal
* fix(php): Bump microgenerator version * fix(monolith): Bump microgenerator versions with monolith removal Source-Author: Mira Leung <miraleung@users.noreply.github.com> Source-Date: Wed Jun 23 12:35:59 2021 -0700 Source-Repo: googleapis/googleapis-discovery Source-Sha: 6a189a8bada35e2657a67b903cad7fee649f2dbc Source-Link: googleapis/googleapis-discovery@6a189a8
1 parent cd6af64 commit 2f81e39

157 files changed

Lines changed: 1733 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

google/cloud/compute_v1/services/accelerator_types/transports/base.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from google.api_core import gapic_v1 # type: ignore
2626
from google.api_core import retry as retries # type: ignore
2727
from google.auth import credentials as ga_credentials # type: ignore
28+
from google.oauth2 import service_account # type: ignore
2829

2930
from google.cloud.compute_v1.types import compute
3031

@@ -67,6 +68,7 @@ def __init__(
6768
scopes: Optional[Sequence[str]] = None,
6869
quota_project_id: Optional[str] = None,
6970
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
71+
always_use_jwt_access: Optional[bool] = False,
7072
**kwargs,
7173
) -> None:
7274
"""Instantiate the transport.
@@ -90,6 +92,8 @@ def __init__(
9092
API requests. If ``None``, then default info will be used.
9193
Generally, you only need to set this if you're developing
9294
your own client library.
95+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
96+
be used for service account credentials.
9397
"""
9498
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
9599
if ":" not in host:
@@ -118,6 +122,14 @@ def __init__(
118122
**scopes_kwargs, quota_project_id=quota_project_id
119123
)
120124

125+
# If the credentials is service account credentials, then always try to use self signed JWT.
126+
if (
127+
always_use_jwt_access
128+
and isinstance(credentials, service_account.Credentials)
129+
and hasattr(service_account.Credentials, "with_always_use_jwt_access")
130+
):
131+
credentials = credentials.with_always_use_jwt_access(True)
132+
121133
# Save the credentials.
122134
self._credentials = credentials
123135

google/cloud/compute_v1/services/addresses/transports/base.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from google.api_core import gapic_v1 # type: ignore
2626
from google.api_core import retry as retries # type: ignore
2727
from google.auth import credentials as ga_credentials # type: ignore
28+
from google.oauth2 import service_account # type: ignore
2829

2930
from google.cloud.compute_v1.types import compute
3031

@@ -66,6 +67,7 @@ def __init__(
6667
scopes: Optional[Sequence[str]] = None,
6768
quota_project_id: Optional[str] = None,
6869
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
70+
always_use_jwt_access: Optional[bool] = False,
6971
**kwargs,
7072
) -> None:
7173
"""Instantiate the transport.
@@ -89,6 +91,8 @@ def __init__(
8991
API requests. If ``None``, then default info will be used.
9092
Generally, you only need to set this if you're developing
9193
your own client library.
94+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
95+
be used for service account credentials.
9296
"""
9397
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
9498
if ":" not in host:
@@ -117,6 +121,14 @@ def __init__(
117121
**scopes_kwargs, quota_project_id=quota_project_id
118122
)
119123

124+
# If the credentials is service account credentials, then always try to use self signed JWT.
125+
if (
126+
always_use_jwt_access
127+
and isinstance(credentials, service_account.Credentials)
128+
and hasattr(service_account.Credentials, "with_always_use_jwt_access")
129+
):
130+
credentials = credentials.with_always_use_jwt_access(True)
131+
120132
# Save the credentials.
121133
self._credentials = credentials
122134

google/cloud/compute_v1/services/autoscalers/transports/base.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from google.api_core import gapic_v1 # type: ignore
2626
from google.api_core import retry as retries # type: ignore
2727
from google.auth import credentials as ga_credentials # type: ignore
28+
from google.oauth2 import service_account # type: ignore
2829

2930
from google.cloud.compute_v1.types import compute
3031

@@ -66,6 +67,7 @@ def __init__(
6667
scopes: Optional[Sequence[str]] = None,
6768
quota_project_id: Optional[str] = None,
6869
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
70+
always_use_jwt_access: Optional[bool] = False,
6971
**kwargs,
7072
) -> None:
7173
"""Instantiate the transport.
@@ -89,6 +91,8 @@ def __init__(
8991
API requests. If ``None``, then default info will be used.
9092
Generally, you only need to set this if you're developing
9193
your own client library.
94+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
95+
be used for service account credentials.
9296
"""
9397
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
9498
if ":" not in host:
@@ -117,6 +121,14 @@ def __init__(
117121
**scopes_kwargs, quota_project_id=quota_project_id
118122
)
119123

124+
# If the credentials is service account credentials, then always try to use self signed JWT.
125+
if (
126+
always_use_jwt_access
127+
and isinstance(credentials, service_account.Credentials)
128+
and hasattr(service_account.Credentials, "with_always_use_jwt_access")
129+
):
130+
credentials = credentials.with_always_use_jwt_access(True)
131+
120132
# Save the credentials.
121133
self._credentials = credentials
122134

google/cloud/compute_v1/services/backend_buckets/transports/base.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from google.api_core import gapic_v1 # type: ignore
2626
from google.api_core import retry as retries # type: ignore
2727
from google.auth import credentials as ga_credentials # type: ignore
28+
from google.oauth2 import service_account # type: ignore
2829

2930
from google.cloud.compute_v1.types import compute
3031

@@ -66,6 +67,7 @@ def __init__(
6667
scopes: Optional[Sequence[str]] = None,
6768
quota_project_id: Optional[str] = None,
6869
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
70+
always_use_jwt_access: Optional[bool] = False,
6971
**kwargs,
7072
) -> None:
7173
"""Instantiate the transport.
@@ -89,6 +91,8 @@ def __init__(
8991
API requests. If ``None``, then default info will be used.
9092
Generally, you only need to set this if you're developing
9193
your own client library.
94+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
95+
be used for service account credentials.
9296
"""
9397
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
9498
if ":" not in host:
@@ -117,6 +121,14 @@ def __init__(
117121
**scopes_kwargs, quota_project_id=quota_project_id
118122
)
119123

124+
# If the credentials is service account credentials, then always try to use self signed JWT.
125+
if (
126+
always_use_jwt_access
127+
and isinstance(credentials, service_account.Credentials)
128+
and hasattr(service_account.Credentials, "with_always_use_jwt_access")
129+
):
130+
credentials = credentials.with_always_use_jwt_access(True)
131+
120132
# Save the credentials.
121133
self._credentials = credentials
122134

google/cloud/compute_v1/services/backend_services/transports/base.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from google.api_core import gapic_v1 # type: ignore
2626
from google.api_core import retry as retries # type: ignore
2727
from google.auth import credentials as ga_credentials # type: ignore
28+
from google.oauth2 import service_account # type: ignore
2829

2930
from google.cloud.compute_v1.types import compute
3031

@@ -66,6 +67,7 @@ def __init__(
6667
scopes: Optional[Sequence[str]] = None,
6768
quota_project_id: Optional[str] = None,
6869
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
70+
always_use_jwt_access: Optional[bool] = False,
6971
**kwargs,
7072
) -> None:
7173
"""Instantiate the transport.
@@ -89,6 +91,8 @@ def __init__(
8991
API requests. If ``None``, then default info will be used.
9092
Generally, you only need to set this if you're developing
9193
your own client library.
94+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
95+
be used for service account credentials.
9296
"""
9397
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
9498
if ":" not in host:
@@ -117,6 +121,14 @@ def __init__(
117121
**scopes_kwargs, quota_project_id=quota_project_id
118122
)
119123

124+
# If the credentials is service account credentials, then always try to use self signed JWT.
125+
if (
126+
always_use_jwt_access
127+
and isinstance(credentials, service_account.Credentials)
128+
and hasattr(service_account.Credentials, "with_always_use_jwt_access")
129+
):
130+
credentials = credentials.with_always_use_jwt_access(True)
131+
120132
# Save the credentials.
121133
self._credentials = credentials
122134

google/cloud/compute_v1/services/disk_types/transports/base.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from google.api_core import gapic_v1 # type: ignore
2626
from google.api_core import retry as retries # type: ignore
2727
from google.auth import credentials as ga_credentials # type: ignore
28+
from google.oauth2 import service_account # type: ignore
2829

2930
from google.cloud.compute_v1.types import compute
3031

@@ -67,6 +68,7 @@ def __init__(
6768
scopes: Optional[Sequence[str]] = None,
6869
quota_project_id: Optional[str] = None,
6970
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
71+
always_use_jwt_access: Optional[bool] = False,
7072
**kwargs,
7173
) -> None:
7274
"""Instantiate the transport.
@@ -90,6 +92,8 @@ def __init__(
9092
API requests. If ``None``, then default info will be used.
9193
Generally, you only need to set this if you're developing
9294
your own client library.
95+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
96+
be used for service account credentials.
9397
"""
9498
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
9599
if ":" not in host:
@@ -118,6 +122,14 @@ def __init__(
118122
**scopes_kwargs, quota_project_id=quota_project_id
119123
)
120124

125+
# If the credentials is service account credentials, then always try to use self signed JWT.
126+
if (
127+
always_use_jwt_access
128+
and isinstance(credentials, service_account.Credentials)
129+
and hasattr(service_account.Credentials, "with_always_use_jwt_access")
130+
):
131+
credentials = credentials.with_always_use_jwt_access(True)
132+
121133
# Save the credentials.
122134
self._credentials = credentials
123135

google/cloud/compute_v1/services/disks/transports/base.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from google.api_core import gapic_v1 # type: ignore
2626
from google.api_core import retry as retries # type: ignore
2727
from google.auth import credentials as ga_credentials # type: ignore
28+
from google.oauth2 import service_account # type: ignore
2829

2930
from google.cloud.compute_v1.types import compute
3031

@@ -66,6 +67,7 @@ def __init__(
6667
scopes: Optional[Sequence[str]] = None,
6768
quota_project_id: Optional[str] = None,
6869
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
70+
always_use_jwt_access: Optional[bool] = False,
6971
**kwargs,
7072
) -> None:
7173
"""Instantiate the transport.
@@ -89,6 +91,8 @@ def __init__(
8991
API requests. If ``None``, then default info will be used.
9092
Generally, you only need to set this if you're developing
9193
your own client library.
94+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
95+
be used for service account credentials.
9296
"""
9397
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
9498
if ":" not in host:
@@ -117,6 +121,14 @@ def __init__(
117121
**scopes_kwargs, quota_project_id=quota_project_id
118122
)
119123

124+
# If the credentials is service account credentials, then always try to use self signed JWT.
125+
if (
126+
always_use_jwt_access
127+
and isinstance(credentials, service_account.Credentials)
128+
and hasattr(service_account.Credentials, "with_always_use_jwt_access")
129+
):
130+
credentials = credentials.with_always_use_jwt_access(True)
131+
120132
# Save the credentials.
121133
self._credentials = credentials
122134

google/cloud/compute_v1/services/external_vpn_gateways/transports/base.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from google.api_core import gapic_v1 # type: ignore
2626
from google.api_core import retry as retries # type: ignore
2727
from google.auth import credentials as ga_credentials # type: ignore
28+
from google.oauth2 import service_account # type: ignore
2829

2930
from google.cloud.compute_v1.types import compute
3031

@@ -66,6 +67,7 @@ def __init__(
6667
scopes: Optional[Sequence[str]] = None,
6768
quota_project_id: Optional[str] = None,
6869
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
70+
always_use_jwt_access: Optional[bool] = False,
6971
**kwargs,
7072
) -> None:
7173
"""Instantiate the transport.
@@ -89,6 +91,8 @@ def __init__(
8991
API requests. If ``None``, then default info will be used.
9092
Generally, you only need to set this if you're developing
9193
your own client library.
94+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
95+
be used for service account credentials.
9296
"""
9397
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
9498
if ":" not in host:
@@ -117,6 +121,14 @@ def __init__(
117121
**scopes_kwargs, quota_project_id=quota_project_id
118122
)
119123

124+
# If the credentials is service account credentials, then always try to use self signed JWT.
125+
if (
126+
always_use_jwt_access
127+
and isinstance(credentials, service_account.Credentials)
128+
and hasattr(service_account.Credentials, "with_always_use_jwt_access")
129+
):
130+
credentials = credentials.with_always_use_jwt_access(True)
131+
120132
# Save the credentials.
121133
self._credentials = credentials
122134

google/cloud/compute_v1/services/firewall_policies/transports/base.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from google.api_core import gapic_v1 # type: ignore
2626
from google.api_core import retry as retries # type: ignore
2727
from google.auth import credentials as ga_credentials # type: ignore
28+
from google.oauth2 import service_account # type: ignore
2829

2930
from google.cloud.compute_v1.types import compute
3031

@@ -66,6 +67,7 @@ def __init__(
6667
scopes: Optional[Sequence[str]] = None,
6768
quota_project_id: Optional[str] = None,
6869
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
70+
always_use_jwt_access: Optional[bool] = False,
6971
**kwargs,
7072
) -> None:
7173
"""Instantiate the transport.
@@ -89,6 +91,8 @@ def __init__(
8991
API requests. If ``None``, then default info will be used.
9092
Generally, you only need to set this if you're developing
9193
your own client library.
94+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
95+
be used for service account credentials.
9296
"""
9397
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
9498
if ":" not in host:
@@ -117,6 +121,14 @@ def __init__(
117121
**scopes_kwargs, quota_project_id=quota_project_id
118122
)
119123

124+
# If the credentials is service account credentials, then always try to use self signed JWT.
125+
if (
126+
always_use_jwt_access
127+
and isinstance(credentials, service_account.Credentials)
128+
and hasattr(service_account.Credentials, "with_always_use_jwt_access")
129+
):
130+
credentials = credentials.with_always_use_jwt_access(True)
131+
120132
# Save the credentials.
121133
self._credentials = credentials
122134

google/cloud/compute_v1/services/firewalls/transports/base.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from google.api_core import gapic_v1 # type: ignore
2626
from google.api_core import retry as retries # type: ignore
2727
from google.auth import credentials as ga_credentials # type: ignore
28+
from google.oauth2 import service_account # type: ignore
2829

2930
from google.cloud.compute_v1.types import compute
3031

@@ -66,6 +67,7 @@ def __init__(
6667
scopes: Optional[Sequence[str]] = None,
6768
quota_project_id: Optional[str] = None,
6869
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
70+
always_use_jwt_access: Optional[bool] = False,
6971
**kwargs,
7072
) -> None:
7173
"""Instantiate the transport.
@@ -89,6 +91,8 @@ def __init__(
8991
API requests. If ``None``, then default info will be used.
9092
Generally, you only need to set this if you're developing
9193
your own client library.
94+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
95+
be used for service account credentials.
9296
"""
9397
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
9498
if ":" not in host:
@@ -117,6 +121,14 @@ def __init__(
117121
**scopes_kwargs, quota_project_id=quota_project_id
118122
)
119123

124+
# If the credentials is service account credentials, then always try to use self signed JWT.
125+
if (
126+
always_use_jwt_access
127+
and isinstance(credentials, service_account.Credentials)
128+
and hasattr(service_account.Credentials, "with_always_use_jwt_access")
129+
):
130+
credentials = credentials.with_always_use_jwt_access(True)
131+
120132
# Save the credentials.
121133
self._credentials = credentials
122134

0 commit comments

Comments
 (0)