U wi ^@s8dZddlmZddlZddlmZGdddeZdS)a InfluxDB OSS API Service. The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech )absolute_importN) _BaseServicecseZdZdZd%fdd ZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$ZZS)&SecretsServicezNOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. Ncst|dS)z0SecretsService - a operation defined in OpenAPI.N)super__init__)self api_client __class__X/opt/alt/python38/lib/python3.8/site-packages/influxdb_client/service/secrets_service.pyrszSecretsService.__init__cKs:d|d<|dr"|j||f|S|j||f|}|SdS)a{Delete a secret from an organization. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_orgs_id_secrets_id(org_id, secret_id, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The organization ID. (required) :param str secret_id: The secret ID. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. T_return_http_data_only async_reqN)get(delete_orgs_id_secrets_id_with_http_info)rorg_id secret_idkwargsdatar r r delete_orgs_id_secrets_id s  z(SecretsService.delete_orgs_id_secrets_idc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd S) aDelete a secret from an organization. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_orgs_id_secrets_id_with_http_info(org_id, secret_id, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The organization ID. (required) :param str secret_id: The secret ID. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. '/api/v2/orgs/{orgID}/secrets/{secretID}DELETENrr _preload_contentT_request_timeout urlopen_kw bodyZ post_paramsfilesZ response_typeZ auth_settingsrr rrZcollection_formatsr"_delete_orgs_id_secrets_id_preparercall_apir rrrrlocal_var_params path_params query_params header_params body_paramsr r r r7s(   z7SecretsService.delete_orgs_id_secrets_id_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd IdHS) aDelete a secret from an organization. This method makes an asynchronous HTTP request. :param async_req bool :param str org_id: The organization ID. (required) :param str secret_id: The secret ID. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. rrNrr rTrrrrr!r r r delete_orgs_id_secrets_id_async[s(   z.SecretsService.delete_orgs_id_secrets_id_asyncc Kst}dddg}|d||d|ks2|ddkr:tdd|ksN|ddkrVtdi}d|krn|d|d<d|kr|d|d<g}i}d|kr|d|d <d} |jd g|d <||||| fS) Nrrzap_trace_spanrzPMissing the required parameter `org_id` when calling `delete_orgs_id_secrets_id`zSMissing the required parameter `secret_id` when calling `delete_orgs_id_secrets_id`orgIDZsecretIDZap-Trace-Spanapplication/jsonAcceptlocals_check_operation_params ValueErrorrselect_header_accept) rrrrr" all_paramsr#r$r%r&r r r r|s2      z1SecretsService._delete_orgs_id_secrets_id_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)aDList all secret keys for an organization. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_orgs_id_secrets(org_id, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The organization ID. (required) :param str zap_trace_span: OpenTracing span context :return: SecretKeysResponse If the method is called asynchronously, returns the request thread. Tr rN)r"get_orgs_id_secrets_with_http_info)rrrrr r r get_orgs_id_secretss  z"SecretsService.get_orgs_id_secretscKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) aSList all secret keys for an organization. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_orgs_id_secrets_with_http_info(org_id, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The organization ID. (required) :param str zap_trace_span: OpenTracing span context :return: SecretKeysResponse If the method is called asynchronously, returns the request thread. /api/v2/orgs/{orgID}/secretsGETSecretKeysResponserr rTrrNr_get_orgs_id_secrets_preparerr rrrrr"r#r$r%r&r r r r3s(   z1SecretsService.get_orgs_id_secrets_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aList all secret keys for an organization. This method makes an asynchronous HTTP request. :param async_req bool :param str org_id: The organization ID. (required) :param str zap_trace_span: OpenTracing span context :return: SecretKeysResponse If the method is called asynchronously, returns the request thread. r5r6r7rr rTrrNrr8r:r r r get_orgs_id_secrets_asyncs(   z(SecretsService.get_orgs_id_secrets_asyncc Kst}ddg}|d||d|ks0|ddkr8tdi}d|krP|d|d<g}i}d|krl|d|d<d}|jdg|d<|||||fS) Nrr(r4zJMissing the required parameter `org_id` when calling `get_orgs_id_secrets`r)r*r+r,r-) rrrr"r2r#r$r%r&r r r r9s&   z+SecretsService._get_orgs_id_secrets_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)aUpdate secrets in an organization. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_orgs_id_secrets(org_id, request_body, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The organization ID. (required) :param dict(str, str) request_body: Secret key value pairs to update/add (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. Tr rN)r$patch_orgs_id_secrets_with_http_info)rr request_bodyrrr r r patch_orgs_id_secretss  z$SecretsService.patch_orgs_id_secretsc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd S) aUpdate secrets in an organization. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_orgs_id_secrets_with_http_info(org_id, request_body, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The organization ID. (required) :param dict(str, str) request_body: Secret key value pairs to update/add (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. r5PATCHNrr rTrrr_patch_orgs_id_secrets_preparerr r rrr=rr"r#r$r%r&r r r r<(s(   z3SecretsService.patch_orgs_id_secrets_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd IdHS) aUpdate secrets in an organization. This method makes an asynchronous HTTP request. :param async_req bool :param str org_id: The organization ID. (required) :param dict(str, str) request_body: Secret key value pairs to update/add (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. r5r?Nrr rTrrrr@rBr r r patch_orgs_id_secrets_asyncLs(   z*SecretsService.patch_orgs_id_secrets_asyncc Kst}dddg}|d||d|ks2|ddkr:tdd|ksN|ddkrVtdi}d|krn|d|d<g}i}d|kr|d|d<d} d|kr|d} |jd g|d <|jd g|d <||||| fS) Nrr=r(r>zLMissing the required parameter `org_id` when calling `patch_orgs_id_secrets`zRMissing the required parameter `request_body` when calling `patch_orgs_id_secrets`r)r*r+r, Content-Typer.r/r0rr1Zselect_header_content_type) rrr=rr"r2r#r$r%r&r r r rAms8     z-SecretsService._patch_orgs_id_secrets_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)aDelete secrets from an organization. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_orgs_id_secrets(org_id, secret_keys, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The organization ID. (required) :param SecretKeys secret_keys: Secret key to delete (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. Tr rN)r#post_orgs_id_secrets_with_http_info)rr secret_keysrrr r r post_orgs_id_secretss  z#SecretsService.post_orgs_id_secretsc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd S) aDelete secrets from an organization. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_orgs_id_secrets_with_http_info(org_id, secret_keys, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The organization ID. (required) :param SecretKeys secret_keys: Secret key to delete (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. #/api/v2/orgs/{orgID}/secrets/deletePOSTNrr rTrrr_post_orgs_id_secrets_preparerr r rrrGrr"r#r$r%r&r r r rFs(   z2SecretsService.post_orgs_id_secrets_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd IdHS) aDelete secrets from an organization. This method makes an asynchronous HTTP request. :param async_req bool :param str org_id: The organization ID. (required) :param SecretKeys secret_keys: Secret key to delete (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. rIrJNrr rTrrrrKrMr r r post_orgs_id_secrets_asyncs(   z)SecretsService.post_orgs_id_secrets_asyncc Kst}dddg}|d||d|ks2|ddkr:tdd|ksN|ddkrVtdi}d|krn|d|d<g}i}d|kr|d|d<d} d|kr|d} |jd g|d <|jd g|d <||||| fS) NrrGr(rHzKMissing the required parameter `org_id` when calling `post_orgs_id_secrets`zPMissing the required parameter `secret_keys` when calling `post_orgs_id_secrets`r)r*r+r,rDrE) rrrGrr"r2r#r$r%r&r r r rLs8     z,SecretsService._post_orgs_id_secrets_prepare)N)__name__ __module__ __qualname____doc__rrrr'rr4r3r;r9r>r<rCrArHrFrNrL __classcell__r r r r rs$$!!# $!%$!r)rR __future__rreZ%influxdb_client.service._base_servicerrr r r r s