Skip to content

Commit 7b7b62f

Browse files
fix: do not set headers with default to omit
1 parent 231d15f commit 7b7b62f

12 files changed

Lines changed: 86 additions & 86 deletions

File tree

src/cloudflare/resources/magic_transit/cf_interconnects.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def update(
115115
{
116116
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
117117
if is_given(x_magic_new_hc_target)
118-
else omit
118+
else not_given
119119
}
120120
),
121121
**(extra_headers or {}),
@@ -177,7 +177,7 @@ def list(
177177
{
178178
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
179179
if is_given(x_magic_new_hc_target)
180-
else omit
180+
else not_given
181181
}
182182
),
183183
**(extra_headers or {}),
@@ -231,7 +231,7 @@ def bulk_update(
231231
{
232232
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
233233
if is_given(x_magic_new_hc_target)
234-
else omit
234+
else not_given
235235
}
236236
),
237237
**(extra_headers or {}),
@@ -287,7 +287,7 @@ def get(
287287
{
288288
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
289289
if is_given(x_magic_new_hc_target)
290-
else omit
290+
else not_given
291291
}
292292
),
293293
**(extra_headers or {}),
@@ -392,7 +392,7 @@ async def update(
392392
{
393393
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
394394
if is_given(x_magic_new_hc_target)
395-
else omit
395+
else not_given
396396
}
397397
),
398398
**(extra_headers or {}),
@@ -454,7 +454,7 @@ async def list(
454454
{
455455
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
456456
if is_given(x_magic_new_hc_target)
457-
else omit
457+
else not_given
458458
}
459459
),
460460
**(extra_headers or {}),
@@ -508,7 +508,7 @@ async def bulk_update(
508508
{
509509
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
510510
if is_given(x_magic_new_hc_target)
511-
else omit
511+
else not_given
512512
}
513513
),
514514
**(extra_headers or {}),
@@ -564,7 +564,7 @@ async def get(
564564
{
565565
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
566566
if is_given(x_magic_new_hc_target)
567-
else omit
567+
else not_given
568568
}
569569
),
570570
**(extra_headers or {}),

src/cloudflare/resources/magic_transit/gre_tunnels.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def create(
121121
{
122122
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
123123
if is_given(x_magic_new_hc_target)
124-
else omit
124+
else not_given
125125
}
126126
),
127127
**(extra_headers or {}),
@@ -230,7 +230,7 @@ def update(
230230
{
231231
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
232232
if is_given(x_magic_new_hc_target)
233-
else omit
233+
else not_given
234234
}
235235
),
236236
**(extra_headers or {}),
@@ -295,7 +295,7 @@ def list(
295295
{
296296
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
297297
if is_given(x_magic_new_hc_target)
298-
else omit
298+
else not_given
299299
}
300300
),
301301
**(extra_headers or {}),
@@ -352,7 +352,7 @@ def delete(
352352
{
353353
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
354354
if is_given(x_magic_new_hc_target)
355-
else omit
355+
else not_given
356356
}
357357
),
358358
**(extra_headers or {}),
@@ -405,7 +405,7 @@ def bulk_update(
405405
{
406406
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
407407
if is_given(x_magic_new_hc_target)
408-
else omit
408+
else not_given
409409
}
410410
),
411411
**(extra_headers or {}),
@@ -461,7 +461,7 @@ def get(
461461
{
462462
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
463463
if is_given(x_magic_new_hc_target)
464-
else omit
464+
else not_given
465465
}
466466
),
467467
**(extra_headers or {}),
@@ -571,7 +571,7 @@ async def create(
571571
{
572572
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
573573
if is_given(x_magic_new_hc_target)
574-
else omit
574+
else not_given
575575
}
576576
),
577577
**(extra_headers or {}),
@@ -680,7 +680,7 @@ async def update(
680680
{
681681
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
682682
if is_given(x_magic_new_hc_target)
683-
else omit
683+
else not_given
684684
}
685685
),
686686
**(extra_headers or {}),
@@ -745,7 +745,7 @@ async def list(
745745
{
746746
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
747747
if is_given(x_magic_new_hc_target)
748-
else omit
748+
else not_given
749749
}
750750
),
751751
**(extra_headers or {}),
@@ -802,7 +802,7 @@ async def delete(
802802
{
803803
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
804804
if is_given(x_magic_new_hc_target)
805-
else omit
805+
else not_given
806806
}
807807
),
808808
**(extra_headers or {}),
@@ -855,7 +855,7 @@ async def bulk_update(
855855
{
856856
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
857857
if is_given(x_magic_new_hc_target)
858-
else omit
858+
else not_given
859859
}
860860
),
861861
**(extra_headers or {}),
@@ -911,7 +911,7 @@ async def get(
911911
{
912912
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
913913
if is_given(x_magic_new_hc_target)
914-
else omit
914+
else not_given
915915
}
916916
),
917917
**(extra_headers or {}),

src/cloudflare/resources/magic_transit/ipsec_tunnels.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def create(
128128
{
129129
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
130130
if is_given(x_magic_new_hc_target)
131-
else omit
131+
else not_given
132132
}
133133
),
134134
**(extra_headers or {}),
@@ -239,7 +239,7 @@ def update(
239239
{
240240
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
241241
if is_given(x_magic_new_hc_target)
242-
else omit
242+
else not_given
243243
}
244244
),
245245
**(extra_headers or {}),
@@ -305,7 +305,7 @@ def list(
305305
{
306306
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
307307
if is_given(x_magic_new_hc_target)
308-
else omit
308+
else not_given
309309
}
310310
),
311311
**(extra_headers or {}),
@@ -362,7 +362,7 @@ def delete(
362362
{
363363
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
364364
if is_given(x_magic_new_hc_target)
365-
else omit
365+
else not_given
366366
}
367367
),
368368
**(extra_headers or {}),
@@ -416,7 +416,7 @@ def bulk_update(
416416
{
417417
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
418418
if is_given(x_magic_new_hc_target)
419-
else omit
419+
else not_given
420420
}
421421
),
422422
**(extra_headers or {}),
@@ -472,7 +472,7 @@ def get(
472472
{
473473
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
474474
if is_given(x_magic_new_hc_target)
475-
else omit
475+
else not_given
476476
}
477477
),
478478
**(extra_headers or {}),
@@ -633,7 +633,7 @@ async def create(
633633
{
634634
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
635635
if is_given(x_magic_new_hc_target)
636-
else omit
636+
else not_given
637637
}
638638
),
639639
**(extra_headers or {}),
@@ -744,7 +744,7 @@ async def update(
744744
{
745745
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
746746
if is_given(x_magic_new_hc_target)
747-
else omit
747+
else not_given
748748
}
749749
),
750750
**(extra_headers or {}),
@@ -810,7 +810,7 @@ async def list(
810810
{
811811
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
812812
if is_given(x_magic_new_hc_target)
813-
else omit
813+
else not_given
814814
}
815815
),
816816
**(extra_headers or {}),
@@ -867,7 +867,7 @@ async def delete(
867867
{
868868
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
869869
if is_given(x_magic_new_hc_target)
870-
else omit
870+
else not_given
871871
}
872872
),
873873
**(extra_headers or {}),
@@ -921,7 +921,7 @@ async def bulk_update(
921921
{
922922
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
923923
if is_given(x_magic_new_hc_target)
924-
else omit
924+
else not_given
925925
}
926926
),
927927
**(extra_headers or {}),
@@ -977,7 +977,7 @@ async def get(
977977
{
978978
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
979979
if is_given(x_magic_new_hc_target)
980-
else omit
980+
else not_given
981981
}
982982
),
983983
**(extra_headers or {}),

src/cloudflare/resources/magic_transit/sites/sites.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ def get(
416416
{
417417
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
418418
if is_given(x_magic_new_hc_target)
419-
else omit
419+
else not_given
420420
}
421421
),
422422
**(extra_headers or {}),
@@ -795,7 +795,7 @@ async def get(
795795
{
796796
"x-magic-new-hc-target": ("true" if x_magic_new_hc_target else "false")
797797
if is_given(x_magic_new_hc_target)
798-
else omit
798+
else not_given
799799
}
800800
),
801801
**(extra_headers or {}),

src/cloudflare/resources/r2/buckets/buckets.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def create(
170170
if not account_id:
171171
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
172172
extra_headers = {
173-
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else omit}),
173+
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else not_given}),
174174
**(extra_headers or {}),
175175
}
176176
return self._post(
@@ -244,7 +244,7 @@ def list(
244244
if not account_id:
245245
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
246246
extra_headers = {
247-
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else omit}),
247+
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else not_given}),
248248
**(extra_headers or {}),
249249
}
250250
return self._get(
@@ -306,7 +306,7 @@ def delete(
306306
if not bucket_name:
307307
raise ValueError(f"Expected a non-empty value for `bucket_name` but received {bucket_name!r}")
308308
extra_headers = {
309-
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else omit}),
309+
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else not_given}),
310310
**(extra_headers or {}),
311311
}
312312
return self._delete(
@@ -363,7 +363,7 @@ def edit(
363363
**strip_not_given(
364364
{
365365
"cf-r2-storage-class": str(storage_class),
366-
"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else omit,
366+
"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else not_given,
367367
}
368368
),
369369
**(extra_headers or {}),
@@ -416,7 +416,7 @@ def get(
416416
if not bucket_name:
417417
raise ValueError(f"Expected a non-empty value for `bucket_name` but received {bucket_name!r}")
418418
extra_headers = {
419-
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else omit}),
419+
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else not_given}),
420420
**(extra_headers or {}),
421421
}
422422
return self._get(
@@ -520,7 +520,7 @@ async def create(
520520
if not account_id:
521521
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
522522
extra_headers = {
523-
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else omit}),
523+
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else not_given}),
524524
**(extra_headers or {}),
525525
}
526526
return await self._post(
@@ -594,7 +594,7 @@ async def list(
594594
if not account_id:
595595
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
596596
extra_headers = {
597-
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else omit}),
597+
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else not_given}),
598598
**(extra_headers or {}),
599599
}
600600
return await self._get(
@@ -656,7 +656,7 @@ async def delete(
656656
if not bucket_name:
657657
raise ValueError(f"Expected a non-empty value for `bucket_name` but received {bucket_name!r}")
658658
extra_headers = {
659-
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else omit}),
659+
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else not_given}),
660660
**(extra_headers or {}),
661661
}
662662
return await self._delete(
@@ -713,7 +713,7 @@ async def edit(
713713
**strip_not_given(
714714
{
715715
"cf-r2-storage-class": str(storage_class),
716-
"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else omit,
716+
"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else not_given,
717717
}
718718
),
719719
**(extra_headers or {}),
@@ -766,7 +766,7 @@ async def get(
766766
if not bucket_name:
767767
raise ValueError(f"Expected a non-empty value for `bucket_name` but received {bucket_name!r}")
768768
extra_headers = {
769-
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else omit}),
769+
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else not_given}),
770770
**(extra_headers or {}),
771771
}
772772
return await self._get(

0 commit comments

Comments
 (0)