|
| 1 | +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
| 2 | + |
| 3 | +from __future__ import annotations |
| 4 | + |
| 5 | +from .summary import ( |
| 6 | + SummaryResource, |
| 7 | + AsyncSummaryResource, |
| 8 | + SummaryResourceWithRawResponse, |
| 9 | + AsyncSummaryResourceWithRawResponse, |
| 10 | + SummaryResourceWithStreamingResponse, |
| 11 | + AsyncSummaryResourceWithStreamingResponse, |
| 12 | +) |
| 13 | +from ...._compat import cached_property |
| 14 | +from ...._resource import SyncAPIResource, AsyncAPIResource |
| 15 | +from .timeseries_groups import ( |
| 16 | + TimeseriesGroupsResource, |
| 17 | + AsyncTimeseriesGroupsResource, |
| 18 | + TimeseriesGroupsResourceWithRawResponse, |
| 19 | + AsyncTimeseriesGroupsResourceWithRawResponse, |
| 20 | + TimeseriesGroupsResourceWithStreamingResponse, |
| 21 | + AsyncTimeseriesGroupsResourceWithStreamingResponse, |
| 22 | +) |
| 23 | + |
| 24 | +__all__ = ["LeakedCredentialsResource", "AsyncLeakedCredentialsResource"] |
| 25 | + |
| 26 | + |
| 27 | +class LeakedCredentialsResource(SyncAPIResource): |
| 28 | + @cached_property |
| 29 | + def summary(self) -> SummaryResource: |
| 30 | + return SummaryResource(self._client) |
| 31 | + |
| 32 | + @cached_property |
| 33 | + def timeseries_groups(self) -> TimeseriesGroupsResource: |
| 34 | + return TimeseriesGroupsResource(self._client) |
| 35 | + |
| 36 | + @cached_property |
| 37 | + def with_raw_response(self) -> LeakedCredentialsResourceWithRawResponse: |
| 38 | + """ |
| 39 | + This property can be used as a prefix for any HTTP method call to return |
| 40 | + the raw response object instead of the parsed content. |
| 41 | +
|
| 42 | + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers |
| 43 | + """ |
| 44 | + return LeakedCredentialsResourceWithRawResponse(self) |
| 45 | + |
| 46 | + @cached_property |
| 47 | + def with_streaming_response(self) -> LeakedCredentialsResourceWithStreamingResponse: |
| 48 | + """ |
| 49 | + An alternative to `.with_raw_response` that doesn't eagerly read the response body. |
| 50 | +
|
| 51 | + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response |
| 52 | + """ |
| 53 | + return LeakedCredentialsResourceWithStreamingResponse(self) |
| 54 | + |
| 55 | + |
| 56 | +class AsyncLeakedCredentialsResource(AsyncAPIResource): |
| 57 | + @cached_property |
| 58 | + def summary(self) -> AsyncSummaryResource: |
| 59 | + return AsyncSummaryResource(self._client) |
| 60 | + |
| 61 | + @cached_property |
| 62 | + def timeseries_groups(self) -> AsyncTimeseriesGroupsResource: |
| 63 | + return AsyncTimeseriesGroupsResource(self._client) |
| 64 | + |
| 65 | + @cached_property |
| 66 | + def with_raw_response(self) -> AsyncLeakedCredentialsResourceWithRawResponse: |
| 67 | + """ |
| 68 | + This property can be used as a prefix for any HTTP method call to return |
| 69 | + the raw response object instead of the parsed content. |
| 70 | +
|
| 71 | + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers |
| 72 | + """ |
| 73 | + return AsyncLeakedCredentialsResourceWithRawResponse(self) |
| 74 | + |
| 75 | + @cached_property |
| 76 | + def with_streaming_response(self) -> AsyncLeakedCredentialsResourceWithStreamingResponse: |
| 77 | + """ |
| 78 | + An alternative to `.with_raw_response` that doesn't eagerly read the response body. |
| 79 | +
|
| 80 | + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response |
| 81 | + """ |
| 82 | + return AsyncLeakedCredentialsResourceWithStreamingResponse(self) |
| 83 | + |
| 84 | + |
| 85 | +class LeakedCredentialsResourceWithRawResponse: |
| 86 | + def __init__(self, leaked_credentials: LeakedCredentialsResource) -> None: |
| 87 | + self._leaked_credentials = leaked_credentials |
| 88 | + |
| 89 | + @cached_property |
| 90 | + def summary(self) -> SummaryResourceWithRawResponse: |
| 91 | + return SummaryResourceWithRawResponse(self._leaked_credentials.summary) |
| 92 | + |
| 93 | + @cached_property |
| 94 | + def timeseries_groups(self) -> TimeseriesGroupsResourceWithRawResponse: |
| 95 | + return TimeseriesGroupsResourceWithRawResponse(self._leaked_credentials.timeseries_groups) |
| 96 | + |
| 97 | + |
| 98 | +class AsyncLeakedCredentialsResourceWithRawResponse: |
| 99 | + def __init__(self, leaked_credentials: AsyncLeakedCredentialsResource) -> None: |
| 100 | + self._leaked_credentials = leaked_credentials |
| 101 | + |
| 102 | + @cached_property |
| 103 | + def summary(self) -> AsyncSummaryResourceWithRawResponse: |
| 104 | + return AsyncSummaryResourceWithRawResponse(self._leaked_credentials.summary) |
| 105 | + |
| 106 | + @cached_property |
| 107 | + def timeseries_groups(self) -> AsyncTimeseriesGroupsResourceWithRawResponse: |
| 108 | + return AsyncTimeseriesGroupsResourceWithRawResponse(self._leaked_credentials.timeseries_groups) |
| 109 | + |
| 110 | + |
| 111 | +class LeakedCredentialsResourceWithStreamingResponse: |
| 112 | + def __init__(self, leaked_credentials: LeakedCredentialsResource) -> None: |
| 113 | + self._leaked_credentials = leaked_credentials |
| 114 | + |
| 115 | + @cached_property |
| 116 | + def summary(self) -> SummaryResourceWithStreamingResponse: |
| 117 | + return SummaryResourceWithStreamingResponse(self._leaked_credentials.summary) |
| 118 | + |
| 119 | + @cached_property |
| 120 | + def timeseries_groups(self) -> TimeseriesGroupsResourceWithStreamingResponse: |
| 121 | + return TimeseriesGroupsResourceWithStreamingResponse(self._leaked_credentials.timeseries_groups) |
| 122 | + |
| 123 | + |
| 124 | +class AsyncLeakedCredentialsResourceWithStreamingResponse: |
| 125 | + def __init__(self, leaked_credentials: AsyncLeakedCredentialsResource) -> None: |
| 126 | + self._leaked_credentials = leaked_credentials |
| 127 | + |
| 128 | + @cached_property |
| 129 | + def summary(self) -> AsyncSummaryResourceWithStreamingResponse: |
| 130 | + return AsyncSummaryResourceWithStreamingResponse(self._leaked_credentials.summary) |
| 131 | + |
| 132 | + @cached_property |
| 133 | + def timeseries_groups(self) -> AsyncTimeseriesGroupsResourceWithStreamingResponse: |
| 134 | + return AsyncTimeseriesGroupsResourceWithStreamingResponse(self._leaked_credentials.timeseries_groups) |
0 commit comments