Skip to content

Commit dc55960

Browse files
committed
Regenerate client
1 parent e8da546 commit dc55960

File tree

23 files changed

+1718
-1629
lines changed

23 files changed

+1718
-1629
lines changed

elasticsearch/src/generated/namespace_clients/async_search.rs

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ use crate::{
3030
headers::{HeaderMap, HeaderName, HeaderValue, ACCEPT, CONTENT_TYPE},
3131
request::{Body, JsonBody, NdBody, PARTS_ENCODED},
3232
response::Response,
33+
transport::Transport,
3334
Method,
3435
},
3536
params::*,
@@ -60,7 +61,7 @@ impl<'b> AsyncSearchDeleteParts<'b> {
6061
#[derive(Clone, Debug)]
6162
#[doc = "Builder for the [Async Search Delete API](https://www.elastic.co/guide/en/elasticsearch/reference/7.8/async-search.html)\n\nDeletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted."]
6263
pub struct AsyncSearchDelete<'a, 'b> {
63-
client: &'a Elasticsearch,
64+
transport: &'a Transport,
6465
parts: AsyncSearchDeleteParts<'b>,
6566
error_trace: Option<bool>,
6667
filter_path: Option<&'b [&'b str]>,
@@ -71,10 +72,10 @@ pub struct AsyncSearchDelete<'a, 'b> {
7172
}
7273
impl<'a, 'b> AsyncSearchDelete<'a, 'b> {
7374
#[doc = "Creates a new instance of [AsyncSearchDelete] with the specified API parts"]
74-
pub fn new(client: &'a Elasticsearch, parts: AsyncSearchDeleteParts<'b>) -> Self {
75+
pub fn new(transport: &'a Transport, parts: AsyncSearchDeleteParts<'b>) -> Self {
7576
let headers = HeaderMap::new();
7677
AsyncSearchDelete {
77-
client,
78+
transport,
7879
parts,
7980
headers,
8081
error_trace: None,
@@ -148,7 +149,7 @@ impl<'a, 'b> AsyncSearchDelete<'a, 'b> {
148149
};
149150
let body = Option::<()>::None;
150151
let response = self
151-
.client
152+
.transport
152153
.send(method, &path, headers, query_string.as_ref(), body)
153154
.await?;
154155
Ok(response)
@@ -177,7 +178,7 @@ impl<'b> AsyncSearchGetParts<'b> {
177178
#[derive(Clone, Debug)]
178179
#[doc = "Builder for the [Async Search Get API](https://www.elastic.co/guide/en/elasticsearch/reference/7.8/async-search.html)\n\nRetrieves the results of a previously submitted async search request given its ID."]
179180
pub struct AsyncSearchGet<'a, 'b> {
180-
client: &'a Elasticsearch,
181+
transport: &'a Transport,
181182
parts: AsyncSearchGetParts<'b>,
182183
error_trace: Option<bool>,
183184
filter_path: Option<&'b [&'b str]>,
@@ -191,10 +192,10 @@ pub struct AsyncSearchGet<'a, 'b> {
191192
}
192193
impl<'a, 'b> AsyncSearchGet<'a, 'b> {
193194
#[doc = "Creates a new instance of [AsyncSearchGet] with the specified API parts"]
194-
pub fn new(client: &'a Elasticsearch, parts: AsyncSearchGetParts<'b>) -> Self {
195+
pub fn new(transport: &'a Transport, parts: AsyncSearchGetParts<'b>) -> Self {
195196
let headers = HeaderMap::new();
196197
AsyncSearchGet {
197-
client,
198+
transport,
198199
parts,
199200
headers,
200201
error_trace: None,
@@ -295,7 +296,7 @@ impl<'a, 'b> AsyncSearchGet<'a, 'b> {
295296
};
296297
let body = Option::<()>::None;
297298
let response = self
298-
.client
299+
.transport
299300
.send(method, &path, headers, query_string.as_ref(), body)
300301
.await?;
301302
Ok(response)
@@ -330,7 +331,7 @@ impl<'b> AsyncSearchSubmitParts<'b> {
330331
#[derive(Clone, Debug)]
331332
#[doc = "Builder for the [Async Search Submit API](https://www.elastic.co/guide/en/elasticsearch/reference/7.8/async-search.html)\n\nExecutes a search request asynchronously."]
332333
pub struct AsyncSearchSubmit<'a, 'b, B> {
333-
client: &'a Elasticsearch,
334+
transport: &'a Transport,
334335
parts: AsyncSearchSubmitParts<'b>,
335336
_source: Option<&'b [&'b str]>,
336337
_source_excludes: Option<&'b [&'b str]>,
@@ -386,10 +387,10 @@ where
386387
B: Body,
387388
{
388389
#[doc = "Creates a new instance of [AsyncSearchSubmit] with the specified API parts"]
389-
pub fn new(client: &'a Elasticsearch, parts: AsyncSearchSubmitParts<'b>) -> Self {
390+
pub fn new(transport: &'a Transport, parts: AsyncSearchSubmitParts<'b>) -> Self {
390391
let headers = HeaderMap::new();
391392
AsyncSearchSubmit {
392-
client,
393+
transport,
393394
parts,
394395
headers,
395396
_source: None,
@@ -487,7 +488,7 @@ where
487488
T: Serialize,
488489
{
489490
AsyncSearchSubmit {
490-
client: self.client,
491+
transport: self.transport,
491492
parts: self.parts,
492493
body: Some(body.into()),
493494
_source: self._source,
@@ -912,40 +913,43 @@ where
912913
};
913914
let body = self.body;
914915
let response = self
915-
.client
916+
.transport
916917
.send(method, &path, headers, query_string.as_ref(), body)
917918
.await?;
918919
Ok(response)
919920
}
920921
}
921922
#[doc = "Namespace client for AsyncSearch APIs"]
922923
pub struct AsyncSearch<'a> {
923-
client: &'a Elasticsearch,
924+
transport: &'a Transport,
924925
}
925926
impl<'a> AsyncSearch<'a> {
926927
#[doc = "Creates a new instance of [AsyncSearch]"]
927-
pub fn new(client: &'a Elasticsearch) -> Self {
928-
Self { client }
928+
pub fn new(transport: &'a Transport) -> Self {
929+
Self { transport }
930+
}
931+
pub fn transport(&self) -> &Transport {
932+
self.transport
929933
}
930934
#[doc = "[Async Search Delete API](https://www.elastic.co/guide/en/elasticsearch/reference/7.8/async-search.html)\n\nDeletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted."]
931935
pub fn delete<'b>(&'a self, parts: AsyncSearchDeleteParts<'b>) -> AsyncSearchDelete<'a, 'b> {
932-
AsyncSearchDelete::new(&self.client, parts)
936+
AsyncSearchDelete::new(self.transport(), parts)
933937
}
934938
#[doc = "[Async Search Get API](https://www.elastic.co/guide/en/elasticsearch/reference/7.8/async-search.html)\n\nRetrieves the results of a previously submitted async search request given its ID."]
935939
pub fn get<'b>(&'a self, parts: AsyncSearchGetParts<'b>) -> AsyncSearchGet<'a, 'b> {
936-
AsyncSearchGet::new(&self.client, parts)
940+
AsyncSearchGet::new(self.transport(), parts)
937941
}
938942
#[doc = "[Async Search Submit API](https://www.elastic.co/guide/en/elasticsearch/reference/7.8/async-search.html)\n\nExecutes a search request asynchronously."]
939943
pub fn submit<'b>(
940944
&'a self,
941945
parts: AsyncSearchSubmitParts<'b>,
942946
) -> AsyncSearchSubmit<'a, 'b, ()> {
943-
AsyncSearchSubmit::new(&self.client, parts)
947+
AsyncSearchSubmit::new(self.transport(), parts)
944948
}
945949
}
946950
impl Elasticsearch {
947951
#[doc = "Creates a namespace client for AsyncSearch APIs"]
948952
pub fn async_search(&self) -> AsyncSearch {
949-
AsyncSearch::new(&self)
953+
AsyncSearch::new(self.transport())
950954
}
951955
}

0 commit comments

Comments
 (0)