33from __future__ import annotations
44
55import os
6- from typing import Any , Union , Mapping , Iterable
6+ from typing import Any , Mapping , Iterable
77from typing_extensions import Self , Literal , override
88
99import httpx
1818 client_delete_objects_params ,
1919)
2020from ._types import (
21- NOT_GIVEN ,
2221 Body ,
2322 Omit ,
2423 Query ,
3029 Transport ,
3130 ProxiesTypes ,
3231 RequestOptions ,
32+ omit ,
33+ not_given ,
3334)
3435from ._utils import (
3536 is_given ,
@@ -376,7 +377,7 @@ def __init__(
376377 * ,
377378 api_key : str | None = None ,
378379 base_url : str | httpx .URL | None = None ,
379- timeout : Union [ float , Timeout , None , NotGiven ] = NOT_GIVEN ,
380+ timeout : float | Timeout | None | NotGiven = not_given ,
380381 max_retries : int = DEFAULT_MAX_RETRIES ,
381382 default_headers : Mapping [str , str ] | None = None ,
382383 default_query : Mapping [str , object ] | None = None ,
@@ -605,9 +606,9 @@ def copy(
605606 * ,
606607 api_key : str | None = None ,
607608 base_url : str | httpx .URL | None = None ,
608- timeout : float | Timeout | None | NotGiven = NOT_GIVEN ,
609+ timeout : float | Timeout | None | NotGiven = not_given ,
609610 http_client : httpx .Client | None = None ,
610- max_retries : int | NotGiven = NOT_GIVEN ,
611+ max_retries : int | NotGiven = not_given ,
611612 default_headers : Mapping [str , str ] | None = None ,
612613 set_default_headers : Mapping [str , str ] | None = None ,
613614 default_query : Mapping [str , object ] | None = None ,
@@ -655,13 +656,13 @@ def create_bucket(
655656 self ,
656657 bucket_name : str ,
657658 * ,
658- location_constraint : str | NotGiven = NOT_GIVEN ,
659+ location_constraint : str | Omit = omit ,
659660 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
660661 # The extra values given here take precedence over values defined on the client or passed to this method.
661662 extra_headers : Headers | None = None ,
662663 extra_query : Query | None = None ,
663664 extra_body : Body | None = None ,
664- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
665+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
665666 ) -> None :
666667 """
667668 Create a bucket.
@@ -698,7 +699,7 @@ def delete_bucket(
698699 extra_headers : Headers | None = None ,
699700 extra_query : Query | None = None ,
700701 extra_body : Body | None = None ,
701- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
702+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
702703 ) -> None :
703704 """Deletes a bucket.
704705
@@ -734,7 +735,7 @@ def delete_object(
734735 extra_headers : Headers | None = None ,
735736 extra_query : Query | None = None ,
736737 extra_body : Body | None = None ,
737- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
738+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
738739 ) -> None :
739740 """
740741 Delete an object from a given bucket.
@@ -772,7 +773,7 @@ def delete_objects(
772773 extra_headers : Headers | None = None ,
773774 extra_query : Query | None = None ,
774775 extra_body : Body | None = None ,
775- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
776+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
776777 ) -> object :
777778 """
778779 Deletes one or multiple objects from a given bucket.
@@ -807,13 +808,13 @@ def get_object(
807808 object_name : str ,
808809 * ,
809810 bucket_name : str ,
810- upload_id : str | NotGiven = NOT_GIVEN ,
811+ upload_id : str | Omit = omit ,
811812 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
812813 # The extra values given here take precedence over values defined on the client or passed to this method.
813814 extra_headers : Headers | None = None ,
814815 extra_query : Query | None = None ,
815816 extra_body : Body | None = None ,
816- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
817+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
817818 ) -> BinaryAPIResponse :
818819 """
819820 Retrieves an object from a given bucket.
@@ -852,7 +853,7 @@ def list_buckets(
852853 extra_headers : Headers | None = None ,
853854 extra_query : Query | None = None ,
854855 extra_body : Body | None = None ,
855- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
856+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
856857 ) -> ListBucketsResponse :
857858 """List all Buckets."""
858859 extra_headers = {"Accept" : "application/xml" , ** (extra_headers or {})}
@@ -868,13 +869,13 @@ def list_objects(
868869 self ,
869870 bucket_name : str ,
870871 * ,
871- list_type : Literal [2 ] | NotGiven = NOT_GIVEN ,
872+ list_type : Literal [2 ] | Omit = omit ,
872873 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
873874 # The extra values given here take precedence over values defined on the client or passed to this method.
874875 extra_headers : Headers | None = None ,
875876 extra_query : Query | None = None ,
876877 extra_body : Body | None = None ,
877- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
878+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
878879 ) -> ListObjectsResponse :
879880 """
880881 List all objects contained in a given bucket.
@@ -909,14 +910,14 @@ def put_object(
909910 * ,
910911 bucket_name : str ,
911912 body : FileTypes ,
912- part_number : str | NotGiven = NOT_GIVEN ,
913- upload_id : str | NotGiven = NOT_GIVEN ,
913+ part_number : str | Omit = omit ,
914+ upload_id : str | Omit = omit ,
914915 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
915916 # The extra values given here take precedence over values defined on the client or passed to this method.
916917 extra_headers : Headers | None = None ,
917918 extra_query : Query | None = None ,
918919 extra_body : Body | None = None ,
919- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
920+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
920921 ) -> None :
921922 """
922923 Add an object to a bucket.
@@ -1149,7 +1150,7 @@ def __init__(
11491150 * ,
11501151 api_key : str | None = None ,
11511152 base_url : str | httpx .URL | None = None ,
1152- timeout : Union [ float , Timeout , None , NotGiven ] = NOT_GIVEN ,
1153+ timeout : float | Timeout | None | NotGiven = not_given ,
11531154 max_retries : int = DEFAULT_MAX_RETRIES ,
11541155 default_headers : Mapping [str , str ] | None = None ,
11551156 default_query : Mapping [str , object ] | None = None ,
@@ -1384,9 +1385,9 @@ def copy(
13841385 * ,
13851386 api_key : str | None = None ,
13861387 base_url : str | httpx .URL | None = None ,
1387- timeout : float | Timeout | None | NotGiven = NOT_GIVEN ,
1388+ timeout : float | Timeout | None | NotGiven = not_given ,
13881389 http_client : httpx .AsyncClient | None = None ,
1389- max_retries : int | NotGiven = NOT_GIVEN ,
1390+ max_retries : int | NotGiven = not_given ,
13901391 default_headers : Mapping [str , str ] | None = None ,
13911392 set_default_headers : Mapping [str , str ] | None = None ,
13921393 default_query : Mapping [str , object ] | None = None ,
@@ -1434,13 +1435,13 @@ async def create_bucket(
14341435 self ,
14351436 bucket_name : str ,
14361437 * ,
1437- location_constraint : str | NotGiven = NOT_GIVEN ,
1438+ location_constraint : str | Omit = omit ,
14381439 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
14391440 # The extra values given here take precedence over values defined on the client or passed to this method.
14401441 extra_headers : Headers | None = None ,
14411442 extra_query : Query | None = None ,
14421443 extra_body : Body | None = None ,
1443- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1444+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
14441445 ) -> None :
14451446 """
14461447 Create a bucket.
@@ -1477,7 +1478,7 @@ async def delete_bucket(
14771478 extra_headers : Headers | None = None ,
14781479 extra_query : Query | None = None ,
14791480 extra_body : Body | None = None ,
1480- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1481+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
14811482 ) -> None :
14821483 """Deletes a bucket.
14831484
@@ -1513,7 +1514,7 @@ async def delete_object(
15131514 extra_headers : Headers | None = None ,
15141515 extra_query : Query | None = None ,
15151516 extra_body : Body | None = None ,
1516- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1517+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
15171518 ) -> None :
15181519 """
15191520 Delete an object from a given bucket.
@@ -1551,7 +1552,7 @@ async def delete_objects(
15511552 extra_headers : Headers | None = None ,
15521553 extra_query : Query | None = None ,
15531554 extra_body : Body | None = None ,
1554- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1555+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
15551556 ) -> object :
15561557 """
15571558 Deletes one or multiple objects from a given bucket.
@@ -1588,13 +1589,13 @@ async def get_object(
15881589 object_name : str ,
15891590 * ,
15901591 bucket_name : str ,
1591- upload_id : str | NotGiven = NOT_GIVEN ,
1592+ upload_id : str | Omit = omit ,
15921593 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
15931594 # The extra values given here take precedence over values defined on the client or passed to this method.
15941595 extra_headers : Headers | None = None ,
15951596 extra_query : Query | None = None ,
15961597 extra_body : Body | None = None ,
1597- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1598+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
15981599 ) -> AsyncBinaryAPIResponse :
15991600 """
16001601 Retrieves an object from a given bucket.
@@ -1635,7 +1636,7 @@ async def list_buckets(
16351636 extra_headers : Headers | None = None ,
16361637 extra_query : Query | None = None ,
16371638 extra_body : Body | None = None ,
1638- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1639+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
16391640 ) -> ListBucketsResponse :
16401641 """List all Buckets."""
16411642 extra_headers = {"Accept" : "application/xml" , ** (extra_headers or {})}
@@ -1651,13 +1652,13 @@ async def list_objects(
16511652 self ,
16521653 bucket_name : str ,
16531654 * ,
1654- list_type : Literal [2 ] | NotGiven = NOT_GIVEN ,
1655+ list_type : Literal [2 ] | Omit = omit ,
16551656 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
16561657 # The extra values given here take precedence over values defined on the client or passed to this method.
16571658 extra_headers : Headers | None = None ,
16581659 extra_query : Query | None = None ,
16591660 extra_body : Body | None = None ,
1660- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1661+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
16611662 ) -> ListObjectsResponse :
16621663 """
16631664 List all objects contained in a given bucket.
@@ -1694,14 +1695,14 @@ async def put_object(
16941695 * ,
16951696 bucket_name : str ,
16961697 body : FileTypes ,
1697- part_number : str | NotGiven = NOT_GIVEN ,
1698- upload_id : str | NotGiven = NOT_GIVEN ,
1698+ part_number : str | Omit = omit ,
1699+ upload_id : str | Omit = omit ,
16991700 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
17001701 # The extra values given here take precedence over values defined on the client or passed to this method.
17011702 extra_headers : Headers | None = None ,
17021703 extra_query : Query | None = None ,
17031704 extra_body : Body | None = None ,
1704- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1705+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
17051706 ) -> None :
17061707 """
17071708 Add an object to a bucket.
0 commit comments