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