3333
3434from compute_api_client .models .commit import Commit
3535from compute_api_client .models .commit_in import CommitIn
36+ from compute_api_client .models .compile_payload import CompilePayload
3637from compute_api_client .models .page_commit import PageCommit
3738
3839from compute_api_client .api_client import ApiClient
@@ -53,6 +54,294 @@ def __init__(self, api_client=None) -> None:
5354 self .api_client = api_client
5455
5556
57+ @validate_call
58+ async def compile_commit_commits_id_compile_post (
59+ self ,
60+ id : StrictInt ,
61+ compile_payload : CompilePayload ,
62+ _request_timeout : Union [
63+ None ,
64+ Annotated [StrictFloat , Field (gt = 0 )],
65+ Tuple [
66+ Annotated [StrictFloat , Field (gt = 0 )],
67+ Annotated [StrictFloat , Field (gt = 0 )]
68+ ]
69+ ] = None ,
70+ _request_auth : Optional [Dict [StrictStr , Any ]] = None ,
71+ _content_type : Optional [StrictStr ] = None ,
72+ _headers : Optional [Dict [StrictStr , Any ]] = None ,
73+ _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
74+ ) -> None :
75+ """Compile file in a commit
76+
77+ Get commit by ID.
78+
79+ :param id: (required)
80+ :type id: int
81+ :param compile_payload: (required)
82+ :type compile_payload: CompilePayload
83+ :param _request_timeout: timeout setting for this request. If one
84+ number provided, it will be total request
85+ timeout. It can also be a pair (tuple) of
86+ (connection, read) timeouts.
87+ :type _request_timeout: int, tuple(int, int), optional
88+ :param _request_auth: set to override the auth_settings for an a single
89+ request; this effectively ignores the
90+ authentication in the spec for a single request.
91+ :type _request_auth: dict, optional
92+ :param _content_type: force content-type for the request.
93+ :type _content_type: str, Optional
94+ :param _headers: set to override the headers for a single
95+ request; this effectively ignores the headers
96+ in the spec for a single request.
97+ :type _headers: dict, optional
98+ :param _host_index: set to override the host_index for a single
99+ request; this effectively ignores the host_index
100+ in the spec for a single request.
101+ :type _host_index: int, optional
102+ :return: Returns the result object.
103+ """ # noqa: E501
104+
105+ _param = self ._compile_commit_commits_id_compile_post_serialize (
106+ id = id ,
107+ compile_payload = compile_payload ,
108+ _request_auth = _request_auth ,
109+ _content_type = _content_type ,
110+ _headers = _headers ,
111+ _host_index = _host_index
112+ )
113+
114+ _response_types_map : Dict [str , Optional [str ]] = {
115+
116+ }
117+ response_data = await self .api_client .call_api (
118+ * _param ,
119+ _request_timeout = _request_timeout
120+ )
121+ await response_data .read ()
122+ return self .api_client .response_deserialize (
123+ response_data = response_data ,
124+ response_types_map = _response_types_map ,
125+ ).data
126+
127+
128+ @validate_call
129+ async def compile_commit_commits_id_compile_post_with_http_info (
130+ self ,
131+ id : StrictInt ,
132+ compile_payload : CompilePayload ,
133+ _request_timeout : Union [
134+ None ,
135+ Annotated [StrictFloat , Field (gt = 0 )],
136+ Tuple [
137+ Annotated [StrictFloat , Field (gt = 0 )],
138+ Annotated [StrictFloat , Field (gt = 0 )]
139+ ]
140+ ] = None ,
141+ _request_auth : Optional [Dict [StrictStr , Any ]] = None ,
142+ _content_type : Optional [StrictStr ] = None ,
143+ _headers : Optional [Dict [StrictStr , Any ]] = None ,
144+ _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
145+ ) -> ApiResponse [None ]:
146+ """Compile file in a commit
147+
148+ Get commit by ID.
149+
150+ :param id: (required)
151+ :type id: int
152+ :param compile_payload: (required)
153+ :type compile_payload: CompilePayload
154+ :param _request_timeout: timeout setting for this request. If one
155+ number provided, it will be total request
156+ timeout. It can also be a pair (tuple) of
157+ (connection, read) timeouts.
158+ :type _request_timeout: int, tuple(int, int), optional
159+ :param _request_auth: set to override the auth_settings for an a single
160+ request; this effectively ignores the
161+ authentication in the spec for a single request.
162+ :type _request_auth: dict, optional
163+ :param _content_type: force content-type for the request.
164+ :type _content_type: str, Optional
165+ :param _headers: set to override the headers for a single
166+ request; this effectively ignores the headers
167+ in the spec for a single request.
168+ :type _headers: dict, optional
169+ :param _host_index: set to override the host_index for a single
170+ request; this effectively ignores the host_index
171+ in the spec for a single request.
172+ :type _host_index: int, optional
173+ :return: Returns the result object.
174+ """ # noqa: E501
175+
176+ _param = self ._compile_commit_commits_id_compile_post_serialize (
177+ id = id ,
178+ compile_payload = compile_payload ,
179+ _request_auth = _request_auth ,
180+ _content_type = _content_type ,
181+ _headers = _headers ,
182+ _host_index = _host_index
183+ )
184+
185+ _response_types_map : Dict [str , Optional [str ]] = {
186+
187+ }
188+ response_data = await self .api_client .call_api (
189+ * _param ,
190+ _request_timeout = _request_timeout
191+ )
192+ await response_data .read ()
193+ return self .api_client .response_deserialize (
194+ response_data = response_data ,
195+ response_types_map = _response_types_map ,
196+ )
197+
198+
199+ @validate_call
200+ async def compile_commit_commits_id_compile_post_without_preload_content (
201+ self ,
202+ id : StrictInt ,
203+ compile_payload : CompilePayload ,
204+ _request_timeout : Union [
205+ None ,
206+ Annotated [StrictFloat , Field (gt = 0 )],
207+ Tuple [
208+ Annotated [StrictFloat , Field (gt = 0 )],
209+ Annotated [StrictFloat , Field (gt = 0 )]
210+ ]
211+ ] = None ,
212+ _request_auth : Optional [Dict [StrictStr , Any ]] = None ,
213+ _content_type : Optional [StrictStr ] = None ,
214+ _headers : Optional [Dict [StrictStr , Any ]] = None ,
215+ _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
216+ ) -> RESTResponseType :
217+ """Compile file in a commit
218+
219+ Get commit by ID.
220+
221+ :param id: (required)
222+ :type id: int
223+ :param compile_payload: (required)
224+ :type compile_payload: CompilePayload
225+ :param _request_timeout: timeout setting for this request. If one
226+ number provided, it will be total request
227+ timeout. It can also be a pair (tuple) of
228+ (connection, read) timeouts.
229+ :type _request_timeout: int, tuple(int, int), optional
230+ :param _request_auth: set to override the auth_settings for an a single
231+ request; this effectively ignores the
232+ authentication in the spec for a single request.
233+ :type _request_auth: dict, optional
234+ :param _content_type: force content-type for the request.
235+ :type _content_type: str, Optional
236+ :param _headers: set to override the headers for a single
237+ request; this effectively ignores the headers
238+ in the spec for a single request.
239+ :type _headers: dict, optional
240+ :param _host_index: set to override the host_index for a single
241+ request; this effectively ignores the host_index
242+ in the spec for a single request.
243+ :type _host_index: int, optional
244+ :return: Returns the result object.
245+ """ # noqa: E501
246+
247+ _param = self ._compile_commit_commits_id_compile_post_serialize (
248+ id = id ,
249+ compile_payload = compile_payload ,
250+ _request_auth = _request_auth ,
251+ _content_type = _content_type ,
252+ _headers = _headers ,
253+ _host_index = _host_index
254+ )
255+
256+ _response_types_map : Dict [str , Optional [str ]] = {
257+
258+ }
259+ response_data = await self .api_client .call_api (
260+ * _param ,
261+ _request_timeout = _request_timeout
262+ )
263+ return response_data .response
264+
265+
266+ def _compile_commit_commits_id_compile_post_serialize (
267+ self ,
268+ id ,
269+ compile_payload ,
270+ _request_auth ,
271+ _content_type ,
272+ _headers ,
273+ _host_index ,
274+ ) -> Tuple :
275+
276+ _host = None
277+
278+ _collection_formats : Dict [str , str ] = {
279+
280+ }
281+
282+ _path_params : Dict [str , str ] = {}
283+ _query_params : List [Tuple [str , str ]] = []
284+ _header_params : Dict [str , Optional [str ]] = _headers or {}
285+ _form_params : List [Tuple [str , str ]] = []
286+ _files : Dict [str , str ] = {}
287+ _body_params : Optional [bytes ] = None
288+
289+ # process the path parameters
290+ if id is not None :
291+ _path_params ['id' ] = id
292+ # process the query parameters
293+ # process the header parameters
294+ # process the form parameters
295+ # process the body parameter
296+ if compile_payload is not None :
297+ _body_params = compile_payload
298+
299+
300+ # set the HTTP header `Accept`
301+ _header_params ['Accept' ] = self .api_client .select_header_accept (
302+ [
303+ 'application/json'
304+ ]
305+ )
306+
307+ # set the HTTP header `Content-Type`
308+ if _content_type :
309+ _header_params ['Content-Type' ] = _content_type
310+ else :
311+ _default_content_type = (
312+ self .api_client .select_header_content_type (
313+ [
314+ 'application/json'
315+ ]
316+ )
317+ )
318+ if _default_content_type is not None :
319+ _header_params ['Content-Type' ] = _default_content_type
320+
321+ # authentication setting
322+ _auth_settings : List [str ] = [
323+ 'user_bearer' ,
324+ 'backend'
325+ ]
326+
327+ return self .api_client .param_serialize (
328+ method = 'POST' ,
329+ resource_path = '/commits/{id}/compile' ,
330+ path_params = _path_params ,
331+ query_params = _query_params ,
332+ header_params = _header_params ,
333+ body = _body_params ,
334+ post_params = _form_params ,
335+ files = _files ,
336+ auth_settings = _auth_settings ,
337+ collection_formats = _collection_formats ,
338+ _host = _host ,
339+ _request_auth = _request_auth
340+ )
341+
342+
343+
344+
56345 @validate_call
57346 async def create_commit_commits_post (
58347 self ,
0 commit comments