1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateIndexInput {
/// <p>The name of an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.</p>
pub domain_name: ::std::option::Option<::std::string::String>,
/// <p>The name of the index to update.</p>
pub index_name: ::std::option::Option<::std::string::String>,
/// <p>The updated JSON schema for the index including any changes to mappings, settings, and semantic enrichment configuration.</p>
pub index_schema: ::std::option::Option<::aws_smithy_types::Document>,
}
impl UpdateIndexInput {
/// <p>The name of an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.</p>
pub fn domain_name(&self) -> ::std::option::Option<&str> {
self.domain_name.as_deref()
}
/// <p>The name of the index to update.</p>
pub fn index_name(&self) -> ::std::option::Option<&str> {
self.index_name.as_deref()
}
/// <p>The updated JSON schema for the index including any changes to mappings, settings, and semantic enrichment configuration.</p>
pub fn index_schema(&self) -> ::std::option::Option<&::aws_smithy_types::Document> {
self.index_schema.as_ref()
}
}
impl UpdateIndexInput {
/// Creates a new builder-style object to manufacture [`UpdateIndexInput`](crate::operation::update_index::UpdateIndexInput).
pub fn builder() -> crate::operation::update_index::builders::UpdateIndexInputBuilder {
crate::operation::update_index::builders::UpdateIndexInputBuilder::default()
}
}
/// A builder for [`UpdateIndexInput`](crate::operation::update_index::UpdateIndexInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateIndexInputBuilder {
pub(crate) domain_name: ::std::option::Option<::std::string::String>,
pub(crate) index_name: ::std::option::Option<::std::string::String>,
pub(crate) index_schema: ::std::option::Option<::aws_smithy_types::Document>,
}
impl UpdateIndexInputBuilder {
/// <p>The name of an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.</p>
/// This field is required.
pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.</p>
pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_name = input;
self
}
/// <p>The name of an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.</p>
pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_name
}
/// <p>The name of the index to update.</p>
/// This field is required.
pub fn index_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.index_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the index to update.</p>
pub fn set_index_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.index_name = input;
self
}
/// <p>The name of the index to update.</p>
pub fn get_index_name(&self) -> &::std::option::Option<::std::string::String> {
&self.index_name
}
/// <p>The updated JSON schema for the index including any changes to mappings, settings, and semantic enrichment configuration.</p>
/// This field is required.
pub fn index_schema(mut self, input: ::aws_smithy_types::Document) -> Self {
self.index_schema = ::std::option::Option::Some(input);
self
}
/// <p>The updated JSON schema for the index including any changes to mappings, settings, and semantic enrichment configuration.</p>
pub fn set_index_schema(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
self.index_schema = input;
self
}
/// <p>The updated JSON schema for the index including any changes to mappings, settings, and semantic enrichment configuration.</p>
pub fn get_index_schema(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
&self.index_schema
}
/// Consumes the builder and constructs a [`UpdateIndexInput`](crate::operation::update_index::UpdateIndexInput).
pub fn build(self) -> ::std::result::Result<crate::operation::update_index::UpdateIndexInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_index::UpdateIndexInput {
domain_name: self.domain_name,
index_name: self.index_name,
index_schema: self.index_schema,
})
}
}