Skip to content
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
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1490
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e1196991f4ef4ff059b3c665a34ec0b270d84b2f786f6a1c0ff43e5974e4c50.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ed8629c4fef78e6fd8669578fc4d3904f20620a1ea39a40d5d2b4adbc4ecad6d.yml
32 changes: 12 additions & 20 deletions src/cloudflare/resources/r2/buckets/buckets.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def delete(
bucket_name: str,
*,
account_id: str,
cf_r2_jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN,
jurisdiction: Literal["default", "eu", "fedramp"] | 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 All @@ -272,7 +272,7 @@ def delete(

bucket_name: Name of the bucket

cf_r2_jurisdiction: The bucket jurisdiction
jurisdiction: The bucket jurisdiction

extra_headers: Send extra headers

Expand All @@ -287,9 +287,7 @@ def delete(
if not bucket_name:
raise ValueError(f"Expected a non-empty value for `bucket_name` but received {bucket_name!r}")
extra_headers = {
**strip_not_given(
{"cf-r2-jurisdiction": str(cf_r2_jurisdiction) if is_given(cf_r2_jurisdiction) else NOT_GIVEN}
),
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else NOT_GIVEN}),
**(extra_headers or {}),
}
return self._delete(
Expand All @@ -309,7 +307,7 @@ def get(
bucket_name: str,
*,
account_id: str,
cf_r2_jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN,
jurisdiction: Literal["default", "eu", "fedramp"] | 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 All @@ -325,7 +323,7 @@ def get(

bucket_name: Name of the bucket

cf_r2_jurisdiction: The bucket jurisdiction
jurisdiction: The bucket jurisdiction

extra_headers: Send extra headers

Expand All @@ -340,9 +338,7 @@ def get(
if not bucket_name:
raise ValueError(f"Expected a non-empty value for `bucket_name` but received {bucket_name!r}")
extra_headers = {
**strip_not_given(
{"cf-r2-jurisdiction": str(cf_r2_jurisdiction) if is_given(cf_r2_jurisdiction) else NOT_GIVEN}
),
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else NOT_GIVEN}),
**(extra_headers or {}),
}
return self._get(
Expand Down Expand Up @@ -543,7 +539,7 @@ async def delete(
bucket_name: str,
*,
account_id: str,
cf_r2_jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN,
jurisdiction: Literal["default", "eu", "fedramp"] | 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 All @@ -559,7 +555,7 @@ async def delete(

bucket_name: Name of the bucket

cf_r2_jurisdiction: The bucket jurisdiction
jurisdiction: The bucket jurisdiction

extra_headers: Send extra headers

Expand All @@ -574,9 +570,7 @@ async def delete(
if not bucket_name:
raise ValueError(f"Expected a non-empty value for `bucket_name` but received {bucket_name!r}")
extra_headers = {
**strip_not_given(
{"cf-r2-jurisdiction": str(cf_r2_jurisdiction) if is_given(cf_r2_jurisdiction) else NOT_GIVEN}
),
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else NOT_GIVEN}),
**(extra_headers or {}),
}
return await self._delete(
Expand All @@ -596,7 +590,7 @@ async def get(
bucket_name: str,
*,
account_id: str,
cf_r2_jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN,
jurisdiction: Literal["default", "eu", "fedramp"] | 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 All @@ -612,7 +606,7 @@ async def get(

bucket_name: Name of the bucket

cf_r2_jurisdiction: The bucket jurisdiction
jurisdiction: The bucket jurisdiction

extra_headers: Send extra headers

Expand All @@ -627,9 +621,7 @@ async def get(
if not bucket_name:
raise ValueError(f"Expected a non-empty value for `bucket_name` but received {bucket_name!r}")
extra_headers = {
**strip_not_given(
{"cf-r2-jurisdiction": str(cf_r2_jurisdiction) if is_given(cf_r2_jurisdiction) else NOT_GIVEN}
),
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else NOT_GIVEN}),
**(extra_headers or {}),
}
return await self._get(
Expand Down
48 changes: 18 additions & 30 deletions src/cloudflare/resources/r2/buckets/cors.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def update(
*,
account_id: str,
rules: Iterable[cors_update_params.Rule] | NotGiven = NOT_GIVEN,
cf_r2_jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN,
jurisdiction: Literal["default", "eu", "fedramp"] | 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 All @@ -72,7 +72,7 @@ def update(

bucket_name: Name of the bucket

cf_r2_jurisdiction: The bucket jurisdiction
jurisdiction: The bucket jurisdiction

extra_headers: Send extra headers

Expand All @@ -87,9 +87,7 @@ def update(
if not bucket_name:
raise ValueError(f"Expected a non-empty value for `bucket_name` but received {bucket_name!r}")
extra_headers = {
**strip_not_given(
{"cf-r2-jurisdiction": str(cf_r2_jurisdiction) if is_given(cf_r2_jurisdiction) else NOT_GIVEN}
),
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else NOT_GIVEN}),
**(extra_headers or {}),
}
return self._put(
Expand All @@ -110,7 +108,7 @@ def delete(
bucket_name: str,
*,
account_id: str,
cf_r2_jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN,
jurisdiction: Literal["default", "eu", "fedramp"] | 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 All @@ -126,7 +124,7 @@ def delete(

bucket_name: Name of the bucket

cf_r2_jurisdiction: The bucket jurisdiction
jurisdiction: The bucket jurisdiction

extra_headers: Send extra headers

Expand All @@ -141,9 +139,7 @@ def delete(
if not bucket_name:
raise ValueError(f"Expected a non-empty value for `bucket_name` but received {bucket_name!r}")
extra_headers = {
**strip_not_given(
{"cf-r2-jurisdiction": str(cf_r2_jurisdiction) if is_given(cf_r2_jurisdiction) else NOT_GIVEN}
),
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else NOT_GIVEN}),
**(extra_headers or {}),
}
return self._delete(
Expand All @@ -163,7 +159,7 @@ def get(
bucket_name: str,
*,
account_id: str,
cf_r2_jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN,
jurisdiction: Literal["default", "eu", "fedramp"] | 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 All @@ -179,7 +175,7 @@ def get(

bucket_name: Name of the bucket

cf_r2_jurisdiction: The bucket jurisdiction
jurisdiction: The bucket jurisdiction

extra_headers: Send extra headers

Expand All @@ -194,9 +190,7 @@ def get(
if not bucket_name:
raise ValueError(f"Expected a non-empty value for `bucket_name` but received {bucket_name!r}")
extra_headers = {
**strip_not_given(
{"cf-r2-jurisdiction": str(cf_r2_jurisdiction) if is_given(cf_r2_jurisdiction) else NOT_GIVEN}
),
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else NOT_GIVEN}),
**(extra_headers or {}),
}
return self._get(
Expand Down Expand Up @@ -238,7 +232,7 @@ async def update(
*,
account_id: str,
rules: Iterable[cors_update_params.Rule] | NotGiven = NOT_GIVEN,
cf_r2_jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN,
jurisdiction: Literal["default", "eu", "fedramp"] | 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 All @@ -254,7 +248,7 @@ async def update(

bucket_name: Name of the bucket

cf_r2_jurisdiction: The bucket jurisdiction
jurisdiction: The bucket jurisdiction

extra_headers: Send extra headers

Expand All @@ -269,9 +263,7 @@ async def update(
if not bucket_name:
raise ValueError(f"Expected a non-empty value for `bucket_name` but received {bucket_name!r}")
extra_headers = {
**strip_not_given(
{"cf-r2-jurisdiction": str(cf_r2_jurisdiction) if is_given(cf_r2_jurisdiction) else NOT_GIVEN}
),
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else NOT_GIVEN}),
**(extra_headers or {}),
}
return await self._put(
Expand All @@ -292,7 +284,7 @@ async def delete(
bucket_name: str,
*,
account_id: str,
cf_r2_jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN,
jurisdiction: Literal["default", "eu", "fedramp"] | 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 All @@ -308,7 +300,7 @@ async def delete(

bucket_name: Name of the bucket

cf_r2_jurisdiction: The bucket jurisdiction
jurisdiction: The bucket jurisdiction

extra_headers: Send extra headers

Expand All @@ -323,9 +315,7 @@ async def delete(
if not bucket_name:
raise ValueError(f"Expected a non-empty value for `bucket_name` but received {bucket_name!r}")
extra_headers = {
**strip_not_given(
{"cf-r2-jurisdiction": str(cf_r2_jurisdiction) if is_given(cf_r2_jurisdiction) else NOT_GIVEN}
),
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else NOT_GIVEN}),
**(extra_headers or {}),
}
return await self._delete(
Expand All @@ -345,7 +335,7 @@ async def get(
bucket_name: str,
*,
account_id: str,
cf_r2_jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN,
jurisdiction: Literal["default", "eu", "fedramp"] | 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 All @@ -361,7 +351,7 @@ async def get(

bucket_name: Name of the bucket

cf_r2_jurisdiction: The bucket jurisdiction
jurisdiction: The bucket jurisdiction

extra_headers: Send extra headers

Expand All @@ -376,9 +366,7 @@ async def get(
if not bucket_name:
raise ValueError(f"Expected a non-empty value for `bucket_name` but received {bucket_name!r}")
extra_headers = {
**strip_not_given(
{"cf-r2-jurisdiction": str(cf_r2_jurisdiction) if is_given(cf_r2_jurisdiction) else NOT_GIVEN}
),
**strip_not_given({"cf-r2-jurisdiction": str(jurisdiction) if is_given(jurisdiction) else NOT_GIVEN}),
**(extra_headers or {}),
}
return await self._get(
Expand Down
Loading