Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Mar 15, 2024
1 parent 2f42526 commit 92ce29b
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 96 deletions.
8 changes: 4 additions & 4 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5101,14 +5101,14 @@ Types:
from cloudflare.types.zero_trust.access.certificates import (
AccessSettings,
SettingUpdateResponse,
SettingListResponse,
SettingGetResponse,
)
```

Methods:

- <code title="put /{account_or_zone}/{account_or_zone_id}/access/certificates/settings">client.zero_trust.access.certificates.settings.<a href="./src/cloudflare/resources/zero_trust/access/certificates/settings.py">update</a>(\*, account_id, zone_id, \*\*<a href="src/cloudflare/types/zero_trust/access/certificates/setting_update_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/access/certificates/setting_update_response.py">Optional</a></code>
- <code title="get /{account_or_zone}/{account_or_zone_id}/access/certificates/settings">client.zero_trust.access.certificates.settings.<a href="./src/cloudflare/resources/zero_trust/access/certificates/settings.py">list</a>(\*, account_id, zone_id) -> <a href="./src/cloudflare/types/zero_trust/access/certificates/setting_list_response.py">Optional</a></code>
- <code title="get /{account_or_zone}/{account_or_zone_id}/access/certificates/settings">client.zero_trust.access.certificates.settings.<a href="./src/cloudflare/resources/zero_trust/access/certificates/settings.py">get</a>(\*, account_id, zone_id) -> <a href="./src/cloudflare/types/zero_trust/access/certificates/setting_get_response.py">Optional</a></code>

### Groups

Expand Down Expand Up @@ -5173,13 +5173,13 @@ Methods:
Types:

```python
from cloudflare.types.zero_trust.access import KeyUpdateResponse, KeyListResponse, KeyRotateResponse
from cloudflare.types.zero_trust.access import KeyUpdateResponse, KeyGetResponse, KeyRotateResponse
```

Methods:

- <code title="put /accounts/{identifier}/access/keys">client.zero_trust.access.keys.<a href="./src/cloudflare/resources/zero_trust/access/keys.py">update</a>(identifier, \*\*<a href="src/cloudflare/types/zero_trust/access/key_update_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/access/key_update_response.py">KeyUpdateResponse</a></code>
- <code title="get /accounts/{identifier}/access/keys">client.zero_trust.access.keys.<a href="./src/cloudflare/resources/zero_trust/access/keys.py">list</a>(identifier) -> <a href="./src/cloudflare/types/zero_trust/access/key_list_response.py">KeyListResponse</a></code>
- <code title="get /accounts/{identifier}/access/keys">client.zero_trust.access.keys.<a href="./src/cloudflare/resources/zero_trust/access/keys.py">get</a>(identifier) -> <a href="./src/cloudflare/types/zero_trust/access/key_get_response.py">KeyGetResponse</a></code>
- <code title="post /accounts/{identifier}/access/keys/rotate">client.zero_trust.access.keys.<a href="./src/cloudflare/resources/zero_trust/access/keys.py">rotate</a>(identifier) -> <a href="./src/cloudflare/types/zero_trust/access/key_rotate_response.py">KeyRotateResponse</a></code>

### Logs
Expand Down
30 changes: 15 additions & 15 deletions src/cloudflare/resources/zero_trust/access/certificates/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
make_request_options,
)
from .....types.zero_trust.access.certificates import (
SettingGetResponse,
AccessSettingsParam,
SettingListResponse,
SettingUpdateResponse,
setting_update_params,
)
Expand Down Expand Up @@ -99,7 +99,7 @@ def update(
cast_to=cast(Type[Optional[SettingUpdateResponse]], ResultWrapper[SettingUpdateResponse]),
)

def list(
def get(
self,
*,
account_id: str | NotGiven = NOT_GIVEN,
Expand All @@ -110,7 +110,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[SettingListResponse]:
) -> Optional[SettingGetResponse]:
"""
List all mTLS hostname settings for this account or zone.
Expand Down Expand Up @@ -151,7 +151,7 @@ def list(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[SettingListResponse]], ResultWrapper[SettingListResponse]),
cast_to=cast(Type[Optional[SettingGetResponse]], ResultWrapper[SettingGetResponse]),
)


Expand Down Expand Up @@ -221,7 +221,7 @@ async def update(
cast_to=cast(Type[Optional[SettingUpdateResponse]], ResultWrapper[SettingUpdateResponse]),
)

async def list(
async def get(
self,
*,
account_id: str | NotGiven = NOT_GIVEN,
Expand All @@ -232,7 +232,7 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[SettingListResponse]:
) -> Optional[SettingGetResponse]:
"""
List all mTLS hostname settings for this account or zone.
Expand Down Expand Up @@ -273,7 +273,7 @@ async def list(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[SettingListResponse]], ResultWrapper[SettingListResponse]),
cast_to=cast(Type[Optional[SettingGetResponse]], ResultWrapper[SettingGetResponse]),
)


Expand All @@ -284,8 +284,8 @@ def __init__(self, settings: Settings) -> None:
self.update = to_raw_response_wrapper(
settings.update,
)
self.list = to_raw_response_wrapper(
settings.list,
self.get = to_raw_response_wrapper(
settings.get,
)


Expand All @@ -296,8 +296,8 @@ def __init__(self, settings: AsyncSettings) -> None:
self.update = async_to_raw_response_wrapper(
settings.update,
)
self.list = async_to_raw_response_wrapper(
settings.list,
self.get = async_to_raw_response_wrapper(
settings.get,
)


Expand All @@ -308,8 +308,8 @@ def __init__(self, settings: Settings) -> None:
self.update = to_streamed_response_wrapper(
settings.update,
)
self.list = to_streamed_response_wrapper(
settings.list,
self.get = to_streamed_response_wrapper(
settings.get,
)


Expand All @@ -320,6 +320,6 @@ def __init__(self, settings: AsyncSettings) -> None:
self.update = async_to_streamed_response_wrapper(
settings.update,
)
self.list = async_to_streamed_response_wrapper(
settings.list,
self.get = async_to_streamed_response_wrapper(
settings.get,
)
34 changes: 17 additions & 17 deletions src/cloudflare/resources/zero_trust/access/keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from ...._base_client import (
make_request_options,
)
from ....types.zero_trust.access import KeyListResponse, KeyRotateResponse, KeyUpdateResponse, key_update_params
from ....types.zero_trust.access import KeyGetResponse, KeyRotateResponse, KeyUpdateResponse, key_update_params

__all__ = ["Keys", "AsyncKeys"]

Expand Down Expand Up @@ -87,7 +87,7 @@ def update(
),
)

def list(
def get(
self,
identifier: str,
*,
Expand All @@ -97,7 +97,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> KeyListResponse:
) -> KeyGetResponse:
"""
Gets the Access key rotation settings for an account.
Expand All @@ -115,7 +115,7 @@ def list(
if not identifier:
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
return cast(
KeyListResponse,
KeyGetResponse,
self._get(
f"/accounts/{identifier}/access/keys",
options=make_request_options(
Expand All @@ -126,7 +126,7 @@ def list(
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[KeyListResponse]
Any, ResultWrapper[KeyGetResponse]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand Down Expand Up @@ -235,7 +235,7 @@ async def update(
),
)

async def list(
async def get(
self,
identifier: str,
*,
Expand All @@ -245,7 +245,7 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> KeyListResponse:
) -> KeyGetResponse:
"""
Gets the Access key rotation settings for an account.
Expand All @@ -263,7 +263,7 @@ async def list(
if not identifier:
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
return cast(
KeyListResponse,
KeyGetResponse,
await self._get(
f"/accounts/{identifier}/access/keys",
options=make_request_options(
Expand All @@ -274,7 +274,7 @@ async def list(
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(
Any, ResultWrapper[KeyListResponse]
Any, ResultWrapper[KeyGetResponse]
), # Union types cannot be passed in as arguments in the type system
),
)
Expand Down Expand Up @@ -331,8 +331,8 @@ def __init__(self, keys: Keys) -> None:
self.update = to_raw_response_wrapper(
keys.update,
)
self.list = to_raw_response_wrapper(
keys.list,
self.get = to_raw_response_wrapper(
keys.get,
)
self.rotate = to_raw_response_wrapper(
keys.rotate,
Expand All @@ -346,8 +346,8 @@ def __init__(self, keys: AsyncKeys) -> None:
self.update = async_to_raw_response_wrapper(
keys.update,
)
self.list = async_to_raw_response_wrapper(
keys.list,
self.get = async_to_raw_response_wrapper(
keys.get,
)
self.rotate = async_to_raw_response_wrapper(
keys.rotate,
Expand All @@ -361,8 +361,8 @@ def __init__(self, keys: Keys) -> None:
self.update = to_streamed_response_wrapper(
keys.update,
)
self.list = to_streamed_response_wrapper(
keys.list,
self.get = to_streamed_response_wrapper(
keys.get,
)
self.rotate = to_streamed_response_wrapper(
keys.rotate,
Expand All @@ -376,8 +376,8 @@ def __init__(self, keys: AsyncKeys) -> None:
self.update = async_to_streamed_response_wrapper(
keys.update,
)
self.list = async_to_streamed_response_wrapper(
keys.list,
self.get = async_to_streamed_response_wrapper(
keys.get,
)
self.rotate = async_to_streamed_response_wrapper(
keys.rotate,
Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/types/zero_trust/access/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from .access_users import AccessUsers as AccessUsers
from .access_groups import AccessGroups as AccessGroups
from .access_bookmarks import AccessBookmarks as AccessBookmarks
from .key_list_response import KeyListResponse as KeyListResponse
from .key_get_response import KeyGetResponse as KeyGetResponse
from .key_update_params import KeyUpdateParams as KeyUpdateParams
from .tag_create_params import TagCreateParams as TagCreateParams
from .tag_list_response import TagListResponse as TagListResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

from .access_settings import AccessSettings as AccessSettings
from .setting_get_response import SettingGetResponse as SettingGetResponse
from .access_settings_param import AccessSettingsParam as AccessSettingsParam
from .setting_list_response import SettingListResponse as SettingListResponse
from .setting_update_params import SettingUpdateParams as SettingUpdateParams
from .setting_update_response import SettingUpdateResponse as SettingUpdateResponse
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

from .access_settings import AccessSettings

__all__ = ["SettingListResponse"]
__all__ = ["SettingGetResponse"]

SettingListResponse = List[AccessSettings]
SettingGetResponse = List[AccessSettings]
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

from typing import Union

__all__ = ["KeyListResponse"]
__all__ = ["KeyGetResponse"]

KeyListResponse = Union[object, str]
KeyGetResponse = Union[object, str]
Loading

0 comments on commit 92ce29b

Please sign in to comment.