|
2 | 2 |
|
3 | 3 | from __future__ import annotations |
4 | 4 |
|
5 | | -from typing import Type, Optional, cast |
| 5 | +from typing import Type, Union, Optional, cast |
6 | 6 | from typing_extensions import Literal |
7 | 7 |
|
8 | 8 | import httpx |
@@ -88,9 +88,9 @@ def create( |
88 | 88 | frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, |
89 | 89 | kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, |
90 | 90 | logpull_options: Optional[str] | NotGiven = NOT_GIVEN, |
91 | | - max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, |
92 | | - max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, |
93 | | - max_upload_records: Optional[int] | NotGiven = NOT_GIVEN, |
| 91 | + max_upload_bytes: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, |
| 92 | + max_upload_interval_seconds: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, |
| 93 | + max_upload_records: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, |
94 | 94 | name: Optional[str] | NotGiven = NOT_GIVEN, |
95 | 95 | output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, |
96 | 96 | ownership_challenge: str | NotGiven = NOT_GIVEN, |
@@ -139,19 +139,17 @@ def create( |
139 | 139 | max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must |
140 | 140 | be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a |
141 | 141 | minimum file size; this means that log files may be much smaller than this batch |
142 | | - size. This parameter is not available for jobs with `edge` as its kind. |
| 142 | + size. |
143 | 143 |
|
144 | 144 | max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 |
145 | 145 | and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify |
146 | 146 | a minimum interval for log batches; this means that log files may be sent in |
147 | | - shorter intervals than this. This parameter is only used for jobs with `edge` as |
148 | | - its kind. |
| 147 | + shorter intervals than this. |
149 | 148 |
|
150 | 149 | max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and |
151 | 150 | 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum |
152 | 151 | number of log lines per batch; this means that log files may contain many fewer |
153 | | - lines than this. This parameter is not available for jobs with `edge` as its |
154 | | - kind. |
| 152 | + lines than this. |
155 | 153 |
|
156 | 154 | name: Optional human readable job name. Not unique. Cloudflare suggests that you set |
157 | 155 | this to a meaningful string, like the domain name, to make it easier to identify |
@@ -224,9 +222,9 @@ def update( |
224 | 222 | frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, |
225 | 223 | kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, |
226 | 224 | logpull_options: Optional[str] | NotGiven = NOT_GIVEN, |
227 | | - max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, |
228 | | - max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, |
229 | | - max_upload_records: Optional[int] | NotGiven = NOT_GIVEN, |
| 225 | + max_upload_bytes: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, |
| 226 | + max_upload_interval_seconds: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, |
| 227 | + max_upload_records: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, |
230 | 228 | name: Optional[str] | NotGiven = NOT_GIVEN, |
231 | 229 | output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, |
232 | 230 | ownership_challenge: str | NotGiven = NOT_GIVEN, |
@@ -274,19 +272,17 @@ def update( |
274 | 272 | max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must |
275 | 273 | be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a |
276 | 274 | minimum file size; this means that log files may be much smaller than this batch |
277 | | - size. This parameter is not available for jobs with `edge` as its kind. |
| 275 | + size. |
278 | 276 |
|
279 | 277 | max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 |
280 | 278 | and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify |
281 | 279 | a minimum interval for log batches; this means that log files may be sent in |
282 | | - shorter intervals than this. This parameter is only used for jobs with `edge` as |
283 | | - its kind. |
| 280 | + shorter intervals than this. |
284 | 281 |
|
285 | 282 | max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and |
286 | 283 | 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum |
287 | 284 | number of log lines per batch; this means that log files may contain many fewer |
288 | | - lines than this. This parameter is not available for jobs with `edge` as its |
289 | | - kind. |
| 285 | + lines than this. |
290 | 286 |
|
291 | 287 | name: Optional human readable job name. Not unique. Cloudflare suggests that you set |
292 | 288 | this to a meaningful string, like the domain name, to make it easier to identify |
@@ -566,9 +562,9 @@ async def create( |
566 | 562 | frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, |
567 | 563 | kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, |
568 | 564 | logpull_options: Optional[str] | NotGiven = NOT_GIVEN, |
569 | | - max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, |
570 | | - max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, |
571 | | - max_upload_records: Optional[int] | NotGiven = NOT_GIVEN, |
| 565 | + max_upload_bytes: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, |
| 566 | + max_upload_interval_seconds: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, |
| 567 | + max_upload_records: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, |
572 | 568 | name: Optional[str] | NotGiven = NOT_GIVEN, |
573 | 569 | output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, |
574 | 570 | ownership_challenge: str | NotGiven = NOT_GIVEN, |
@@ -617,19 +613,17 @@ async def create( |
617 | 613 | max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must |
618 | 614 | be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a |
619 | 615 | minimum file size; this means that log files may be much smaller than this batch |
620 | | - size. This parameter is not available for jobs with `edge` as its kind. |
| 616 | + size. |
621 | 617 |
|
622 | 618 | max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 |
623 | 619 | and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify |
624 | 620 | a minimum interval for log batches; this means that log files may be sent in |
625 | | - shorter intervals than this. This parameter is only used for jobs with `edge` as |
626 | | - its kind. |
| 621 | + shorter intervals than this. |
627 | 622 |
|
628 | 623 | max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and |
629 | 624 | 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum |
630 | 625 | number of log lines per batch; this means that log files may contain many fewer |
631 | | - lines than this. This parameter is not available for jobs with `edge` as its |
632 | | - kind. |
| 626 | + lines than this. |
633 | 627 |
|
634 | 628 | name: Optional human readable job name. Not unique. Cloudflare suggests that you set |
635 | 629 | this to a meaningful string, like the domain name, to make it easier to identify |
@@ -702,9 +696,9 @@ async def update( |
702 | 696 | frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN, |
703 | 697 | kind: Literal["", "edge"] | NotGiven = NOT_GIVEN, |
704 | 698 | logpull_options: Optional[str] | NotGiven = NOT_GIVEN, |
705 | | - max_upload_bytes: Optional[int] | NotGiven = NOT_GIVEN, |
706 | | - max_upload_interval_seconds: Optional[int] | NotGiven = NOT_GIVEN, |
707 | | - max_upload_records: Optional[int] | NotGiven = NOT_GIVEN, |
| 699 | + max_upload_bytes: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, |
| 700 | + max_upload_interval_seconds: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, |
| 701 | + max_upload_records: Union[Literal[0], object, None] | NotGiven = NOT_GIVEN, |
708 | 702 | name: Optional[str] | NotGiven = NOT_GIVEN, |
709 | 703 | output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN, |
710 | 704 | ownership_challenge: str | NotGiven = NOT_GIVEN, |
@@ -752,19 +746,17 @@ async def update( |
752 | 746 | max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must |
753 | 747 | be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a |
754 | 748 | minimum file size; this means that log files may be much smaller than this batch |
755 | | - size. This parameter is not available for jobs with `edge` as its kind. |
| 749 | + size. |
756 | 750 |
|
757 | 751 | max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30 |
758 | 752 | and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify |
759 | 753 | a minimum interval for log batches; this means that log files may be sent in |
760 | | - shorter intervals than this. This parameter is only used for jobs with `edge` as |
761 | | - its kind. |
| 754 | + shorter intervals than this. |
762 | 755 |
|
763 | 756 | max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and |
764 | 757 | 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum |
765 | 758 | number of log lines per batch; this means that log files may contain many fewer |
766 | | - lines than this. This parameter is not available for jobs with `edge` as its |
767 | | - kind. |
| 759 | + lines than this. |
768 | 760 |
|
769 | 761 | name: Optional human readable job name. Not unique. Cloudflare suggests that you set |
770 | 762 | this to a meaningful string, like the domain name, to make it easier to identify |
|
0 commit comments