Skip to content

Commit

Permalink
feat: update via SDK Studio (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Feb 16, 2024
1 parent 4f9e6b6 commit 37163ea
Show file tree
Hide file tree
Showing 70 changed files with 1,574 additions and 1,392 deletions.
72 changes: 38 additions & 34 deletions api.md

Large diffs are not rendered by default.

36 changes: 21 additions & 15 deletions src/cloudflare/resources/access/users/failed_logins.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from ...._base_client import (
make_request_options,
)
from ....types.access.users import FailedLoginGetResponse
from ....types.access.users import FailedLoginZeroTrustUsersGetFailedLoginsResponse

__all__ = ["FailedLogins", "AsyncFailedLogins"]

Expand All @@ -33,7 +33,7 @@ def with_raw_response(self) -> FailedLoginsWithRawResponse:
def with_streaming_response(self) -> FailedLoginsWithStreamingResponse:
return FailedLoginsWithStreamingResponse(self)

def get(
def zero_trust_users_get_failed_logins(
self,
id: str,
*,
Expand All @@ -44,7 +44,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[FailedLoginGetResponse]:
) -> Optional[FailedLoginZeroTrustUsersGetFailedLoginsResponse]:
"""
Get all failed login attempts for a single user.
Expand Down Expand Up @@ -74,7 +74,10 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[FailedLoginGetResponse]], ResultWrapper[FailedLoginGetResponse]),
cast_to=cast(
Type[Optional[FailedLoginZeroTrustUsersGetFailedLoginsResponse]],
ResultWrapper[FailedLoginZeroTrustUsersGetFailedLoginsResponse],
),
)


Expand All @@ -87,7 +90,7 @@ def with_raw_response(self) -> AsyncFailedLoginsWithRawResponse:
def with_streaming_response(self) -> AsyncFailedLoginsWithStreamingResponse:
return AsyncFailedLoginsWithStreamingResponse(self)

async def get(
async def zero_trust_users_get_failed_logins(
self,
id: str,
*,
Expand All @@ -98,7 +101,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[FailedLoginGetResponse]:
) -> Optional[FailedLoginZeroTrustUsersGetFailedLoginsResponse]:
"""
Get all failed login attempts for a single user.
Expand Down Expand Up @@ -128,41 +131,44 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[FailedLoginGetResponse]], ResultWrapper[FailedLoginGetResponse]),
cast_to=cast(
Type[Optional[FailedLoginZeroTrustUsersGetFailedLoginsResponse]],
ResultWrapper[FailedLoginZeroTrustUsersGetFailedLoginsResponse],
),
)


class FailedLoginsWithRawResponse:
def __init__(self, failed_logins: FailedLogins) -> None:
self._failed_logins = failed_logins

self.get = to_raw_response_wrapper(
failed_logins.get,
self.zero_trust_users_get_failed_logins = to_raw_response_wrapper(
failed_logins.zero_trust_users_get_failed_logins,
)


class AsyncFailedLoginsWithRawResponse:
def __init__(self, failed_logins: AsyncFailedLogins) -> None:
self._failed_logins = failed_logins

self.get = async_to_raw_response_wrapper(
failed_logins.get,
self.zero_trust_users_get_failed_logins = async_to_raw_response_wrapper(
failed_logins.zero_trust_users_get_failed_logins,
)


class FailedLoginsWithStreamingResponse:
def __init__(self, failed_logins: FailedLogins) -> None:
self._failed_logins = failed_logins

self.get = to_streamed_response_wrapper(
failed_logins.get,
self.zero_trust_users_get_failed_logins = to_streamed_response_wrapper(
failed_logins.zero_trust_users_get_failed_logins,
)


class AsyncFailedLoginsWithStreamingResponse:
def __init__(self, failed_logins: AsyncFailedLogins) -> None:
self._failed_logins = failed_logins

self.get = async_to_streamed_response_wrapper(
failed_logins.get,
self.zero_trust_users_get_failed_logins = async_to_streamed_response_wrapper(
failed_logins.zero_trust_users_get_failed_logins,
)
34 changes: 17 additions & 17 deletions src/cloudflare/resources/acms/total_tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
async_to_streamed_response_wrapper,
)
from ..._wrappers import ResultWrapper
from ...types.acms import TotalTLSGetResponse, TotalTLSCreateResponse, total_tls_create_params
from ...types.acms import TotalTLSGetResponse, TotalTLSUpdateResponse, total_tls_update_params
from ..._base_client import (
make_request_options,
)
Expand All @@ -35,7 +35,7 @@ def with_raw_response(self) -> TotalTLSWithRawResponse:
def with_streaming_response(self) -> TotalTLSWithStreamingResponse:
return TotalTLSWithStreamingResponse(self)

def create(
def update(
self,
zone_id: str,
*,
Expand All @@ -47,7 +47,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> TotalTLSCreateResponse:
) -> TotalTLSUpdateResponse:
"""
Set Total TLS Settings or disable the feature for a Zone.
Expand Down Expand Up @@ -76,7 +76,7 @@ def create(
"enabled": enabled,
"certificate_authority": certificate_authority,
},
total_tls_create_params.TotalTLSCreateParams,
total_tls_update_params.TotalTLSUpdateParams,
),
options=make_request_options(
extra_headers=extra_headers,
Expand All @@ -85,7 +85,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[TotalTLSCreateResponse], ResultWrapper[TotalTLSCreateResponse]),
cast_to=cast(Type[TotalTLSUpdateResponse], ResultWrapper[TotalTLSUpdateResponse]),
)

def get(
Expand Down Expand Up @@ -137,7 +137,7 @@ def with_raw_response(self) -> AsyncTotalTLSWithRawResponse:
def with_streaming_response(self) -> AsyncTotalTLSWithStreamingResponse:
return AsyncTotalTLSWithStreamingResponse(self)

async def create(
async def update(
self,
zone_id: str,
*,
Expand All @@ -149,7 +149,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> TotalTLSCreateResponse:
) -> TotalTLSUpdateResponse:
"""
Set Total TLS Settings or disable the feature for a Zone.
Expand Down Expand Up @@ -178,7 +178,7 @@ async def create(
"enabled": enabled,
"certificate_authority": certificate_authority,
},
total_tls_create_params.TotalTLSCreateParams,
total_tls_update_params.TotalTLSUpdateParams,
),
options=make_request_options(
extra_headers=extra_headers,
Expand All @@ -187,7 +187,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[TotalTLSCreateResponse], ResultWrapper[TotalTLSCreateResponse]),
cast_to=cast(Type[TotalTLSUpdateResponse], ResultWrapper[TotalTLSUpdateResponse]),
)

async def get(
Expand Down Expand Up @@ -234,8 +234,8 @@ class TotalTLSWithRawResponse:
def __init__(self, total_tls: TotalTLS) -> None:
self._total_tls = total_tls

self.create = to_raw_response_wrapper(
total_tls.create,
self.update = to_raw_response_wrapper(
total_tls.update,
)
self.get = to_raw_response_wrapper(
total_tls.get,
Expand All @@ -246,8 +246,8 @@ class AsyncTotalTLSWithRawResponse:
def __init__(self, total_tls: AsyncTotalTLS) -> None:
self._total_tls = total_tls

self.create = async_to_raw_response_wrapper(
total_tls.create,
self.update = async_to_raw_response_wrapper(
total_tls.update,
)
self.get = async_to_raw_response_wrapper(
total_tls.get,
Expand All @@ -258,8 +258,8 @@ class TotalTLSWithStreamingResponse:
def __init__(self, total_tls: TotalTLS) -> None:
self._total_tls = total_tls

self.create = to_streamed_response_wrapper(
total_tls.create,
self.update = to_streamed_response_wrapper(
total_tls.update,
)
self.get = to_streamed_response_wrapper(
total_tls.get,
Expand All @@ -270,8 +270,8 @@ class AsyncTotalTLSWithStreamingResponse:
def __init__(self, total_tls: AsyncTotalTLS) -> None:
self._total_tls = total_tls

self.create = async_to_streamed_response_wrapper(
total_tls.create,
self.update = async_to_streamed_response_wrapper(
total_tls.update,
)
self.get = async_to_streamed_response_wrapper(
total_tls.get,
Expand Down
Loading

0 comments on commit 37163ea

Please sign in to comment.