Skip to content

Commit b692dae

Browse files
authored
feat(google/cloud/agentidentitycredentials/v1beta): add google-cloud-agentidentitycredentials v1beta (#17898)
b/535024092 This PyPI package google-cloud-agentidentitycredentials already exists with v1 version.
1 parent 223c8c1 commit b692dae

29 files changed

Lines changed: 8449 additions & 22 deletions

librarian.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ libraries:
306306
version: 0.1.0
307307
apis:
308308
- path: google/cloud/agentidentitycredentials/v1
309+
- path: google/cloud/agentidentitycredentials/v1beta
309310
copyright_year: "2026"
310311
python:
311312
default_version: v1
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
AuthProviderCredentialsService
2+
------------------------------------------------
3+
4+
.. automodule:: google.cloud.agentidentitycredentials_v1beta.services.auth_provider_credentials_service
5+
:members:
6+
:inherited-members:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Services for Google Cloud Agentidentitycredentials v1beta API
2+
=============================================================
3+
.. toctree::
4+
:maxdepth: 2
5+
6+
auth_provider_credentials_service
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Types for Google Cloud Agentidentitycredentials v1beta API
2+
==========================================================
3+
4+
.. automodule:: google.cloud.agentidentitycredentials_v1beta.types
5+
:members:
6+
:show-inheritance:
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2026 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
import sys
17+
18+
import google.api_core as api_core
19+
20+
from google.cloud.agentidentitycredentials_v1beta import (
21+
gapic_version as package_version,
22+
)
23+
24+
__version__ = package_version.__version__
25+
26+
from importlib import metadata
27+
28+
# PEP 0810: Explicit Lazy Imports
29+
# Python 3.15+ natively intercepts and defers these imports.
30+
# Developers can disable this behavior and force eager imports.
31+
# For more information, see:
32+
# https://docs.python.org/3.15/library/sys.html#sys.set_lazy_imports_filter
33+
# Older Python versions safely ignore this variable.
34+
__lazy_modules__ = {
35+
"google.cloud.agentidentitycredentials_v1beta.services.auth_provider_credentials_service",
36+
"google.cloud.agentidentitycredentials_v1beta.types.auth_provider_credentials_service",
37+
}
38+
39+
40+
from .services.auth_provider_credentials_service import (
41+
AuthProviderCredentialsServiceAsyncClient,
42+
AuthProviderCredentialsServiceClient,
43+
)
44+
from .types.auth_provider_credentials_service import (
45+
FinalizeCredentialsRequest,
46+
FinalizeCredentialsResponse,
47+
RetrieveCredentialsRequest,
48+
RetrieveCredentialsResponse,
49+
)
50+
51+
if hasattr(api_core, "check_python_version") and hasattr(
52+
api_core, "check_dependency_versions"
53+
): # pragma: NO COVER
54+
api_core.check_python_version("google.cloud.agentidentitycredentials_v1beta") # type: ignore
55+
api_core.check_dependency_versions("google.cloud.agentidentitycredentials_v1beta") # type: ignore
56+
else: # pragma: NO COVER
57+
# An older version of api_core is installed which does not define the
58+
# functions above. We do equivalent checks manually.
59+
try:
60+
import warnings
61+
62+
_py_version_str = sys.version.split()[0]
63+
_package_label = "google.cloud.agentidentitycredentials_v1beta"
64+
if sys.version_info < (3, 10):
65+
warnings.warn(
66+
"You are using a non-supported Python version "
67+
+ f"({_py_version_str}). Google will not post any further "
68+
+ f"updates to {_package_label} supporting this Python version. "
69+
+ "Please upgrade to the latest Python version, or at "
70+
+ f"least to Python 3.10, and then update {_package_label}.",
71+
FutureWarning,
72+
)
73+
74+
def parse_version_to_tuple(version_string: str):
75+
"""Safely converts a semantic version string to a comparable tuple of integers.
76+
Example: "6.33.5" -> (6, 33, 5)
77+
Ignores non-numeric parts and handles common version formats.
78+
Args:
79+
version_string: Version string in the format "x.y.z" or "x.y.z<suffix>"
80+
Returns:
81+
Tuple of integers for the parsed version string.
82+
"""
83+
parts = []
84+
for part in version_string.split("."):
85+
try:
86+
parts.append(int(part))
87+
except ValueError:
88+
# If it's a non-numeric part (e.g., '1.0.0b1' -> 'b1'), stop here.
89+
# This is a simplification compared to 'packaging.parse_version', but sufficient
90+
# for comparing strictly numeric semantic versions.
91+
break
92+
return tuple(parts)
93+
94+
def _get_version(dependency_name):
95+
try:
96+
version_string: str = metadata.version(dependency_name)
97+
parsed_version = parse_version_to_tuple(version_string)
98+
return (parsed_version, version_string)
99+
except Exception:
100+
# Catch exceptions from metadata.version() (e.g., PackageNotFoundError)
101+
# or errors during parse_version_to_tuple
102+
return (None, "--")
103+
104+
_dependency_package = "google.protobuf"
105+
_next_supported_version = "6.33.5"
106+
_next_supported_version_tuple = (6, 33, 5)
107+
_recommendation = " (we recommend 7.x)"
108+
(_version_used, _version_used_string) = _get_version(_dependency_package)
109+
if _version_used and _version_used < _next_supported_version_tuple:
110+
warnings.warn(
111+
f"Package {_package_label} depends on "
112+
+ f"{_dependency_package}, currently installed at version "
113+
+ f"{_version_used_string}. Future updates to "
114+
+ f"{_package_label} will require {_dependency_package} at "
115+
+ f"version {_next_supported_version} or higher{_recommendation}."
116+
+ " Please ensure "
117+
+ "that either (a) your Python environment doesn't pin the "
118+
+ f"version of {_dependency_package}, so that updates to "
119+
+ f"{_package_label} can require the higher version, or "
120+
+ "(b) you manually update your Python environment to use at "
121+
+ f"least version {_next_supported_version} of "
122+
+ f"{_dependency_package}.",
123+
FutureWarning,
124+
)
125+
except Exception:
126+
warnings.warn(
127+
"Could not determine the version of Python "
128+
+ "currently being used. To continue receiving "
129+
+ "updates for {_package_label}, ensure you are "
130+
+ "using a supported version of Python; see "
131+
+ "https://devguide.python.org/versions/"
132+
)
133+
134+
__all__ = (
135+
"AuthProviderCredentialsServiceAsyncClient",
136+
"AuthProviderCredentialsServiceClient",
137+
"FinalizeCredentialsRequest",
138+
"FinalizeCredentialsResponse",
139+
"RetrieveCredentialsRequest",
140+
"RetrieveCredentialsResponse",
141+
)
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
3+
"language": "python",
4+
"libraryPackage": "google.cloud.agentidentitycredentials_v1beta",
5+
"protoPackage": "google.cloud.agentidentitycredentials.v1beta",
6+
"schema": "1.0",
7+
"services": {
8+
"AuthProviderCredentialsService": {
9+
"clients": {
10+
"grpc": {
11+
"libraryClient": "AuthProviderCredentialsServiceClient",
12+
"rpcs": {
13+
"FinalizeCredentials": {
14+
"methods": [
15+
"finalize_credentials"
16+
]
17+
},
18+
"RetrieveCredentials": {
19+
"methods": [
20+
"retrieve_credentials"
21+
]
22+
}
23+
}
24+
},
25+
"grpc-async": {
26+
"libraryClient": "AuthProviderCredentialsServiceAsyncClient",
27+
"rpcs": {
28+
"FinalizeCredentials": {
29+
"methods": [
30+
"finalize_credentials"
31+
]
32+
},
33+
"RetrieveCredentials": {
34+
"methods": [
35+
"retrieve_credentials"
36+
]
37+
}
38+
}
39+
},
40+
"rest": {
41+
"libraryClient": "AuthProviderCredentialsServiceClient",
42+
"rpcs": {
43+
"FinalizeCredentials": {
44+
"methods": [
45+
"finalize_credentials"
46+
]
47+
},
48+
"RetrieveCredentials": {
49+
"methods": [
50+
"retrieve_credentials"
51+
]
52+
}
53+
}
54+
}
55+
}
56+
}
57+
}
58+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2026 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
__version__ = "0.1.0" # {x-release-please-version}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Marker file for PEP 561.
2+
# The google-cloud-agentidentitycredentials package uses inline types.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2026 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2026 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
from .async_client import AuthProviderCredentialsServiceAsyncClient
17+
from .client import AuthProviderCredentialsServiceClient
18+
19+
__all__ = (
20+
"AuthProviderCredentialsServiceClient",
21+
"AuthProviderCredentialsServiceAsyncClient",
22+
)

0 commit comments

Comments
 (0)