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

Merged
merged 1 commit into from
Mar 18, 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
108 changes: 66 additions & 42 deletions src/cloudflare/resources/dns/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ def create(
self,
*,
zone_id: str,
data: record_create_params.Data,
name: str,
priority: float,
type: Literal[
"URI",
"TXT",
Expand All @@ -84,7 +82,10 @@ def create(
"A",
],
comment: str | NotGiven = NOT_GIVEN,
content: object | NotGiven = NOT_GIVEN,
data: record_create_params.Data | NotGiven = NOT_GIVEN,
meta: record_create_params.Meta | NotGiven = NOT_GIVEN,
priority: float | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
ttl: Union[float, Literal[1]] | NotGiven = NOT_GIVEN,
Expand All @@ -110,14 +111,16 @@ def create(

name: DNS record name (or @ for the zone apex) in Punycode.

priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.

type: Record type.

comment: Comments or notes about the DNS record. This field has no effect on DNS
responses.

content: Formatted URI content. See 'data' to set URI properties.

priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.

proxied: Whether the record is receiving the performance and security benefits of
Cloudflare.

Expand All @@ -143,12 +146,13 @@ def create(
f"/zones/{zone_id}/dns_records",
body=maybe_transform(
{
"data": data,
"name": name,
"priority": priority,
"type": type,
"comment": comment,
"content": content,
"data": data,
"meta": meta,
"priority": priority,
"proxied": proxied,
"tags": tags,
"ttl": ttl,
Expand All @@ -173,9 +177,7 @@ def update(
dns_record_id: str,
*,
zone_id: str,
data: record_update_params.Data,
name: str,
priority: float,
type: Literal[
"URI",
"TXT",
Expand All @@ -199,7 +201,10 @@ def update(
"A",
],
comment: str | NotGiven = NOT_GIVEN,
content: object | NotGiven = NOT_GIVEN,
data: record_update_params.Data | NotGiven = NOT_GIVEN,
meta: record_update_params.Meta | NotGiven = NOT_GIVEN,
priority: float | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
ttl: Union[float, Literal[1]] | NotGiven = NOT_GIVEN,
Expand All @@ -226,14 +231,16 @@ def update(

name: DNS record name (or @ for the zone apex) in Punycode.

priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.

type: Record type.

comment: Comments or notes about the DNS record. This field has no effect on DNS
responses.

content: Formatted URI content. See 'data' to set URI properties.

priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.

proxied: Whether the record is receiving the performance and security benefits of
Cloudflare.

Expand Down Expand Up @@ -261,12 +268,13 @@ def update(
f"/zones/{zone_id}/dns_records/{dns_record_id}",
body=maybe_transform(
{
"data": data,
"name": name,
"priority": priority,
"type": type,
"comment": comment,
"content": content,
"data": data,
"meta": meta,
"priority": priority,
"proxied": proxied,
"tags": tags,
"ttl": ttl,
Expand Down Expand Up @@ -460,9 +468,7 @@ def edit(
dns_record_id: str,
*,
zone_id: str,
data: record_edit_params.Data,
name: str,
priority: float,
type: Literal[
"URI",
"TXT",
Expand All @@ -486,7 +492,10 @@ def edit(
"A",
],
comment: str | NotGiven = NOT_GIVEN,
content: object | NotGiven = NOT_GIVEN,
data: record_edit_params.Data | NotGiven = NOT_GIVEN,
meta: record_edit_params.Meta | NotGiven = NOT_GIVEN,
priority: float | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
ttl: Union[float, Literal[1]] | NotGiven = NOT_GIVEN,
Expand All @@ -513,14 +522,16 @@ def edit(

name: DNS record name (or @ for the zone apex) in Punycode.

priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.

type: Record type.

comment: Comments or notes about the DNS record. This field has no effect on DNS
responses.

content: Formatted URI content. See 'data' to set URI properties.

priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.

proxied: Whether the record is receiving the performance and security benefits of
Cloudflare.

Expand Down Expand Up @@ -548,12 +559,13 @@ def edit(
f"/zones/{zone_id}/dns_records/{dns_record_id}",
body=maybe_transform(
{
"data": data,
"name": name,
"priority": priority,
"type": type,
"comment": comment,
"content": content,
"data": data,
"meta": meta,
"priority": priority,
"proxied": proxied,
"tags": tags,
"ttl": ttl,
Expand Down Expand Up @@ -783,9 +795,7 @@ async def create(
self,
*,
zone_id: str,
data: record_create_params.Data,
name: str,
priority: float,
type: Literal[
"URI",
"TXT",
Expand All @@ -809,7 +819,10 @@ async def create(
"A",
],
comment: str | NotGiven = NOT_GIVEN,
content: object | NotGiven = NOT_GIVEN,
data: record_create_params.Data | NotGiven = NOT_GIVEN,
meta: record_create_params.Meta | NotGiven = NOT_GIVEN,
priority: float | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
ttl: Union[float, Literal[1]] | NotGiven = NOT_GIVEN,
Expand All @@ -835,14 +848,16 @@ async def create(

name: DNS record name (or @ for the zone apex) in Punycode.

priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.

type: Record type.

comment: Comments or notes about the DNS record. This field has no effect on DNS
responses.

content: Formatted URI content. See 'data' to set URI properties.

priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.

proxied: Whether the record is receiving the performance and security benefits of
Cloudflare.

Expand All @@ -868,12 +883,13 @@ async def create(
f"/zones/{zone_id}/dns_records",
body=await async_maybe_transform(
{
"data": data,
"name": name,
"priority": priority,
"type": type,
"comment": comment,
"content": content,
"data": data,
"meta": meta,
"priority": priority,
"proxied": proxied,
"tags": tags,
"ttl": ttl,
Expand All @@ -898,9 +914,7 @@ async def update(
dns_record_id: str,
*,
zone_id: str,
data: record_update_params.Data,
name: str,
priority: float,
type: Literal[
"URI",
"TXT",
Expand All @@ -924,7 +938,10 @@ async def update(
"A",
],
comment: str | NotGiven = NOT_GIVEN,
content: object | NotGiven = NOT_GIVEN,
data: record_update_params.Data | NotGiven = NOT_GIVEN,
meta: record_update_params.Meta | NotGiven = NOT_GIVEN,
priority: float | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
ttl: Union[float, Literal[1]] | NotGiven = NOT_GIVEN,
Expand All @@ -951,14 +968,16 @@ async def update(

name: DNS record name (or @ for the zone apex) in Punycode.

priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.

type: Record type.

comment: Comments or notes about the DNS record. This field has no effect on DNS
responses.

content: Formatted URI content. See 'data' to set URI properties.

priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.

proxied: Whether the record is receiving the performance and security benefits of
Cloudflare.

Expand Down Expand Up @@ -986,12 +1005,13 @@ async def update(
f"/zones/{zone_id}/dns_records/{dns_record_id}",
body=await async_maybe_transform(
{
"data": data,
"name": name,
"priority": priority,
"type": type,
"comment": comment,
"content": content,
"data": data,
"meta": meta,
"priority": priority,
"proxied": proxied,
"tags": tags,
"ttl": ttl,
Expand Down Expand Up @@ -1185,9 +1205,7 @@ async def edit(
dns_record_id: str,
*,
zone_id: str,
data: record_edit_params.Data,
name: str,
priority: float,
type: Literal[
"URI",
"TXT",
Expand All @@ -1211,7 +1229,10 @@ async def edit(
"A",
],
comment: str | NotGiven = NOT_GIVEN,
content: object | NotGiven = NOT_GIVEN,
data: record_edit_params.Data | NotGiven = NOT_GIVEN,
meta: record_edit_params.Meta | NotGiven = NOT_GIVEN,
priority: float | NotGiven = NOT_GIVEN,
proxied: bool | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
ttl: Union[float, Literal[1]] | NotGiven = NOT_GIVEN,
Expand All @@ -1238,14 +1259,16 @@ async def edit(

name: DNS record name (or @ for the zone apex) in Punycode.

priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.

type: Record type.

comment: Comments or notes about the DNS record. This field has no effect on DNS
responses.

content: Formatted URI content. See 'data' to set URI properties.

priority: Required for MX, SRV and URI records; unused by other record types. Records with
lower priorities are preferred.

proxied: Whether the record is receiving the performance and security benefits of
Cloudflare.

Expand Down Expand Up @@ -1273,12 +1296,13 @@ async def edit(
f"/zones/{zone_id}/dns_records/{dns_record_id}",
body=await async_maybe_transform(
{
"data": data,
"name": name,
"priority": priority,
"type": type,
"comment": comment,
"content": content,
"data": data,
"meta": meta,
"priority": priority,
"proxied": proxied,
"tags": tags,
"ttl": ttl,
Expand Down
Loading