massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / boto / boto / s3 / key.pyi
1 from typing import Any, Callable, Text, overload
2
3 class Key:
4     DefaultContentType: str
5     RestoreBody: str
6     BufferSize: Any
7     base_user_settable_fields: Any
8     base_fields: Any
9     bucket: Any
10     name: str
11     metadata: Any
12     cache_control: Any
13     content_type: Any
14     content_encoding: Any
15     content_disposition: Any
16     content_language: Any
17     filename: Any
18     etag: Any
19     is_latest: bool
20     last_modified: Any
21     owner: Any
22     path: Any
23     resp: Any
24     mode: Any
25     size: Any
26     version_id: Any
27     source_version_id: Any
28     delete_marker: bool
29     encrypted: Any
30     ongoing_restore: Any
31     expiry_date: Any
32     local_hashes: Any
33     def __init__(self, bucket: Any | None = ..., name: Any | None = ...) -> None: ...
34     def __iter__(self): ...
35     @property
36     def provider(self): ...
37     key: Any
38     md5: Any
39     base64md5: Any
40     storage_class: Any
41     def get_md5_from_hexdigest(self, md5_hexdigest): ...
42     def handle_encryption_headers(self, resp): ...
43     def handle_version_headers(self, resp, force: bool = ...): ...
44     def handle_restore_headers(self, response): ...
45     def handle_addl_headers(self, headers): ...
46     def open_read(
47         self,
48         headers: dict[Text, Text] | None = ...,
49         query_args: str = ...,
50         override_num_retries: Any | None = ...,
51         response_headers: dict[Text, Text] | None = ...,
52     ): ...
53     def open_write(self, headers: dict[Text, Text] | None = ..., override_num_retries: Any | None = ...): ...
54     def open(
55         self,
56         mode: str = ...,
57         headers: dict[Text, Text] | None = ...,
58         query_args: Any | None = ...,
59         override_num_retries: Any | None = ...,
60     ): ...
61     closed: bool
62     def close(self, fast: bool = ...): ...
63     def next(self): ...
64     __next__: Any
65     def read(self, size: int = ...): ...
66     def change_storage_class(self, new_storage_class, dst_bucket: Any | None = ..., validate_dst_bucket: bool = ...): ...
67     def copy(
68         self,
69         dst_bucket,
70         dst_key,
71         metadata: Any | None = ...,
72         reduced_redundancy: bool = ...,
73         preserve_acl: bool = ...,
74         encrypt_key: bool = ...,
75         validate_dst_bucket: bool = ...,
76     ): ...
77     def startElement(self, name, attrs, connection): ...
78     def endElement(self, name, value, connection): ...
79     def exists(self, headers: dict[Text, Text] | None = ...): ...
80     def delete(self, headers: dict[Text, Text] | None = ...): ...
81     def get_metadata(self, name): ...
82     def set_metadata(self, name, value): ...
83     def update_metadata(self, d): ...
84     def set_acl(self, acl_str, headers: dict[Text, Text] | None = ...): ...
85     def get_acl(self, headers: dict[Text, Text] | None = ...): ...
86     def get_xml_acl(self, headers: dict[Text, Text] | None = ...): ...
87     def set_xml_acl(self, acl_str, headers: dict[Text, Text] | None = ...): ...
88     def set_canned_acl(self, acl_str, headers: dict[Text, Text] | None = ...): ...
89     def get_redirect(self): ...
90     def set_redirect(self, redirect_location, headers: dict[Text, Text] | None = ...): ...
91     def make_public(self, headers: dict[Text, Text] | None = ...): ...
92     def generate_url(
93         self,
94         expires_in,
95         method: str = ...,
96         headers: dict[Text, Text] | None = ...,
97         query_auth: bool = ...,
98         force_http: bool = ...,
99         response_headers: dict[Text, Text] | None = ...,
100         expires_in_absolute: bool = ...,
101         version_id: Any | None = ...,
102         policy: Any | None = ...,
103         reduced_redundancy: bool = ...,
104         encrypt_key: bool = ...,
105     ): ...
106     def send_file(
107         self,
108         fp,
109         headers: dict[Text, Text] | None = ...,
110         cb: Callable[[int, int], Any] | None = ...,
111         num_cb: int = ...,
112         query_args: Any | None = ...,
113         chunked_transfer: bool = ...,
114         size: Any | None = ...,
115     ): ...
116     def should_retry(self, response, chunked_transfer: bool = ...): ...
117     def compute_md5(self, fp, size: Any | None = ...): ...
118     def set_contents_from_stream(
119         self,
120         fp,
121         headers: dict[Text, Text] | None = ...,
122         replace: bool = ...,
123         cb: Callable[[int, int], Any] | None = ...,
124         num_cb: int = ...,
125         policy: Any | None = ...,
126         reduced_redundancy: bool = ...,
127         query_args: Any | None = ...,
128         size: Any | None = ...,
129     ): ...
130     def set_contents_from_file(
131         self,
132         fp,
133         headers: dict[Text, Text] | None = ...,
134         replace: bool = ...,
135         cb: Callable[[int, int], Any] | None = ...,
136         num_cb: int = ...,
137         policy: Any | None = ...,
138         md5: Any | None = ...,
139         reduced_redundancy: bool = ...,
140         query_args: Any | None = ...,
141         encrypt_key: bool = ...,
142         size: Any | None = ...,
143         rewind: bool = ...,
144     ): ...
145     def set_contents_from_filename(
146         self,
147         filename,
148         headers: dict[Text, Text] | None = ...,
149         replace: bool = ...,
150         cb: Callable[[int, int], Any] | None = ...,
151         num_cb: int = ...,
152         policy: Any | None = ...,
153         md5: Any | None = ...,
154         reduced_redundancy: bool = ...,
155         encrypt_key: bool = ...,
156     ): ...
157     def set_contents_from_string(
158         self,
159         string_data: Text | bytes,
160         headers: dict[Text, Text] | None = ...,
161         replace: bool = ...,
162         cb: Callable[[int, int], Any] | None = ...,
163         num_cb: int = ...,
164         policy: Any | None = ...,
165         md5: Any | None = ...,
166         reduced_redundancy: bool = ...,
167         encrypt_key: bool = ...,
168     ) -> None: ...
169     def get_file(
170         self,
171         fp,
172         headers: dict[Text, Text] | None = ...,
173         cb: Callable[[int, int], Any] | None = ...,
174         num_cb: int = ...,
175         torrent: bool = ...,
176         version_id: Any | None = ...,
177         override_num_retries: Any | None = ...,
178         response_headers: dict[Text, Text] | None = ...,
179     ): ...
180     def get_torrent_file(
181         self, fp, headers: dict[Text, Text] | None = ..., cb: Callable[[int, int], Any] | None = ..., num_cb: int = ...
182     ): ...
183     def get_contents_to_file(
184         self,
185         fp,
186         headers: dict[Text, Text] | None = ...,
187         cb: Callable[[int, int], Any] | None = ...,
188         num_cb: int = ...,
189         torrent: bool = ...,
190         version_id: Any | None = ...,
191         res_download_handler: Any | None = ...,
192         response_headers: dict[Text, Text] | None = ...,
193     ): ...
194     def get_contents_to_filename(
195         self,
196         filename,
197         headers: dict[Text, Text] | None = ...,
198         cb: Callable[[int, int], Any] | None = ...,
199         num_cb: int = ...,
200         torrent: bool = ...,
201         version_id: Any | None = ...,
202         res_download_handler: Any | None = ...,
203         response_headers: dict[Text, Text] | None = ...,
204     ): ...
205     @overload
206     def get_contents_as_string(
207         self,
208         headers: dict[Text, Text] | None = ...,
209         cb: Callable[[int, int], Any] | None = ...,
210         num_cb: int = ...,
211         torrent: bool = ...,
212         version_id: Any | None = ...,
213         response_headers: dict[Text, Text] | None = ...,
214         encoding: None = ...,
215     ) -> bytes: ...
216     @overload
217     def get_contents_as_string(
218         self,
219         headers: dict[Text, Text] | None = ...,
220         cb: Callable[[int, int], Any] | None = ...,
221         num_cb: int = ...,
222         torrent: bool = ...,
223         version_id: Any | None = ...,
224         response_headers: dict[Text, Text] | None = ...,
225         *,
226         encoding: Text,
227     ) -> Text: ...
228     def add_email_grant(self, permission, email_address, headers: dict[Text, Text] | None = ...): ...
229     def add_user_grant(self, permission, user_id, headers: dict[Text, Text] | None = ..., display_name: Any | None = ...): ...
230     def set_remote_metadata(self, metadata_plus, metadata_minus, preserve_acl, headers: dict[Text, Text] | None = ...): ...
231     def restore(self, days, headers: dict[Text, Text] | None = ...): ...