Skip to content

Commit

Permalink
feat: OpenAPI spec update via Stainless API (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Mar 12, 2024
1 parent 8fa23bb commit 0fc0851
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 85 deletions.
12 changes: 6 additions & 6 deletions src/cloudflare/resources/pcaps/pcaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def magic_pcap_collection_create_pcap_request(
system: Literal["magic-transit"],
time_limit: float,
type: Literal["simple", "full"],
filter_v1: pcap_magic_pcap_collection_create_pcap_request_params.Jp9MvktBPcapsRequestSimpleFilterV1
filter_v1: pcap_magic_pcap_collection_create_pcap_request_params._6wtRj17BPcapsRequestSimpleFilterV1
| NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -170,7 +170,7 @@ def magic_pcap_collection_create_pcap_request(
time_limit: float,
type: Literal["simple", "full"],
byte_limit: float | NotGiven = NOT_GIVEN,
filter_v1: pcap_magic_pcap_collection_create_pcap_request_params.Jp9MvktBPcapsRequestFullFilterV1
filter_v1: pcap_magic_pcap_collection_create_pcap_request_params._6wtRj17BPcapsRequestFullFilterV1
| NotGiven = NOT_GIVEN,
packet_limit: 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 @@ -228,7 +228,7 @@ def magic_pcap_collection_create_pcap_request(
system: Literal["magic-transit"],
time_limit: float,
type: Literal["simple", "full"],
filter_v1: pcap_magic_pcap_collection_create_pcap_request_params.Jp9MvktBPcapsRequestSimpleFilterV1
filter_v1: pcap_magic_pcap_collection_create_pcap_request_params._6wtRj17BPcapsRequestSimpleFilterV1
| NotGiven = NOT_GIVEN,
colo_name: str | NotGiven = NOT_GIVEN,
destination_conf: str | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -390,7 +390,7 @@ async def magic_pcap_collection_create_pcap_request(
system: Literal["magic-transit"],
time_limit: float,
type: Literal["simple", "full"],
filter_v1: pcap_magic_pcap_collection_create_pcap_request_params.Jp9MvktBPcapsRequestSimpleFilterV1
filter_v1: pcap_magic_pcap_collection_create_pcap_request_params._6wtRj17BPcapsRequestSimpleFilterV1
| NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -437,7 +437,7 @@ async def magic_pcap_collection_create_pcap_request(
time_limit: float,
type: Literal["simple", "full"],
byte_limit: float | NotGiven = NOT_GIVEN,
filter_v1: pcap_magic_pcap_collection_create_pcap_request_params.Jp9MvktBPcapsRequestFullFilterV1
filter_v1: pcap_magic_pcap_collection_create_pcap_request_params._6wtRj17BPcapsRequestFullFilterV1
| NotGiven = NOT_GIVEN,
packet_limit: 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 @@ -495,7 +495,7 @@ async def magic_pcap_collection_create_pcap_request(
system: Literal["magic-transit"],
time_limit: float,
type: Literal["simple", "full"],
filter_v1: pcap_magic_pcap_collection_create_pcap_request_params.Jp9MvktBPcapsRequestSimpleFilterV1
filter_v1: pcap_magic_pcap_collection_create_pcap_request_params._6wtRj17BPcapsRequestSimpleFilterV1
| NotGiven = NOT_GIVEN,
colo_name: str | NotGiven = NOT_GIVEN,
destination_conf: str | NotGiven = NOT_GIVEN,
Expand Down
8 changes: 4 additions & 4 deletions src/cloudflare/resources/purge_caches.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def zone_purge(
self,
identifier: str,
*,
files: List[purge_cach_zone_purge_params.Hv5ypxlmFilesFile] | NotGiven = NOT_GIVEN,
files: List[purge_cach_zone_purge_params.HDwfmVgpFilesFile] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -209,7 +209,7 @@ def zone_purge(
prefixes: List[str] | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
purge_everything: bool | NotGiven = NOT_GIVEN,
files: List[purge_cach_zone_purge_params.Hv5ypxlmFilesFile] | NotGiven = NOT_GIVEN,
files: List[purge_cach_zone_purge_params.HDwfmVgpFilesFile] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -368,7 +368,7 @@ async def zone_purge(
self,
identifier: str,
*,
files: List[purge_cach_zone_purge_params.Hv5ypxlmFilesFile] | NotGiven = NOT_GIVEN,
files: List[purge_cach_zone_purge_params.HDwfmVgpFilesFile] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -426,7 +426,7 @@ async def zone_purge(
prefixes: List[str] | NotGiven = NOT_GIVEN,
tags: List[str] | NotGiven = NOT_GIVEN,
purge_everything: bool | NotGiven = NOT_GIVEN,
files: List[purge_cach_zone_purge_params.Hv5ypxlmFilesFile] | NotGiven = NOT_GIVEN,
files: List[purge_cach_zone_purge_params.HDwfmVgpFilesFile] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"UnionMember0ResultActor",
"UnionMember0ResultOwner",
"UnionMember0ResultResource",
"I4k0tzSwAPIResponseCommon",
"I4k0tzSwAPIResponseCommonError",
"I4k0tzSwAPIResponseCommonMessage",
"SYy67PmvAPIResponseCommon",
"SYy67PmvAPIResponseCommonError",
"SYy67PmvAPIResponseCommonMessage",
]


Expand Down Expand Up @@ -101,27 +101,27 @@ class UnionMember0(BaseModel):
success: Optional[bool] = None


class I4k0tzSwAPIResponseCommonError(BaseModel):
class SYy67PmvAPIResponseCommonError(BaseModel):
code: int

message: str


class I4k0tzSwAPIResponseCommonMessage(BaseModel):
class SYy67PmvAPIResponseCommonMessage(BaseModel):
code: int

message: str


class I4k0tzSwAPIResponseCommon(BaseModel):
errors: List[I4k0tzSwAPIResponseCommonError]
class SYy67PmvAPIResponseCommon(BaseModel):
errors: List[SYy67PmvAPIResponseCommonError]

messages: List[I4k0tzSwAPIResponseCommonMessage]
messages: List[SYy67PmvAPIResponseCommonMessage]

result: Union[object, List[object], str]

success: Literal[True]
"""Whether the API call was successful"""


AuditLogAuditLogsGetAccountAuditLogsResponse = Union[UnionMember0, I4k0tzSwAPIResponseCommon]
AuditLogAuditLogsGetAccountAuditLogsResponse = Union[UnionMember0, SYy67PmvAPIResponseCommon]
22 changes: 11 additions & 11 deletions src/cloudflare/types/pcap_get_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

__all__ = [
"PcapGetResponse",
"Jp9MvktBPcapsResponseSimple",
"Jp9MvktBPcapsResponseSimpleFilterV1",
"Jp9MvktBPcapsResponseFull",
"Jp9MvktBPcapsResponseFullFilterV1",
"_6wtRj17BPcapsResponseSimple",
"_6wtRj17BPcapsResponseSimpleFilterV1",
"_6wtRj17BPcapsResponseFull",
"_6wtRj17BPcapsResponseFullFilterV1",
]


class Jp9MvktBPcapsResponseSimpleFilterV1(BaseModel):
class _6wtRj17BPcapsResponseSimpleFilterV1(BaseModel):
destination_address: Optional[str] = None
"""The destination IP address of the packet."""

Expand All @@ -31,11 +31,11 @@ class Jp9MvktBPcapsResponseSimpleFilterV1(BaseModel):
"""The source port of the packet."""


class Jp9MvktBPcapsResponseSimple(BaseModel):
class _6wtRj17BPcapsResponseSimple(BaseModel):
id: Optional[str] = None
"""The ID for the packet capture."""

filter_v1: Optional[Jp9MvktBPcapsResponseSimpleFilterV1] = None
filter_v1: Optional[_6wtRj17BPcapsResponseSimpleFilterV1] = None
"""The packet capture filter. When this field is empty, all packets are captured."""

status: Optional[
Expand All @@ -62,7 +62,7 @@ class Jp9MvktBPcapsResponseSimple(BaseModel):
"""


class Jp9MvktBPcapsResponseFullFilterV1(BaseModel):
class _6wtRj17BPcapsResponseFullFilterV1(BaseModel):
destination_address: Optional[str] = None
"""The destination IP address of the packet."""

Expand All @@ -79,7 +79,7 @@ class Jp9MvktBPcapsResponseFullFilterV1(BaseModel):
"""The source port of the packet."""


class Jp9MvktBPcapsResponseFull(BaseModel):
class _6wtRj17BPcapsResponseFull(BaseModel):
id: Optional[str] = None
"""The ID for the packet capture."""

Expand All @@ -105,7 +105,7 @@ class Jp9MvktBPcapsResponseFull(BaseModel):
This field only applies to `full` packet captures.
"""

filter_v1: Optional[Jp9MvktBPcapsResponseFullFilterV1] = None
filter_v1: Optional[_6wtRj17BPcapsResponseFullFilterV1] = None
"""The packet capture filter. When this field is empty, all packets are captured."""

status: Optional[
Expand All @@ -132,4 +132,4 @@ class Jp9MvktBPcapsResponseFull(BaseModel):
"""


PcapGetResponse = Union[Jp9MvktBPcapsResponseSimple, Jp9MvktBPcapsResponseFull]
PcapGetResponse = Union[_6wtRj17BPcapsResponseSimple, _6wtRj17BPcapsResponseFull]
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

__all__ = [
"PcapMagicPcapCollectionCreatePcapRequestParams",
"Jp9MvktBPcapsRequestSimple",
"Jp9MvktBPcapsRequestSimpleFilterV1",
"Jp9MvktBPcapsRequestFull",
"Jp9MvktBPcapsRequestFullFilterV1",
"_6wtRj17BPcapsRequestSimple",
"_6wtRj17BPcapsRequestSimpleFilterV1",
"_6wtRj17BPcapsRequestFull",
"_6wtRj17BPcapsRequestFullFilterV1",
]


class Jp9MvktBPcapsRequestSimple(TypedDict, total=False):
class _6wtRj17BPcapsRequestSimple(TypedDict, total=False):
packet_limit: Required[float]
"""The limit of packets contained in a packet capture."""

Expand All @@ -31,11 +31,11 @@ class Jp9MvktBPcapsRequestSimple(TypedDict, total=False):
non-sampled packets.
"""

filter_v1: Jp9MvktBPcapsRequestSimpleFilterV1
filter_v1: _6wtRj17BPcapsRequestSimpleFilterV1
"""The packet capture filter. When this field is empty, all packets are captured."""


class Jp9MvktBPcapsRequestSimpleFilterV1(TypedDict, total=False):
class _6wtRj17BPcapsRequestSimpleFilterV1(TypedDict, total=False):
destination_address: str
"""The destination IP address of the packet."""

Expand All @@ -52,7 +52,7 @@ class Jp9MvktBPcapsRequestSimpleFilterV1(TypedDict, total=False):
"""The source port of the packet."""


class Jp9MvktBPcapsRequestFull(TypedDict, total=False):
class _6wtRj17BPcapsRequestFull(TypedDict, total=False):
colo_name: Required[str]
"""The name of the data center used for the packet capture.
Expand Down Expand Up @@ -82,14 +82,14 @@ class Jp9MvktBPcapsRequestFull(TypedDict, total=False):
This field only applies to `full` packet captures.
"""

filter_v1: Jp9MvktBPcapsRequestFullFilterV1
filter_v1: _6wtRj17BPcapsRequestFullFilterV1
"""The packet capture filter. When this field is empty, all packets are captured."""

packet_limit: float
"""The limit of packets contained in a packet capture."""


class Jp9MvktBPcapsRequestFullFilterV1(TypedDict, total=False):
class _6wtRj17BPcapsRequestFullFilterV1(TypedDict, total=False):
destination_address: str
"""The destination IP address of the packet."""

Expand All @@ -106,4 +106,4 @@ class Jp9MvktBPcapsRequestFullFilterV1(TypedDict, total=False):
"""The source port of the packet."""


PcapMagicPcapCollectionCreatePcapRequestParams = Union[Jp9MvktBPcapsRequestSimple, Jp9MvktBPcapsRequestFull]
PcapMagicPcapCollectionCreatePcapRequestParams = Union[_6wtRj17BPcapsRequestSimple, _6wtRj17BPcapsRequestFull]
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

__all__ = [
"PcapMagicPcapCollectionCreatePcapRequestResponse",
"Jp9MvktBPcapsResponseSimple",
"Jp9MvktBPcapsResponseSimpleFilterV1",
"Jp9MvktBPcapsResponseFull",
"Jp9MvktBPcapsResponseFullFilterV1",
"_6wtRj17BPcapsResponseSimple",
"_6wtRj17BPcapsResponseSimpleFilterV1",
"_6wtRj17BPcapsResponseFull",
"_6wtRj17BPcapsResponseFullFilterV1",
]


class Jp9MvktBPcapsResponseSimpleFilterV1(BaseModel):
class _6wtRj17BPcapsResponseSimpleFilterV1(BaseModel):
destination_address: Optional[str] = None
"""The destination IP address of the packet."""

Expand All @@ -31,11 +31,11 @@ class Jp9MvktBPcapsResponseSimpleFilterV1(BaseModel):
"""The source port of the packet."""


class Jp9MvktBPcapsResponseSimple(BaseModel):
class _6wtRj17BPcapsResponseSimple(BaseModel):
id: Optional[str] = None
"""The ID for the packet capture."""

filter_v1: Optional[Jp9MvktBPcapsResponseSimpleFilterV1] = None
filter_v1: Optional[_6wtRj17BPcapsResponseSimpleFilterV1] = None
"""The packet capture filter. When this field is empty, all packets are captured."""

status: Optional[
Expand All @@ -62,7 +62,7 @@ class Jp9MvktBPcapsResponseSimple(BaseModel):
"""


class Jp9MvktBPcapsResponseFullFilterV1(BaseModel):
class _6wtRj17BPcapsResponseFullFilterV1(BaseModel):
destination_address: Optional[str] = None
"""The destination IP address of the packet."""

Expand All @@ -79,7 +79,7 @@ class Jp9MvktBPcapsResponseFullFilterV1(BaseModel):
"""The source port of the packet."""


class Jp9MvktBPcapsResponseFull(BaseModel):
class _6wtRj17BPcapsResponseFull(BaseModel):
id: Optional[str] = None
"""The ID for the packet capture."""

Expand All @@ -105,7 +105,7 @@ class Jp9MvktBPcapsResponseFull(BaseModel):
This field only applies to `full` packet captures.
"""

filter_v1: Optional[Jp9MvktBPcapsResponseFullFilterV1] = None
filter_v1: Optional[_6wtRj17BPcapsResponseFullFilterV1] = None
"""The packet capture filter. When this field is empty, all packets are captured."""

status: Optional[
Expand All @@ -132,4 +132,4 @@ class Jp9MvktBPcapsResponseFull(BaseModel):
"""


PcapMagicPcapCollectionCreatePcapRequestResponse = Union[Jp9MvktBPcapsResponseSimple, Jp9MvktBPcapsResponseFull]
PcapMagicPcapCollectionCreatePcapRequestResponse = Union[_6wtRj17BPcapsResponseSimple, _6wtRj17BPcapsResponseFull]
Loading

0 comments on commit 0fc0851

Please sign in to comment.