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.
Files changed (76) hide show
  1. google/cloud/cloudcontrolspartner/__init__.py +115 -0
  2. google/cloud/cloudcontrolspartner/gapic_version.py +16 -0
  3. google/cloud/cloudcontrolspartner/py.typed +2 -0
  4. google/cloud/cloudcontrolspartner_v1/__init__.py +103 -0
  5. google/cloud/cloudcontrolspartner_v1/gapic_metadata.json +197 -0
  6. google/cloud/cloudcontrolspartner_v1/gapic_version.py +16 -0
  7. google/cloud/cloudcontrolspartner_v1/py.typed +2 -0
  8. google/cloud/cloudcontrolspartner_v1/services/__init__.py +15 -0
  9. google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_core/__init__.py +22 -0
  10. google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_core/async_client.py +1253 -0
  11. google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_core/client.py +1705 -0
  12. google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_core/pagers.py +429 -0
  13. google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_core/transports/__init__.py +41 -0
  14. google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_core/transports/base.py +340 -0
  15. google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_core/transports/grpc.py +466 -0
  16. google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_core/transports/grpc_asyncio.py +472 -0
  17. google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_core/transports/rest.py +1212 -0
  18. google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_monitoring/__init__.py +22 -0
  19. google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_monitoring/async_client.py +528 -0
  20. google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_monitoring/client.py +935 -0
  21. google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_monitoring/pagers.py +155 -0
  22. google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_monitoring/transports/__init__.py +41 -0
  23. google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_monitoring/transports/base.py +194 -0
  24. google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_monitoring/transports/grpc.py +300 -0
  25. google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_monitoring/transports/grpc_asyncio.py +299 -0
  26. google/cloud/cloudcontrolspartner_v1/services/cloud_controls_partner_monitoring/transports/rest.py +434 -0
  27. google/cloud/cloudcontrolspartner_v1/types/__init__.py +82 -0
  28. google/cloud/cloudcontrolspartner_v1/types/access_approval_requests.py +228 -0
  29. google/cloud/cloudcontrolspartner_v1/types/completion_state.py +53 -0
  30. google/cloud/cloudcontrolspartner_v1/types/core.py +93 -0
  31. google/cloud/cloudcontrolspartner_v1/types/customer_workloads.py +300 -0
  32. google/cloud/cloudcontrolspartner_v1/types/customers.py +233 -0
  33. google/cloud/cloudcontrolspartner_v1/types/ekm_connections.py +141 -0
  34. google/cloud/cloudcontrolspartner_v1/types/monitoring.py +24 -0
  35. google/cloud/cloudcontrolspartner_v1/types/partner_permissions.py +94 -0
  36. google/cloud/cloudcontrolspartner_v1/types/partners.py +188 -0
  37. google/cloud/cloudcontrolspartner_v1/types/violations.py +388 -0
  38. google/cloud/cloudcontrolspartner_v1beta/__init__.py +103 -0
  39. google/cloud/cloudcontrolspartner_v1beta/gapic_metadata.json +197 -0
  40. google/cloud/cloudcontrolspartner_v1beta/gapic_version.py +16 -0
  41. google/cloud/cloudcontrolspartner_v1beta/py.typed +2 -0
  42. google/cloud/cloudcontrolspartner_v1beta/services/__init__.py +15 -0
  43. google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_core/__init__.py +22 -0
  44. google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_core/async_client.py +1262 -0
  45. google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_core/client.py +1714 -0
  46. google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_core/pagers.py +429 -0
  47. google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_core/transports/__init__.py +41 -0
  48. google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_core/transports/base.py +340 -0
  49. google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_core/transports/grpc.py +466 -0
  50. google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_core/transports/grpc_asyncio.py +472 -0
  51. google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_core/transports/rest.py +1212 -0
  52. google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_monitoring/__init__.py +22 -0
  53. google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_monitoring/async_client.py +530 -0
  54. google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_monitoring/client.py +937 -0
  55. google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_monitoring/pagers.py +155 -0
  56. google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_monitoring/transports/__init__.py +41 -0
  57. google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_monitoring/transports/base.py +194 -0
  58. google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_monitoring/transports/grpc.py +300 -0
  59. google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_monitoring/transports/grpc_asyncio.py +299 -0
  60. google/cloud/cloudcontrolspartner_v1beta/services/cloud_controls_partner_monitoring/transports/rest.py +434 -0
  61. google/cloud/cloudcontrolspartner_v1beta/types/__init__.py +82 -0
  62. google/cloud/cloudcontrolspartner_v1beta/types/access_approval_requests.py +230 -0
  63. google/cloud/cloudcontrolspartner_v1beta/types/completion_state.py +53 -0
  64. google/cloud/cloudcontrolspartner_v1beta/types/core.py +93 -0
  65. google/cloud/cloudcontrolspartner_v1beta/types/customer_workloads.py +304 -0
  66. google/cloud/cloudcontrolspartner_v1beta/types/customers.py +236 -0
  67. google/cloud/cloudcontrolspartner_v1beta/types/ekm_connections.py +143 -0
  68. google/cloud/cloudcontrolspartner_v1beta/types/monitoring.py +24 -0
  69. google/cloud/cloudcontrolspartner_v1beta/types/partner_permissions.py +96 -0
  70. google/cloud/cloudcontrolspartner_v1beta/types/partners.py +189 -0
  71. google/cloud/cloudcontrolspartner_v1beta/types/violations.py +391 -0
  72. google_cloud_cloudcontrolspartner-0.1.0.dist-info/LICENSE +202 -0
  73. google_cloud_cloudcontrolspartner-0.1.0.dist-info/METADATA +137 -0
  74. google_cloud_cloudcontrolspartner-0.1.0.dist-info/RECORD +76 -0
  75. google_cloud_cloudcontrolspartner-0.1.0.dist-info/WHEEL +5 -0
  76. google_cloud_cloudcontrolspartner-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,472 @@
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
+ from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
17
+ import warnings
18
+
19
+ from google.api_core import gapic_v1, grpc_helpers_async
20
+ from google.auth import credentials as ga_credentials # type: ignore
21
+ from google.auth.transport.grpc import SslCredentials # type: ignore
22
+ import grpc # type: ignore
23
+ from grpc.experimental import aio # type: ignore
24
+
25
+ from google.cloud.cloudcontrolspartner_v1.types import (
26
+ access_approval_requests,
27
+ customer_workloads,
28
+ customers,
29
+ ekm_connections,
30
+ partner_permissions,
31
+ partners,
32
+ )
33
+
34
+ from .base import DEFAULT_CLIENT_INFO, CloudControlsPartnerCoreTransport
35
+ from .grpc import CloudControlsPartnerCoreGrpcTransport
36
+
37
+
38
+ class CloudControlsPartnerCoreGrpcAsyncIOTransport(CloudControlsPartnerCoreTransport):
39
+ """gRPC AsyncIO backend transport for CloudControlsPartnerCore.
40
+
41
+ Service describing handlers for resources
42
+
43
+ This class defines the same methods as the primary client, so the
44
+ primary client can load the underlying transport implementation
45
+ and call it.
46
+
47
+ It sends protocol buffers over the wire using gRPC (which is built on
48
+ top of HTTP/2); the ``grpcio`` package must be installed.
49
+ """
50
+
51
+ _grpc_channel: aio.Channel
52
+ _stubs: Dict[str, Callable] = {}
53
+
54
+ @classmethod
55
+ def create_channel(
56
+ cls,
57
+ host: str = "cloudcontrolspartner.googleapis.com",
58
+ credentials: Optional[ga_credentials.Credentials] = None,
59
+ credentials_file: Optional[str] = None,
60
+ scopes: Optional[Sequence[str]] = None,
61
+ quota_project_id: Optional[str] = None,
62
+ **kwargs,
63
+ ) -> aio.Channel:
64
+ """Create and return a gRPC AsyncIO channel object.
65
+ Args:
66
+ host (Optional[str]): The host for the channel to use.
67
+ credentials (Optional[~.Credentials]): The
68
+ authorization credentials to attach to requests. These
69
+ credentials identify this application to the service. If
70
+ none are specified, the client will attempt to ascertain
71
+ the credentials from the environment.
72
+ credentials_file (Optional[str]): A file with credentials that can
73
+ be loaded with :func:`google.auth.load_credentials_from_file`.
74
+ This argument is ignored if ``channel`` is provided.
75
+ scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
76
+ service. These are only used when credentials are not specified and
77
+ are passed to :func:`google.auth.default`.
78
+ quota_project_id (Optional[str]): An optional project to use for billing
79
+ and quota.
80
+ kwargs (Optional[dict]): Keyword arguments, which are passed to the
81
+ channel creation.
82
+ Returns:
83
+ aio.Channel: A gRPC AsyncIO channel object.
84
+ """
85
+
86
+ return grpc_helpers_async.create_channel(
87
+ host,
88
+ credentials=credentials,
89
+ credentials_file=credentials_file,
90
+ quota_project_id=quota_project_id,
91
+ default_scopes=cls.AUTH_SCOPES,
92
+ scopes=scopes,
93
+ default_host=cls.DEFAULT_HOST,
94
+ **kwargs,
95
+ )
96
+
97
+ def __init__(
98
+ self,
99
+ *,
100
+ host: str = "cloudcontrolspartner.googleapis.com",
101
+ credentials: Optional[ga_credentials.Credentials] = None,
102
+ credentials_file: Optional[str] = None,
103
+ scopes: Optional[Sequence[str]] = None,
104
+ channel: Optional[aio.Channel] = None,
105
+ api_mtls_endpoint: Optional[str] = None,
106
+ client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
107
+ ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
108
+ client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
109
+ quota_project_id: Optional[str] = None,
110
+ client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
111
+ always_use_jwt_access: Optional[bool] = False,
112
+ api_audience: Optional[str] = None,
113
+ ) -> None:
114
+ """Instantiate the transport.
115
+
116
+ Args:
117
+ host (Optional[str]):
118
+ The hostname to connect to (default: 'cloudcontrolspartner.googleapis.com').
119
+ credentials (Optional[google.auth.credentials.Credentials]): The
120
+ authorization credentials to attach to requests. These
121
+ credentials identify the application to the service; if none
122
+ are specified, the client will attempt to ascertain the
123
+ credentials from the environment.
124
+ This argument is ignored if ``channel`` is provided.
125
+ credentials_file (Optional[str]): A file with credentials that can
126
+ be loaded with :func:`google.auth.load_credentials_from_file`.
127
+ This argument is ignored if ``channel`` is provided.
128
+ scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
129
+ service. These are only used when credentials are not specified and
130
+ are passed to :func:`google.auth.default`.
131
+ channel (Optional[aio.Channel]): A ``Channel`` instance through
132
+ which to make calls.
133
+ api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
134
+ If provided, it overrides the ``host`` argument and tries to create
135
+ a mutual TLS channel with client SSL credentials from
136
+ ``client_cert_source`` or application default SSL credentials.
137
+ client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
138
+ Deprecated. A callback to provide client SSL certificate bytes and
139
+ private key bytes, both in PEM format. It is ignored if
140
+ ``api_mtls_endpoint`` is None.
141
+ ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
142
+ for the grpc channel. It is ignored if ``channel`` is provided.
143
+ client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
144
+ A callback to provide client certificate bytes and private key bytes,
145
+ both in PEM format. It is used to configure a mutual TLS channel. It is
146
+ ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
147
+ quota_project_id (Optional[str]): An optional project to use for billing
148
+ and quota.
149
+ client_info (google.api_core.gapic_v1.client_info.ClientInfo):
150
+ The client info used to send a user-agent string along with
151
+ API requests. If ``None``, then default info will be used.
152
+ Generally, you only need to set this if you're developing
153
+ your own client library.
154
+ always_use_jwt_access (Optional[bool]): Whether self signed JWT should
155
+ be used for service account credentials.
156
+
157
+ Raises:
158
+ google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
159
+ creation failed for any reason.
160
+ google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials``
161
+ and ``credentials_file`` are passed.
162
+ """
163
+ self._grpc_channel = None
164
+ self._ssl_channel_credentials = ssl_channel_credentials
165
+ self._stubs: Dict[str, Callable] = {}
166
+
167
+ if api_mtls_endpoint:
168
+ warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning)
169
+ if client_cert_source:
170
+ warnings.warn("client_cert_source is deprecated", DeprecationWarning)
171
+
172
+ if channel:
173
+ # Ignore credentials if a channel was passed.
174
+ credentials = False
175
+ # If a channel was explicitly provided, set it.
176
+ self._grpc_channel = channel
177
+ self._ssl_channel_credentials = None
178
+ else:
179
+ if api_mtls_endpoint:
180
+ host = api_mtls_endpoint
181
+
182
+ # Create SSL credentials with client_cert_source or application
183
+ # default SSL credentials.
184
+ if client_cert_source:
185
+ cert, key = client_cert_source()
186
+ self._ssl_channel_credentials = grpc.ssl_channel_credentials(
187
+ certificate_chain=cert, private_key=key
188
+ )
189
+ else:
190
+ self._ssl_channel_credentials = SslCredentials().ssl_credentials
191
+
192
+ else:
193
+ if client_cert_source_for_mtls and not ssl_channel_credentials:
194
+ cert, key = client_cert_source_for_mtls()
195
+ self._ssl_channel_credentials = grpc.ssl_channel_credentials(
196
+ certificate_chain=cert, private_key=key
197
+ )
198
+
199
+ # The base transport sets the host, credentials and scopes
200
+ super().__init__(
201
+ host=host,
202
+ credentials=credentials,
203
+ credentials_file=credentials_file,
204
+ scopes=scopes,
205
+ quota_project_id=quota_project_id,
206
+ client_info=client_info,
207
+ always_use_jwt_access=always_use_jwt_access,
208
+ api_audience=api_audience,
209
+ )
210
+
211
+ if not self._grpc_channel:
212
+ self._grpc_channel = type(self).create_channel(
213
+ self._host,
214
+ # use the credentials which are saved
215
+ credentials=self._credentials,
216
+ # Set ``credentials_file`` to ``None`` here as
217
+ # the credentials that we saved earlier should be used.
218
+ credentials_file=None,
219
+ scopes=self._scopes,
220
+ ssl_credentials=self._ssl_channel_credentials,
221
+ quota_project_id=quota_project_id,
222
+ options=[
223
+ ("grpc.max_send_message_length", -1),
224
+ ("grpc.max_receive_message_length", -1),
225
+ ],
226
+ )
227
+
228
+ # Wrap messages. This must be done after self._grpc_channel exists
229
+ self._prep_wrapped_messages(client_info)
230
+
231
+ @property
232
+ def grpc_channel(self) -> aio.Channel:
233
+ """Create the channel designed to connect to this service.
234
+
235
+ This property caches on the instance; repeated calls return
236
+ the same channel.
237
+ """
238
+ # Return the channel from cache.
239
+ return self._grpc_channel
240
+
241
+ @property
242
+ def get_workload(
243
+ self,
244
+ ) -> Callable[
245
+ [customer_workloads.GetWorkloadRequest], Awaitable[customer_workloads.Workload]
246
+ ]:
247
+ r"""Return a callable for the get workload method over gRPC.
248
+
249
+ Gets details of a single workload
250
+
251
+ Returns:
252
+ Callable[[~.GetWorkloadRequest],
253
+ Awaitable[~.Workload]]:
254
+ A function that, when called, will call the underlying RPC
255
+ on the server.
256
+ """
257
+ # Generate a "stub function" on-the-fly which will actually make
258
+ # the request.
259
+ # gRPC handles serialization and deserialization, so we just need
260
+ # to pass in the functions for each.
261
+ if "get_workload" not in self._stubs:
262
+ self._stubs["get_workload"] = self.grpc_channel.unary_unary(
263
+ "/google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore/GetWorkload",
264
+ request_serializer=customer_workloads.GetWorkloadRequest.serialize,
265
+ response_deserializer=customer_workloads.Workload.deserialize,
266
+ )
267
+ return self._stubs["get_workload"]
268
+
269
+ @property
270
+ def list_workloads(
271
+ self,
272
+ ) -> Callable[
273
+ [customer_workloads.ListWorkloadsRequest],
274
+ Awaitable[customer_workloads.ListWorkloadsResponse],
275
+ ]:
276
+ r"""Return a callable for the list workloads method over gRPC.
277
+
278
+ Lists customer workloads for a given customer org id
279
+
280
+ Returns:
281
+ Callable[[~.ListWorkloadsRequest],
282
+ Awaitable[~.ListWorkloadsResponse]]:
283
+ A function that, when called, will call the underlying RPC
284
+ on the server.
285
+ """
286
+ # Generate a "stub function" on-the-fly which will actually make
287
+ # the request.
288
+ # gRPC handles serialization and deserialization, so we just need
289
+ # to pass in the functions for each.
290
+ if "list_workloads" not in self._stubs:
291
+ self._stubs["list_workloads"] = self.grpc_channel.unary_unary(
292
+ "/google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore/ListWorkloads",
293
+ request_serializer=customer_workloads.ListWorkloadsRequest.serialize,
294
+ response_deserializer=customer_workloads.ListWorkloadsResponse.deserialize,
295
+ )
296
+ return self._stubs["list_workloads"]
297
+
298
+ @property
299
+ def get_customer(
300
+ self,
301
+ ) -> Callable[[customers.GetCustomerRequest], Awaitable[customers.Customer]]:
302
+ r"""Return a callable for the get customer method over gRPC.
303
+
304
+ Gets details of a single customer
305
+
306
+ Returns:
307
+ Callable[[~.GetCustomerRequest],
308
+ Awaitable[~.Customer]]:
309
+ A function that, when called, will call the underlying RPC
310
+ on the server.
311
+ """
312
+ # Generate a "stub function" on-the-fly which will actually make
313
+ # the request.
314
+ # gRPC handles serialization and deserialization, so we just need
315
+ # to pass in the functions for each.
316
+ if "get_customer" not in self._stubs:
317
+ self._stubs["get_customer"] = self.grpc_channel.unary_unary(
318
+ "/google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore/GetCustomer",
319
+ request_serializer=customers.GetCustomerRequest.serialize,
320
+ response_deserializer=customers.Customer.deserialize,
321
+ )
322
+ return self._stubs["get_customer"]
323
+
324
+ @property
325
+ def list_customers(
326
+ self,
327
+ ) -> Callable[
328
+ [customers.ListCustomersRequest], Awaitable[customers.ListCustomersResponse]
329
+ ]:
330
+ r"""Return a callable for the list customers method over gRPC.
331
+
332
+ Lists customers of a partner identified by its Google
333
+ Cloud organization ID
334
+
335
+ Returns:
336
+ Callable[[~.ListCustomersRequest],
337
+ Awaitable[~.ListCustomersResponse]]:
338
+ A function that, when called, will call the underlying RPC
339
+ on the server.
340
+ """
341
+ # Generate a "stub function" on-the-fly which will actually make
342
+ # the request.
343
+ # gRPC handles serialization and deserialization, so we just need
344
+ # to pass in the functions for each.
345
+ if "list_customers" not in self._stubs:
346
+ self._stubs["list_customers"] = self.grpc_channel.unary_unary(
347
+ "/google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore/ListCustomers",
348
+ request_serializer=customers.ListCustomersRequest.serialize,
349
+ response_deserializer=customers.ListCustomersResponse.deserialize,
350
+ )
351
+ return self._stubs["list_customers"]
352
+
353
+ @property
354
+ def get_ekm_connections(
355
+ self,
356
+ ) -> Callable[
357
+ [ekm_connections.GetEkmConnectionsRequest],
358
+ Awaitable[ekm_connections.EkmConnections],
359
+ ]:
360
+ r"""Return a callable for the get ekm connections method over gRPC.
361
+
362
+ Gets the EKM connections associated with a workload
363
+
364
+ Returns:
365
+ Callable[[~.GetEkmConnectionsRequest],
366
+ Awaitable[~.EkmConnections]]:
367
+ A function that, when called, will call the underlying RPC
368
+ on the server.
369
+ """
370
+ # Generate a "stub function" on-the-fly which will actually make
371
+ # the request.
372
+ # gRPC handles serialization and deserialization, so we just need
373
+ # to pass in the functions for each.
374
+ if "get_ekm_connections" not in self._stubs:
375
+ self._stubs["get_ekm_connections"] = self.grpc_channel.unary_unary(
376
+ "/google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore/GetEkmConnections",
377
+ request_serializer=ekm_connections.GetEkmConnectionsRequest.serialize,
378
+ response_deserializer=ekm_connections.EkmConnections.deserialize,
379
+ )
380
+ return self._stubs["get_ekm_connections"]
381
+
382
+ @property
383
+ def get_partner_permissions(
384
+ self,
385
+ ) -> Callable[
386
+ [partner_permissions.GetPartnerPermissionsRequest],
387
+ Awaitable[partner_permissions.PartnerPermissions],
388
+ ]:
389
+ r"""Return a callable for the get partner permissions method over gRPC.
390
+
391
+ Gets the partner permissions granted for a workload
392
+
393
+ Returns:
394
+ Callable[[~.GetPartnerPermissionsRequest],
395
+ Awaitable[~.PartnerPermissions]]:
396
+ A function that, when called, will call the underlying RPC
397
+ on the server.
398
+ """
399
+ # Generate a "stub function" on-the-fly which will actually make
400
+ # the request.
401
+ # gRPC handles serialization and deserialization, so we just need
402
+ # to pass in the functions for each.
403
+ if "get_partner_permissions" not in self._stubs:
404
+ self._stubs["get_partner_permissions"] = self.grpc_channel.unary_unary(
405
+ "/google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore/GetPartnerPermissions",
406
+ request_serializer=partner_permissions.GetPartnerPermissionsRequest.serialize,
407
+ response_deserializer=partner_permissions.PartnerPermissions.deserialize,
408
+ )
409
+ return self._stubs["get_partner_permissions"]
410
+
411
+ @property
412
+ def list_access_approval_requests(
413
+ self,
414
+ ) -> Callable[
415
+ [access_approval_requests.ListAccessApprovalRequestsRequest],
416
+ Awaitable[access_approval_requests.ListAccessApprovalRequestsResponse],
417
+ ]:
418
+ r"""Return a callable for the list access approval requests method over gRPC.
419
+
420
+ Lists access requests associated with a workload
421
+
422
+ Returns:
423
+ Callable[[~.ListAccessApprovalRequestsRequest],
424
+ Awaitable[~.ListAccessApprovalRequestsResponse]]:
425
+ A function that, when called, will call the underlying RPC
426
+ on the server.
427
+ """
428
+ # Generate a "stub function" on-the-fly which will actually make
429
+ # the request.
430
+ # gRPC handles serialization and deserialization, so we just need
431
+ # to pass in the functions for each.
432
+ if "list_access_approval_requests" not in self._stubs:
433
+ self._stubs[
434
+ "list_access_approval_requests"
435
+ ] = self.grpc_channel.unary_unary(
436
+ "/google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore/ListAccessApprovalRequests",
437
+ request_serializer=access_approval_requests.ListAccessApprovalRequestsRequest.serialize,
438
+ response_deserializer=access_approval_requests.ListAccessApprovalRequestsResponse.deserialize,
439
+ )
440
+ return self._stubs["list_access_approval_requests"]
441
+
442
+ @property
443
+ def get_partner(
444
+ self,
445
+ ) -> Callable[[partners.GetPartnerRequest], Awaitable[partners.Partner]]:
446
+ r"""Return a callable for the get partner method over gRPC.
447
+
448
+ Get details of a Partner.
449
+
450
+ Returns:
451
+ Callable[[~.GetPartnerRequest],
452
+ Awaitable[~.Partner]]:
453
+ A function that, when called, will call the underlying RPC
454
+ on the server.
455
+ """
456
+ # Generate a "stub function" on-the-fly which will actually make
457
+ # the request.
458
+ # gRPC handles serialization and deserialization, so we just need
459
+ # to pass in the functions for each.
460
+ if "get_partner" not in self._stubs:
461
+ self._stubs["get_partner"] = self.grpc_channel.unary_unary(
462
+ "/google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore/GetPartner",
463
+ request_serializer=partners.GetPartnerRequest.serialize,
464
+ response_deserializer=partners.Partner.deserialize,
465
+ )
466
+ return self._stubs["get_partner"]
467
+
468
+ def close(self):
469
+ return self.grpc_channel.close()
470
+
471
+
472
+ __all__ = ("CloudControlsPartnerCoreGrpcAsyncIOTransport",)