Skip to content

Commit b77ea6a

Browse files
russcamswallez
authored andcommitted
Update client to 8.3.3 and regenerate
1 parent d52932e commit b77ea6a

24 files changed

+4975
-2051
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ that is compatible with the version of Elasticsearch you're using
4444

4545
```toml
4646
[dependencies]
47-
elasticsearch = "8.0.0-alpha.1"
47+
elasticsearch = "8.3.3-alpha.1"
4848
```
4949

5050
The following _optional_ dependencies may also be useful to create requests and read responses

api_generator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "api_generator"
3-
version = "8.0.0-alpha.1"
3+
version = "8.3.3-alpha.1"
44
publish = false
55
description = "Generates source code for elasticsearch package, from the Elasticsearch REST API specs"
66
repository = "https://github.com/elastic/elasticsearch-rs"

docs/installation.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ compatible with the version of {es} you are using:
77
[source,toml]
88
----
99
[dependencies]
10-
elasticsearch = "8.0.0-alpha.1"
10+
elasticsearch = "8.3.3-alpha.1"
1111
----
1212

1313
The following _optional_ dependencies may also be useful to create requests and

elasticsearch/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "elasticsearch"
3-
version = "8.0.0-alpha.1"
3+
version = "8.3.3-alpha.1"
44
edition = "2018"
55
authors = ["Elastic and Contributors"]
66
description = "Official Elasticsearch Rust client"

elasticsearch/src/cat.rs

Lines changed: 195 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,194 @@ impl<'a, 'b> CatAllocation<'a, 'b> {
526526
}
527527
}
528528
#[derive(Debug, Clone, PartialEq)]
529+
#[doc = "API parts for the Cat Component Templates API"]
530+
pub enum CatComponentTemplatesParts<'b> {
531+
#[doc = "No parts"]
532+
None,
533+
#[doc = "Name"]
534+
Name(&'b str),
535+
}
536+
impl<'b> CatComponentTemplatesParts<'b> {
537+
#[doc = "Builds a relative URL path to the Cat Component Templates API"]
538+
pub fn url(self) -> Cow<'static, str> {
539+
match self {
540+
CatComponentTemplatesParts::None => "/_cat/component_templates".into(),
541+
CatComponentTemplatesParts::Name(ref name) => {
542+
let encoded_name: Cow<str> = percent_encode(name.as_bytes(), PARTS_ENCODED).into();
543+
let mut p = String::with_capacity(26usize + encoded_name.len());
544+
p.push_str("/_cat/component_templates/");
545+
p.push_str(encoded_name.as_ref());
546+
p.into()
547+
}
548+
}
549+
}
550+
}
551+
#[doc = "Builder for the [Cat Component Templates API](https://www.elastic.co/guide/en/elasticsearch/reference/8.0/cat-compoentn-templates.html)\n\nReturns information about existing component_templates templates."]
552+
#[derive(Clone, Debug)]
553+
pub struct CatComponentTemplates<'a, 'b> {
554+
transport: &'a Transport,
555+
parts: CatComponentTemplatesParts<'b>,
556+
error_trace: Option<bool>,
557+
filter_path: Option<&'b [&'b str]>,
558+
format: Option<&'b str>,
559+
h: Option<&'b [&'b str]>,
560+
headers: HeaderMap,
561+
help: Option<bool>,
562+
human: Option<bool>,
563+
local: Option<bool>,
564+
master_timeout: Option<&'b str>,
565+
pretty: Option<bool>,
566+
request_timeout: Option<Duration>,
567+
s: Option<&'b [&'b str]>,
568+
source: Option<&'b str>,
569+
v: Option<bool>,
570+
}
571+
impl<'a, 'b> CatComponentTemplates<'a, 'b> {
572+
#[doc = "Creates a new instance of [CatComponentTemplates] with the specified API parts"]
573+
pub fn new(transport: &'a Transport, parts: CatComponentTemplatesParts<'b>) -> Self {
574+
let mut headers = HeaderMap::with_capacity(2);
575+
headers.insert(CONTENT_TYPE, HeaderValue::from_static("text/plain"));
576+
headers.insert(ACCEPT, HeaderValue::from_static("text/plain"));
577+
CatComponentTemplates {
578+
transport,
579+
parts,
580+
headers,
581+
error_trace: None,
582+
filter_path: None,
583+
format: None,
584+
h: None,
585+
help: None,
586+
human: None,
587+
local: None,
588+
master_timeout: None,
589+
pretty: None,
590+
request_timeout: None,
591+
s: None,
592+
source: None,
593+
v: None,
594+
}
595+
}
596+
#[doc = "Include the stack trace of returned errors."]
597+
pub fn error_trace(mut self, error_trace: bool) -> Self {
598+
self.error_trace = Some(error_trace);
599+
self
600+
}
601+
#[doc = "A comma-separated list of filters used to reduce the response."]
602+
pub fn filter_path(mut self, filter_path: &'b [&'b str]) -> Self {
603+
self.filter_path = Some(filter_path);
604+
self
605+
}
606+
#[doc = "a short version of the Accept header, e.g. json, yaml"]
607+
pub fn format(mut self, format: &'b str) -> Self {
608+
self.format = Some(format);
609+
self
610+
}
611+
#[doc = "Comma-separated list of column names to display"]
612+
pub fn h(mut self, h: &'b [&'b str]) -> Self {
613+
self.h = Some(h);
614+
self
615+
}
616+
#[doc = "Adds a HTTP header"]
617+
pub fn header(mut self, key: HeaderName, value: HeaderValue) -> Self {
618+
self.headers.insert(key, value);
619+
self
620+
}
621+
#[doc = "Return help information"]
622+
pub fn help(mut self, help: bool) -> Self {
623+
self.help = Some(help);
624+
self
625+
}
626+
#[doc = "Return human readable values for statistics."]
627+
pub fn human(mut self, human: bool) -> Self {
628+
self.human = Some(human);
629+
self
630+
}
631+
#[doc = "Return local information, do not retrieve the state from master node (default: false)"]
632+
pub fn local(mut self, local: bool) -> Self {
633+
self.local = Some(local);
634+
self
635+
}
636+
#[doc = "Explicit operation timeout for connection to master node"]
637+
pub fn master_timeout(mut self, master_timeout: &'b str) -> Self {
638+
self.master_timeout = Some(master_timeout);
639+
self
640+
}
641+
#[doc = "Pretty format the returned JSON response."]
642+
pub fn pretty(mut self, pretty: bool) -> Self {
643+
self.pretty = Some(pretty);
644+
self
645+
}
646+
#[doc = "Sets a request timeout for this API call.\n\nThe timeout is applied from when the request starts connecting until the response body has finished."]
647+
pub fn request_timeout(mut self, timeout: Duration) -> Self {
648+
self.request_timeout = Some(timeout);
649+
self
650+
}
651+
#[doc = "Comma-separated list of column names or column aliases to sort by"]
652+
pub fn s(mut self, s: &'b [&'b str]) -> Self {
653+
self.s = Some(s);
654+
self
655+
}
656+
#[doc = "The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests."]
657+
pub fn source(mut self, source: &'b str) -> Self {
658+
self.source = Some(source);
659+
self
660+
}
661+
#[doc = "Verbose mode. Display column headers"]
662+
pub fn v(mut self, v: bool) -> Self {
663+
self.v = Some(v);
664+
self
665+
}
666+
#[doc = "Creates an asynchronous call to the Cat Component Templates API that can be awaited"]
667+
pub async fn send(self) -> Result<Response, Error> {
668+
let path = self.parts.url();
669+
let method = Method::Get;
670+
let headers = self.headers;
671+
let timeout = self.request_timeout;
672+
let query_string = {
673+
#[serde_with::skip_serializing_none]
674+
#[derive(Serialize)]
675+
struct QueryParams<'b> {
676+
error_trace: Option<bool>,
677+
#[serde(serialize_with = "crate::client::serialize_coll_qs")]
678+
filter_path: Option<&'b [&'b str]>,
679+
format: Option<&'b str>,
680+
#[serde(serialize_with = "crate::client::serialize_coll_qs")]
681+
h: Option<&'b [&'b str]>,
682+
help: Option<bool>,
683+
human: Option<bool>,
684+
local: Option<bool>,
685+
master_timeout: Option<&'b str>,
686+
pretty: Option<bool>,
687+
#[serde(serialize_with = "crate::client::serialize_coll_qs")]
688+
s: Option<&'b [&'b str]>,
689+
source: Option<&'b str>,
690+
v: Option<bool>,
691+
}
692+
let query_params = QueryParams {
693+
error_trace: self.error_trace,
694+
filter_path: self.filter_path,
695+
format: self.format,
696+
h: self.h,
697+
help: self.help,
698+
human: self.human,
699+
local: self.local,
700+
master_timeout: self.master_timeout,
701+
pretty: self.pretty,
702+
s: self.s,
703+
source: self.source,
704+
v: self.v,
705+
};
706+
Some(query_params)
707+
};
708+
let body = Option::<()>::None;
709+
let response = self
710+
.transport
711+
.send(method, &path, headers, query_string.as_ref(), body, timeout)
712+
.await?;
713+
Ok(response)
714+
}
715+
}
716+
#[derive(Debug, Clone, PartialEq)]
529717
#[doc = "API parts for the Cat Count API"]
530718
pub enum CatCountParts<'b> {
531719
#[doc = "No parts"]
@@ -1841,7 +2029,6 @@ impl<'b> CatMlDatafeedsParts<'b> {
18412029
pub struct CatMlDatafeeds<'a, 'b> {
18422030
transport: &'a Transport,
18432031
parts: CatMlDatafeedsParts<'b>,
1844-
allow_no_datafeeds: Option<bool>,
18452032
allow_no_match: Option<bool>,
18462033
error_trace: Option<bool>,
18472034
filter_path: Option<&'b [&'b str]>,
@@ -1867,7 +2054,6 @@ impl<'a, 'b> CatMlDatafeeds<'a, 'b> {
18672054
transport,
18682055
parts,
18692056
headers,
1870-
allow_no_datafeeds: None,
18712057
allow_no_match: None,
18722058
error_trace: None,
18732059
filter_path: None,
@@ -1884,11 +2070,6 @@ impl<'a, 'b> CatMlDatafeeds<'a, 'b> {
18842070
}
18852071
}
18862072
#[doc = "Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)"]
1887-
pub fn allow_no_datafeeds(mut self, allow_no_datafeeds: bool) -> Self {
1888-
self.allow_no_datafeeds = Some(allow_no_datafeeds);
1889-
self
1890-
}
1891-
#[doc = "Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)"]
18922073
pub fn allow_no_match(mut self, allow_no_match: bool) -> Self {
18932074
self.allow_no_match = Some(allow_no_match);
18942075
self
@@ -1968,7 +2149,6 @@ impl<'a, 'b> CatMlDatafeeds<'a, 'b> {
19682149
#[serde_with::skip_serializing_none]
19692150
#[derive(Serialize)]
19702151
struct QueryParams<'b> {
1971-
allow_no_datafeeds: Option<bool>,
19722152
allow_no_match: Option<bool>,
19732153
error_trace: Option<bool>,
19742154
#[serde(serialize_with = "crate::client::serialize_coll_qs")]
@@ -1986,7 +2166,6 @@ impl<'a, 'b> CatMlDatafeeds<'a, 'b> {
19862166
v: Option<bool>,
19872167
}
19882168
let query_params = QueryParams {
1989-
allow_no_datafeeds: self.allow_no_datafeeds,
19902169
allow_no_match: self.allow_no_match,
19912170
error_trace: self.error_trace,
19922171
filter_path: self.filter_path,
@@ -2039,7 +2218,6 @@ impl<'b> CatMlJobsParts<'b> {
20392218
pub struct CatMlJobs<'a, 'b> {
20402219
transport: &'a Transport,
20412220
parts: CatMlJobsParts<'b>,
2042-
allow_no_jobs: Option<bool>,
20432221
allow_no_match: Option<bool>,
20442222
bytes: Option<Bytes>,
20452223
error_trace: Option<bool>,
@@ -2066,7 +2244,6 @@ impl<'a, 'b> CatMlJobs<'a, 'b> {
20662244
transport,
20672245
parts,
20682246
headers,
2069-
allow_no_jobs: None,
20702247
allow_no_match: None,
20712248
bytes: None,
20722249
error_trace: None,
@@ -2084,11 +2261,6 @@ impl<'a, 'b> CatMlJobs<'a, 'b> {
20842261
}
20852262
}
20862263
#[doc = "Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"]
2087-
pub fn allow_no_jobs(mut self, allow_no_jobs: bool) -> Self {
2088-
self.allow_no_jobs = Some(allow_no_jobs);
2089-
self
2090-
}
2091-
#[doc = "Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"]
20922264
pub fn allow_no_match(mut self, allow_no_match: bool) -> Self {
20932265
self.allow_no_match = Some(allow_no_match);
20942266
self
@@ -2173,7 +2345,6 @@ impl<'a, 'b> CatMlJobs<'a, 'b> {
21732345
#[serde_with::skip_serializing_none]
21742346
#[derive(Serialize)]
21752347
struct QueryParams<'b> {
2176-
allow_no_jobs: Option<bool>,
21772348
allow_no_match: Option<bool>,
21782349
bytes: Option<Bytes>,
21792350
error_trace: Option<bool>,
@@ -2192,7 +2363,6 @@ impl<'a, 'b> CatMlJobs<'a, 'b> {
21922363
v: Option<bool>,
21932364
}
21942365
let query_params = QueryParams {
2195-
allow_no_jobs: self.allow_no_jobs,
21962366
allow_no_match: self.allow_no_match,
21972367
bytes: self.bytes,
21982368
error_trace: self.error_trace,
@@ -4997,6 +5167,13 @@ impl<'a> Cat<'a> {
49975167
pub fn allocation<'b>(&'a self, parts: CatAllocationParts<'b>) -> CatAllocation<'a, 'b> {
49985168
CatAllocation::new(self.transport(), parts)
49995169
}
5170+
#[doc = "[Cat Component Templates API](https://www.elastic.co/guide/en/elasticsearch/reference/8.0/cat-compoentn-templates.html)\n\nReturns information about existing component_templates templates."]
5171+
pub fn component_templates<'b>(
5172+
&'a self,
5173+
parts: CatComponentTemplatesParts<'b>,
5174+
) -> CatComponentTemplates<'a, 'b> {
5175+
CatComponentTemplates::new(self.transport(), parts)
5176+
}
50005177
#[doc = "[Cat Count API](https://www.elastic.co/guide/en/elasticsearch/reference/8.0/cat-count.html)\n\nProvides quick access to the document count of the entire cluster, or individual indices."]
50015178
pub fn count<'b>(&'a self, parts: CatCountParts<'b>) -> CatCount<'a, 'b> {
50025179
CatCount::new(self.transport(), parts)

0 commit comments

Comments
 (0)