google-cloud-cloudcontrolspartner 0.1.0__py3-none-any.whl
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.
- google/cloud/cloudcontrolspartner/__init__.py +115 -0
- google/cloud/cloudcontrolspartner/gapic_version.py +16 -0
- google/cloud/cloudcontrolspartner/py.typed +2 -0
- google/cloud/cloudcontrolspartner_v1/__init__.py +103 -0
- google/cloud/cloudcontrolspartner_v1/gapic_metadata.json +197 -0
- google/cloud/cloudcontrolspartner_v1/gapic_version.py +16 -0
- google/cloud/cloudcontrolspartner_v1/py.typed +2 -0
- google/cloud/cloudcontrolspartner_v1/services/__init__.py +15 -0
- google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_core/__init__.py +22 -0
- google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_core/async_client.py +1253 -0
- google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_core/client.py +1705 -0
- google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_core/pagers.py +429 -0
- google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_core/transports/__init__.py +41 -0
- google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_core/transports/base.py +340 -0
- google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_core/transports/grpc.py +466 -0
- google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_core/transports/grpc_asyncio.py +472 -0
- google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_core/transports/rest.py +1212 -0
- google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_monitoring/__init__.py +22 -0
- google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_monitoring/async_client.py +528 -0
- google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_monitoring/client.py +935 -0
- google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_monitoring/pagers.py +155 -0
- google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_monitoring/transports/__init__.py +41 -0
- google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_monitoring/transports/base.py +194 -0
- google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_monitoring/transports/grpc.py +300 -0
- google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_monitoring/transports/grpc_asyncio.py +299 -0
- google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_monitoring/transports/rest.py +434 -0
- google/cloud/cloudcontrolspartner_v1/types/__init__.py +82 -0
- google/cloud/cloudcontrolspartner_v1/types/access_approval_requests.py +228 -0
- google/cloud/cloudcontrolspartner_v1/types/completion_state.py +53 -0
- google/cloud/cloudcontrolspartner_v1/types/core.py +93 -0
- google/cloud/cloudcontrolspartner_v1/types/customer_workloads.py +300 -0
- google/cloud/cloudcontrolspartner_v1/types/customers.py +233 -0
- google/cloud/cloudcontrolspartner_v1/types/ekm_connections.py +141 -0
- google/cloud/cloudcontrolspartner_v1/types/monitoring.py +24 -0
- google/cloud/cloudcontrolspartner_v1/types/partner_permissions.py +94 -0
- google/cloud/cloudcontrolspartner_v1/types/partners.py +188 -0
- google/cloud/cloudcontrolspartner_v1/types/violations.py +388 -0
- google/cloud/cloudcontrolspartner_v1beta/__init__.py +103 -0
- google/cloud/cloudcontrolspartner_v1beta/gapic_metadata.json +197 -0
- google/cloud/cloudcontrolspartner_v1beta/gapic_version.py +16 -0
- google/cloud/cloudcontrolspartner_v1beta/py.typed +2 -0
- google/cloud/cloudcontrolspartner_v1beta/services/__init__.py +15 -0
- google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_core/__init__.py +22 -0
- google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_core/async_client.py +1262 -0
- google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_core/client.py +1714 -0
- google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_core/pagers.py +429 -0
- google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_core/transports/__init__.py +41 -0
- google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_core/transports/base.py +340 -0
- google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_core/transports/grpc.py +466 -0
- google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_core/transports/grpc_asyncio.py +472 -0
- google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_core/transports/rest.py +1212 -0
- google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_monitoring/__init__.py +22 -0
- google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_monitoring/async_client.py +530 -0
- google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_monitoring/client.py +937 -0
- google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_monitoring/pagers.py +155 -0
- google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_monitoring/transports/__init__.py +41 -0
- google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_monitoring/transports/base.py +194 -0
- google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_monitoring/transports/grpc.py +300 -0
- google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_monitoring/transports/grpc_asyncio.py +299 -0
- google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_monitoring/transports/rest.py +434 -0
- google/cloud/cloudcontrolspartner_v1beta/types/__init__.py +82 -0
- google/cloud/cloudcontrolspartner_v1beta/types/access_approval_requests.py +230 -0
- google/cloud/cloudcontrolspartner_v1beta/types/completion_state.py +53 -0
- google/cloud/cloudcontrolspartner_v1beta/types/core.py +93 -0
- google/cloud/cloudcontrolspartner_v1beta/types/customer_workloads.py +304 -0
- google/cloud/cloudcontrolspartner_v1beta/types/customers.py +236 -0
- google/cloud/cloudcontrolspartner_v1beta/types/ekm_connections.py +143 -0
- google/cloud/cloudcontrolspartner_v1beta/types/monitoring.py +24 -0
- google/cloud/cloudcontrolspartner_v1beta/types/partner_permissions.py +96 -0
- google/cloud/cloudcontrolspartner_v1beta/types/partners.py +189 -0
- google/cloud/cloudcontrolspartner_v1beta/types/violations.py +391 -0
- google_cloud_cloudcontrolspartner-0.1.0.dist-info/LICENSE +202 -0
- google_cloud_cloudcontrolspartner-0.1.0.dist-info/METADATA +137 -0
- google_cloud_cloudcontrolspartner-0.1.0.dist-info/RECORD +76 -0
- google_cloud_cloudcontrolspartner-0.1.0.dist-info/WHEEL +5 -0
- google_cloud_cloudcontrolspartner-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1212 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Copyright 2023 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
|
+
|
|
17
|
+
import dataclasses
|
|
18
|
+
import json # type: ignore
|
|
19
|
+
import re
|
|
20
|
+
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
|
|
21
|
+
import warnings
|
|
22
|
+
|
|
23
|
+
from google.api_core import gapic_v1, path_template, rest_helpers, rest_streaming
|
|
24
|
+
from google.api_core import exceptions as core_exceptions
|
|
25
|
+
from google.api_core import retry as retries
|
|
26
|
+
from google.auth import credentials as ga_credentials # type: ignore
|
|
27
|
+
from google.auth.transport.grpc import SslCredentials # type: ignore
|
|
28
|
+
from google.auth.transport.requests import AuthorizedSession # type: ignore
|
|
29
|
+
from google.protobuf import json_format
|
|
30
|
+
import grpc # type: ignore
|
|
31
|
+
from requests import __version__ as requests_version
|
|
32
|
+
|
|
33
|
+
try:
|
|
34
|
+
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None]
|
|
35
|
+
except AttributeError: # pragma: NO COVER
|
|
36
|
+
OptionalRetry = Union[retries.Retry, object, None] # type: ignore
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
from google.cloud.cloudcontrolspartner_v1.types import (
|
|
40
|
+
access_approval_requests,
|
|
41
|
+
customer_workloads,
|
|
42
|
+
customers,
|
|
43
|
+
ekm_connections,
|
|
44
|
+
partner_permissions,
|
|
45
|
+
partners,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
from .base import CloudControlsPartnerCoreTransport
|
|
49
|
+
from .base import DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO
|
|
50
|
+
|
|
51
|
+
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
|
|
52
|
+
gapic_version=BASE_DEFAULT_CLIENT_INFO.gapic_version,
|
|
53
|
+
grpc_version=None,
|
|
54
|
+
rest_version=requests_version,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class CloudControlsPartnerCoreRestInterceptor:
|
|
59
|
+
"""Interceptor for CloudControlsPartnerCore.
|
|
60
|
+
|
|
61
|
+
Interceptors are used to manipulate requests, request metadata, and responses
|
|
62
|
+
in arbitrary ways.
|
|
63
|
+
Example use cases include:
|
|
64
|
+
* Logging
|
|
65
|
+
* Verifying requests according to service or custom semantics
|
|
66
|
+
* Stripping extraneous information from responses
|
|
67
|
+
|
|
68
|
+
These use cases and more can be enabled by injecting an
|
|
69
|
+
instance of a custom subclass when constructing the CloudControlsPartnerCoreRestTransport.
|
|
70
|
+
|
|
71
|
+
.. code-block:: python
|
|
72
|
+
class MyCustomCloudControlsPartnerCoreInterceptor(CloudControlsPartnerCoreRestInterceptor):
|
|
73
|
+
def pre_get_customer(self, request, metadata):
|
|
74
|
+
logging.log(f"Received request: {request}")
|
|
75
|
+
return request, metadata
|
|
76
|
+
|
|
77
|
+
def post_get_customer(self, response):
|
|
78
|
+
logging.log(f"Received response: {response}")
|
|
79
|
+
return response
|
|
80
|
+
|
|
81
|
+
def pre_get_ekm_connections(self, request, metadata):
|
|
82
|
+
logging.log(f"Received request: {request}")
|
|
83
|
+
return request, metadata
|
|
84
|
+
|
|
85
|
+
def post_get_ekm_connections(self, response):
|
|
86
|
+
logging.log(f"Received response: {response}")
|
|
87
|
+
return response
|
|
88
|
+
|
|
89
|
+
def pre_get_partner(self, request, metadata):
|
|
90
|
+
logging.log(f"Received request: {request}")
|
|
91
|
+
return request, metadata
|
|
92
|
+
|
|
93
|
+
def post_get_partner(self, response):
|
|
94
|
+
logging.log(f"Received response: {response}")
|
|
95
|
+
return response
|
|
96
|
+
|
|
97
|
+
def pre_get_partner_permissions(self, request, metadata):
|
|
98
|
+
logging.log(f"Received request: {request}")
|
|
99
|
+
return request, metadata
|
|
100
|
+
|
|
101
|
+
def post_get_partner_permissions(self, response):
|
|
102
|
+
logging.log(f"Received response: {response}")
|
|
103
|
+
return response
|
|
104
|
+
|
|
105
|
+
def pre_get_workload(self, request, metadata):
|
|
106
|
+
logging.log(f"Received request: {request}")
|
|
107
|
+
return request, metadata
|
|
108
|
+
|
|
109
|
+
def post_get_workload(self, response):
|
|
110
|
+
logging.log(f"Received response: {response}")
|
|
111
|
+
return response
|
|
112
|
+
|
|
113
|
+
def pre_list_access_approval_requests(self, request, metadata):
|
|
114
|
+
logging.log(f"Received request: {request}")
|
|
115
|
+
return request, metadata
|
|
116
|
+
|
|
117
|
+
def post_list_access_approval_requests(self, response):
|
|
118
|
+
logging.log(f"Received response: {response}")
|
|
119
|
+
return response
|
|
120
|
+
|
|
121
|
+
def pre_list_customers(self, request, metadata):
|
|
122
|
+
logging.log(f"Received request: {request}")
|
|
123
|
+
return request, metadata
|
|
124
|
+
|
|
125
|
+
def post_list_customers(self, response):
|
|
126
|
+
logging.log(f"Received response: {response}")
|
|
127
|
+
return response
|
|
128
|
+
|
|
129
|
+
def pre_list_workloads(self, request, metadata):
|
|
130
|
+
logging.log(f"Received request: {request}")
|
|
131
|
+
return request, metadata
|
|
132
|
+
|
|
133
|
+
def post_list_workloads(self, response):
|
|
134
|
+
logging.log(f"Received response: {response}")
|
|
135
|
+
return response
|
|
136
|
+
|
|
137
|
+
transport = CloudControlsPartnerCoreRestTransport(interceptor=MyCustomCloudControlsPartnerCoreInterceptor())
|
|
138
|
+
client = CloudControlsPartnerCoreClient(transport=transport)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
"""
|
|
142
|
+
|
|
143
|
+
def pre_get_customer(
|
|
144
|
+
self, request: customers.GetCustomerRequest, metadata: Sequence[Tuple[str, str]]
|
|
145
|
+
) -> Tuple[customers.GetCustomerRequest, Sequence[Tuple[str, str]]]:
|
|
146
|
+
"""Pre-rpc interceptor for get_customer
|
|
147
|
+
|
|
148
|
+
Override in a subclass to manipulate the request or metadata
|
|
149
|
+
before they are sent to the CloudControlsPartnerCore server.
|
|
150
|
+
"""
|
|
151
|
+
return request, metadata
|
|
152
|
+
|
|
153
|
+
def post_get_customer(self, response: customers.Customer) -> customers.Customer:
|
|
154
|
+
"""Post-rpc interceptor for get_customer
|
|
155
|
+
|
|
156
|
+
Override in a subclass to manipulate the response
|
|
157
|
+
after it is returned by the CloudControlsPartnerCore server but before
|
|
158
|
+
it is returned to user code.
|
|
159
|
+
"""
|
|
160
|
+
return response
|
|
161
|
+
|
|
162
|
+
def pre_get_ekm_connections(
|
|
163
|
+
self,
|
|
164
|
+
request: ekm_connections.GetEkmConnectionsRequest,
|
|
165
|
+
metadata: Sequence[Tuple[str, str]],
|
|
166
|
+
) -> Tuple[ekm_connections.GetEkmConnectionsRequest, Sequence[Tuple[str, str]]]:
|
|
167
|
+
"""Pre-rpc interceptor for get_ekm_connections
|
|
168
|
+
|
|
169
|
+
Override in a subclass to manipulate the request or metadata
|
|
170
|
+
before they are sent to the CloudControlsPartnerCore server.
|
|
171
|
+
"""
|
|
172
|
+
return request, metadata
|
|
173
|
+
|
|
174
|
+
def post_get_ekm_connections(
|
|
175
|
+
self, response: ekm_connections.EkmConnections
|
|
176
|
+
) -> ekm_connections.EkmConnections:
|
|
177
|
+
"""Post-rpc interceptor for get_ekm_connections
|
|
178
|
+
|
|
179
|
+
Override in a subclass to manipulate the response
|
|
180
|
+
after it is returned by the CloudControlsPartnerCore server but before
|
|
181
|
+
it is returned to user code.
|
|
182
|
+
"""
|
|
183
|
+
return response
|
|
184
|
+
|
|
185
|
+
def pre_get_partner(
|
|
186
|
+
self, request: partners.GetPartnerRequest, metadata: Sequence[Tuple[str, str]]
|
|
187
|
+
) -> Tuple[partners.GetPartnerRequest, Sequence[Tuple[str, str]]]:
|
|
188
|
+
"""Pre-rpc interceptor for get_partner
|
|
189
|
+
|
|
190
|
+
Override in a subclass to manipulate the request or metadata
|
|
191
|
+
before they are sent to the CloudControlsPartnerCore server.
|
|
192
|
+
"""
|
|
193
|
+
return request, metadata
|
|
194
|
+
|
|
195
|
+
def post_get_partner(self, response: partners.Partner) -> partners.Partner:
|
|
196
|
+
"""Post-rpc interceptor for get_partner
|
|
197
|
+
|
|
198
|
+
Override in a subclass to manipulate the response
|
|
199
|
+
after it is returned by the CloudControlsPartnerCore server but before
|
|
200
|
+
it is returned to user code.
|
|
201
|
+
"""
|
|
202
|
+
return response
|
|
203
|
+
|
|
204
|
+
def pre_get_partner_permissions(
|
|
205
|
+
self,
|
|
206
|
+
request: partner_permissions.GetPartnerPermissionsRequest,
|
|
207
|
+
metadata: Sequence[Tuple[str, str]],
|
|
208
|
+
) -> Tuple[
|
|
209
|
+
partner_permissions.GetPartnerPermissionsRequest, Sequence[Tuple[str, str]]
|
|
210
|
+
]:
|
|
211
|
+
"""Pre-rpc interceptor for get_partner_permissions
|
|
212
|
+
|
|
213
|
+
Override in a subclass to manipulate the request or metadata
|
|
214
|
+
before they are sent to the CloudControlsPartnerCore server.
|
|
215
|
+
"""
|
|
216
|
+
return request, metadata
|
|
217
|
+
|
|
218
|
+
def post_get_partner_permissions(
|
|
219
|
+
self, response: partner_permissions.PartnerPermissions
|
|
220
|
+
) -> partner_permissions.PartnerPermissions:
|
|
221
|
+
"""Post-rpc interceptor for get_partner_permissions
|
|
222
|
+
|
|
223
|
+
Override in a subclass to manipulate the response
|
|
224
|
+
after it is returned by the CloudControlsPartnerCore server but before
|
|
225
|
+
it is returned to user code.
|
|
226
|
+
"""
|
|
227
|
+
return response
|
|
228
|
+
|
|
229
|
+
def pre_get_workload(
|
|
230
|
+
self,
|
|
231
|
+
request: customer_workloads.GetWorkloadRequest,
|
|
232
|
+
metadata: Sequence[Tuple[str, str]],
|
|
233
|
+
) -> Tuple[customer_workloads.GetWorkloadRequest, Sequence[Tuple[str, str]]]:
|
|
234
|
+
"""Pre-rpc interceptor for get_workload
|
|
235
|
+
|
|
236
|
+
Override in a subclass to manipulate the request or metadata
|
|
237
|
+
before they are sent to the CloudControlsPartnerCore server.
|
|
238
|
+
"""
|
|
239
|
+
return request, metadata
|
|
240
|
+
|
|
241
|
+
def post_get_workload(
|
|
242
|
+
self, response: customer_workloads.Workload
|
|
243
|
+
) -> customer_workloads.Workload:
|
|
244
|
+
"""Post-rpc interceptor for get_workload
|
|
245
|
+
|
|
246
|
+
Override in a subclass to manipulate the response
|
|
247
|
+
after it is returned by the CloudControlsPartnerCore server but before
|
|
248
|
+
it is returned to user code.
|
|
249
|
+
"""
|
|
250
|
+
return response
|
|
251
|
+
|
|
252
|
+
def pre_list_access_approval_requests(
|
|
253
|
+
self,
|
|
254
|
+
request: access_approval_requests.ListAccessApprovalRequestsRequest,
|
|
255
|
+
metadata: Sequence[Tuple[str, str]],
|
|
256
|
+
) -> Tuple[
|
|
257
|
+
access_approval_requests.ListAccessApprovalRequestsRequest,
|
|
258
|
+
Sequence[Tuple[str, str]],
|
|
259
|
+
]:
|
|
260
|
+
"""Pre-rpc interceptor for list_access_approval_requests
|
|
261
|
+
|
|
262
|
+
Override in a subclass to manipulate the request or metadata
|
|
263
|
+
before they are sent to the CloudControlsPartnerCore server.
|
|
264
|
+
"""
|
|
265
|
+
return request, metadata
|
|
266
|
+
|
|
267
|
+
def post_list_access_approval_requests(
|
|
268
|
+
self, response: access_approval_requests.ListAccessApprovalRequestsResponse
|
|
269
|
+
) -> access_approval_requests.ListAccessApprovalRequestsResponse:
|
|
270
|
+
"""Post-rpc interceptor for list_access_approval_requests
|
|
271
|
+
|
|
272
|
+
Override in a subclass to manipulate the response
|
|
273
|
+
after it is returned by the CloudControlsPartnerCore server but before
|
|
274
|
+
it is returned to user code.
|
|
275
|
+
"""
|
|
276
|
+
return response
|
|
277
|
+
|
|
278
|
+
def pre_list_customers(
|
|
279
|
+
self,
|
|
280
|
+
request: customers.ListCustomersRequest,
|
|
281
|
+
metadata: Sequence[Tuple[str, str]],
|
|
282
|
+
) -> Tuple[customers.ListCustomersRequest, Sequence[Tuple[str, str]]]:
|
|
283
|
+
"""Pre-rpc interceptor for list_customers
|
|
284
|
+
|
|
285
|
+
Override in a subclass to manipulate the request or metadata
|
|
286
|
+
before they are sent to the CloudControlsPartnerCore server.
|
|
287
|
+
"""
|
|
288
|
+
return request, metadata
|
|
289
|
+
|
|
290
|
+
def post_list_customers(
|
|
291
|
+
self, response: customers.ListCustomersResponse
|
|
292
|
+
) -> customers.ListCustomersResponse:
|
|
293
|
+
"""Post-rpc interceptor for list_customers
|
|
294
|
+
|
|
295
|
+
Override in a subclass to manipulate the response
|
|
296
|
+
after it is returned by the CloudControlsPartnerCore server but before
|
|
297
|
+
it is returned to user code.
|
|
298
|
+
"""
|
|
299
|
+
return response
|
|
300
|
+
|
|
301
|
+
def pre_list_workloads(
|
|
302
|
+
self,
|
|
303
|
+
request: customer_workloads.ListWorkloadsRequest,
|
|
304
|
+
metadata: Sequence[Tuple[str, str]],
|
|
305
|
+
) -> Tuple[customer_workloads.ListWorkloadsRequest, Sequence[Tuple[str, str]]]:
|
|
306
|
+
"""Pre-rpc interceptor for list_workloads
|
|
307
|
+
|
|
308
|
+
Override in a subclass to manipulate the request or metadata
|
|
309
|
+
before they are sent to the CloudControlsPartnerCore server.
|
|
310
|
+
"""
|
|
311
|
+
return request, metadata
|
|
312
|
+
|
|
313
|
+
def post_list_workloads(
|
|
314
|
+
self, response: customer_workloads.ListWorkloadsResponse
|
|
315
|
+
) -> customer_workloads.ListWorkloadsResponse:
|
|
316
|
+
"""Post-rpc interceptor for list_workloads
|
|
317
|
+
|
|
318
|
+
Override in a subclass to manipulate the response
|
|
319
|
+
after it is returned by the CloudControlsPartnerCore server but before
|
|
320
|
+
it is returned to user code.
|
|
321
|
+
"""
|
|
322
|
+
return response
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
@dataclasses.dataclass
|
|
326
|
+
class CloudControlsPartnerCoreRestStub:
|
|
327
|
+
_session: AuthorizedSession
|
|
328
|
+
_host: str
|
|
329
|
+
_interceptor: CloudControlsPartnerCoreRestInterceptor
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
class CloudControlsPartnerCoreRestTransport(CloudControlsPartnerCoreTransport):
|
|
333
|
+
"""REST backend transport for CloudControlsPartnerCore.
|
|
334
|
+
|
|
335
|
+
Service describing handlers for resources
|
|
336
|
+
|
|
337
|
+
This class defines the same methods as the primary client, so the
|
|
338
|
+
primary client can load the underlying transport implementation
|
|
339
|
+
and call it.
|
|
340
|
+
|
|
341
|
+
It sends JSON representations of protocol buffers over HTTP/1.1
|
|
342
|
+
|
|
343
|
+
"""
|
|
344
|
+
|
|
345
|
+
def __init__(
|
|
346
|
+
self,
|
|
347
|
+
*,
|
|
348
|
+
host: str = "cloudcontrolspartner.googleapis.com",
|
|
349
|
+
credentials: Optional[ga_credentials.Credentials] = None,
|
|
350
|
+
credentials_file: Optional[str] = None,
|
|
351
|
+
scopes: Optional[Sequence[str]] = None,
|
|
352
|
+
client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
|
|
353
|
+
quota_project_id: Optional[str] = None,
|
|
354
|
+
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
|
|
355
|
+
always_use_jwt_access: Optional[bool] = False,
|
|
356
|
+
url_scheme: str = "https",
|
|
357
|
+
interceptor: Optional[CloudControlsPartnerCoreRestInterceptor] = None,
|
|
358
|
+
api_audience: Optional[str] = None,
|
|
359
|
+
) -> None:
|
|
360
|
+
"""Instantiate the transport.
|
|
361
|
+
|
|
362
|
+
Args:
|
|
363
|
+
host (Optional[str]):
|
|
364
|
+
The hostname to connect to (default: 'cloudcontrolspartner.googleapis.com').
|
|
365
|
+
credentials (Optional[google.auth.credentials.Credentials]): The
|
|
366
|
+
authorization credentials to attach to requests. These
|
|
367
|
+
credentials identify the application to the service; if none
|
|
368
|
+
are specified, the client will attempt to ascertain the
|
|
369
|
+
credentials from the environment.
|
|
370
|
+
|
|
371
|
+
credentials_file (Optional[str]): A file with credentials that can
|
|
372
|
+
be loaded with :func:`google.auth.load_credentials_from_file`.
|
|
373
|
+
This argument is ignored if ``channel`` is provided.
|
|
374
|
+
scopes (Optional(Sequence[str])): A list of scopes. This argument is
|
|
375
|
+
ignored if ``channel`` is provided.
|
|
376
|
+
client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client
|
|
377
|
+
certificate to configure mutual TLS HTTP channel. It is ignored
|
|
378
|
+
if ``channel`` is provided.
|
|
379
|
+
quota_project_id (Optional[str]): An optional project to use for billing
|
|
380
|
+
and quota.
|
|
381
|
+
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
|
|
382
|
+
The client info used to send a user-agent string along with
|
|
383
|
+
API requests. If ``None``, then default info will be used.
|
|
384
|
+
Generally, you only need to set this if you are developing
|
|
385
|
+
your own client library.
|
|
386
|
+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
|
|
387
|
+
be used for service account credentials.
|
|
388
|
+
url_scheme: the protocol scheme for the API endpoint. Normally
|
|
389
|
+
"https", but for testing or local servers,
|
|
390
|
+
"http" can be specified.
|
|
391
|
+
"""
|
|
392
|
+
# Run the base constructor
|
|
393
|
+
# TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc.
|
|
394
|
+
# TODO: When custom host (api_endpoint) is set, `scopes` must *also* be set on the
|
|
395
|
+
# credentials object
|
|
396
|
+
maybe_url_match = re.match("^(?P<scheme>http(?:s)?://)?(?P<host>.*)$", host)
|
|
397
|
+
if maybe_url_match is None:
|
|
398
|
+
raise ValueError(
|
|
399
|
+
f"Unexpected hostname structure: {host}"
|
|
400
|
+
) # pragma: NO COVER
|
|
401
|
+
|
|
402
|
+
url_match_items = maybe_url_match.groupdict()
|
|
403
|
+
|
|
404
|
+
host = f"{url_scheme}://{host}" if not url_match_items["scheme"] else host
|
|
405
|
+
|
|
406
|
+
super().__init__(
|
|
407
|
+
host=host,
|
|
408
|
+
credentials=credentials,
|
|
409
|
+
client_info=client_info,
|
|
410
|
+
always_use_jwt_access=always_use_jwt_access,
|
|
411
|
+
api_audience=api_audience,
|
|
412
|
+
)
|
|
413
|
+
self._session = AuthorizedSession(
|
|
414
|
+
self._credentials, default_host=self.DEFAULT_HOST
|
|
415
|
+
)
|
|
416
|
+
if client_cert_source_for_mtls:
|
|
417
|
+
self._session.configure_mtls_channel(client_cert_source_for_mtls)
|
|
418
|
+
self._interceptor = interceptor or CloudControlsPartnerCoreRestInterceptor()
|
|
419
|
+
self._prep_wrapped_messages(client_info)
|
|
420
|
+
|
|
421
|
+
class _GetCustomer(CloudControlsPartnerCoreRestStub):
|
|
422
|
+
def __hash__(self):
|
|
423
|
+
return hash("GetCustomer")
|
|
424
|
+
|
|
425
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
426
|
+
|
|
427
|
+
@classmethod
|
|
428
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
429
|
+
return {
|
|
430
|
+
k: v
|
|
431
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
432
|
+
if k not in message_dict
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
def __call__(
|
|
436
|
+
self,
|
|
437
|
+
request: customers.GetCustomerRequest,
|
|
438
|
+
*,
|
|
439
|
+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
440
|
+
timeout: Optional[float] = None,
|
|
441
|
+
metadata: Sequence[Tuple[str, str]] = (),
|
|
442
|
+
) -> customers.Customer:
|
|
443
|
+
r"""Call the get customer method over HTTP.
|
|
444
|
+
|
|
445
|
+
Args:
|
|
446
|
+
request (~.customers.GetCustomerRequest):
|
|
447
|
+
The request object. Message for getting a customer
|
|
448
|
+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
|
|
449
|
+
should be retried.
|
|
450
|
+
timeout (float): The timeout for this request.
|
|
451
|
+
metadata (Sequence[Tuple[str, str]]): Strings which should be
|
|
452
|
+
sent along with the request as metadata.
|
|
453
|
+
|
|
454
|
+
Returns:
|
|
455
|
+
~.customers.Customer:
|
|
456
|
+
Contains metadata around a Cloud
|
|
457
|
+
Controls Partner Customer
|
|
458
|
+
|
|
459
|
+
"""
|
|
460
|
+
|
|
461
|
+
http_options: List[Dict[str, str]] = [
|
|
462
|
+
{
|
|
463
|
+
"method": "get",
|
|
464
|
+
"uri": "/v1/{name=organizations/*/locations/*/customers/*}",
|
|
465
|
+
},
|
|
466
|
+
]
|
|
467
|
+
request, metadata = self._interceptor.pre_get_customer(request, metadata)
|
|
468
|
+
pb_request = customers.GetCustomerRequest.pb(request)
|
|
469
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
470
|
+
|
|
471
|
+
uri = transcoded_request["uri"]
|
|
472
|
+
method = transcoded_request["method"]
|
|
473
|
+
|
|
474
|
+
# Jsonify the query params
|
|
475
|
+
query_params = json.loads(
|
|
476
|
+
json_format.MessageToJson(
|
|
477
|
+
transcoded_request["query_params"],
|
|
478
|
+
use_integers_for_enums=True,
|
|
479
|
+
)
|
|
480
|
+
)
|
|
481
|
+
query_params.update(self._get_unset_required_fields(query_params))
|
|
482
|
+
|
|
483
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
484
|
+
|
|
485
|
+
# Send the request
|
|
486
|
+
headers = dict(metadata)
|
|
487
|
+
headers["Content-Type"] = "application/json"
|
|
488
|
+
response = getattr(self._session, method)(
|
|
489
|
+
"{host}{uri}".format(host=self._host, uri=uri),
|
|
490
|
+
timeout=timeout,
|
|
491
|
+
headers=headers,
|
|
492
|
+
params=rest_helpers.flatten_query_params(query_params, strict=True),
|
|
493
|
+
)
|
|
494
|
+
|
|
495
|
+
# In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception
|
|
496
|
+
# subclass.
|
|
497
|
+
if response.status_code >= 400:
|
|
498
|
+
raise core_exceptions.from_http_response(response)
|
|
499
|
+
|
|
500
|
+
# Return the response
|
|
501
|
+
resp = customers.Customer()
|
|
502
|
+
pb_resp = customers.Customer.pb(resp)
|
|
503
|
+
|
|
504
|
+
json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True)
|
|
505
|
+
resp = self._interceptor.post_get_customer(resp)
|
|
506
|
+
return resp
|
|
507
|
+
|
|
508
|
+
class _GetEkmConnections(CloudControlsPartnerCoreRestStub):
|
|
509
|
+
def __hash__(self):
|
|
510
|
+
return hash("GetEkmConnections")
|
|
511
|
+
|
|
512
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
513
|
+
|
|
514
|
+
@classmethod
|
|
515
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
516
|
+
return {
|
|
517
|
+
k: v
|
|
518
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
519
|
+
if k not in message_dict
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
def __call__(
|
|
523
|
+
self,
|
|
524
|
+
request: ekm_connections.GetEkmConnectionsRequest,
|
|
525
|
+
*,
|
|
526
|
+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
527
|
+
timeout: Optional[float] = None,
|
|
528
|
+
metadata: Sequence[Tuple[str, str]] = (),
|
|
529
|
+
) -> ekm_connections.EkmConnections:
|
|
530
|
+
r"""Call the get ekm connections method over HTTP.
|
|
531
|
+
|
|
532
|
+
Args:
|
|
533
|
+
request (~.ekm_connections.GetEkmConnectionsRequest):
|
|
534
|
+
The request object. Request for getting the EKM
|
|
535
|
+
connections associated with a workload
|
|
536
|
+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
|
|
537
|
+
should be retried.
|
|
538
|
+
timeout (float): The timeout for this request.
|
|
539
|
+
metadata (Sequence[Tuple[str, str]]): Strings which should be
|
|
540
|
+
sent along with the request as metadata.
|
|
541
|
+
|
|
542
|
+
Returns:
|
|
543
|
+
~.ekm_connections.EkmConnections:
|
|
544
|
+
The EKM connections associated with a
|
|
545
|
+
workload
|
|
546
|
+
|
|
547
|
+
"""
|
|
548
|
+
|
|
549
|
+
http_options: List[Dict[str, str]] = [
|
|
550
|
+
{
|
|
551
|
+
"method": "get",
|
|
552
|
+
"uri": "/v1/{name=organizations/*/locations/*/customers/*/workloads/*/ekmConnections}",
|
|
553
|
+
},
|
|
554
|
+
]
|
|
555
|
+
request, metadata = self._interceptor.pre_get_ekm_connections(
|
|
556
|
+
request, metadata
|
|
557
|
+
)
|
|
558
|
+
pb_request = ekm_connections.GetEkmConnectionsRequest.pb(request)
|
|
559
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
560
|
+
|
|
561
|
+
uri = transcoded_request["uri"]
|
|
562
|
+
method = transcoded_request["method"]
|
|
563
|
+
|
|
564
|
+
# Jsonify the query params
|
|
565
|
+
query_params = json.loads(
|
|
566
|
+
json_format.MessageToJson(
|
|
567
|
+
transcoded_request["query_params"],
|
|
568
|
+
use_integers_for_enums=True,
|
|
569
|
+
)
|
|
570
|
+
)
|
|
571
|
+
query_params.update(self._get_unset_required_fields(query_params))
|
|
572
|
+
|
|
573
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
574
|
+
|
|
575
|
+
# Send the request
|
|
576
|
+
headers = dict(metadata)
|
|
577
|
+
headers["Content-Type"] = "application/json"
|
|
578
|
+
response = getattr(self._session, method)(
|
|
579
|
+
"{host}{uri}".format(host=self._host, uri=uri),
|
|
580
|
+
timeout=timeout,
|
|
581
|
+
headers=headers,
|
|
582
|
+
params=rest_helpers.flatten_query_params(query_params, strict=True),
|
|
583
|
+
)
|
|
584
|
+
|
|
585
|
+
# In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception
|
|
586
|
+
# subclass.
|
|
587
|
+
if response.status_code >= 400:
|
|
588
|
+
raise core_exceptions.from_http_response(response)
|
|
589
|
+
|
|
590
|
+
# Return the response
|
|
591
|
+
resp = ekm_connections.EkmConnections()
|
|
592
|
+
pb_resp = ekm_connections.EkmConnections.pb(resp)
|
|
593
|
+
|
|
594
|
+
json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True)
|
|
595
|
+
resp = self._interceptor.post_get_ekm_connections(resp)
|
|
596
|
+
return resp
|
|
597
|
+
|
|
598
|
+
class _GetPartner(CloudControlsPartnerCoreRestStub):
|
|
599
|
+
def __hash__(self):
|
|
600
|
+
return hash("GetPartner")
|
|
601
|
+
|
|
602
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
603
|
+
|
|
604
|
+
@classmethod
|
|
605
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
606
|
+
return {
|
|
607
|
+
k: v
|
|
608
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
609
|
+
if k not in message_dict
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
def __call__(
|
|
613
|
+
self,
|
|
614
|
+
request: partners.GetPartnerRequest,
|
|
615
|
+
*,
|
|
616
|
+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
617
|
+
timeout: Optional[float] = None,
|
|
618
|
+
metadata: Sequence[Tuple[str, str]] = (),
|
|
619
|
+
) -> partners.Partner:
|
|
620
|
+
r"""Call the get partner method over HTTP.
|
|
621
|
+
|
|
622
|
+
Args:
|
|
623
|
+
request (~.partners.GetPartnerRequest):
|
|
624
|
+
The request object. Message for getting a Partner
|
|
625
|
+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
|
|
626
|
+
should be retried.
|
|
627
|
+
timeout (float): The timeout for this request.
|
|
628
|
+
metadata (Sequence[Tuple[str, str]]): Strings which should be
|
|
629
|
+
sent along with the request as metadata.
|
|
630
|
+
|
|
631
|
+
Returns:
|
|
632
|
+
~.partners.Partner:
|
|
633
|
+
Message describing Partner resource
|
|
634
|
+
"""
|
|
635
|
+
|
|
636
|
+
http_options: List[Dict[str, str]] = [
|
|
637
|
+
{
|
|
638
|
+
"method": "get",
|
|
639
|
+
"uri": "/v1/{name=organizations/*/locations/*/partner}",
|
|
640
|
+
},
|
|
641
|
+
]
|
|
642
|
+
request, metadata = self._interceptor.pre_get_partner(request, metadata)
|
|
643
|
+
pb_request = partners.GetPartnerRequest.pb(request)
|
|
644
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
645
|
+
|
|
646
|
+
uri = transcoded_request["uri"]
|
|
647
|
+
method = transcoded_request["method"]
|
|
648
|
+
|
|
649
|
+
# Jsonify the query params
|
|
650
|
+
query_params = json.loads(
|
|
651
|
+
json_format.MessageToJson(
|
|
652
|
+
transcoded_request["query_params"],
|
|
653
|
+
use_integers_for_enums=True,
|
|
654
|
+
)
|
|
655
|
+
)
|
|
656
|
+
query_params.update(self._get_unset_required_fields(query_params))
|
|
657
|
+
|
|
658
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
659
|
+
|
|
660
|
+
# Send the request
|
|
661
|
+
headers = dict(metadata)
|
|
662
|
+
headers["Content-Type"] = "application/json"
|
|
663
|
+
response = getattr(self._session, method)(
|
|
664
|
+
"{host}{uri}".format(host=self._host, uri=uri),
|
|
665
|
+
timeout=timeout,
|
|
666
|
+
headers=headers,
|
|
667
|
+
params=rest_helpers.flatten_query_params(query_params, strict=True),
|
|
668
|
+
)
|
|
669
|
+
|
|
670
|
+
# In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception
|
|
671
|
+
# subclass.
|
|
672
|
+
if response.status_code >= 400:
|
|
673
|
+
raise core_exceptions.from_http_response(response)
|
|
674
|
+
|
|
675
|
+
# Return the response
|
|
676
|
+
resp = partners.Partner()
|
|
677
|
+
pb_resp = partners.Partner.pb(resp)
|
|
678
|
+
|
|
679
|
+
json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True)
|
|
680
|
+
resp = self._interceptor.post_get_partner(resp)
|
|
681
|
+
return resp
|
|
682
|
+
|
|
683
|
+
class _GetPartnerPermissions(CloudControlsPartnerCoreRestStub):
|
|
684
|
+
def __hash__(self):
|
|
685
|
+
return hash("GetPartnerPermissions")
|
|
686
|
+
|
|
687
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
688
|
+
|
|
689
|
+
@classmethod
|
|
690
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
691
|
+
return {
|
|
692
|
+
k: v
|
|
693
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
694
|
+
if k not in message_dict
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
def __call__(
|
|
698
|
+
self,
|
|
699
|
+
request: partner_permissions.GetPartnerPermissionsRequest,
|
|
700
|
+
*,
|
|
701
|
+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
702
|
+
timeout: Optional[float] = None,
|
|
703
|
+
metadata: Sequence[Tuple[str, str]] = (),
|
|
704
|
+
) -> partner_permissions.PartnerPermissions:
|
|
705
|
+
r"""Call the get partner permissions method over HTTP.
|
|
706
|
+
|
|
707
|
+
Args:
|
|
708
|
+
request (~.partner_permissions.GetPartnerPermissionsRequest):
|
|
709
|
+
The request object. Request for getting the partner
|
|
710
|
+
permissions granted for a workload
|
|
711
|
+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
|
|
712
|
+
should be retried.
|
|
713
|
+
timeout (float): The timeout for this request.
|
|
714
|
+
metadata (Sequence[Tuple[str, str]]): Strings which should be
|
|
715
|
+
sent along with the request as metadata.
|
|
716
|
+
|
|
717
|
+
Returns:
|
|
718
|
+
~.partner_permissions.PartnerPermissions:
|
|
719
|
+
The permissions granted to the
|
|
720
|
+
partner for a workload
|
|
721
|
+
|
|
722
|
+
"""
|
|
723
|
+
|
|
724
|
+
http_options: List[Dict[str, str]] = [
|
|
725
|
+
{
|
|
726
|
+
"method": "get",
|
|
727
|
+
"uri": "/v1/{name=organizations/*/locations/*/customers/*/workloads/*/partnerPermissions}",
|
|
728
|
+
},
|
|
729
|
+
]
|
|
730
|
+
request, metadata = self._interceptor.pre_get_partner_permissions(
|
|
731
|
+
request, metadata
|
|
732
|
+
)
|
|
733
|
+
pb_request = partner_permissions.GetPartnerPermissionsRequest.pb(request)
|
|
734
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
735
|
+
|
|
736
|
+
uri = transcoded_request["uri"]
|
|
737
|
+
method = transcoded_request["method"]
|
|
738
|
+
|
|
739
|
+
# Jsonify the query params
|
|
740
|
+
query_params = json.loads(
|
|
741
|
+
json_format.MessageToJson(
|
|
742
|
+
transcoded_request["query_params"],
|
|
743
|
+
use_integers_for_enums=True,
|
|
744
|
+
)
|
|
745
|
+
)
|
|
746
|
+
query_params.update(self._get_unset_required_fields(query_params))
|
|
747
|
+
|
|
748
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
749
|
+
|
|
750
|
+
# Send the request
|
|
751
|
+
headers = dict(metadata)
|
|
752
|
+
headers["Content-Type"] = "application/json"
|
|
753
|
+
response = getattr(self._session, method)(
|
|
754
|
+
"{host}{uri}".format(host=self._host, uri=uri),
|
|
755
|
+
timeout=timeout,
|
|
756
|
+
headers=headers,
|
|
757
|
+
params=rest_helpers.flatten_query_params(query_params, strict=True),
|
|
758
|
+
)
|
|
759
|
+
|
|
760
|
+
# In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception
|
|
761
|
+
# subclass.
|
|
762
|
+
if response.status_code >= 400:
|
|
763
|
+
raise core_exceptions.from_http_response(response)
|
|
764
|
+
|
|
765
|
+
# Return the response
|
|
766
|
+
resp = partner_permissions.PartnerPermissions()
|
|
767
|
+
pb_resp = partner_permissions.PartnerPermissions.pb(resp)
|
|
768
|
+
|
|
769
|
+
json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True)
|
|
770
|
+
resp = self._interceptor.post_get_partner_permissions(resp)
|
|
771
|
+
return resp
|
|
772
|
+
|
|
773
|
+
class _GetWorkload(CloudControlsPartnerCoreRestStub):
|
|
774
|
+
def __hash__(self):
|
|
775
|
+
return hash("GetWorkload")
|
|
776
|
+
|
|
777
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
778
|
+
|
|
779
|
+
@classmethod
|
|
780
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
781
|
+
return {
|
|
782
|
+
k: v
|
|
783
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
784
|
+
if k not in message_dict
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
def __call__(
|
|
788
|
+
self,
|
|
789
|
+
request: customer_workloads.GetWorkloadRequest,
|
|
790
|
+
*,
|
|
791
|
+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
792
|
+
timeout: Optional[float] = None,
|
|
793
|
+
metadata: Sequence[Tuple[str, str]] = (),
|
|
794
|
+
) -> customer_workloads.Workload:
|
|
795
|
+
r"""Call the get workload method over HTTP.
|
|
796
|
+
|
|
797
|
+
Args:
|
|
798
|
+
request (~.customer_workloads.GetWorkloadRequest):
|
|
799
|
+
The request object. Message for getting a customer
|
|
800
|
+
workload.
|
|
801
|
+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
|
|
802
|
+
should be retried.
|
|
803
|
+
timeout (float): The timeout for this request.
|
|
804
|
+
metadata (Sequence[Tuple[str, str]]): Strings which should be
|
|
805
|
+
sent along with the request as metadata.
|
|
806
|
+
|
|
807
|
+
Returns:
|
|
808
|
+
~.customer_workloads.Workload:
|
|
809
|
+
Contains metadata around the `Workload
|
|
810
|
+
resource <https://cloud.google.com/assured-workloads/docs/reference/rest/Shared.Types/Workload>`__
|
|
811
|
+
in the Assured Workloads API.
|
|
812
|
+
|
|
813
|
+
"""
|
|
814
|
+
|
|
815
|
+
http_options: List[Dict[str, str]] = [
|
|
816
|
+
{
|
|
817
|
+
"method": "get",
|
|
818
|
+
"uri": "/v1/{name=organizations/*/locations/*/customers/*/workloads/*}",
|
|
819
|
+
},
|
|
820
|
+
]
|
|
821
|
+
request, metadata = self._interceptor.pre_get_workload(request, metadata)
|
|
822
|
+
pb_request = customer_workloads.GetWorkloadRequest.pb(request)
|
|
823
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
824
|
+
|
|
825
|
+
uri = transcoded_request["uri"]
|
|
826
|
+
method = transcoded_request["method"]
|
|
827
|
+
|
|
828
|
+
# Jsonify the query params
|
|
829
|
+
query_params = json.loads(
|
|
830
|
+
json_format.MessageToJson(
|
|
831
|
+
transcoded_request["query_params"],
|
|
832
|
+
use_integers_for_enums=True,
|
|
833
|
+
)
|
|
834
|
+
)
|
|
835
|
+
query_params.update(self._get_unset_required_fields(query_params))
|
|
836
|
+
|
|
837
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
838
|
+
|
|
839
|
+
# Send the request
|
|
840
|
+
headers = dict(metadata)
|
|
841
|
+
headers["Content-Type"] = "application/json"
|
|
842
|
+
response = getattr(self._session, method)(
|
|
843
|
+
"{host}{uri}".format(host=self._host, uri=uri),
|
|
844
|
+
timeout=timeout,
|
|
845
|
+
headers=headers,
|
|
846
|
+
params=rest_helpers.flatten_query_params(query_params, strict=True),
|
|
847
|
+
)
|
|
848
|
+
|
|
849
|
+
# In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception
|
|
850
|
+
# subclass.
|
|
851
|
+
if response.status_code >= 400:
|
|
852
|
+
raise core_exceptions.from_http_response(response)
|
|
853
|
+
|
|
854
|
+
# Return the response
|
|
855
|
+
resp = customer_workloads.Workload()
|
|
856
|
+
pb_resp = customer_workloads.Workload.pb(resp)
|
|
857
|
+
|
|
858
|
+
json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True)
|
|
859
|
+
resp = self._interceptor.post_get_workload(resp)
|
|
860
|
+
return resp
|
|
861
|
+
|
|
862
|
+
class _ListAccessApprovalRequests(CloudControlsPartnerCoreRestStub):
|
|
863
|
+
def __hash__(self):
|
|
864
|
+
return hash("ListAccessApprovalRequests")
|
|
865
|
+
|
|
866
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
867
|
+
|
|
868
|
+
@classmethod
|
|
869
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
870
|
+
return {
|
|
871
|
+
k: v
|
|
872
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
873
|
+
if k not in message_dict
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
def __call__(
|
|
877
|
+
self,
|
|
878
|
+
request: access_approval_requests.ListAccessApprovalRequestsRequest,
|
|
879
|
+
*,
|
|
880
|
+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
881
|
+
timeout: Optional[float] = None,
|
|
882
|
+
metadata: Sequence[Tuple[str, str]] = (),
|
|
883
|
+
) -> access_approval_requests.ListAccessApprovalRequestsResponse:
|
|
884
|
+
r"""Call the list access approval
|
|
885
|
+
requests method over HTTP.
|
|
886
|
+
|
|
887
|
+
Args:
|
|
888
|
+
request (~.access_approval_requests.ListAccessApprovalRequestsRequest):
|
|
889
|
+
The request object. Request for getting the access
|
|
890
|
+
requests associated with a workload.
|
|
891
|
+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
|
|
892
|
+
should be retried.
|
|
893
|
+
timeout (float): The timeout for this request.
|
|
894
|
+
metadata (Sequence[Tuple[str, str]]): Strings which should be
|
|
895
|
+
sent along with the request as metadata.
|
|
896
|
+
|
|
897
|
+
Returns:
|
|
898
|
+
~.access_approval_requests.ListAccessApprovalRequestsResponse:
|
|
899
|
+
Response message for list access
|
|
900
|
+
requests.
|
|
901
|
+
|
|
902
|
+
"""
|
|
903
|
+
|
|
904
|
+
http_options: List[Dict[str, str]] = [
|
|
905
|
+
{
|
|
906
|
+
"method": "get",
|
|
907
|
+
"uri": "/v1/{parent=organizations/*/locations/*/customers/*/workloads/*}/accessApprovalRequests",
|
|
908
|
+
},
|
|
909
|
+
]
|
|
910
|
+
request, metadata = self._interceptor.pre_list_access_approval_requests(
|
|
911
|
+
request, metadata
|
|
912
|
+
)
|
|
913
|
+
pb_request = access_approval_requests.ListAccessApprovalRequestsRequest.pb(
|
|
914
|
+
request
|
|
915
|
+
)
|
|
916
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
917
|
+
|
|
918
|
+
uri = transcoded_request["uri"]
|
|
919
|
+
method = transcoded_request["method"]
|
|
920
|
+
|
|
921
|
+
# Jsonify the query params
|
|
922
|
+
query_params = json.loads(
|
|
923
|
+
json_format.MessageToJson(
|
|
924
|
+
transcoded_request["query_params"],
|
|
925
|
+
use_integers_for_enums=True,
|
|
926
|
+
)
|
|
927
|
+
)
|
|
928
|
+
query_params.update(self._get_unset_required_fields(query_params))
|
|
929
|
+
|
|
930
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
931
|
+
|
|
932
|
+
# Send the request
|
|
933
|
+
headers = dict(metadata)
|
|
934
|
+
headers["Content-Type"] = "application/json"
|
|
935
|
+
response = getattr(self._session, method)(
|
|
936
|
+
"{host}{uri}".format(host=self._host, uri=uri),
|
|
937
|
+
timeout=timeout,
|
|
938
|
+
headers=headers,
|
|
939
|
+
params=rest_helpers.flatten_query_params(query_params, strict=True),
|
|
940
|
+
)
|
|
941
|
+
|
|
942
|
+
# In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception
|
|
943
|
+
# subclass.
|
|
944
|
+
if response.status_code >= 400:
|
|
945
|
+
raise core_exceptions.from_http_response(response)
|
|
946
|
+
|
|
947
|
+
# Return the response
|
|
948
|
+
resp = access_approval_requests.ListAccessApprovalRequestsResponse()
|
|
949
|
+
pb_resp = access_approval_requests.ListAccessApprovalRequestsResponse.pb(
|
|
950
|
+
resp
|
|
951
|
+
)
|
|
952
|
+
|
|
953
|
+
json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True)
|
|
954
|
+
resp = self._interceptor.post_list_access_approval_requests(resp)
|
|
955
|
+
return resp
|
|
956
|
+
|
|
957
|
+
class _ListCustomers(CloudControlsPartnerCoreRestStub):
|
|
958
|
+
def __hash__(self):
|
|
959
|
+
return hash("ListCustomers")
|
|
960
|
+
|
|
961
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
962
|
+
|
|
963
|
+
@classmethod
|
|
964
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
965
|
+
return {
|
|
966
|
+
k: v
|
|
967
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
968
|
+
if k not in message_dict
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
def __call__(
|
|
972
|
+
self,
|
|
973
|
+
request: customers.ListCustomersRequest,
|
|
974
|
+
*,
|
|
975
|
+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
976
|
+
timeout: Optional[float] = None,
|
|
977
|
+
metadata: Sequence[Tuple[str, str]] = (),
|
|
978
|
+
) -> customers.ListCustomersResponse:
|
|
979
|
+
r"""Call the list customers method over HTTP.
|
|
980
|
+
|
|
981
|
+
Args:
|
|
982
|
+
request (~.customers.ListCustomersRequest):
|
|
983
|
+
The request object. Request to list customers
|
|
984
|
+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
|
|
985
|
+
should be retried.
|
|
986
|
+
timeout (float): The timeout for this request.
|
|
987
|
+
metadata (Sequence[Tuple[str, str]]): Strings which should be
|
|
988
|
+
sent along with the request as metadata.
|
|
989
|
+
|
|
990
|
+
Returns:
|
|
991
|
+
~.customers.ListCustomersResponse:
|
|
992
|
+
Response message for list customer
|
|
993
|
+
Customers requests
|
|
994
|
+
|
|
995
|
+
"""
|
|
996
|
+
|
|
997
|
+
http_options: List[Dict[str, str]] = [
|
|
998
|
+
{
|
|
999
|
+
"method": "get",
|
|
1000
|
+
"uri": "/v1/{parent=organizations/*/locations/*}/customers",
|
|
1001
|
+
},
|
|
1002
|
+
]
|
|
1003
|
+
request, metadata = self._interceptor.pre_list_customers(request, metadata)
|
|
1004
|
+
pb_request = customers.ListCustomersRequest.pb(request)
|
|
1005
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1006
|
+
|
|
1007
|
+
uri = transcoded_request["uri"]
|
|
1008
|
+
method = transcoded_request["method"]
|
|
1009
|
+
|
|
1010
|
+
# Jsonify the query params
|
|
1011
|
+
query_params = json.loads(
|
|
1012
|
+
json_format.MessageToJson(
|
|
1013
|
+
transcoded_request["query_params"],
|
|
1014
|
+
use_integers_for_enums=True,
|
|
1015
|
+
)
|
|
1016
|
+
)
|
|
1017
|
+
query_params.update(self._get_unset_required_fields(query_params))
|
|
1018
|
+
|
|
1019
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1020
|
+
|
|
1021
|
+
# Send the request
|
|
1022
|
+
headers = dict(metadata)
|
|
1023
|
+
headers["Content-Type"] = "application/json"
|
|
1024
|
+
response = getattr(self._session, method)(
|
|
1025
|
+
"{host}{uri}".format(host=self._host, uri=uri),
|
|
1026
|
+
timeout=timeout,
|
|
1027
|
+
headers=headers,
|
|
1028
|
+
params=rest_helpers.flatten_query_params(query_params, strict=True),
|
|
1029
|
+
)
|
|
1030
|
+
|
|
1031
|
+
# In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception
|
|
1032
|
+
# subclass.
|
|
1033
|
+
if response.status_code >= 400:
|
|
1034
|
+
raise core_exceptions.from_http_response(response)
|
|
1035
|
+
|
|
1036
|
+
# Return the response
|
|
1037
|
+
resp = customers.ListCustomersResponse()
|
|
1038
|
+
pb_resp = customers.ListCustomersResponse.pb(resp)
|
|
1039
|
+
|
|
1040
|
+
json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True)
|
|
1041
|
+
resp = self._interceptor.post_list_customers(resp)
|
|
1042
|
+
return resp
|
|
1043
|
+
|
|
1044
|
+
class _ListWorkloads(CloudControlsPartnerCoreRestStub):
|
|
1045
|
+
def __hash__(self):
|
|
1046
|
+
return hash("ListWorkloads")
|
|
1047
|
+
|
|
1048
|
+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
|
|
1049
|
+
|
|
1050
|
+
@classmethod
|
|
1051
|
+
def _get_unset_required_fields(cls, message_dict):
|
|
1052
|
+
return {
|
|
1053
|
+
k: v
|
|
1054
|
+
for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
|
|
1055
|
+
if k not in message_dict
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
def __call__(
|
|
1059
|
+
self,
|
|
1060
|
+
request: customer_workloads.ListWorkloadsRequest,
|
|
1061
|
+
*,
|
|
1062
|
+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1063
|
+
timeout: Optional[float] = None,
|
|
1064
|
+
metadata: Sequence[Tuple[str, str]] = (),
|
|
1065
|
+
) -> customer_workloads.ListWorkloadsResponse:
|
|
1066
|
+
r"""Call the list workloads method over HTTP.
|
|
1067
|
+
|
|
1068
|
+
Args:
|
|
1069
|
+
request (~.customer_workloads.ListWorkloadsRequest):
|
|
1070
|
+
The request object. Request to list customer workloads.
|
|
1071
|
+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
|
|
1072
|
+
should be retried.
|
|
1073
|
+
timeout (float): The timeout for this request.
|
|
1074
|
+
metadata (Sequence[Tuple[str, str]]): Strings which should be
|
|
1075
|
+
sent along with the request as metadata.
|
|
1076
|
+
|
|
1077
|
+
Returns:
|
|
1078
|
+
~.customer_workloads.ListWorkloadsResponse:
|
|
1079
|
+
Response message for list customer
|
|
1080
|
+
workloads requests.
|
|
1081
|
+
|
|
1082
|
+
"""
|
|
1083
|
+
|
|
1084
|
+
http_options: List[Dict[str, str]] = [
|
|
1085
|
+
{
|
|
1086
|
+
"method": "get",
|
|
1087
|
+
"uri": "/v1/{parent=organizations/*/locations/*/customers/*}/workloads",
|
|
1088
|
+
},
|
|
1089
|
+
]
|
|
1090
|
+
request, metadata = self._interceptor.pre_list_workloads(request, metadata)
|
|
1091
|
+
pb_request = customer_workloads.ListWorkloadsRequest.pb(request)
|
|
1092
|
+
transcoded_request = path_template.transcode(http_options, pb_request)
|
|
1093
|
+
|
|
1094
|
+
uri = transcoded_request["uri"]
|
|
1095
|
+
method = transcoded_request["method"]
|
|
1096
|
+
|
|
1097
|
+
# Jsonify the query params
|
|
1098
|
+
query_params = json.loads(
|
|
1099
|
+
json_format.MessageToJson(
|
|
1100
|
+
transcoded_request["query_params"],
|
|
1101
|
+
use_integers_for_enums=True,
|
|
1102
|
+
)
|
|
1103
|
+
)
|
|
1104
|
+
query_params.update(self._get_unset_required_fields(query_params))
|
|
1105
|
+
|
|
1106
|
+
query_params["$alt"] = "json;enum-encoding=int"
|
|
1107
|
+
|
|
1108
|
+
# Send the request
|
|
1109
|
+
headers = dict(metadata)
|
|
1110
|
+
headers["Content-Type"] = "application/json"
|
|
1111
|
+
response = getattr(self._session, method)(
|
|
1112
|
+
"{host}{uri}".format(host=self._host, uri=uri),
|
|
1113
|
+
timeout=timeout,
|
|
1114
|
+
headers=headers,
|
|
1115
|
+
params=rest_helpers.flatten_query_params(query_params, strict=True),
|
|
1116
|
+
)
|
|
1117
|
+
|
|
1118
|
+
# In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception
|
|
1119
|
+
# subclass.
|
|
1120
|
+
if response.status_code >= 400:
|
|
1121
|
+
raise core_exceptions.from_http_response(response)
|
|
1122
|
+
|
|
1123
|
+
# Return the response
|
|
1124
|
+
resp = customer_workloads.ListWorkloadsResponse()
|
|
1125
|
+
pb_resp = customer_workloads.ListWorkloadsResponse.pb(resp)
|
|
1126
|
+
|
|
1127
|
+
json_format.Parse(response.content, pb_resp, ignore_unknown_fields=True)
|
|
1128
|
+
resp = self._interceptor.post_list_workloads(resp)
|
|
1129
|
+
return resp
|
|
1130
|
+
|
|
1131
|
+
@property
|
|
1132
|
+
def get_customer(
|
|
1133
|
+
self,
|
|
1134
|
+
) -> Callable[[customers.GetCustomerRequest], customers.Customer]:
|
|
1135
|
+
# The return type is fine, but mypy isn't sophisticated enough to determine what's going on here.
|
|
1136
|
+
# In C++ this would require a dynamic_cast
|
|
1137
|
+
return self._GetCustomer(self._session, self._host, self._interceptor) # type: ignore
|
|
1138
|
+
|
|
1139
|
+
@property
|
|
1140
|
+
def get_ekm_connections(
|
|
1141
|
+
self,
|
|
1142
|
+
) -> Callable[
|
|
1143
|
+
[ekm_connections.GetEkmConnectionsRequest], ekm_connections.EkmConnections
|
|
1144
|
+
]:
|
|
1145
|
+
# The return type is fine, but mypy isn't sophisticated enough to determine what's going on here.
|
|
1146
|
+
# In C++ this would require a dynamic_cast
|
|
1147
|
+
return self._GetEkmConnections(self._session, self._host, self._interceptor) # type: ignore
|
|
1148
|
+
|
|
1149
|
+
@property
|
|
1150
|
+
def get_partner(self) -> Callable[[partners.GetPartnerRequest], partners.Partner]:
|
|
1151
|
+
# The return type is fine, but mypy isn't sophisticated enough to determine what's going on here.
|
|
1152
|
+
# In C++ this would require a dynamic_cast
|
|
1153
|
+
return self._GetPartner(self._session, self._host, self._interceptor) # type: ignore
|
|
1154
|
+
|
|
1155
|
+
@property
|
|
1156
|
+
def get_partner_permissions(
|
|
1157
|
+
self,
|
|
1158
|
+
) -> Callable[
|
|
1159
|
+
[partner_permissions.GetPartnerPermissionsRequest],
|
|
1160
|
+
partner_permissions.PartnerPermissions,
|
|
1161
|
+
]:
|
|
1162
|
+
# The return type is fine, but mypy isn't sophisticated enough to determine what's going on here.
|
|
1163
|
+
# In C++ this would require a dynamic_cast
|
|
1164
|
+
return self._GetPartnerPermissions(self._session, self._host, self._interceptor) # type: ignore
|
|
1165
|
+
|
|
1166
|
+
@property
|
|
1167
|
+
def get_workload(
|
|
1168
|
+
self,
|
|
1169
|
+
) -> Callable[[customer_workloads.GetWorkloadRequest], customer_workloads.Workload]:
|
|
1170
|
+
# The return type is fine, but mypy isn't sophisticated enough to determine what's going on here.
|
|
1171
|
+
# In C++ this would require a dynamic_cast
|
|
1172
|
+
return self._GetWorkload(self._session, self._host, self._interceptor) # type: ignore
|
|
1173
|
+
|
|
1174
|
+
@property
|
|
1175
|
+
def list_access_approval_requests(
|
|
1176
|
+
self,
|
|
1177
|
+
) -> Callable[
|
|
1178
|
+
[access_approval_requests.ListAccessApprovalRequestsRequest],
|
|
1179
|
+
access_approval_requests.ListAccessApprovalRequestsResponse,
|
|
1180
|
+
]:
|
|
1181
|
+
# The return type is fine, but mypy isn't sophisticated enough to determine what's going on here.
|
|
1182
|
+
# In C++ this would require a dynamic_cast
|
|
1183
|
+
return self._ListAccessApprovalRequests(self._session, self._host, self._interceptor) # type: ignore
|
|
1184
|
+
|
|
1185
|
+
@property
|
|
1186
|
+
def list_customers(
|
|
1187
|
+
self,
|
|
1188
|
+
) -> Callable[[customers.ListCustomersRequest], customers.ListCustomersResponse]:
|
|
1189
|
+
# The return type is fine, but mypy isn't sophisticated enough to determine what's going on here.
|
|
1190
|
+
# In C++ this would require a dynamic_cast
|
|
1191
|
+
return self._ListCustomers(self._session, self._host, self._interceptor) # type: ignore
|
|
1192
|
+
|
|
1193
|
+
@property
|
|
1194
|
+
def list_workloads(
|
|
1195
|
+
self,
|
|
1196
|
+
) -> Callable[
|
|
1197
|
+
[customer_workloads.ListWorkloadsRequest],
|
|
1198
|
+
customer_workloads.ListWorkloadsResponse,
|
|
1199
|
+
]:
|
|
1200
|
+
# The return type is fine, but mypy isn't sophisticated enough to determine what's going on here.
|
|
1201
|
+
# In C++ this would require a dynamic_cast
|
|
1202
|
+
return self._ListWorkloads(self._session, self._host, self._interceptor) # type: ignore
|
|
1203
|
+
|
|
1204
|
+
@property
|
|
1205
|
+
def kind(self) -> str:
|
|
1206
|
+
return "rest"
|
|
1207
|
+
|
|
1208
|
+
def close(self):
|
|
1209
|
+
self._session.close()
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
__all__ = ("CloudControlsPartnerCoreRestTransport",)
|