Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Apr 24, 2024
1 parent 9cd06e0 commit 7c214a7
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 3 deletions.
8 changes: 8 additions & 0 deletions src/cloudflare/types/magic_transit/sites/acl_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,12 @@ class ACL(TypedDict, total=False):
description: str
"""Description for the ACL."""

forward_locally: bool
"""The desired forwarding action for this ACL policy.
If set to "false", the policy will forward traffic to Cloudflare. If set to
"true", the policy will forward traffic locally on the Magic WAN Connector. If
not included in request, will default to false.
"""

protocols: List[Literal["tcp", "udp", "icmp"]]
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ class ACL(BaseModel):
description: Optional[str] = None
"""Description for the ACL."""

forward_locally: Optional[bool] = None
"""The desired forwarding action for this ACL policy.
If set to "false", the policy will forward traffic to Cloudflare. If set to
"true", the policy will forward traffic locally on the Magic WAN Connector. If
not included in request, will default to false.
"""

lan_1: Optional[ACLLAN1] = None

lan_2: Optional[ACLLAN2] = None
Expand Down
10 changes: 9 additions & 1 deletion src/cloudflare/types/magic_transit/sites/acl_delete_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ class DeletedACL(BaseModel):
description: Optional[str] = None
"""Description for the ACL."""

forward_locally: Optional[bool] = None
"""The desired forwarding action for this ACL policy.
If set to "false", the policy will forward traffic to Cloudflare. If set to
"true", the policy will forward traffic locally on the Magic WAN Connector. If
not included in request, will default to false.
"""

lan_1: Optional[DeletedACLLAN1] = None

lan_2: Optional[DeletedACLLAN2] = None
Expand All @@ -71,4 +79,4 @@ class ACLDeleteResponse(BaseModel):
deleted: Optional[bool] = None

deleted_acl: Optional[DeletedACL] = None
"""Bidirectional ACL policy for local network traffic within a site."""
"""Bidirectional ACL policy for network traffic within a site."""
10 changes: 9 additions & 1 deletion src/cloudflare/types/magic_transit/sites/acl_get_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ class ACL(BaseModel):
description: Optional[str] = None
"""Description for the ACL."""

forward_locally: Optional[bool] = None
"""The desired forwarding action for this ACL policy.
If set to "false", the policy will forward traffic to Cloudflare. If set to
"true", the policy will forward traffic locally on the Magic WAN Connector. If
not included in request, will default to false.
"""

lan_1: Optional[ACLLAN1] = None

lan_2: Optional[ACLLAN2] = None
Expand All @@ -69,4 +77,4 @@ class ACL(BaseModel):

class ACLGetResponse(BaseModel):
acl: Optional[ACL] = None
"""Bidirectional ACL policy for local network traffic within a site."""
"""Bidirectional ACL policy for network traffic within a site."""
8 changes: 8 additions & 0 deletions src/cloudflare/types/magic_transit/sites/acl_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ class ACL(BaseModel):
description: Optional[str] = None
"""Description for the ACL."""

forward_locally: Optional[bool] = None
"""The desired forwarding action for this ACL policy.
If set to "false", the policy will forward traffic to Cloudflare. If set to
"true", the policy will forward traffic locally on the Magic WAN Connector. If
not included in request, will default to false.
"""

lan_1: Optional[ACLLAN1] = None

lan_2: Optional[ACLLAN2] = None
Expand Down
8 changes: 8 additions & 0 deletions src/cloudflare/types/magic_transit/sites/acl_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ class ACL(TypedDict, total=False):
description: str
"""Description for the ACL."""

forward_locally: bool
"""The desired forwarding action for this ACL policy.
If set to "false", the policy will forward traffic to Cloudflare. If set to
"true", the policy will forward traffic locally on the Magic WAN Connector. If
not included in request, will default to false.
"""

lan_1: ACLLAN1

lan_2: ACLLAN2
Expand Down
10 changes: 9 additions & 1 deletion src/cloudflare/types/magic_transit/sites/acl_update_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ class ACL(BaseModel):
description: Optional[str] = None
"""Description for the ACL."""

forward_locally: Optional[bool] = None
"""The desired forwarding action for this ACL policy.
If set to "false", the policy will forward traffic to Cloudflare. If set to
"true", the policy will forward traffic locally on the Magic WAN Connector. If
not included in request, will default to false.
"""

lan_1: Optional[ACLLAN1] = None

lan_2: Optional[ACLLAN2] = None
Expand All @@ -69,4 +77,4 @@ class ACL(BaseModel):

class ACLUpdateResponse(BaseModel):
acl: Optional[ACL] = None
"""Bidirectional ACL policy for local network traffic within a site."""
"""Bidirectional ACL policy for network traffic within a site."""
4 changes: 4 additions & 0 deletions tests/api_resources/magic_transit/sites/test_acls.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
acl={
"description": "Allows local traffic between PIN pads and cash register.",
"forward_locally": True,
"lan_1": {
"lan_id": "string",
"lan_name": "string",
Expand Down Expand Up @@ -120,6 +121,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
site_id="023e105f4ecef8ad9ca31a8372d0c353",
acl={
"description": "Allows local traffic between PIN pads and cash register.",
"forward_locally": True,
"lan_1": {
"lan_id": "string",
"lan_name": "string",
Expand Down Expand Up @@ -393,6 +395,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
account_id="023e105f4ecef8ad9ca31a8372d0c353",
acl={
"description": "Allows local traffic between PIN pads and cash register.",
"forward_locally": True,
"lan_1": {
"lan_id": "string",
"lan_name": "string",
Expand Down Expand Up @@ -473,6 +476,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
site_id="023e105f4ecef8ad9ca31a8372d0c353",
acl={
"description": "Allows local traffic between PIN pads and cash register.",
"forward_locally": True,
"lan_1": {
"lan_id": "string",
"lan_name": "string",
Expand Down

0 comments on commit 7c214a7

Please sign in to comment.