Skip to content

Commit d7aa7ad

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#357)
1 parent e6e5f2d commit d7aa7ad

File tree

7 files changed

+22
-12
lines changed

7 files changed

+22
-12
lines changed

api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3852,7 +3852,7 @@ Methods:
38523852
Types:
38533853

38543854
```python
3855-
from cloudflare.types.magic_transit.sites import ACL, ACLConfiguration, Subnet
3855+
from cloudflare.types.magic_transit.sites import ACL, ACLConfiguration, AllowedProtocol, Subnet
38563856
```
38573857

38583858
Methods:

src/cloudflare/resources/magic_transit/sites/acls.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from __future__ import annotations
44

55
from typing import List, Type, cast
6-
from typing_extensions import Literal
76

87
import httpx
98

@@ -28,6 +27,7 @@
2827
)
2928
from ....types.magic_transit.sites import (
3029
ACL,
30+
AllowedProtocol,
3131
ACLConfigurationParam,
3232
acl_create_params,
3333
acl_delete_params,
@@ -56,7 +56,7 @@ def create(
5656
name: str,
5757
description: str | NotGiven = NOT_GIVEN,
5858
forward_locally: bool | NotGiven = NOT_GIVEN,
59-
protocols: List[Literal["tcp", "udp", "icmp"]] | NotGiven = NOT_GIVEN,
59+
protocols: List[AllowedProtocol] | NotGiven = NOT_GIVEN,
6060
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6161
# The extra values given here take precedence over values defined on the client or passed to this method.
6262
extra_headers: Headers | None = None,
@@ -127,7 +127,7 @@ def update(
127127
lan_1: ACLConfigurationParam | NotGiven = NOT_GIVEN,
128128
lan_2: ACLConfigurationParam | NotGiven = NOT_GIVEN,
129129
name: str | NotGiven = NOT_GIVEN,
130-
protocols: List[Literal["tcp", "udp", "icmp"]] | NotGiven = NOT_GIVEN,
130+
protocols: List[AllowedProtocol] | NotGiven = NOT_GIVEN,
131131
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
132132
# The extra values given here take precedence over values defined on the client or passed to this method.
133133
extra_headers: Headers | None = None,
@@ -352,7 +352,7 @@ async def create(
352352
name: str,
353353
description: str | NotGiven = NOT_GIVEN,
354354
forward_locally: bool | NotGiven = NOT_GIVEN,
355-
protocols: List[Literal["tcp", "udp", "icmp"]] | NotGiven = NOT_GIVEN,
355+
protocols: List[AllowedProtocol] | NotGiven = NOT_GIVEN,
356356
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
357357
# The extra values given here take precedence over values defined on the client or passed to this method.
358358
extra_headers: Headers | None = None,
@@ -423,7 +423,7 @@ async def update(
423423
lan_1: ACLConfigurationParam | NotGiven = NOT_GIVEN,
424424
lan_2: ACLConfigurationParam | NotGiven = NOT_GIVEN,
425425
name: str | NotGiven = NOT_GIVEN,
426-
protocols: List[Literal["tcp", "udp", "icmp"]] | NotGiven = NOT_GIVEN,
426+
protocols: List[AllowedProtocol] | NotGiven = NOT_GIVEN,
427427
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
428428
# The extra values given here take precedence over values defined on the client or passed to this method.
429429
extra_headers: Headers | None = None,

src/cloudflare/types/magic_transit/sites/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from .dhcp_server import DHCPServer as DHCPServer
1313
from .subnet_param import SubnetParam as SubnetParam
1414
from .routed_subnet import RoutedSubnet as RoutedSubnet
15+
from .allowed_protocol import AllowedProtocol as AllowedProtocol
1516
from .dhcp_relay_param import DHCPRelayParam as DHCPRelayParam
1617
from .acl_configuration import ACLConfiguration as ACLConfiguration
1718
from .acl_create_params import ACLCreateParams as ACLCreateParams

src/cloudflare/types/magic_transit/sites/acl.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
from typing import List, Optional
4-
from typing_extensions import Literal
54

65
from ...._models import BaseModel
6+
from .allowed_protocol import AllowedProtocol
77
from .acl_configuration import ACLConfiguration
88

99
__all__ = ["ACL"]
@@ -31,4 +31,4 @@ class ACL(BaseModel):
3131
name: Optional[str] = None
3232
"""The name of the ACL."""
3333

34-
protocols: Optional[List[Literal["tcp", "udp", "icmp"]]] = None
34+
protocols: Optional[List[AllowedProtocol]] = None

src/cloudflare/types/magic_transit/sites/acl_create_params.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
from __future__ import annotations
44

55
from typing import List
6-
from typing_extensions import Literal, Required, TypedDict
6+
from typing_extensions import Required, TypedDict
77

8+
from .allowed_protocol import AllowedProtocol
89
from .acl_configuration_param import ACLConfigurationParam
910

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

35-
protocols: List[Literal["tcp", "udp", "icmp"]]
36+
protocols: List[AllowedProtocol]

src/cloudflare/types/magic_transit/sites/acl_update_params.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
from __future__ import annotations
44

55
from typing import List
6-
from typing_extensions import Literal, Required, TypedDict
6+
from typing_extensions import Required, TypedDict
77

8+
from .allowed_protocol import AllowedProtocol
89
from .acl_configuration_param import ACLConfigurationParam
910

1011
__all__ = ["ACLUpdateParams"]
@@ -35,4 +36,4 @@ class ACLUpdateParams(TypedDict, total=False):
3536
name: str
3637
"""The name of the ACL."""
3738

38-
protocols: List[Literal["tcp", "udp", "icmp"]]
39+
protocols: List[AllowedProtocol]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing_extensions import Literal
4+
5+
__all__ = ["AllowedProtocol"]
6+
7+
AllowedProtocol = Literal["tcp", "udp", "icmp"]

0 commit comments

Comments
 (0)