-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathclient.py
More file actions
63 lines (47 loc) · 2.01 KB
/
Copy pathclient.py
File metadata and controls
63 lines (47 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# This file was auto-generated by Fern from our API Definition.
from __future__ import annotations
import typing
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .raw_client import AsyncRawWorkspacesClient, RawWorkspacesClient
if typing.TYPE_CHECKING:
from .resources.audit_logs.client import AsyncAuditLogsClient, AuditLogsClient
class WorkspacesClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
self._raw_client = RawWorkspacesClient(client_wrapper=client_wrapper)
self._client_wrapper = client_wrapper
self._audit_logs: typing.Optional[AuditLogsClient] = None
@property
def with_raw_response(self) -> RawWorkspacesClient:
"""
Retrieves a raw implementation of this client that returns raw responses.
Returns
-------
RawWorkspacesClient
"""
return self._raw_client
@property
def audit_logs(self):
if self._audit_logs is None:
from .resources.audit_logs.client import AuditLogsClient # noqa: E402
self._audit_logs = AuditLogsClient(client_wrapper=self._client_wrapper)
return self._audit_logs
class AsyncWorkspacesClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._raw_client = AsyncRawWorkspacesClient(client_wrapper=client_wrapper)
self._client_wrapper = client_wrapper
self._audit_logs: typing.Optional[AsyncAuditLogsClient] = None
@property
def with_raw_response(self) -> AsyncRawWorkspacesClient:
"""
Retrieves a raw implementation of this client that returns raw responses.
Returns
-------
AsyncRawWorkspacesClient
"""
return self._raw_client
@property
def audit_logs(self):
if self._audit_logs is None:
from .resources.audit_logs.client import AsyncAuditLogsClient # noqa: E402
self._audit_logs = AsyncAuditLogsClient(client_wrapper=self._client_wrapper)
return self._audit_logs