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$Zd%d&Zd'd(Zd)d*Zd+d,ZZS).RestoreServicezNOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. Ncst|dS)z0RestoreService - a operation defined in OpenAPI.N)super__init__)self api_client __class__X/opt/alt/python38/lib/python3.8/site-packages/influxdb_client/service/restore_service.pyrszRestoreService.__init__cKs:d|d<|dr"|j||f|S|j||f|}|SdS)aOverwrite storage metadata for a bucket with shard info from a backup.. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_restore_bucket_id(bucket_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str bucket_id: The bucket ID. (required) :param str body: Database info serialized as protobuf. (required) :param str zap_trace_span: OpenTracing span context :param str content_type: :return: str If the method is called asynchronously, returns the request thread. T_return_http_data_only async_reqN)get%post_restore_bucket_id_with_http_info)r bucket_idbodykwargsdatar r r post_restore_bucket_id s  z%RestoreService.post_restore_bucket_idc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) aOverwrite storage metadata for a bucket with shard info from a backup.. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_restore_bucket_id_with_http_info(bucket_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str bucket_id: The bucket ID. (required) :param str body: Database info serialized as protobuf. (required) :param str zap_trace_span: OpenTracing span context :param str content_type: :return: str If the method is called asynchronously, returns the request thread. !/api/v2/restore/bucket/{bucketID}POSTstrrr _preload_contentT_request_timeout urlopen_kwN rZ post_paramsfilesZ response_typeZ auth_settingsrr rrZcollection_formatsr_post_restore_bucket_id_preparercall_apir rrrrlocal_var_params path_params query_params header_params body_paramsr r r r8s(   z4RestoreService.post_restore_bucket_id_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aOverwrite storage metadata for a bucket with shard info from a backup.. This method makes an asynchronous HTTP request. :param async_req bool :param str bucket_id: The bucket ID. (required) :param str body: Database info serialized as protobuf. (required) :param str zap_trace_span: OpenTracing span context :param str content_type: :return: str If the method is called asynchronously, returns the request thread. rrrrr rTrrNrrr!r r r post_restore_bucket_id_async]s(   z+RestoreService.post_restore_bucket_id_asyncc Kst}ddddg}|d||d|ks4|ddkr>> thread = api.post_restore_bucket_metadata(bucket_metadata_manifest, async_req=True) >>> result = thread.get() :param async_req bool :param BucketMetadataManifest bucket_metadata_manifest: Metadata manifest for a bucket. (required) :param str zap_trace_span: OpenTracing span context :return: RestoredBucketMappings If the method is called asynchronously, returns the request thread. Tr rN)r+post_restore_bucket_metadata_with_http_info)rbucket_metadata_manifestrrr r r post_restore_bucket_metadatas  z+RestoreService.post_restore_bucket_metadatacKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) aCreate a new bucket pre-seeded with shard info from a backup.. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_restore_bucket_metadata_with_http_info(bucket_metadata_manifest, async_req=True) >>> result = thread.get() :param async_req bool :param BucketMetadataManifest bucket_metadata_manifest: Metadata manifest for a bucket. (required) :param str zap_trace_span: OpenTracing span context :return: RestoredBucketMappings If the method is called asynchronously, returns the request thread. /api/v2/restore/bucketMetadatarRestoredBucketMappingsrr rTrrNr%_post_restore_bucket_metadata_preparerr rrr4rr"r#r$r%r&r r r r3s(   z:RestoreService.post_restore_bucket_metadata_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aCreate a new bucket pre-seeded with shard info from a backup.. This method makes an asynchronous HTTP request. :param async_req bool :param BucketMetadataManifest bucket_metadata_manifest: Metadata manifest for a bucket. (required) :param str zap_trace_span: OpenTracing span context :return: RestoredBucketMappings If the method is called asynchronously, returns the request thread. r6rr7rr rTrrNrr8r:r r r "post_restore_bucket_metadata_asyncs(   z1RestoreService.post_restore_bucket_metadata_asyncc Kst}ddg}|d||d|ks0|ddkr8tdi}g}i}d|krX|d|d<d}d|krl|d}|jdg|d<|jdg|d<|||||fS) Nr4r(r5zeMissing the required parameter `bucket_metadata_manifest` when calling `post_restore_bucket_metadata`r*r,r-r+r/) rr4rr"r2r#r$r%r&r r r r9s,  z4RestoreService._post_restore_bucket_metadata_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)adOverwrite the embedded KV store on the server with a backed-up snapshot.. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_restore_kv(body, async_req=True) >>> result = thread.get() :param async_req bool :param file body: Full KV snapshot. (required) :param str zap_trace_span: OpenTracing span context :param str content_encoding: The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. :param str content_type: :return: PostRestoreKVResponse If the method is called asynchronously, returns the request thread. Tr rN)rpost_restore_kv_with_http_inforrrrr r r post_restore_kvs  zRestoreService.post_restore_kvcKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) asOverwrite the embedded KV store on the server with a backed-up snapshot.. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_restore_kv_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool :param file body: Full KV snapshot. (required) :param str zap_trace_span: OpenTracing span context :param str content_encoding: The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. :param str content_type: :return: PostRestoreKVResponse If the method is called asynchronously, returns the request thread. /api/v2/restore/kvrPostRestoreKVResponserr rTrrNr_post_restore_kv_preparerr rrrrr"r#r$r%r&r r r r<6s(   z-RestoreService.post_restore_kv_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aOverwrite the embedded KV store on the server with a backed-up snapshot.. This method makes an asynchronous HTTP request. :param async_req bool :param file body: Full KV snapshot. (required) :param str zap_trace_span: OpenTracing span context :param str content_encoding: The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. :param str content_type: :return: PostRestoreKVResponse If the method is called asynchronously, returns the request thread. r?rr@rr rTrrNrrArCr r r post_restore_kv_async[s(   z$RestoreService.post_restore_kv_asyncc Kst}ddddg}|d||d|ks4|ddkrzDMissing the required parameter `body` when calling `post_restore_kv`r*Content-Encodingr+r,r-r.r/ rrrr"r2r#r$r%r&r r r rB}s4     z'RestoreService._post_restore_kv_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)aqRestore a TSM snapshot into a shard.. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_restore_shard_id(shard_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str shard_id: The shard ID. (required) :param file body: TSM snapshot. (required) :param str zap_trace_span: OpenTracing span context :param str content_encoding: The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. :param str content_type: :return: None If the method is called asynchronously, returns the request thread. Tr rN)r$post_restore_shard_id_with_http_info)rshard_idrrrr r r post_restore_shard_ids  z$RestoreService.post_restore_shard_idc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd S) aRestore a TSM snapshot into a shard.. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_restore_shard_id_with_http_info(shard_id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str shard_id: The shard ID. (required) :param file body: TSM snapshot. (required) :param str zap_trace_span: OpenTracing span context :param str content_encoding: The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. :param str content_type: :return: None If the method is called asynchronously, returns the request thread. /api/v2/restore/shards/{shardID}rNrr rTrrr_post_restore_shard_id_preparerr r rrIrrr"r#r$r%r&r r r rHs(   z3RestoreService.post_restore_shard_id_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd IdHS) aRestore a TSM snapshot into a shard.. This method makes an asynchronous HTTP request. :param async_req bool :param str shard_id: The shard ID. (required) :param file body: TSM snapshot. (required) :param str zap_trace_span: OpenTracing span context :param str content_encoding: The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. :param str content_type: :return: None If the method is called asynchronously, returns the request thread. rKrNrr rTrrrrLrNr r r post_restore_shard_id_asyncs(   z*RestoreService.post_restore_shard_id_asyncc Kst}dddddg}|d||d|ks6|ddkr>tdd|ksR|ddkrZtdi}d|krr|d|d <g}i}d|kr|d|d <d|kr|d|d <d|kr|d|d <d} d|kr|d} |jd g|d<|jdg|d <||||| fS)NrIrr(rEr)rJzNMissing the required parameter `shard_id` when calling `post_restore_shard_id`zJMissing the required parameter `body` when calling `post_restore_shard_id`ZshardIDr*rFr+r,r-r.r/) rrIrrr"r2r#r$r%r&r r r rMs@      z-RestoreService._post_restore_shard_id_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)aVOverwrite the embedded SQL store on the server with a backed-up snapshot.. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_restore_sql(body, async_req=True) >>> result = thread.get() :param async_req bool :param file body: Full SQL snapshot. (required) :param str zap_trace_span: OpenTracing span context :param str content_encoding: The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. :param str content_type: :return: None If the method is called asynchronously, returns the request thread. Tr rN)rpost_restore_sql_with_http_infor=r r r post_restore_sql+s  zRestoreService.post_restore_sqlcKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd S) aeOverwrite the embedded SQL store on the server with a backed-up snapshot.. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_restore_sql_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool :param file body: Full SQL snapshot. (required) :param str zap_trace_span: OpenTracing span context :param str content_encoding: The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. :param str content_type: :return: None If the method is called asynchronously, returns the request thread. /api/v2/restore/sqlrNrr rTrrr_post_restore_sql_preparerr rrCr r r rPCs(   z.RestoreService.post_restore_sql_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd IdHS) aOverwrite the embedded SQL store on the server with a backed-up snapshot.. This method makes an asynchronous HTTP request. :param async_req bool :param file body: Full SQL snapshot. (required) :param str zap_trace_span: OpenTracing span context :param str content_encoding: The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. :param str content_type: :return: None If the method is called asynchronously, returns the request thread. rRrNrr rTrrrrSrCr r r post_restore_sql_asynchs(   z%RestoreService.post_restore_sql_asyncc Kst}ddddg}|d||d|ks4|ddkrr<rDrBrJrHrOrMrQrPrUrT __classcell__r r r r rs,%"'# %"#&#)%"r)rY __future__rreZ%influxdb_client.service._base_servicerrr r r r s