Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Apr 22, 2024
1 parent b4310a5 commit f44f877
Show file tree
Hide file tree
Showing 63 changed files with 1,376 additions and 375 deletions.
98 changes: 45 additions & 53 deletions api.md

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions src/cloudflare/resources/cache/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
AsyncVariantsWithStreamingResponse,
)
from .cache_reserve import (
CacheReserve,
AsyncCacheReserve,
CacheReserveWithRawResponse,
AsyncCacheReserveWithRawResponse,
CacheReserveWithStreamingResponse,
AsyncCacheReserveWithStreamingResponse,
CacheReserveResource,
AsyncCacheReserveResource,
CacheReserveResourceWithRawResponse,
AsyncCacheReserveResourceWithRawResponse,
CacheReserveResourceWithStreamingResponse,
AsyncCacheReserveResourceWithStreamingResponse,
)
from .smart_tiered_cache import (
SmartTieredCache,
Expand All @@ -42,12 +42,12 @@
)

__all__ = [
"CacheReserve",
"AsyncCacheReserve",
"CacheReserveWithRawResponse",
"AsyncCacheReserveWithRawResponse",
"CacheReserveWithStreamingResponse",
"AsyncCacheReserveWithStreamingResponse",
"CacheReserveResource",
"AsyncCacheReserveResource",
"CacheReserveResourceWithRawResponse",
"AsyncCacheReserveResourceWithRawResponse",
"CacheReserveResourceWithStreamingResponse",
"AsyncCacheReserveResourceWithStreamingResponse",
"SmartTieredCache",
"AsyncSmartTieredCache",
"SmartTieredCacheWithRawResponse",
Expand Down
36 changes: 18 additions & 18 deletions src/cloudflare/resources/cache/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
)
from ..._wrappers import ResultWrapper
from .cache_reserve import (
CacheReserve,
AsyncCacheReserve,
CacheReserveWithRawResponse,
AsyncCacheReserveWithRawResponse,
CacheReserveWithStreamingResponse,
AsyncCacheReserveWithStreamingResponse,
CacheReserveResource,
AsyncCacheReserveResource,
CacheReserveResourceWithRawResponse,
AsyncCacheReserveResourceWithRawResponse,
CacheReserveResourceWithStreamingResponse,
AsyncCacheReserveResourceWithStreamingResponse,
)
from ..._base_client import (
make_request_options,
Expand All @@ -63,8 +63,8 @@

class Cache(SyncAPIResource):
@cached_property
def cache_reserve(self) -> CacheReserve:
return CacheReserve(self._client)
def cache_reserve(self) -> CacheReserveResource:
return CacheReserveResource(self._client)

@cached_property
def smart_tiered_cache(self) -> SmartTieredCache:
Expand Down Expand Up @@ -415,8 +415,8 @@ def purge(

class AsyncCache(AsyncAPIResource):
@cached_property
def cache_reserve(self) -> AsyncCacheReserve:
return AsyncCacheReserve(self._client)
def cache_reserve(self) -> AsyncCacheReserveResource:
return AsyncCacheReserveResource(self._client)

@cached_property
def smart_tiered_cache(self) -> AsyncSmartTieredCache:
Expand Down Expand Up @@ -774,8 +774,8 @@ def __init__(self, cache: Cache) -> None:
)

@cached_property
def cache_reserve(self) -> CacheReserveWithRawResponse:
return CacheReserveWithRawResponse(self._cache.cache_reserve)
def cache_reserve(self) -> CacheReserveResourceWithRawResponse:
return CacheReserveResourceWithRawResponse(self._cache.cache_reserve)

@cached_property
def smart_tiered_cache(self) -> SmartTieredCacheWithRawResponse:
Expand All @@ -799,8 +799,8 @@ def __init__(self, cache: AsyncCache) -> None:
)

@cached_property
def cache_reserve(self) -> AsyncCacheReserveWithRawResponse:
return AsyncCacheReserveWithRawResponse(self._cache.cache_reserve)
def cache_reserve(self) -> AsyncCacheReserveResourceWithRawResponse:
return AsyncCacheReserveResourceWithRawResponse(self._cache.cache_reserve)

@cached_property
def smart_tiered_cache(self) -> AsyncSmartTieredCacheWithRawResponse:
Expand All @@ -824,8 +824,8 @@ def __init__(self, cache: Cache) -> None:
)

@cached_property
def cache_reserve(self) -> CacheReserveWithStreamingResponse:
return CacheReserveWithStreamingResponse(self._cache.cache_reserve)
def cache_reserve(self) -> CacheReserveResourceWithStreamingResponse:
return CacheReserveResourceWithStreamingResponse(self._cache.cache_reserve)

@cached_property
def smart_tiered_cache(self) -> SmartTieredCacheWithStreamingResponse:
Expand All @@ -849,8 +849,8 @@ def __init__(self, cache: AsyncCache) -> None:
)

@cached_property
def cache_reserve(self) -> AsyncCacheReserveWithStreamingResponse:
return AsyncCacheReserveWithStreamingResponse(self._cache.cache_reserve)
def cache_reserve(self) -> AsyncCacheReserveResourceWithStreamingResponse:
return AsyncCacheReserveResourceWithStreamingResponse(self._cache.cache_reserve)

@cached_property
def smart_tiered_cache(self) -> AsyncSmartTieredCacheWithStreamingResponse:
Expand Down
38 changes: 19 additions & 19 deletions src/cloudflare/resources/cache/cache_reserve.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@
make_request_options,
)

__all__ = ["CacheReserve", "AsyncCacheReserve"]
__all__ = ["CacheReserveResource", "AsyncCacheReserveResource"]


class CacheReserve(SyncAPIResource):
class CacheReserveResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> CacheReserveWithRawResponse:
return CacheReserveWithRawResponse(self)
def with_raw_response(self) -> CacheReserveResourceWithRawResponse:
return CacheReserveResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> CacheReserveWithStreamingResponse:
return CacheReserveWithStreamingResponse(self)
def with_streaming_response(self) -> CacheReserveResourceWithStreamingResponse:
return CacheReserveResourceWithStreamingResponse(self)

def clear(
self,
Expand Down Expand Up @@ -224,14 +224,14 @@ def status(
)


class AsyncCacheReserve(AsyncAPIResource):
class AsyncCacheReserveResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncCacheReserveWithRawResponse:
return AsyncCacheReserveWithRawResponse(self)
def with_raw_response(self) -> AsyncCacheReserveResourceWithRawResponse:
return AsyncCacheReserveResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AsyncCacheReserveWithStreamingResponse:
return AsyncCacheReserveWithStreamingResponse(self)
def with_streaming_response(self) -> AsyncCacheReserveResourceWithStreamingResponse:
return AsyncCacheReserveResourceWithStreamingResponse(self)

async def clear(
self,
Expand Down Expand Up @@ -412,8 +412,8 @@ async def status(
)


class CacheReserveWithRawResponse:
def __init__(self, cache_reserve: CacheReserve) -> None:
class CacheReserveResourceWithRawResponse:
def __init__(self, cache_reserve: CacheReserveResource) -> None:
self._cache_reserve = cache_reserve

self.clear = to_raw_response_wrapper(
Expand All @@ -430,8 +430,8 @@ def __init__(self, cache_reserve: CacheReserve) -> None:
)


class AsyncCacheReserveWithRawResponse:
def __init__(self, cache_reserve: AsyncCacheReserve) -> None:
class AsyncCacheReserveResourceWithRawResponse:
def __init__(self, cache_reserve: AsyncCacheReserveResource) -> None:
self._cache_reserve = cache_reserve

self.clear = async_to_raw_response_wrapper(
Expand All @@ -448,8 +448,8 @@ def __init__(self, cache_reserve: AsyncCacheReserve) -> None:
)


class CacheReserveWithStreamingResponse:
def __init__(self, cache_reserve: CacheReserve) -> None:
class CacheReserveResourceWithStreamingResponse:
def __init__(self, cache_reserve: CacheReserveResource) -> None:
self._cache_reserve = cache_reserve

self.clear = to_streamed_response_wrapper(
Expand All @@ -466,8 +466,8 @@ def __init__(self, cache_reserve: CacheReserve) -> None:
)


class AsyncCacheReserveWithStreamingResponse:
def __init__(self, cache_reserve: AsyncCacheReserve) -> None:
class AsyncCacheReserveResourceWithStreamingResponse:
def __init__(self, cache_reserve: AsyncCacheReserveResource) -> None:
self._cache_reserve = cache_reserve

self.clear = async_to_streamed_response_wrapper(
Expand Down
Loading

0 comments on commit f44f877

Please sign in to comment.