massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / boto / boto / s3 / connection.pyi
1 from typing import Any, Text, Type
2
3 from boto.connection import AWSAuthConnection
4 from boto.exception import BotoClientError
5
6 from .bucket import Bucket
7
8 def check_lowercase_bucketname(n): ...
9 def assert_case_insensitive(f): ...
10
11 class _CallingFormat:
12     def get_bucket_server(self, server, bucket): ...
13     def build_url_base(self, connection, protocol, server, bucket, key: str = ...): ...
14     def build_host(self, server, bucket): ...
15     def build_auth_path(self, bucket, key: str = ...): ...
16     def build_path_base(self, bucket, key: str = ...): ...
17
18 class SubdomainCallingFormat(_CallingFormat):
19     def get_bucket_server(self, server, bucket): ...
20
21 class VHostCallingFormat(_CallingFormat):
22     def get_bucket_server(self, server, bucket): ...
23
24 class OrdinaryCallingFormat(_CallingFormat):
25     def get_bucket_server(self, server, bucket): ...
26     def build_path_base(self, bucket, key: str = ...): ...
27
28 class ProtocolIndependentOrdinaryCallingFormat(OrdinaryCallingFormat):
29     def build_url_base(self, connection, protocol, server, bucket, key: str = ...): ...
30
31 class Location:
32     DEFAULT: str
33     EU: str
34     EUCentral1: str
35     USWest: str
36     USWest2: str
37     SAEast: str
38     APNortheast: str
39     APSoutheast: str
40     APSoutheast2: str
41     CNNorth1: str
42
43 class NoHostProvided: ...
44 class HostRequiredError(BotoClientError): ...
45
46 class S3Connection(AWSAuthConnection):
47     DefaultHost: Any
48     DefaultCallingFormat: Any
49     QueryString: str
50     calling_format: Any
51     bucket_class: Type[Bucket]
52     anon: Any
53     def __init__(
54         self,
55         aws_access_key_id: Any | None = ...,
56         aws_secret_access_key: Any | None = ...,
57         is_secure: bool = ...,
58         port: Any | None = ...,
59         proxy: Any | None = ...,
60         proxy_port: Any | None = ...,
61         proxy_user: Any | None = ...,
62         proxy_pass: Any | None = ...,
63         host: Any = ...,
64         debug: int = ...,
65         https_connection_factory: Any | None = ...,
66         calling_format: Any = ...,
67         path: str = ...,
68         provider: str = ...,
69         bucket_class: Type[Bucket] = ...,
70         security_token: Any | None = ...,
71         suppress_consec_slashes: bool = ...,
72         anon: bool = ...,
73         validate_certs: Any | None = ...,
74         profile_name: Any | None = ...,
75     ) -> None: ...
76     def __iter__(self): ...
77     def __contains__(self, bucket_name): ...
78     def set_bucket_class(self, bucket_class: Type[Bucket]) -> None: ...
79     def build_post_policy(self, expiration_time, conditions): ...
80     def build_post_form_args(
81         self,
82         bucket_name,
83         key,
84         expires_in: int = ...,
85         acl: Any | None = ...,
86         success_action_redirect: Any | None = ...,
87         max_content_length: Any | None = ...,
88         http_method: str = ...,
89         fields: Any | None = ...,
90         conditions: Any | None = ...,
91         storage_class: str = ...,
92         server_side_encryption: Any | None = ...,
93     ): ...
94     def generate_url_sigv4(
95         self,
96         expires_in,
97         method,
98         bucket: str = ...,
99         key: str = ...,
100         headers: dict[Text, Text] | None = ...,
101         force_http: bool = ...,
102         response_headers: dict[Text, Text] | None = ...,
103         version_id: Any | None = ...,
104         iso_date: Any | None = ...,
105     ): ...
106     def generate_url(
107         self,
108         expires_in,
109         method,
110         bucket: str = ...,
111         key: str = ...,
112         headers: dict[Text, Text] | None = ...,
113         query_auth: bool = ...,
114         force_http: bool = ...,
115         response_headers: dict[Text, Text] | None = ...,
116         expires_in_absolute: bool = ...,
117         version_id: Any | None = ...,
118     ): ...
119     def get_all_buckets(self, headers: dict[Text, Text] | None = ...): ...
120     def get_canonical_user_id(self, headers: dict[Text, Text] | None = ...): ...
121     def get_bucket(self, bucket_name: Text, validate: bool = ..., headers: dict[Text, Text] | None = ...) -> Bucket: ...
122     def head_bucket(self, bucket_name, headers: dict[Text, Text] | None = ...): ...
123     def lookup(self, bucket_name, validate: bool = ..., headers: dict[Text, Text] | None = ...): ...
124     def create_bucket(
125         self, bucket_name, headers: dict[Text, Text] | None = ..., location: Any = ..., policy: Any | None = ...
126     ): ...
127     def delete_bucket(self, bucket, headers: dict[Text, Text] | None = ...): ...
128     def make_request(self, method, bucket: str = ..., key: str = ..., headers: Any | None = ..., data: str = ..., query_args: Any | None = ..., sender: Any | None = ..., override_num_retries: Any | None = ..., retry_handler: Any | None = ..., *args, **kwargs): ...  # type: ignore # https://github.com/python/mypy/issues/1237