Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#996)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Jun 17, 2024
1 parent f1bbc0b commit 6e04248
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 86 deletions.
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7897,7 +7897,7 @@ Methods:

- <code title="get /accounts/{account_id}/ai-gateway/gateways/{id}/logs">client.ai_gateway.logs.<a href="./src/cloudflare/resources/ai_gateway/logs.py">get</a>(id, \*, account_id, \*\*<a href="src/cloudflare/types/ai_gateway/log_get_params.py">params</a>) -> <a href="./src/cloudflare/types/ai_gateway/log_get_response.py">LogGetResponse</a></code>

# Iam
# IAM

## PermissionGroups

Expand Down
16 changes: 8 additions & 8 deletions src/cloudflare/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class Cloudflare(SyncAPIClient):
cloudforce_one: resources.CloudforceOneResource
event_notifications: resources.EventNotificationsResource
ai_gateway: resources.AIGatewayResource
iam: resources.IamResource
iam: resources.IAMResource
with_raw_response: CloudflareWithRawResponse
with_streaming_response: CloudflareWithStreamedResponse

Expand Down Expand Up @@ -289,7 +289,7 @@ def __init__(
self.cloudforce_one = resources.CloudforceOneResource(self)
self.event_notifications = resources.EventNotificationsResource(self)
self.ai_gateway = resources.AIGatewayResource(self)
self.iam = resources.IamResource(self)
self.iam = resources.IAMResource(self)
self.with_raw_response = CloudflareWithRawResponse(self)
self.with_streaming_response = CloudflareWithStreamedResponse(self)

Expand Down Expand Up @@ -551,7 +551,7 @@ class AsyncCloudflare(AsyncAPIClient):
cloudforce_one: resources.AsyncCloudforceOneResource
event_notifications: resources.AsyncEventNotificationsResource
ai_gateway: resources.AsyncAIGatewayResource
iam: resources.AsyncIamResource
iam: resources.AsyncIAMResource
with_raw_response: AsyncCloudflareWithRawResponse
with_streaming_response: AsyncCloudflareWithStreamedResponse

Expand Down Expand Up @@ -710,7 +710,7 @@ def __init__(
self.cloudforce_one = resources.AsyncCloudforceOneResource(self)
self.event_notifications = resources.AsyncEventNotificationsResource(self)
self.ai_gateway = resources.AsyncAIGatewayResource(self)
self.iam = resources.AsyncIamResource(self)
self.iam = resources.AsyncIAMResource(self)
self.with_raw_response = AsyncCloudflareWithRawResponse(self)
self.with_streaming_response = AsyncCloudflareWithStreamedResponse(self)

Expand Down Expand Up @@ -983,7 +983,7 @@ def __init__(self, client: Cloudflare) -> None:
self.cloudforce_one = resources.CloudforceOneResourceWithRawResponse(client.cloudforce_one)
self.event_notifications = resources.EventNotificationsResourceWithRawResponse(client.event_notifications)
self.ai_gateway = resources.AIGatewayResourceWithRawResponse(client.ai_gateway)
self.iam = resources.IamResourceWithRawResponse(client.iam)
self.iam = resources.IAMResourceWithRawResponse(client.iam)


class AsyncCloudflareWithRawResponse:
Expand Down Expand Up @@ -1085,7 +1085,7 @@ def __init__(self, client: AsyncCloudflare) -> None:
self.cloudforce_one = resources.AsyncCloudforceOneResourceWithRawResponse(client.cloudforce_one)
self.event_notifications = resources.AsyncEventNotificationsResourceWithRawResponse(client.event_notifications)
self.ai_gateway = resources.AsyncAIGatewayResourceWithRawResponse(client.ai_gateway)
self.iam = resources.AsyncIamResourceWithRawResponse(client.iam)
self.iam = resources.AsyncIAMResourceWithRawResponse(client.iam)


class CloudflareWithStreamedResponse:
Expand Down Expand Up @@ -1187,7 +1187,7 @@ def __init__(self, client: Cloudflare) -> None:
self.cloudforce_one = resources.CloudforceOneResourceWithStreamingResponse(client.cloudforce_one)
self.event_notifications = resources.EventNotificationsResourceWithStreamingResponse(client.event_notifications)
self.ai_gateway = resources.AIGatewayResourceWithStreamingResponse(client.ai_gateway)
self.iam = resources.IamResourceWithStreamingResponse(client.iam)
self.iam = resources.IAMResourceWithStreamingResponse(client.iam)


class AsyncCloudflareWithStreamedResponse:
Expand Down Expand Up @@ -1297,7 +1297,7 @@ def __init__(self, client: AsyncCloudflare) -> None:
client.event_notifications
)
self.ai_gateway = resources.AsyncAIGatewayResourceWithStreamingResponse(client.ai_gateway)
self.iam = resources.AsyncIamResourceWithStreamingResponse(client.iam)
self.iam = resources.AsyncIAMResourceWithStreamingResponse(client.iam)


Client = Cloudflare
Expand Down
24 changes: 12 additions & 12 deletions src/cloudflare/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
AsyncDNSResourceWithStreamingResponse,
)
from .iam import (
IamResource,
AsyncIamResource,
IamResourceWithRawResponse,
AsyncIamResourceWithRawResponse,
IamResourceWithStreamingResponse,
AsyncIamResourceWithStreamingResponse,
IAMResource,
AsyncIAMResource,
IAMResourceWithRawResponse,
AsyncIAMResourceWithRawResponse,
IAMResourceWithStreamingResponse,
AsyncIAMResourceWithStreamingResponse,
)
from .ips import (
IPsResource,
Expand Down Expand Up @@ -1172,10 +1172,10 @@
"AsyncAIGatewayResourceWithRawResponse",
"AIGatewayResourceWithStreamingResponse",
"AsyncAIGatewayResourceWithStreamingResponse",
"IamResource",
"AsyncIamResource",
"IamResourceWithRawResponse",
"AsyncIamResourceWithRawResponse",
"IamResourceWithStreamingResponse",
"AsyncIamResourceWithStreamingResponse",
"IAMResource",
"AsyncIAMResource",
"IAMResourceWithRawResponse",
"AsyncIAMResourceWithRawResponse",
"IAMResourceWithStreamingResponse",
"AsyncIAMResourceWithStreamingResponse",
]
16 changes: 8 additions & 8 deletions src/cloudflare/resources/accounts/members.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def create(
*,
account_id: str,
email: str,
policies: Iterable[member_create_params.IamCreateMemberWithPoliciesPolicy],
policies: Iterable[member_create_params.IAMCreateMemberWithPoliciesPolicy],
status: Literal["accepted", "pending"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -124,7 +124,7 @@ def create(
email: str,
roles: List[str] | NotGiven = NOT_GIVEN,
status: Literal["accepted", "pending"] | NotGiven = NOT_GIVEN,
policies: Iterable[member_create_params.IamCreateMemberWithPoliciesPolicy] | NotGiven = NOT_GIVEN,
policies: Iterable[member_create_params.IAMCreateMemberWithPoliciesPolicy] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -195,7 +195,7 @@ def update(
member_id: str,
*,
account_id: str,
policies: Iterable[member_update_params.IamUpdateMemberWithPoliciesPolicy],
policies: Iterable[member_update_params.IAMUpdateMemberWithPoliciesPolicy],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -230,7 +230,7 @@ def update(
*,
account_id: str,
roles: Iterable[member_update_params.MemberRole] | NotGiven = NOT_GIVEN,
policies: Iterable[member_update_params.IamUpdateMemberWithPoliciesPolicy] | NotGiven = NOT_GIVEN,
policies: Iterable[member_update_params.IAMUpdateMemberWithPoliciesPolicy] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -464,7 +464,7 @@ async def create(
*,
account_id: str,
email: str,
policies: Iterable[member_create_params.IamCreateMemberWithPoliciesPolicy],
policies: Iterable[member_create_params.IAMCreateMemberWithPoliciesPolicy],
status: Literal["accepted", "pending"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -501,7 +501,7 @@ async def create(
email: str,
roles: List[str] | NotGiven = NOT_GIVEN,
status: Literal["accepted", "pending"] | NotGiven = NOT_GIVEN,
policies: Iterable[member_create_params.IamCreateMemberWithPoliciesPolicy] | NotGiven = NOT_GIVEN,
policies: Iterable[member_create_params.IAMCreateMemberWithPoliciesPolicy] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -572,7 +572,7 @@ async def update(
member_id: str,
*,
account_id: str,
policies: Iterable[member_update_params.IamUpdateMemberWithPoliciesPolicy],
policies: Iterable[member_update_params.IAMUpdateMemberWithPoliciesPolicy],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -607,7 +607,7 @@ async def update(
*,
account_id: str,
roles: Iterable[member_update_params.MemberRole] | NotGiven = NOT_GIVEN,
policies: Iterable[member_update_params.IamUpdateMemberWithPoliciesPolicy] | NotGiven = NOT_GIVEN,
policies: Iterable[member_update_params.IAMUpdateMemberWithPoliciesPolicy] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down
24 changes: 12 additions & 12 deletions src/cloudflare/resources/iam/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .iam import (
IamResource,
AsyncIamResource,
IamResourceWithRawResponse,
AsyncIamResourceWithRawResponse,
IamResourceWithStreamingResponse,
AsyncIamResourceWithStreamingResponse,
IAMResource,
AsyncIAMResource,
IAMResourceWithRawResponse,
AsyncIAMResourceWithRawResponse,
IAMResourceWithStreamingResponse,
AsyncIAMResourceWithStreamingResponse,
)
from .resource_groups import (
ResourceGroupsResource,
Expand Down Expand Up @@ -38,10 +38,10 @@
"AsyncResourceGroupsResourceWithRawResponse",
"ResourceGroupsResourceWithStreamingResponse",
"AsyncResourceGroupsResourceWithStreamingResponse",
"IamResource",
"AsyncIamResource",
"IamResourceWithRawResponse",
"AsyncIamResourceWithRawResponse",
"IamResourceWithStreamingResponse",
"AsyncIamResourceWithStreamingResponse",
"IAMResource",
"AsyncIAMResource",
"IAMResourceWithRawResponse",
"AsyncIAMResourceWithRawResponse",
"IAMResourceWithStreamingResponse",
"AsyncIAMResourceWithStreamingResponse",
]
38 changes: 19 additions & 19 deletions src/cloudflare/resources/iam/iam.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
AsyncPermissionGroupsResourceWithStreamingResponse,
)

__all__ = ["IamResource", "AsyncIamResource"]
__all__ = ["IAMResource", "AsyncIAMResource"]


class IamResource(SyncAPIResource):
class IAMResource(SyncAPIResource):
@cached_property
def permission_groups(self) -> PermissionGroupsResource:
return PermissionGroupsResource(self._client)
Expand All @@ -34,15 +34,15 @@ def resource_groups(self) -> ResourceGroupsResource:
return ResourceGroupsResource(self._client)

@cached_property
def with_raw_response(self) -> IamResourceWithRawResponse:
return IamResourceWithRawResponse(self)
def with_raw_response(self) -> IAMResourceWithRawResponse:
return IAMResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> IamResourceWithStreamingResponse:
return IamResourceWithStreamingResponse(self)
def with_streaming_response(self) -> IAMResourceWithStreamingResponse:
return IAMResourceWithStreamingResponse(self)


class AsyncIamResource(AsyncAPIResource):
class AsyncIAMResource(AsyncAPIResource):
@cached_property
def permission_groups(self) -> AsyncPermissionGroupsResource:
return AsyncPermissionGroupsResource(self._client)
Expand All @@ -52,16 +52,16 @@ def resource_groups(self) -> AsyncResourceGroupsResource:
return AsyncResourceGroupsResource(self._client)

@cached_property
def with_raw_response(self) -> AsyncIamResourceWithRawResponse:
return AsyncIamResourceWithRawResponse(self)
def with_raw_response(self) -> AsyncIAMResourceWithRawResponse:
return AsyncIAMResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AsyncIamResourceWithStreamingResponse:
return AsyncIamResourceWithStreamingResponse(self)
def with_streaming_response(self) -> AsyncIAMResourceWithStreamingResponse:
return AsyncIAMResourceWithStreamingResponse(self)


class IamResourceWithRawResponse:
def __init__(self, iam: IamResource) -> None:
class IAMResourceWithRawResponse:
def __init__(self, iam: IAMResource) -> None:
self._iam = iam

@cached_property
Expand All @@ -73,8 +73,8 @@ def resource_groups(self) -> ResourceGroupsResourceWithRawResponse:
return ResourceGroupsResourceWithRawResponse(self._iam.resource_groups)


class AsyncIamResourceWithRawResponse:
def __init__(self, iam: AsyncIamResource) -> None:
class AsyncIAMResourceWithRawResponse:
def __init__(self, iam: AsyncIAMResource) -> None:
self._iam = iam

@cached_property
Expand All @@ -86,8 +86,8 @@ def resource_groups(self) -> AsyncResourceGroupsResourceWithRawResponse:
return AsyncResourceGroupsResourceWithRawResponse(self._iam.resource_groups)


class IamResourceWithStreamingResponse:
def __init__(self, iam: IamResource) -> None:
class IAMResourceWithStreamingResponse:
def __init__(self, iam: IAMResource) -> None:
self._iam = iam

@cached_property
Expand All @@ -99,8 +99,8 @@ def resource_groups(self) -> ResourceGroupsResourceWithStreamingResponse:
return ResourceGroupsResourceWithStreamingResponse(self._iam.resource_groups)


class AsyncIamResourceWithStreamingResponse:
def __init__(self, iam: AsyncIamResource) -> None:
class AsyncIAMResourceWithStreamingResponse:
def __init__(self, iam: AsyncIAMResource) -> None:
self._iam = iam

@cached_property
Expand Down
28 changes: 14 additions & 14 deletions src/cloudflare/types/accounts/member_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

__all__ = [
"MemberCreateParams",
"IamCreateMemberWithRoles",
"IamCreateMemberWithPolicies",
"IamCreateMemberWithPoliciesPolicy",
"IamCreateMemberWithPoliciesPolicyPermissionGroup",
"IamCreateMemberWithPoliciesPolicyResourceGroup",
"IAMCreateMemberWithRoles",
"IAMCreateMemberWithPolicies",
"IAMCreateMemberWithPoliciesPolicy",
"IAMCreateMemberWithPoliciesPolicyPermissionGroup",
"IAMCreateMemberWithPoliciesPolicyResourceGroup",
]


class IamCreateMemberWithRoles(TypedDict, total=False):
class IAMCreateMemberWithRoles(TypedDict, total=False):
account_id: Required[str]
"""Account identifier tag."""

Expand All @@ -28,38 +28,38 @@ class IamCreateMemberWithRoles(TypedDict, total=False):
status: Literal["accepted", "pending"]


class IamCreateMemberWithPolicies(TypedDict, total=False):
class IAMCreateMemberWithPolicies(TypedDict, total=False):
account_id: Required[str]
"""Account identifier tag."""

email: Required[str]
"""The contact email address of the user."""

policies: Required[Iterable[IamCreateMemberWithPoliciesPolicy]]
policies: Required[Iterable[IAMCreateMemberWithPoliciesPolicy]]
"""Array of policies associated with this member."""

status: Literal["accepted", "pending"]


class IamCreateMemberWithPoliciesPolicyPermissionGroup(TypedDict, total=False):
class IAMCreateMemberWithPoliciesPolicyPermissionGroup(TypedDict, total=False):
id: Required[str]
"""Identifier of the group."""


class IamCreateMemberWithPoliciesPolicyResourceGroup(TypedDict, total=False):
class IAMCreateMemberWithPoliciesPolicyResourceGroup(TypedDict, total=False):
id: Required[str]
"""Identifier of the group."""


class IamCreateMemberWithPoliciesPolicy(TypedDict, total=False):
class IAMCreateMemberWithPoliciesPolicy(TypedDict, total=False):
access: Required[Literal["allow", "deny"]]
"""Allow or deny operations against the resources."""

permission_groups: Required[Iterable[IamCreateMemberWithPoliciesPolicyPermissionGroup]]
permission_groups: Required[Iterable[IAMCreateMemberWithPoliciesPolicyPermissionGroup]]
"""A set of permission groups that are specified to the policy."""

resource_groups: Required[Iterable[IamCreateMemberWithPoliciesPolicyResourceGroup]]
resource_groups: Required[Iterable[IAMCreateMemberWithPoliciesPolicyResourceGroup]]
"""A list of resource groups that the policy applies to."""


MemberCreateParams = Union[IamCreateMemberWithRoles, IamCreateMemberWithPolicies]
MemberCreateParams = Union[IAMCreateMemberWithRoles, IAMCreateMemberWithPolicies]
Loading

0 comments on commit 6e04248

Please sign in to comment.