aws_sdk_opensearch/operation/update_index/
_update_index_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateIndexInput {
6 pub domain_name: ::std::option::Option<::std::string::String>,
8 pub index_name: ::std::option::Option<::std::string::String>,
10 pub index_schema: ::std::option::Option<::aws_smithy_types::Document>,
12}
13impl UpdateIndexInput {
14 pub fn domain_name(&self) -> ::std::option::Option<&str> {
16 self.domain_name.as_deref()
17 }
18 pub fn index_name(&self) -> ::std::option::Option<&str> {
20 self.index_name.as_deref()
21 }
22 pub fn index_schema(&self) -> ::std::option::Option<&::aws_smithy_types::Document> {
24 self.index_schema.as_ref()
25 }
26}
27impl UpdateIndexInput {
28 pub fn builder() -> crate::operation::update_index::builders::UpdateIndexInputBuilder {
30 crate::operation::update_index::builders::UpdateIndexInputBuilder::default()
31 }
32}
33
34#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateIndexInputBuilder {
38 pub(crate) domain_name: ::std::option::Option<::std::string::String>,
39 pub(crate) index_name: ::std::option::Option<::std::string::String>,
40 pub(crate) index_schema: ::std::option::Option<::aws_smithy_types::Document>,
41}
42impl UpdateIndexInputBuilder {
43 pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46 self.domain_name = ::std::option::Option::Some(input.into());
47 self
48 }
49 pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51 self.domain_name = input;
52 self
53 }
54 pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
56 &self.domain_name
57 }
58 pub fn index_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61 self.index_name = ::std::option::Option::Some(input.into());
62 self
63 }
64 pub fn set_index_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.index_name = input;
67 self
68 }
69 pub fn get_index_name(&self) -> &::std::option::Option<::std::string::String> {
71 &self.index_name
72 }
73 pub fn index_schema(mut self, input: ::aws_smithy_types::Document) -> Self {
76 self.index_schema = ::std::option::Option::Some(input);
77 self
78 }
79 pub fn set_index_schema(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
81 self.index_schema = input;
82 self
83 }
84 pub fn get_index_schema(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
86 &self.index_schema
87 }
88 pub fn build(self) -> ::std::result::Result<crate::operation::update_index::UpdateIndexInput, ::aws_smithy_types::error::operation::BuildError> {
90 ::std::result::Result::Ok(crate::operation::update_index::UpdateIndexInput {
91 domain_name: self.domain_name,
92 index_name: self.index_name,
93 index_schema: self.index_schema,
94 })
95 }
96}