google-cloud-maintenance-api 0.2.0__tar.gz → 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. {google_cloud_maintenance_api-0.2.0/google_cloud_maintenance_api.egg-info → google_cloud_maintenance_api-0.4.0}/PKG-INFO +6 -8
  2. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/README.rst +2 -2
  3. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/google/cloud/maintenance_api/__init__.py +3 -3
  4. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/google/cloud/maintenance_api/gapic_version.py +1 -1
  5. google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1/__init__.py +151 -0
  6. google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1/gapic_metadata.json +73 -0
  7. {google_cloud_maintenance_api-0.2.0/google/cloud/maintenance_api_v1beta → google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1}/gapic_version.py +1 -1
  8. google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1/services/maintenance/async_client.py +802 -0
  9. google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1/services/maintenance/client.py +1240 -0
  10. google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1/services/maintenance/pagers.py +361 -0
  11. google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1/services/maintenance/transports/base.py +244 -0
  12. google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1/services/maintenance/transports/grpc.py +462 -0
  13. google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1/services/maintenance/transports/grpc_asyncio.py +505 -0
  14. google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1/services/maintenance/transports/rest.py +1189 -0
  15. google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1/services/maintenance/transports/rest_base.py +283 -0
  16. google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1/types/maintenance_service.py +704 -0
  17. google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1beta/__init__.py +151 -0
  18. google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1beta/gapic_version.py +16 -0
  19. google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1beta/py.typed +2 -0
  20. google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1beta/services/maintenance/__init__.py +22 -0
  21. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/google/cloud/maintenance_api_v1beta/services/maintenance/async_client.py +30 -16
  22. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/google/cloud/maintenance_api_v1beta/services/maintenance/client.py +68 -41
  23. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/google/cloud/maintenance_api_v1beta/services/maintenance/pagers.py +4 -4
  24. google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1beta/services/maintenance/transports/__init__.py +36 -0
  25. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/google/cloud/maintenance_api_v1beta/services/maintenance/transports/base.py +15 -6
  26. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/google/cloud/maintenance_api_v1beta/services/maintenance/transports/grpc.py +17 -13
  27. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/google/cloud/maintenance_api_v1beta/services/maintenance/transports/grpc_asyncio.py +16 -12
  28. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/google/cloud/maintenance_api_v1beta/services/maintenance/transports/rest.py +17 -13
  29. {google_cloud_maintenance_api-0.2.0/google/cloud/maintenance_api_v1beta → google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1beta/types}/__init__.py +2 -10
  30. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/google/cloud/maintenance_api_v1beta/types/maintenance_service.py +10 -7
  31. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0/google_cloud_maintenance_api.egg-info}/PKG-INFO +6 -8
  32. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/google_cloud_maintenance_api.egg-info/SOURCES.txt +19 -0
  33. google_cloud_maintenance_api-0.4.0/google_cloud_maintenance_api.egg-info/requires.txt +11 -0
  34. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/setup.py +3 -5
  35. google_cloud_maintenance_api-0.4.0/tests/unit/gapic/maintenance_api_v1/__init__.py +15 -0
  36. google_cloud_maintenance_api-0.4.0/tests/unit/gapic/maintenance_api_v1/test_maintenance.py +5422 -0
  37. google_cloud_maintenance_api-0.4.0/tests/unit/gapic/maintenance_api_v1beta/__init__.py +15 -0
  38. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/tests/unit/gapic/maintenance_api_v1beta/test_maintenance.py +401 -112
  39. google_cloud_maintenance_api-0.2.0/google_cloud_maintenance_api.egg-info/requires.txt +0 -11
  40. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/LICENSE +0 -0
  41. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/MANIFEST.in +0 -0
  42. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/google/cloud/maintenance_api/py.typed +0 -0
  43. {google_cloud_maintenance_api-0.2.0/google/cloud/maintenance_api_v1beta → google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1}/py.typed +0 -0
  44. {google_cloud_maintenance_api-0.2.0/google/cloud/maintenance_api_v1beta → google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1}/services/__init__.py +0 -0
  45. {google_cloud_maintenance_api-0.2.0/google/cloud/maintenance_api_v1beta → google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1}/services/maintenance/__init__.py +0 -0
  46. {google_cloud_maintenance_api-0.2.0/google/cloud/maintenance_api_v1beta → google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1}/services/maintenance/transports/__init__.py +0 -0
  47. {google_cloud_maintenance_api-0.2.0/google/cloud/maintenance_api_v1beta → google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1}/types/__init__.py +0 -0
  48. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/google/cloud/maintenance_api_v1beta/gapic_metadata.json +0 -0
  49. {google_cloud_maintenance_api-0.2.0/tests → google_cloud_maintenance_api-0.4.0/google/cloud/maintenance_api_v1beta/services}/__init__.py +0 -0
  50. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/google/cloud/maintenance_api_v1beta/services/maintenance/transports/rest_base.py +0 -0
  51. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/google_cloud_maintenance_api.egg-info/dependency_links.txt +0 -0
  52. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/google_cloud_maintenance_api.egg-info/not-zip-safe +0 -0
  53. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/google_cloud_maintenance_api.egg-info/top_level.txt +0 -0
  54. {google_cloud_maintenance_api-0.2.0 → google_cloud_maintenance_api-0.4.0}/setup.cfg +0 -0
  55. {google_cloud_maintenance_api-0.2.0/tests/unit → google_cloud_maintenance_api-0.4.0/tests}/__init__.py +0 -0
  56. {google_cloud_maintenance_api-0.2.0/tests/unit/gapic → google_cloud_maintenance_api-0.4.0/tests/unit}/__init__.py +0 -0
  57. {google_cloud_maintenance_api-0.2.0/tests/unit/gapic/maintenance_api_v1beta → google_cloud_maintenance_api-0.4.0/tests/unit/gapic}/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-cloud-maintenance-api
3
- Version: 0.2.0
3
+ Version: 0.4.0
4
4
  Summary: Google Cloud Maintenance Api API client library
5
5
  Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-maintenance-api
6
6
  Author: Google LLC
@@ -12,8 +12,6 @@ Classifier: Intended Audience :: Developers
12
12
  Classifier: License :: OSI Approved :: Apache Software License
13
13
  Classifier: Programming Language :: Python
14
14
  Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.7
16
- Classifier: Programming Language :: Python :: 3.8
17
15
  Classifier: Programming Language :: Python :: 3.9
18
16
  Classifier: Programming Language :: Python :: 3.10
19
17
  Classifier: Programming Language :: Python :: 3.11
@@ -22,15 +20,15 @@ Classifier: Programming Language :: Python :: 3.13
22
20
  Classifier: Programming Language :: Python :: 3.14
23
21
  Classifier: Operating System :: OS Independent
24
22
  Classifier: Topic :: Internet
25
- Requires-Python: >=3.7
23
+ Requires-Python: >=3.9
26
24
  License-File: LICENSE
27
- Requires-Dist: google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0,>=1.34.1
25
+ Requires-Dist: google-api-core[grpc]<3.0.0,>=2.11.0
28
26
  Requires-Dist: google-auth!=2.24.0,!=2.25.0,<3.0.0,>=2.14.1
29
27
  Requires-Dist: grpcio<2.0.0,>=1.33.2
30
28
  Requires-Dist: grpcio<2.0.0,>=1.75.1; python_version >= "3.14"
31
29
  Requires-Dist: proto-plus<2.0.0,>=1.22.3
32
30
  Requires-Dist: proto-plus<2.0.0,>=1.25.0; python_version >= "3.13"
33
- Requires-Dist: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<7.0.0,>=3.20.2
31
+ Requires-Dist: protobuf<8.0.0,>=4.25.8
34
32
  Dynamic: author
35
33
  Dynamic: author-email
36
34
  Dynamic: classifier
@@ -106,14 +104,14 @@ Supported Python Versions
106
104
  Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
107
105
  Python.
108
106
 
109
- Python >= 3.7, including 3.14
107
+ Python >= 3.9, including 3.14
110
108
 
111
109
  .. _active: https://devguide.python.org/devcycle/#in-development-main-branch
112
110
  .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
113
111
 
114
112
  Unsupported Python Versions
115
113
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
116
- Python <= 3.6
114
+ Python <= 3.8
117
115
 
118
116
  If you are using an `end-of-life`_
119
117
  version of Python, we recommend that you update as soon as possible to an actively supported version.
@@ -61,14 +61,14 @@ Supported Python Versions
61
61
  Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
62
62
  Python.
63
63
 
64
- Python >= 3.7, including 3.14
64
+ Python >= 3.9, including 3.14
65
65
 
66
66
  .. _active: https://devguide.python.org/devcycle/#in-development-main-branch
67
67
  .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
68
68
 
69
69
  Unsupported Python Versions
70
70
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
71
- Python <= 3.6
71
+ Python <= 3.8
72
72
 
73
73
  If you are using an `end-of-life`_
74
74
  version of Python, we recommend that you update as soon as possible to an actively supported version.
@@ -18,13 +18,13 @@ from google.cloud.maintenance_api import gapic_version as package_version
18
18
  __version__ = package_version.__version__
19
19
 
20
20
 
21
- from google.cloud.maintenance_api_v1beta.services.maintenance.async_client import (
21
+ from google.cloud.maintenance_api_v1.services.maintenance.async_client import (
22
22
  MaintenanceAsyncClient,
23
23
  )
24
- from google.cloud.maintenance_api_v1beta.services.maintenance.client import (
24
+ from google.cloud.maintenance_api_v1.services.maintenance.client import (
25
25
  MaintenanceClient,
26
26
  )
27
- from google.cloud.maintenance_api_v1beta.types.maintenance_service import (
27
+ from google.cloud.maintenance_api_v1.types.maintenance_service import (
28
28
  GetResourceMaintenanceRequest,
29
29
  ListResourceMaintenancesRequest,
30
30
  ListResourceMaintenancesResponse,
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "0.2.0" # {x-release-please-version}
16
+ __version__ = "0.4.0" # {x-release-please-version}
@@ -0,0 +1,151 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2025 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.maintenance_api_v1 import gapic_version as package_version
21
+
22
+ __version__ = package_version.__version__
23
+
24
+ if sys.version_info >= (3, 8): # pragma: NO COVER
25
+ from importlib import metadata
26
+ else: # pragma: NO COVER
27
+ # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove
28
+ # this code path once we drop support for Python 3.7
29
+ import importlib_metadata as metadata
30
+
31
+
32
+ from .services.maintenance import MaintenanceAsyncClient, MaintenanceClient
33
+ from .types.maintenance_service import (
34
+ GetResourceMaintenanceRequest,
35
+ ListResourceMaintenancesRequest,
36
+ ListResourceMaintenancesResponse,
37
+ MaintenanceCategory,
38
+ MaintenanceControl,
39
+ MaintenanceSummary,
40
+ ResourceMaintenance,
41
+ SummarizeMaintenancesRequest,
42
+ SummarizeMaintenancesResponse,
43
+ )
44
+
45
+ if hasattr(api_core, "check_python_version") and hasattr(
46
+ api_core, "check_dependency_versions"
47
+ ): # pragma: NO COVER
48
+ api_core.check_python_version("google.cloud.maintenance_api_v1") # type: ignore
49
+ api_core.check_dependency_versions("google.cloud.maintenance_api_v1") # type: ignore
50
+ else: # pragma: NO COVER
51
+ # An older version of api_core is installed which does not define the
52
+ # functions above. We do equivalent checks manually.
53
+ try:
54
+ import sys
55
+ import warnings
56
+
57
+ _py_version_str = sys.version.split()[0]
58
+ _package_label = "google.cloud.maintenance_api_v1"
59
+ if sys.version_info < (3, 9):
60
+ warnings.warn(
61
+ "You are using a non-supported Python version "
62
+ + f"({_py_version_str}). Google will not post any further "
63
+ + f"updates to {_package_label} supporting this Python version. "
64
+ + "Please upgrade to the latest Python version, or at "
65
+ + f"least to Python 3.9, and then update {_package_label}.",
66
+ FutureWarning,
67
+ )
68
+ if sys.version_info[:2] == (3, 9):
69
+ warnings.warn(
70
+ f"You are using a Python version ({_py_version_str}) "
71
+ + f"which Google will stop supporting in {_package_label} in "
72
+ + "January 2026. Please "
73
+ + "upgrade to the latest Python version, or at "
74
+ + "least to Python 3.10, before then, and "
75
+ + f"then update {_package_label}.",
76
+ FutureWarning,
77
+ )
78
+
79
+ def parse_version_to_tuple(version_string: str):
80
+ """Safely converts a semantic version string to a comparable tuple of integers.
81
+ Example: "4.25.8" -> (4, 25, 8)
82
+ Ignores non-numeric parts and handles common version formats.
83
+ Args:
84
+ version_string: Version string in the format "x.y.z" or "x.y.z<suffix>"
85
+ Returns:
86
+ Tuple of integers for the parsed version string.
87
+ """
88
+ parts = []
89
+ for part in version_string.split("."):
90
+ try:
91
+ parts.append(int(part))
92
+ except ValueError:
93
+ # If it's a non-numeric part (e.g., '1.0.0b1' -> 'b1'), stop here.
94
+ # This is a simplification compared to 'packaging.parse_version', but sufficient
95
+ # for comparing strictly numeric semantic versions.
96
+ break
97
+ return tuple(parts)
98
+
99
+ def _get_version(dependency_name):
100
+ try:
101
+ version_string: str = metadata.version(dependency_name)
102
+ parsed_version = parse_version_to_tuple(version_string)
103
+ return (parsed_version, version_string)
104
+ except Exception:
105
+ # Catch exceptions from metadata.version() (e.g., PackageNotFoundError)
106
+ # or errors during parse_version_to_tuple
107
+ return (None, "--")
108
+
109
+ _dependency_package = "google.protobuf"
110
+ _next_supported_version = "4.25.8"
111
+ _next_supported_version_tuple = (4, 25, 8)
112
+ _recommendation = " (we recommend 6.x)"
113
+ (_version_used, _version_used_string) = _get_version(_dependency_package)
114
+ if _version_used and _version_used < _next_supported_version_tuple:
115
+ warnings.warn(
116
+ f"Package {_package_label} depends on "
117
+ + f"{_dependency_package}, currently installed at version "
118
+ + f"{_version_used_string}. Future updates to "
119
+ + f"{_package_label} will require {_dependency_package} at "
120
+ + f"version {_next_supported_version} or higher{_recommendation}."
121
+ + " Please ensure "
122
+ + "that either (a) your Python environment doesn't pin the "
123
+ + f"version of {_dependency_package}, so that updates to "
124
+ + f"{_package_label} can require the higher version, or "
125
+ + "(b) you manually update your Python environment to use at "
126
+ + f"least version {_next_supported_version} of "
127
+ + f"{_dependency_package}.",
128
+ FutureWarning,
129
+ )
130
+ except Exception:
131
+ warnings.warn(
132
+ "Could not determine the version of Python "
133
+ + "currently being used. To continue receiving "
134
+ + "updates for {_package_label}, ensure you are "
135
+ + "using a supported version of Python; see "
136
+ + "https://devguide.python.org/versions/"
137
+ )
138
+
139
+ __all__ = (
140
+ "MaintenanceAsyncClient",
141
+ "GetResourceMaintenanceRequest",
142
+ "ListResourceMaintenancesRequest",
143
+ "ListResourceMaintenancesResponse",
144
+ "MaintenanceCategory",
145
+ "MaintenanceClient",
146
+ "MaintenanceControl",
147
+ "MaintenanceSummary",
148
+ "ResourceMaintenance",
149
+ "SummarizeMaintenancesRequest",
150
+ "SummarizeMaintenancesResponse",
151
+ )
@@ -0,0 +1,73 @@
1
+ {
2
+ "comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
3
+ "language": "python",
4
+ "libraryPackage": "google.cloud.maintenance_api_v1",
5
+ "protoPackage": "google.cloud.maintenance.api.v1",
6
+ "schema": "1.0",
7
+ "services": {
8
+ "Maintenance": {
9
+ "clients": {
10
+ "grpc": {
11
+ "libraryClient": "MaintenanceClient",
12
+ "rpcs": {
13
+ "GetResourceMaintenance": {
14
+ "methods": [
15
+ "get_resource_maintenance"
16
+ ]
17
+ },
18
+ "ListResourceMaintenances": {
19
+ "methods": [
20
+ "list_resource_maintenances"
21
+ ]
22
+ },
23
+ "SummarizeMaintenances": {
24
+ "methods": [
25
+ "summarize_maintenances"
26
+ ]
27
+ }
28
+ }
29
+ },
30
+ "grpc-async": {
31
+ "libraryClient": "MaintenanceAsyncClient",
32
+ "rpcs": {
33
+ "GetResourceMaintenance": {
34
+ "methods": [
35
+ "get_resource_maintenance"
36
+ ]
37
+ },
38
+ "ListResourceMaintenances": {
39
+ "methods": [
40
+ "list_resource_maintenances"
41
+ ]
42
+ },
43
+ "SummarizeMaintenances": {
44
+ "methods": [
45
+ "summarize_maintenances"
46
+ ]
47
+ }
48
+ }
49
+ },
50
+ "rest": {
51
+ "libraryClient": "MaintenanceClient",
52
+ "rpcs": {
53
+ "GetResourceMaintenance": {
54
+ "methods": [
55
+ "get_resource_maintenance"
56
+ ]
57
+ },
58
+ "ListResourceMaintenances": {
59
+ "methods": [
60
+ "list_resource_maintenances"
61
+ ]
62
+ },
63
+ "SummarizeMaintenances": {
64
+ "methods": [
65
+ "summarize_maintenances"
66
+ ]
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "0.2.0" # {x-release-please-version}
16
+ __version__ = "0.4.0" # {x-release-please-version}