aws_sdk_opensearchserverless/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 id: ::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 id(&self) -> ::std::option::Option<&str> {
16 self.id.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) id: ::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 id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46 self.id = ::std::option::Option::Some(input.into());
47 self
48 }
49 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51 self.id = input;
52 self
53 }
54 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
56 &self.id
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 {
75 self.index_schema = ::std::option::Option::Some(input);
76 self
77 }
78 pub fn set_index_schema(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
80 self.index_schema = input;
81 self
82 }
83 pub fn get_index_schema(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
85 &self.index_schema
86 }
87 pub fn build(self) -> ::std::result::Result<crate::operation::update_index::UpdateIndexInput, ::aws_smithy_types::error::operation::BuildError> {
89 ::std::result::Result::Ok(crate::operation::update_index::UpdateIndexInput {
90 id: self.id,
91 index_name: self.index_name,
92 index_schema: self.index_schema,
93 })
94 }
95}