Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): OpenAPI spec update via Stainless API #201

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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."""
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
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
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