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 #194

Merged
merged 1 commit into from
Apr 1, 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
16 changes: 0 additions & 16 deletions src/cloudflare/resources/dns/firewall/firewall.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def create(
maximum_cache_ttl: float | NotGiven = NOT_GIVEN,
minimum_cache_ttl: float | NotGiven = NOT_GIVEN,
negative_cache_ttl: Optional[float] | NotGiven = NOT_GIVEN,
origin_ips: object | NotGiven = NOT_GIVEN,
ratelimit: Optional[float] | NotGiven = NOT_GIVEN,
retries: float | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -100,8 +99,6 @@ def create(

negative_cache_ttl: Negative DNS Cache TTL.

origin_ips: Deprecated alias for "upstream_ips".

ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to
the upstream nameservers configured on the cluster).

Expand Down Expand Up @@ -130,7 +127,6 @@ def create(
"maximum_cache_ttl": maximum_cache_ttl,
"minimum_cache_ttl": minimum_cache_ttl,
"negative_cache_ttl": negative_cache_ttl,
"origin_ips": origin_ips,
"ratelimit": ratelimit,
"retries": retries,
},
Expand Down Expand Up @@ -256,7 +252,6 @@ def edit(
upstream_ips: List[Union[str, str]],
attack_mitigation: Optional[firewall_edit_params.AttackMitigation] | NotGiven = NOT_GIVEN,
negative_cache_ttl: Optional[float] | NotGiven = NOT_GIVEN,
origin_ips: object | NotGiven = NOT_GIVEN,
ratelimit: Optional[float] | NotGiven = NOT_GIVEN,
retries: float | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -288,8 +283,6 @@ def edit(

negative_cache_ttl: Negative DNS Cache TTL.

origin_ips: Deprecated alias for "upstream_ips".

ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to
the upstream nameservers configured on the cluster).

Expand Down Expand Up @@ -321,7 +314,6 @@ def edit(
"upstream_ips": upstream_ips,
"attack_mitigation": attack_mitigation,
"negative_cache_ttl": negative_cache_ttl,
"origin_ips": origin_ips,
"ratelimit": ratelimit,
"retries": retries,
},
Expand Down Expand Up @@ -407,7 +399,6 @@ async def create(
maximum_cache_ttl: float | NotGiven = NOT_GIVEN,
minimum_cache_ttl: float | NotGiven = NOT_GIVEN,
negative_cache_ttl: Optional[float] | NotGiven = NOT_GIVEN,
origin_ips: object | NotGiven = NOT_GIVEN,
ratelimit: Optional[float] | NotGiven = NOT_GIVEN,
retries: float | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -437,8 +428,6 @@ async def create(

negative_cache_ttl: Negative DNS Cache TTL.

origin_ips: Deprecated alias for "upstream_ips".

ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to
the upstream nameservers configured on the cluster).

Expand Down Expand Up @@ -467,7 +456,6 @@ async def create(
"maximum_cache_ttl": maximum_cache_ttl,
"minimum_cache_ttl": minimum_cache_ttl,
"negative_cache_ttl": negative_cache_ttl,
"origin_ips": origin_ips,
"ratelimit": ratelimit,
"retries": retries,
},
Expand Down Expand Up @@ -593,7 +581,6 @@ async def edit(
upstream_ips: List[Union[str, str]],
attack_mitigation: Optional[firewall_edit_params.AttackMitigation] | NotGiven = NOT_GIVEN,
negative_cache_ttl: Optional[float] | NotGiven = NOT_GIVEN,
origin_ips: object | NotGiven = NOT_GIVEN,
ratelimit: Optional[float] | NotGiven = NOT_GIVEN,
retries: float | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -625,8 +612,6 @@ async def edit(

negative_cache_ttl: Negative DNS Cache TTL.

origin_ips: Deprecated alias for "upstream_ips".

ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to
the upstream nameservers configured on the cluster).

Expand Down Expand Up @@ -658,7 +643,6 @@ async def edit(
"upstream_ips": upstream_ips,
"attack_mitigation": attack_mitigation,
"negative_cache_ttl": negative_cache_ttl,
"origin_ips": origin_ips,
"ratelimit": ratelimit,
"retries": retries,
},
Expand Down
6 changes: 0 additions & 6 deletions src/cloudflare/types/dns/dns_firewall.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ class AttackMitigation(BaseModel):
DNS servers protected.
"""

only_when_origin_unhealthy: Optional[object] = None
"""Deprecated alias for "only_when_upstream_unhealthy"."""

only_when_upstream_unhealthy: Optional[bool] = None
"""Only mitigate attacks when upstream servers seem unhealthy."""

Expand Down Expand Up @@ -54,9 +51,6 @@ class DNSFirewall(BaseModel):
negative_cache_ttl: Optional[float] = None
"""Negative DNS Cache TTL."""

origin_ips: Optional[object] = None
"""Deprecated alias for "upstream_ips"."""

ratelimit: Optional[float] = None
"""
Ratelimit in queries per second per datacenter (applies to DNS queries sent to
Expand Down
6 changes: 0 additions & 6 deletions src/cloudflare/types/dns/firewall_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ class FirewallCreateParams(TypedDict, total=False):
negative_cache_ttl: Optional[float]
"""Negative DNS Cache TTL."""

origin_ips: object
"""Deprecated alias for "upstream_ips"."""

ratelimit: Optional[float]
"""
Ratelimit in queries per second per datacenter (applies to DNS queries sent to
Expand All @@ -58,8 +55,5 @@ class AttackMitigation(TypedDict, total=False):
DNS servers protected.
"""

only_when_origin_unhealthy: object
"""Deprecated alias for "only_when_upstream_unhealthy"."""

only_when_upstream_unhealthy: bool
"""Only mitigate attacks when upstream servers seem unhealthy."""
6 changes: 0 additions & 6 deletions src/cloudflare/types/dns/firewall_edit_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ class FirewallEditParams(TypedDict, total=False):
negative_cache_ttl: Optional[float]
"""Negative DNS Cache TTL."""

origin_ips: object
"""Deprecated alias for "upstream_ips"."""

ratelimit: Optional[float]
"""
Ratelimit in queries per second per datacenter (applies to DNS queries sent to
Expand All @@ -60,8 +57,5 @@ class AttackMitigation(TypedDict, total=False):
DNS servers protected.
"""

only_when_origin_unhealthy: object
"""Deprecated alias for "only_when_upstream_unhealthy"."""

only_when_upstream_unhealthy: bool
"""Only mitigate attacks when upstream servers seem unhealthy."""
8 changes: 0 additions & 8 deletions tests/api_resources/dns/test_firewall.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,13 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"],
attack_mitigation={
"enabled": True,
"only_when_origin_unhealthy": {},
"only_when_upstream_unhealthy": False,
},
deprecate_any_requests=True,
ecs_fallback=False,
maximum_cache_ttl=900,
minimum_cache_ttl=60,
negative_cache_ttl=900,
origin_ips={},
ratelimit=600,
retries=2,
)
Expand Down Expand Up @@ -229,11 +227,9 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"],
attack_mitigation={
"enabled": True,
"only_when_origin_unhealthy": {},
"only_when_upstream_unhealthy": False,
},
negative_cache_ttl=900,
origin_ips={},
ratelimit=600,
retries=2,
)
Expand Down Expand Up @@ -385,15 +381,13 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"],
attack_mitigation={
"enabled": True,
"only_when_origin_unhealthy": {},
"only_when_upstream_unhealthy": False,
},
deprecate_any_requests=True,
ecs_fallback=False,
maximum_cache_ttl=900,
minimum_cache_ttl=60,
negative_cache_ttl=900,
origin_ips={},
ratelimit=600,
retries=2,
)
Expand Down Expand Up @@ -574,11 +568,9 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"],
attack_mitigation={
"enabled": True,
"only_when_origin_unhealthy": {},
"only_when_upstream_unhealthy": False,
},
negative_cache_ttl=900,
origin_ips={},
ratelimit=600,
retries=2,
)
Expand Down