|
| 1 | +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
| 2 | + |
| 3 | +from __future__ import annotations |
| 4 | + |
| 5 | +from .profiles import ( |
| 6 | + ProfilesResource, |
| 7 | + AsyncProfilesResource, |
| 8 | + ProfilesResourceWithRawResponse, |
| 9 | + AsyncProfilesResourceWithRawResponse, |
| 10 | + ProfilesResourceWithStreamingResponse, |
| 11 | + AsyncProfilesResourceWithStreamingResponse, |
| 12 | +) |
| 13 | +from ..._compat import cached_property |
| 14 | +from ..._resource import SyncAPIResource, AsyncAPIResource |
| 15 | + |
| 16 | +__all__ = ["BrowserResource", "AsyncBrowserResource"] |
| 17 | + |
| 18 | + |
| 19 | +class BrowserResource(SyncAPIResource): |
| 20 | + @cached_property |
| 21 | + def profiles(self) -> ProfilesResource: |
| 22 | + """See the authenticated browser profiles your organization created.""" |
| 23 | + return ProfilesResource(self._client) |
| 24 | + |
| 25 | + @cached_property |
| 26 | + def with_raw_response(self) -> BrowserResourceWithRawResponse: |
| 27 | + """ |
| 28 | + This property can be used as a prefix for any HTTP method call to return |
| 29 | + the raw response object instead of the parsed content. |
| 30 | +
|
| 31 | + For more information, see https://www.github.com/context-dot-dev/context-python-sdk#accessing-raw-response-data-eg-headers |
| 32 | + """ |
| 33 | + return BrowserResourceWithRawResponse(self) |
| 34 | + |
| 35 | + @cached_property |
| 36 | + def with_streaming_response(self) -> BrowserResourceWithStreamingResponse: |
| 37 | + """ |
| 38 | + An alternative to `.with_raw_response` that doesn't eagerly read the response body. |
| 39 | +
|
| 40 | + For more information, see https://www.github.com/context-dot-dev/context-python-sdk#with_streaming_response |
| 41 | + """ |
| 42 | + return BrowserResourceWithStreamingResponse(self) |
| 43 | + |
| 44 | + |
| 45 | +class AsyncBrowserResource(AsyncAPIResource): |
| 46 | + @cached_property |
| 47 | + def profiles(self) -> AsyncProfilesResource: |
| 48 | + """See the authenticated browser profiles your organization created.""" |
| 49 | + return AsyncProfilesResource(self._client) |
| 50 | + |
| 51 | + @cached_property |
| 52 | + def with_raw_response(self) -> AsyncBrowserResourceWithRawResponse: |
| 53 | + """ |
| 54 | + This property can be used as a prefix for any HTTP method call to return |
| 55 | + the raw response object instead of the parsed content. |
| 56 | +
|
| 57 | + For more information, see https://www.github.com/context-dot-dev/context-python-sdk#accessing-raw-response-data-eg-headers |
| 58 | + """ |
| 59 | + return AsyncBrowserResourceWithRawResponse(self) |
| 60 | + |
| 61 | + @cached_property |
| 62 | + def with_streaming_response(self) -> AsyncBrowserResourceWithStreamingResponse: |
| 63 | + """ |
| 64 | + An alternative to `.with_raw_response` that doesn't eagerly read the response body. |
| 65 | +
|
| 66 | + For more information, see https://www.github.com/context-dot-dev/context-python-sdk#with_streaming_response |
| 67 | + """ |
| 68 | + return AsyncBrowserResourceWithStreamingResponse(self) |
| 69 | + |
| 70 | + |
| 71 | +class BrowserResourceWithRawResponse: |
| 72 | + def __init__(self, browser: BrowserResource) -> None: |
| 73 | + self._browser = browser |
| 74 | + |
| 75 | + @cached_property |
| 76 | + def profiles(self) -> ProfilesResourceWithRawResponse: |
| 77 | + """See the authenticated browser profiles your organization created.""" |
| 78 | + return ProfilesResourceWithRawResponse(self._browser.profiles) |
| 79 | + |
| 80 | + |
| 81 | +class AsyncBrowserResourceWithRawResponse: |
| 82 | + def __init__(self, browser: AsyncBrowserResource) -> None: |
| 83 | + self._browser = browser |
| 84 | + |
| 85 | + @cached_property |
| 86 | + def profiles(self) -> AsyncProfilesResourceWithRawResponse: |
| 87 | + """See the authenticated browser profiles your organization created.""" |
| 88 | + return AsyncProfilesResourceWithRawResponse(self._browser.profiles) |
| 89 | + |
| 90 | + |
| 91 | +class BrowserResourceWithStreamingResponse: |
| 92 | + def __init__(self, browser: BrowserResource) -> None: |
| 93 | + self._browser = browser |
| 94 | + |
| 95 | + @cached_property |
| 96 | + def profiles(self) -> ProfilesResourceWithStreamingResponse: |
| 97 | + """See the authenticated browser profiles your organization created.""" |
| 98 | + return ProfilesResourceWithStreamingResponse(self._browser.profiles) |
| 99 | + |
| 100 | + |
| 101 | +class AsyncBrowserResourceWithStreamingResponse: |
| 102 | + def __init__(self, browser: AsyncBrowserResource) -> None: |
| 103 | + self._browser = browser |
| 104 | + |
| 105 | + @cached_property |
| 106 | + def profiles(self) -> AsyncProfilesResourceWithStreamingResponse: |
| 107 | + """See the authenticated browser profiles your organization created.""" |
| 108 | + return AsyncProfilesResourceWithStreamingResponse(self._browser.profiles) |
0 commit comments