
    CT                         S r SSKJr  SSKrSSKrSSKrSSKrSSKrSSKJ	r	  SSK
JrJ
r
  SSKJrJrJrJr  SSKJr  SS	KJr  SS
KJr  SSKJrJr   " S S\5      rg)z
Kubernetes

No description provided (generated by Swagger Codegen
https://github.com/swagger-api/swagger-codegen)

OpenAPI spec version: v1.14.4

Generated by: https://github.com/swagger-api/swagger-codegen.git
    )absolute_importN)
ThreadPool)datedatetime)PY3integer_types	iteritems	text_type)quote   )models)Configuration)ApiExceptionRESTClientObjectc            	       n   \ rS rSrSr\\\\4\	-   r
\\(       a  \O\\\\\\\S.rSr     SS jrS r\S 5       r\S 5       r\R2                  S	 5       rS
 r            SS jrS rS rS r             SS jr      S S jr S r!S!S jr"S r#S r$S r%S r&S r'S r(S r)S r*S r+Sr,g)"	ApiClient!   av  
Generic API client for Swagger client library builds.

Swagger generic API client. This client handles the client-
server communication, and is invariant across implementations. Specifics of
the methods and models for each application are generated from the Swagger
templates.

NOTE: This class is auto generated by the swagger code generator program.
Ref: https://github.com/swagger-api/swagger-codegen
Do not edit the class manually.

:param host: The base path for the server to call.
:param header_name: a header to pass when making calls to the API.
:param header_value: a header value to pass when making calls to the API.
)intlongfloatstrboolr   r   objectNc                     Uc
  [        5       nXl        XPl        [        U5      U l        0 U l        Ub  X0R
                  U'   X@l        SU l        g )Nz&Swagger-Codegen/10.0.0-snapshot/python)r   configurationpool_threadsr   rest_clientdefault_headerscookie
user_agent)selfr   header_nameheader_valuer   r   s         /lib/third_party/kubernetes/client/api_client.py__init__ApiClient.__init__@   sR     #om&$'6DD*6;'K>DO    c                     U R                   (       a<  U R                   R                  5         U R                   R                  5         S U l         g g N)_poolclosejoinr!   s    r$   __del__ApiClient.__del__S   s3    zz
jj
jjoodj r'   c                 h    U R                   c  [        U R                  5      U l         U R                   $ )zbCreate thread pool on first request

avoids instantiating unused threadpool for blocking clients.
)r*   r   r   r-   s    r$   poolApiClient.poolY   s*     zzd//0dj::r'   c                      U R                   S   $ )z
Gets user agent.

User-Agentr   r-   s    r$   r    ApiClient.user_agentc   s    
 --r'   c                      XR                   S'   g)z
Sets user agent.
r4   Nr5   r!   values     r$   r    r6   j   s    
 */&r'   c                      X R                   U'   g r)   r5   )r!   r"   r#   s      r$   set_default_headerApiClient.set_default_headerq   s    (4%r'   c                    U R                   nU=(       d    0 nUR                  U R                  5        U R                  (       a  U R                  US'   U(       a+  U R	                  U5      n[        U R                  X\5      5      nU(       a^  U R	                  U5      nU R                  X<5      nU H6  u  nnUR                  SU-  [        [        U5      UR                  S95      nM8     U(       a"  U R	                  U5      nU R                  XL5      nU(       d  U(       a3  U R                  Xx5      nU R	                  U5      nU R                  X|5      nU R                  XTU
5        U(       a  U R	                  U5      nU R                   R                  U-   nU R                  UUUUUUUUS9nUU l        UnU(       a  U	(       a  U R!                  UU	5      nOS nU(       a  U$ UUR"                  UR%                  5       4$ )NCookiez{%s})safe)query_paramsheaderspost_paramsbody_preload_content_request_timeout)r   updater   r   sanitize_for_serializationdictparameters_to_tuplesreplacer   r   safe_chars_for_path_paramprepare_post_parametersupdate_params_for_authhostrequestlast_responsedeserializestatus
getheaders)r!   resource_pathmethodpath_paramsr@   header_paramsrC   rB   filesresponse_typeauth_settings_return_http_data_onlycollection_formatsrD   rE   configkvurlresponse_datareturn_datas                        r$   
__call_apiApiClient.__call_apit   s     F "'RM--.{{ $mH55mDm

#
#M
FHm 33K@k--kNk$!Q%--QJc!f6+K+KLN  44\Bl..|Pl e00Dk33K@k--kNk 	]K ,,T2d 


!
!M
1C LL!)) ! +M 'DK	&&}mD=//1I1I1KLLr'   c           	        ^  Uc  g[        UT R                  5      (       a  U$ [        U[        5      (       a"  U Vs/ s H  nT R                  U5      PM     sn$ [        U[        5      (       a  [	        U 4S jU 5       5      $ [        U[
        [        45      (       a  UR                  5       $ [        U[        5      (       a  UnON[        UR                  5       VVs0 s H,  u  pE[        X5      c  M  UR                  U   [        X5      _M.     nnn[        U5       VVs0 s H  u  pgUT R                  U5      _M     snn$ s  snf s  snnf s  snnf )a  
Builds a JSON POST object.

If obj is None, return None.
If obj is str, int, long, float, bool, return directly.
If obj is datetime.datetime, datetime.date
    convert to string in iso8601 format.
If obj is list, sanitize each element in the list.
If obj is dict, return the dict.
If obj is swagger model, return the properties dict.

:param obj: The data to serialize.
:return: The serialized form of data.
Nc              3   F   >#    U  H  nTR                  U5      v   M     g 7fr)   )rG   ).0sub_objr!   s     r$   	<genexpr>7ApiClient.sanitize_for_serialization.<locals>.<genexpr>   s     O34227;;3s   !)
isinstancePRIMITIVE_TYPESlistrG   tupler   r   	isoformatrH   r	   swagger_typesgetattrattribute_map)r!   objrh   obj_dictattr_keyvals   `       r$   rG   $ApiClient.sanitize_for_serialization   s7    {	C--	.	.j	C		FIJc7d--g6cJJ	C		O3OOO	C(D)	*	*]]_#th #3#4#455gdS 6#

D
!73#5
55   "(++HC 	T,,S11+ ) Ks   EE
5E
#Ec                     US:X  a  U R                  U5      $  [        R                  " UR                  5      nU R                  X25      $ ! [         a    UR                  n N)f = f)z
Deserializes response into an object.

:param response: RESTResponse object to be deserialized.
:param response_type: class literal for
    deserialized object, or string of class name.

:return: deserialized object.
file)_ApiClient__deserialize_filejsonloadsdata
ValueError_ApiClient__deserialize)r!   responserY   r   s       r$   rQ   ApiClient.deserialize   sa     $$X..ZZ&d d22  ]]ds    A
 
A#"A#c           	      8   Uc  g[        U5      [        :X  a  UR                  S5      (       aG  [        R                  " SU5      R                  S5      nU Vs/ s H  o@R                  XC5      PM     sn$ UR                  S5      (       aU  [        R                  " SU5      R                  S5      n[        U5       VVs0 s H  u  pVXPR                  Xc5      _M     snn$ X R                  ;   a  U R                  U   nO[        [        U5      nX R                  ;   a  U R                  X5      $ U[        :X  a  U R                  U5      $ U[        :X  a  U R!                  U5      $ U["        :X  a  U R%                  U5      $ U R'                  X5      $ s  snf s  snnf )z
Deserializes dict, list, str into an object.

:param data: dict, list or str.
:param klass: class literal, or string of class name.

:return: object.
Nzlist[z
list[(.*)]r   zdict(zdict(([^,]*), (.*))   )typer   
startswithrematchgroupr   r	   NATIVE_TYPES_MAPPINGrq   r   rl   !_ApiClient__deserialize_primitiver   _ApiClient__deserialize_objectr   _ApiClient__deserialize_dater    _ApiClient__deserialize_datatime_ApiClient__deserialize_model)r!   r   klasssub_klssub_datar^   r_   s          r$   __deserializeApiClient.__deserialize  se    |E{c			'	"	"((=%066q9FJKd(""85dKK			'	"	"((159??B>GoNoda%%a11oNN 
++	+))%0&$$$))$66	&&&t,,	$$$T**	(	((..%%d22+ L Os   F?Fc                     U(       d  U R                  XX4XVXxXXX5      $ U R                  R                  U R                   XX4UXgXU
XUU45      nU$ )aK  
Makes the HTTP request (synchronous) and return the deserialized data.
To make an async request, set the async parameter.

:param resource_path: Path to method endpoint.
:param method: Method to call.
:param path_params: Path parameters in the url.
:param query_params: Query parameters in the url.
:param header_params: Header parameters to be
    placed in the request header.
:param body: Request body.
:param post_params dict: Request post form parameters,
    for `application/x-www-form-urlencoded`, `multipart/form-data`.
:param auth_settings list: Auth Settings names for the request.
:param response: Response data type.
:param files dict: key -> filename, value -> filepath,
    for `multipart/form-data`.
:param async_req bool: execute request asynchronously
:param _return_http_data_only: response data without head status code
and headers
:param collection_formats: dict of collection formats for path, query,
    header, and post parameters.
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without
                         reading/decoding response data. Default is
                         True.
:param _request_timeout: timeout setting for this request. If one number
provided, it will be total request
                         timeout. It can also be a pair (tuple) of
                         (connection, read) timeouts.
:return:
    If async parameter is True,
    the request will be called asynchronously.
    The method will return the request thread.
    If parameter async is False or missing,
    then the method will return the response directly.
)_ApiClient__call_apir1   apply_async)r!   rT   rU   rV   r@   rW   rC   rB   rX   rY   rZ   	async_reqr[   r\   rD   rE   threads                    r$   call_apiApiClient.call_api2  sm    j __]K*+*3-	A A yy$$
//+]eM!7Gf Mr'   c	           
         US:X  a  U R                   R                  UUUUUS9$ US:X  a  U R                   R                  UUUUUS9$ US:X  a  U R                   R                  UUUUUUUS9$ US:X  a  U R                   R	                  UUUUUUUS9$ US:X  a  U R                   R                  UUUUUUUS9$ US:X  a  U R                   R                  UUUUUUUS9$ US	:X  a  U R                   R                  UUUUUUS
9$ [        S5      e)z*
Makes the HTTP request using RESTClient.
GET)r@   rD   rE   rA   HEADOPTIONS)r@   rA   rB   rD   rE   rC   POSTPUTPATCHDELETE)r@   rA   rD   rE   rC   zQhttp method must be `GET`, `HEAD`, `OPTIONS`, `POST`, `PATCH`, `PUT` or `DELETE`.)	r   r   r   r   r   r   r   r   r   )	r!   rU   r`   r@   rA   rB   rC   rD   rE   s	            r$   rO   ApiClient.requestv  s    !!
#++ "   
6	""
#++ #   
9	%%
#!++ &   
6	""
#!++ #   
5!!
#!++ "   
7	##
#!++ $   
8	$$
#++ %    > ? ?r'   c                   ^ / nUc  0 n[        U[        5      (       a  [        U5      OU H  u  mnTU;   ap  UT   nUS:X  a  UR                  U4S jU 5       5        M4  US:X  a  SnOUS:X  a  SnOUS:X  a  SnOS	nUR	                  TUR                  S
 U 5       5      45        M|  UR	                  TU45        M     U$ )z
Get parameters as list of tuples, formatting collections.

:param params: Parameters as dict or list of two-tuples
:param dict collection_formats: Parameter collection formats
:return: Parameters as list of tuples, collections formatted
multic              3   ,   >#    U  H	  nTU4v   M     g 7fr)    )rg   r9   r^   s     r$   ri   1ApiClient.parameters_to_tuples.<locals>.<genexpr>  s     6A5QJAs   ssv tsv	pipes|,c              3   8   #    U  H  n[        U5      v   M     g 7fr)   )r   )rg   r9   s     r$   ri   r     s     .Iqes5zzqs   )rk   rH   r	   extendappendr,   )r!   paramsr\   
new_paramsr_   collection_format	delimiterr^   s          @r$   rI   ApiClient.parameters_to_tuples  s     J!%/%=%=	&!6I1	
 	 .q1'


6A6
6%'I E)I G+II


Q	.Iq.I IJ
K1a&!! J" r'   c                    / nU(       a  UnU(       a  [        U5       H  u  pEU(       d  M  [        U5      [        L a  UOU/nU H  n[        US5       n[        R
                  R                  UR                  5      n	UR                  5       n
[        R                  " U	5      S   =(       d    SnUR                  [        U[        XU/5      /5      5        SSS5        M     M     U$ ! , (       d  f       M  = f)z
Builds form parameters.

:param post_params: Normal form parameters.
:param files: File parameters.
:return: Form parameters with files.
rbr   zapplication/octet-streamN)r	   r   rm   openospathbasenamenameread	mimetypes
guess_typer   rn   )r!   rB   rX   r   r^   r_   
file_namesnffilenamefiledatamimetypes               r$   rL   !ApiClient.prepare_post_parameters  s     FfE"$!
q'T/Qs
AAt}ww''/HvvxH 
#%%&( F+E MM%E8x*H$I JKL } 	 # M }s   BC))
C8c                     U(       d  gU Vs/ s H  o"R                  5       PM     nnSU;   a  gSR                  U5      $ s  snf )z
Returns `Accept` based on an array of accepts provided.

:param accepts: List of headers.
:return: Accept (e.g. application/json).
Napplication/jsonz, )lowerr,   )r!   acceptsxs      r$   select_header_acceptApiClient.select_header_accept  sA     ")*'Qwwy'G*W$YYw +s   A c                 ~    U(       d  gU Vs/ s H  o"R                  5       PM     nnSU;   d  SU;   a  gUS   $ s  snf )z
Returns `Content-Type` based on an array of content_types provided.

:param content_types: List of content-types.
:return: Content-Type (e.g. application/json).
r   z*/*r   )r   )r!   content_typesr   s      r$   select_header_content_type$ApiClient.select_header_content_type  sD     (561WWYM6]*e}.D1 7s   :c                 &   U(       d  gU H  nU R                   R                  5       R                  U5      nU(       d  M5  US   (       d  MA  US   S:X  a  US   XS   '   MV  US   S:X  a  UR                  US   US   45        Mz  [	        S5      e   g)z
Updates header and query params based on authentication setting.

:param headers: Header parameters dict to be updated.
:param querys: Query parameters tuple list to be updated.
:param auth_settings: Authentication setting identifiers list.
Nr9   inheaderrw   queryz3Authentication token must be in `query` or `header`)r   rZ   getr   r   )r!   rA   querysrZ   authauth_settings         r$   rM    ApiClient.update_params_for_auth  s     ''557;;DAl	G$
$8+)5g)>'u%
&$7*
--e,l7.CD
ECE E r'   c                 ,   [         R                  " U R                  R                  S9u  p#[        R
                  " U5        [        R                  " U5        UR                  S5      nU(       ac  [        R                  " SU5      R                  S5      n[        R                  R                  [        R                  R                  U5      U5      n[        US5       nUR                  UR                   5        SSS5        U$ ! , (       d  f       U$ = f)z
Saves response body into a file in a temporary folder,
using the filename from the `Content-Disposition` header if provided.

:param response:  RESTResponse.
:return: file path.
)dirzContent-Dispositionz filename=[\'"]?([^\'"\s]+)[\'"]?r   wN)tempfilemkstempr   temp_folder_pathr   r+   remove	getheaderr   searchr   r   r,   dirnamer   writer   )r!   r   fdr   content_dispositionr   r   s          r$   __deserialize_fileApiClient.__deserialize_file4  s     D$6$6$G$GHHBHHRLIIdO",,-BC
&46IK
%(  WW\\"''//$/:d	dCAgghmm 
 K 
 Ks   D
Dc                 d     U" U5      $ ! [          a    [        U5      s $ [         a    Us $ f = f)z
Deserializes string to primitive type.

:param data: str.
:param klass: class literal.

:return: int, long, float, str, bool.
)UnicodeEncodeErrorunicode	TypeError)r!   r   r   s      r$   __deserialize_primitive!ApiClient.__deserialize_primitiveL  s7    4[ T] ks   
 ///c                     U$ )z,
Return a original value.

:return: object.
r   r8   s     r$   __deserialize_objectApiClient.__deserialize_object\  s	     Lr'   c                      SSK Jn  U" U5      R                  5       $ ! [         a    Us $ [         a    [        SSR                  U5      S9ef = f)zB
Deserializes string to date.

:param string: str.
:return: date.
r   parsez(Failed to parse `{0}` into a date objectrR   reason)dateutil.parserr   r   ImportErrorr   r   formatr!   stringr   s      r$   __deserialize_dateApiClient.__deserialize_dated  s\    L'6]!! m L;BB6JL LLs    A#Ac                      SSK Jn  U" U5      $ ! [         a    Us $ [         a    [	        SSR                  U5      S9ef = f)z|
Deserializes string to datetime.

The string should be in iso8601 datetime format.

:param string: str.
:return: datetime.
r   r   z,Failed to parse `{0}` into a datetime objectr   )r   r   r   r   r   r   r   s      r$   __deserialize_datatime ApiClient.__deserialize_datatimeu  sS    	N'6] m N<CCFKN NNs    A#Ac                    UR                   (       d  [        US5      (       d  U$ 0 nUR                   by  [        UR                   5       H`  u  pEUc  M
  UR                  U   U;   d  M  [	        U[
        [        45      (       d  M<  XR                  U      nU R                  Xe5      X4'   Mb     U" S0 UD6n[        US5      (       a)  UR                  U5      nU(       a  U R                  X5      nU$ )zs
Deserializes list or dict to model.

:param data: dict, list.
:param klass: class literal.
:return: model object.
get_real_child_modelr   )	rp   hasattrr	   rr   rk   rm   rH   r   r  )	r!   r   r   kwargsru   	attr_typer9   instance
klass_names	            r$   __deserialize_modelApiClient.__deserialize_model  s     wu6L'M'MkF&&u':':;/$""4(D0$t--**401%++E=&, < vHx/00006j	%%d7Or'   )r*   r   r   r   rP   r   r   r    )NNNNN)NNNNNNNNNNTN)NNNNNNNNNNNTN)NNNNTN)NN)-__name__
__module____qualname____firstlineno____doc__r   r   bytesr
   r   rl   r   r   r   r   r   r   r   r   r*   r%   r.   propertyr1   r    setterr;   r   rG   rQ   r   r   rO   rI   rL   r   r   rM   r|   r   r   r   r   r   __static_attributes__r   r'   r$   r   r   !   sm   " D%3mC/cd	 % "  ?&   . . / /5 ""#!##(,$("&"&RMh+Z3.$3R   !!!&*"& $ $BN  ##H?T<8 ""E00 L"N(r'   r   )r  
__future__r   r   r   r}   r   r   multiprocessing.poolr   r   r   sixr   r   r	   r
   six.moves.urllib.parser    r   r   r   restr   r   r   r   r   r'   r$   <module>r     sF   	 ' 	 	    + # 9 8 (  ( 0C
 C
r'   