Skip to content

Commit 427f8f1

Browse files
feat(api): api update
1 parent ec2e81c commit 427f8f1

5 files changed

Lines changed: 48 additions & 65 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1752
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07850c05f5faee9033ffe4970b3e0a2368458141d05da9b761a534f8195e6e6d.yml
3-
openapi_spec_hash: 69b3076f1524a788b18a81893fee1ee3
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-97074b550d93648f2a49d85826e270e6d8701c8f7995d398092d47b38a5617d5.yml
3+
openapi_spec_hash: e8767543491a9b3109cd30388421100b
44
config_hash: 284c4178d08f75d8c8b29f275948a8fd

src/cloudflare/resources/logpush/jobs.py

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Type, Optional, cast
5+
from typing import Type, Union, Optional, cast
66
from typing_extensions import Literal
77

88
import httpx
@@ -88,9 +88,9 @@ def create(
8888
frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN,
8989
kind: Literal["", "edge"] | NotGiven = NOT_GIVEN,
9090
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,
9494
name: Optional[str] | NotGiven = NOT_GIVEN,
9595
output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN,
9696
ownership_challenge: str | NotGiven = NOT_GIVEN,
@@ -139,19 +139,17 @@ def create(
139139
max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must
140140
be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a
141141
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.
143143
144144
max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30
145145
and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify
146146
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.
149148
150149
max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and
151150
1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum
152151
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.
155153
156154
name: Optional human readable job name. Not unique. Cloudflare suggests that you set
157155
this to a meaningful string, like the domain name, to make it easier to identify
@@ -224,9 +222,9 @@ def update(
224222
frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN,
225223
kind: Literal["", "edge"] | NotGiven = NOT_GIVEN,
226224
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,
230228
name: Optional[str] | NotGiven = NOT_GIVEN,
231229
output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN,
232230
ownership_challenge: str | NotGiven = NOT_GIVEN,
@@ -274,19 +272,17 @@ def update(
274272
max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must
275273
be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a
276274
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.
278276
279277
max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30
280278
and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify
281279
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.
284281
285282
max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and
286283
1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum
287284
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.
290286
291287
name: Optional human readable job name. Not unique. Cloudflare suggests that you set
292288
this to a meaningful string, like the domain name, to make it easier to identify
@@ -566,9 +562,9 @@ async def create(
566562
frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN,
567563
kind: Literal["", "edge"] | NotGiven = NOT_GIVEN,
568564
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,
572568
name: Optional[str] | NotGiven = NOT_GIVEN,
573569
output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN,
574570
ownership_challenge: str | NotGiven = NOT_GIVEN,
@@ -617,19 +613,17 @@ async def create(
617613
max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must
618614
be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a
619615
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.
621617
622618
max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30
623619
and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify
624620
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.
627622
628623
max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and
629624
1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum
630625
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.
633627
634628
name: Optional human readable job name. Not unique. Cloudflare suggests that you set
635629
this to a meaningful string, like the domain name, to make it easier to identify
@@ -702,9 +696,9 @@ async def update(
702696
frequency: Optional[Literal["high", "low"]] | NotGiven = NOT_GIVEN,
703697
kind: Literal["", "edge"] | NotGiven = NOT_GIVEN,
704698
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,
708702
name: Optional[str] | NotGiven = NOT_GIVEN,
709703
output_options: Optional[OutputOptionsParam] | NotGiven = NOT_GIVEN,
710704
ownership_challenge: str | NotGiven = NOT_GIVEN,
@@ -752,19 +746,17 @@ async def update(
752746
max_upload_bytes: The maximum uncompressed file size of a batch of logs. This setting value must
753747
be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a
754748
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.
756750
757751
max_upload_interval_seconds: The maximum interval in seconds for log batches. This setting must be between 30
758752
and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify
759753
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.
762755
763756
max_upload_records: The maximum number of log lines per batch. This setting must be between 1000 and
764757
1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum
765758
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.
768760
769761
name: Optional human readable job name. Not unique. Cloudflare suggests that you set
770762
this to a meaningful string, like the domain name, to make it easier to identify

src/cloudflare/types/logpush/job_create_params.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Optional
5+
from typing import Union, Optional
66
from typing_extensions import Literal, Required, TypedDict
77

88
from .output_options_param import OutputOptionsParam
@@ -92,31 +92,28 @@ class JobCreateParams(TypedDict, total=False):
9292
keep on making this call for you, setting start and end times appropriately.
9393
"""
9494

95-
max_upload_bytes: Optional[int]
95+
max_upload_bytes: Union[Literal[0], object, None]
9696
"""The maximum uncompressed file size of a batch of logs.
9797
9898
This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note
9999
that you cannot set a minimum file size; this means that log files may be much
100-
smaller than this batch size. This parameter is not available for jobs with
101-
`edge` as its kind.
100+
smaller than this batch size.
102101
"""
103102

104-
max_upload_interval_seconds: Optional[int]
103+
max_upload_interval_seconds: Union[Literal[0], object, None]
105104
"""The maximum interval in seconds for log batches.
106105
107106
This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable
108107
it. Note that you cannot specify a minimum interval for log batches; this means
109-
that log files may be sent in shorter intervals than this. This parameter is
110-
only used for jobs with `edge` as its kind.
108+
that log files may be sent in shorter intervals than this.
111109
"""
112110

113-
max_upload_records: Optional[int]
111+
max_upload_records: Union[Literal[0], object, None]
114112
"""The maximum number of log lines per batch.
115113
116114
This setting must be between 1000 and 1,000,000 lines, or `0` to disable it.
117115
Note that you cannot specify a minimum number of log lines per batch; this means
118-
that log files may contain many fewer lines than this. This parameter is not
119-
available for jobs with `edge` as its kind.
116+
that log files may contain many fewer lines than this.
120117
"""
121118

122119
name: Optional[str]

src/cloudflare/types/logpush/job_update_params.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Optional
5+
from typing import Union, Optional
66
from typing_extensions import Literal, TypedDict
77

88
from .output_options_param import OutputOptionsParam
@@ -58,31 +58,28 @@ class JobUpdateParams(TypedDict, total=False):
5858
keep on making this call for you, setting start and end times appropriately.
5959
"""
6060

61-
max_upload_bytes: Optional[int]
61+
max_upload_bytes: Union[Literal[0], object, None]
6262
"""The maximum uncompressed file size of a batch of logs.
6363
6464
This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note
6565
that you cannot set a minimum file size; this means that log files may be much
66-
smaller than this batch size. This parameter is not available for jobs with
67-
`edge` as its kind.
66+
smaller than this batch size.
6867
"""
6968

70-
max_upload_interval_seconds: Optional[int]
69+
max_upload_interval_seconds: Union[Literal[0], object, None]
7170
"""The maximum interval in seconds for log batches.
7271
7372
This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable
7473
it. Note that you cannot specify a minimum interval for log batches; this means
75-
that log files may be sent in shorter intervals than this. This parameter is
76-
only used for jobs with `edge` as its kind.
74+
that log files may be sent in shorter intervals than this.
7775
"""
7876

79-
max_upload_records: Optional[int]
77+
max_upload_records: Union[Literal[0], object, None]
8078
"""The maximum number of log lines per batch.
8179
8280
This setting must be between 1000 and 1,000,000 lines, or `0` to disable it.
8381
Note that you cannot specify a minimum number of log lines per batch; this means
84-
that log files may contain many fewer lines than this. This parameter is not
85-
available for jobs with `edge` as its kind.
82+
that log files may contain many fewer lines than this.
8683
"""
8784

8885
name: Optional[str]

src/cloudflare/types/logpush/logpush_job.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Optional
3+
from typing import Union, Optional
44
from datetime import datetime
55
from typing_extensions import Literal
66

@@ -107,31 +107,28 @@ class LogpushJob(BaseModel):
107107
keep on making this call for you, setting start and end times appropriately.
108108
"""
109109

110-
max_upload_bytes: Optional[int] = None
110+
max_upload_bytes: Union[Literal[0], object, None] = None
111111
"""The maximum uncompressed file size of a batch of logs.
112112
113113
This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note
114114
that you cannot set a minimum file size; this means that log files may be much
115-
smaller than this batch size. This parameter is not available for jobs with
116-
`edge` as its kind.
115+
smaller than this batch size.
117116
"""
118117

119-
max_upload_interval_seconds: Optional[int] = None
118+
max_upload_interval_seconds: Union[Literal[0], object, None] = None
120119
"""The maximum interval in seconds for log batches.
121120
122121
This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable
123122
it. Note that you cannot specify a minimum interval for log batches; this means
124-
that log files may be sent in shorter intervals than this. This parameter is
125-
only used for jobs with `edge` as its kind.
123+
that log files may be sent in shorter intervals than this.
126124
"""
127125

128-
max_upload_records: Optional[int] = None
126+
max_upload_records: Union[Literal[0], object, None] = None
129127
"""The maximum number of log lines per batch.
130128
131129
This setting must be between 1000 and 1,000,000 lines, or `0` to disable it.
132130
Note that you cannot specify a minimum number of log lines per batch; this means
133-
that log files may contain many fewer lines than this. This parameter is not
134-
available for jobs with `edge` as its kind.
131+
that log files may contain many fewer lines than this.
135132
"""
136133

137134
name: Optional[str] = None

0 commit comments

Comments
 (0)