3 fY@sbdZddlmZddlZddlZddlZddlmZddlm Z Gddde Z e Z dd ZdS) a Kubernetes First version Generated by: https://github.com/swagger-api/swagger-codegen Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. )absolute_importN) iteritems) http_clientc@seZdZdZddZeddZejddZeddZejd dZed d Z e jd d Z d dZ ddZ ddZ ddZ dS)ConfigurationObjectz4 Configuration options for RESTClientObject cCsd|_d|_d|_i|_i|_d|_d|_i|_tj d|jd<tj d|jd<d|_ d|_ d|_ d|_ d |_d |_d|_d|_d|_d|_d|_d|_d |_dS) z Constructor zhttps://localhostNclientZpackage_loggerurllib3Zurllib3_loggerz%%(asctime)s %(levelname)s %(message)sFTzv4.channel.k8s.io)host api_clientZtemp_folder_pathapi_keyapi_key_prefixusernamepasswordloggerlogging getLogger logger_formatlogger_stream_handlerlogger_file_handler logger_filedebugZ verify_sslZ ssl_ca_cert cert_filekey_fileassert_hostnameZconnection_pool_maxsizeZhttp_proxy_urlZws_streaming_protocol)selfrP/Users/olari/OneDrive/sandbox/awsBlog2/lambda/kubernetes/client/configuration.py__init__$s.zConfigurationObject.__init__cCs|jS)z' Gets the logger_file. )!_ConfigurationObject__logger_file)rrrrraszConfigurationObject.logger_filecCs||_|jr`tj|j|_|jj|jxt|jD]&\}}|j|j|j r4|j |j q4WnNtj |_ |j j|jx4t|jD]&\}}|j|j |jr|j |jqWdS)z Sets the logger_file. If the logger_file is None, then add stream handler and remove file handler. Otherwise, add file handler and remove stream handler. :param value: The logger_file path. :type: str N) rr FileHandlerr setFormatterlogger_formatterrr addHandlerr removeHandler StreamHandler)rvalue_rrrrrhs    cCs|jS)z( Gets the debug status. )_ConfigurationObject__debug)rrrrrszConfigurationObject.debugcCsj||_|jr:x"t|jD]\}}|jtjqWdtj_n,x"t|jD]\}}|jtj qFWdtj_dS)zt Sets the debug status. :param value: The debug status, True or False. :type: bool rN) r'rrsetLevelrDEBUGhttplibHTTPConnection debuglevelWARNING)rr%r&rrrrrs cCs|jS)z) Gets the logger_format. )#_ConfigurationObject__logger_format)rrrrrsz!ConfigurationObject.logger_formatcCs||_tj|j|_dS)z Sets the logger_format. The logger_formatter will be updated when sets logger_format. :param value: The format string. :type: str N)r/r Formatterr!)rr%rrrrs cCsJ|jj|r0|jj|r0|j|d|j|S|jj|rF|j|SdS)z Gets API key (with prefix if set). :param identifier: The identifier of apiKey. :return: The token for api key authentication.  N)r getr )r identifierrrrget_api_key_with_prefixs      z+ConfigurationObject.get_api_key_with_prefixcCs tjj|jd|jdjdS)z| Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. :) basic_auth authorization)rutil make_headersr rr2)rrrrget_basic_auth_tokensz(ConfigurationObject.get_basic_auth_tokencCsdddd|jddiS)zo Gets Auth Settings dict for api client. :return: The Auth Settings information dict. BearerTokenr headerr7)typeinkeyr%)r4)rrrr auth_settingss z!ConfigurationObject.auth_settingscCsdjtjtjdS)zk Gets the essential information for debugging. :return: The report for debugging. zPython SDK Debug Report: OS: {env} Python Version: {pyversion} Version of the API: v1.5.0-snapshot SDK Package Version: 1.0.0-snapshot)envZ pyversion)formatsysplatformversion)rrrrto_debug_reportsz#ConfigurationObject.to_debug_reportN)__name__ __module__ __qualname____doc__rpropertyrsetterrrr4r:r@rFrrrrrs=     rcCstS)zESimulate a singelton Configuration object for backward compatibility.) configurationrrrr ConfigurationsrN)rJ __future__rrrCrsixr six.movesrr+objectrrMrNrrrrs   R