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: OpenAPI spec update via Stainless API #29

Merged
merged 1 commit into from
Feb 15, 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
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.ZdLgyV2rPcapsRequestSimpleFilterV1
filter_v1: pcap_magic_pcap_collection_create_pcap_request_params.BuvwFvChPcapsRequestSimpleFilterV1
| 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.ZdLgyV2rPcapsRequestFullFilterV1
filter_v1: pcap_magic_pcap_collection_create_pcap_request_params.BuvwFvChPcapsRequestFullFilterV1
| 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.ZdLgyV2rPcapsRequestSimpleFilterV1
filter_v1: pcap_magic_pcap_collection_create_pcap_request_params.BuvwFvChPcapsRequestSimpleFilterV1
| 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.ZdLgyV2rPcapsRequestSimpleFilterV1
filter_v1: pcap_magic_pcap_collection_create_pcap_request_params.BuvwFvChPcapsRequestSimpleFilterV1
| 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.ZdLgyV2rPcapsRequestFullFilterV1
filter_v1: pcap_magic_pcap_collection_create_pcap_request_params.BuvwFvChPcapsRequestFullFilterV1
| 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.ZdLgyV2rPcapsRequestSimpleFilterV1
filter_v1: pcap_magic_pcap_collection_create_pcap_request_params.BuvwFvChPcapsRequestSimpleFilterV1
| 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.ONoTspwWFilesFile] | NotGiven = NOT_GIVEN,
files: List[purge_cach_zone_purge_params.QBpKLyWfFilesFile] | 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.ONoTspwWFilesFile] | NotGiven = NOT_GIVEN,
files: List[purge_cach_zone_purge_params.QBpKLyWfFilesFile] | 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.ONoTspwWFilesFile] | NotGiven = NOT_GIVEN,
files: List[purge_cach_zone_purge_params.QBpKLyWfFilesFile] | 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.ONoTspwWFilesFile] | NotGiven = NOT_GIVEN,
files: List[purge_cach_zone_purge_params.QBpKLyWfFilesFile] | 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",
"UalMsMtCAPIResponseCommon",
"UalMsMtCapiResponseCommonError",
"UalMsMtCapiResponseCommonMessage",
"T1elfSrPAPIResponseCommon",
"T1elfSrPapiResponseCommonError",
"T1elfSrPapiResponseCommonMessage",
]


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


class UalMsMtCapiResponseCommonError(BaseModel):
class T1elfSrPapiResponseCommonError(BaseModel):
code: int

message: str


class UalMsMtCapiResponseCommonMessage(BaseModel):
class T1elfSrPapiResponseCommonMessage(BaseModel):
code: int

message: str


class UalMsMtCAPIResponseCommon(BaseModel):
errors: List[UalMsMtCapiResponseCommonError]
class T1elfSrPAPIResponseCommon(BaseModel):
errors: List[T1elfSrPapiResponseCommonError]

messages: List[UalMsMtCapiResponseCommonMessage]
messages: List[T1elfSrPapiResponseCommonMessage]

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

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


AuditLogAuditLogsGetAccountAuditLogsResponse = Union[UnionMember0, UalMsMtCAPIResponseCommon]
AuditLogAuditLogsGetAccountAuditLogsResponse = Union[UnionMember0, T1elfSrPAPIResponseCommon]
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",
"ZdLgyV2rPcapsResponseSimple",
"ZdLgyV2rPcapsResponseSimpleFilterV1",
"ZdLgyV2rPcapsResponseFull",
"ZdLgyV2rPcapsResponseFullFilterV1",
"BuvwFvChPcapsResponseSimple",
"BuvwFvChPcapsResponseSimpleFilterV1",
"BuvwFvChPcapsResponseFull",
"BuvwFvChPcapsResponseFullFilterV1",
]


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

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


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

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

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


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

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


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

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

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

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


PcapGetResponse = Union[ZdLgyV2rPcapsResponseSimple, ZdLgyV2rPcapsResponseFull]
PcapGetResponse = Union[BuvwFvChPcapsResponseSimple, BuvwFvChPcapsResponseFull]
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

__all__ = [
"PcapMagicPcapCollectionCreatePcapRequestParams",
"ZdLgyV2rPcapsRequestSimple",
"ZdLgyV2rPcapsRequestSimpleFilterV1",
"ZdLgyV2rPcapsRequestFull",
"ZdLgyV2rPcapsRequestFullFilterV1",
"BuvwFvChPcapsRequestSimple",
"BuvwFvChPcapsRequestSimpleFilterV1",
"BuvwFvChPcapsRequestFull",
"BuvwFvChPcapsRequestFullFilterV1",
]


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

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

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


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

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


class ZdLgyV2rPcapsRequestFull(TypedDict, total=False):
class BuvwFvChPcapsRequestFull(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 ZdLgyV2rPcapsRequestFull(TypedDict, total=False):
This field only applies to `full` packet captures.
"""

filter_v1: ZdLgyV2rPcapsRequestFullFilterV1
filter_v1: BuvwFvChPcapsRequestFullFilterV1
"""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 ZdLgyV2rPcapsRequestFullFilterV1(TypedDict, total=False):
class BuvwFvChPcapsRequestFullFilterV1(TypedDict, total=False):
destination_address: str
"""The destination IP address of the packet."""

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


PcapMagicPcapCollectionCreatePcapRequestParams = Union[ZdLgyV2rPcapsRequestSimple, ZdLgyV2rPcapsRequestFull]
PcapMagicPcapCollectionCreatePcapRequestParams = Union[BuvwFvChPcapsRequestSimple, BuvwFvChPcapsRequestFull]
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

__all__ = [
"PcapMagicPcapCollectionCreatePcapRequestResponse",
"ZdLgyV2rPcapsResponseSimple",
"ZdLgyV2rPcapsResponseSimpleFilterV1",
"ZdLgyV2rPcapsResponseFull",
"ZdLgyV2rPcapsResponseFullFilterV1",
"BuvwFvChPcapsResponseSimple",
"BuvwFvChPcapsResponseSimpleFilterV1",
"BuvwFvChPcapsResponseFull",
"BuvwFvChPcapsResponseFullFilterV1",
]


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

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


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

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

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


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

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


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

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

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

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


PcapMagicPcapCollectionCreatePcapRequestResponse = Union[ZdLgyV2rPcapsResponseSimple, ZdLgyV2rPcapsResponseFull]
PcapMagicPcapCollectionCreatePcapRequestResponse = Union[BuvwFvChPcapsResponseSimple, BuvwFvChPcapsResponseFull]
Loading