Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#357)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Apr 23, 2024
1 parent e6e5f2d commit d7aa7ad
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3852,7 +3852,7 @@ Methods:
Types:

```python
from cloudflare.types.magic_transit.sites import ACL, ACLConfiguration, Subnet
from cloudflare.types.magic_transit.sites import ACL, ACLConfiguration, AllowedProtocol, Subnet
```

Methods:
Expand Down
10 changes: 5 additions & 5 deletions src/cloudflare/resources/magic_transit/sites/acls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from __future__ import annotations

from typing import List, Type, cast
from typing_extensions import Literal

import httpx

Expand All @@ -28,6 +27,7 @@
)
from ....types.magic_transit.sites import (
ACL,
AllowedProtocol,
ACLConfigurationParam,
acl_create_params,
acl_delete_params,
Expand Down Expand Up @@ -56,7 +56,7 @@ def create(
name: str,
description: str | NotGiven = NOT_GIVEN,
forward_locally: bool | NotGiven = NOT_GIVEN,
protocols: List[Literal["tcp", "udp", "icmp"]] | NotGiven = NOT_GIVEN,
protocols: List[AllowedProtocol] | 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 @@ -127,7 +127,7 @@ def update(
lan_1: ACLConfigurationParam | NotGiven = NOT_GIVEN,
lan_2: ACLConfigurationParam | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
protocols: List[Literal["tcp", "udp", "icmp"]] | NotGiven = NOT_GIVEN,
protocols: List[AllowedProtocol] | 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 @@ -352,7 +352,7 @@ async def create(
name: str,
description: str | NotGiven = NOT_GIVEN,
forward_locally: bool | NotGiven = NOT_GIVEN,
protocols: List[Literal["tcp", "udp", "icmp"]] | NotGiven = NOT_GIVEN,
protocols: List[AllowedProtocol] | 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 @@ -423,7 +423,7 @@ async def update(
lan_1: ACLConfigurationParam | NotGiven = NOT_GIVEN,
lan_2: ACLConfigurationParam | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
protocols: List[Literal["tcp", "udp", "icmp"]] | NotGiven = NOT_GIVEN,
protocols: List[AllowedProtocol] | 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
1 change: 1 addition & 0 deletions src/cloudflare/types/magic_transit/sites/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from .dhcp_server import DHCPServer as DHCPServer
from .subnet_param import SubnetParam as SubnetParam
from .routed_subnet import RoutedSubnet as RoutedSubnet
from .allowed_protocol import AllowedProtocol as AllowedProtocol
from .dhcp_relay_param import DHCPRelayParam as DHCPRelayParam
from .acl_configuration import ACLConfiguration as ACLConfiguration
from .acl_create_params import ACLCreateParams as ACLCreateParams
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/magic_transit/sites/acl.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from typing_extensions import Literal

from ...._models import BaseModel
from .allowed_protocol import AllowedProtocol
from .acl_configuration import ACLConfiguration

__all__ = ["ACL"]
Expand Down Expand Up @@ -31,4 +31,4 @@ class ACL(BaseModel):
name: Optional[str] = None
"""The name of the ACL."""

protocols: Optional[List[Literal["tcp", "udp", "icmp"]]] = None
protocols: Optional[List[AllowedProtocol]] = None
5 changes: 3 additions & 2 deletions src/cloudflare/types/magic_transit/sites/acl_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
from __future__ import annotations

from typing import List
from typing_extensions import Literal, Required, TypedDict
from typing_extensions import Required, TypedDict

from .allowed_protocol import AllowedProtocol
from .acl_configuration_param import ACLConfigurationParam

__all__ = ["ACLCreateParams"]
Expand Down Expand Up @@ -32,4 +33,4 @@ class ACLCreateParams(TypedDict, total=False):
not included in request, will default to false.
"""

protocols: List[Literal["tcp", "udp", "icmp"]]
protocols: List[AllowedProtocol]
5 changes: 3 additions & 2 deletions src/cloudflare/types/magic_transit/sites/acl_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
from __future__ import annotations

from typing import List
from typing_extensions import Literal, Required, TypedDict
from typing_extensions import Required, TypedDict

from .allowed_protocol import AllowedProtocol
from .acl_configuration_param import ACLConfigurationParam

__all__ = ["ACLUpdateParams"]
Expand Down Expand Up @@ -35,4 +36,4 @@ class ACLUpdateParams(TypedDict, total=False):
name: str
"""The name of the ACL."""

protocols: List[Literal["tcp", "udp", "icmp"]]
protocols: List[AllowedProtocol]
7 changes: 7 additions & 0 deletions src/cloudflare/types/magic_transit/sites/allowed_protocol.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing_extensions import Literal

__all__ = ["AllowedProtocol"]

AllowedProtocol = Literal["tcp", "udp", "icmp"]

0 comments on commit d7aa7ad

Please sign in to comment.