aws_sdk_qbusiness/operation/update_index/
_update_index_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateIndexInput {
6    /// <p>The identifier of the Amazon Q Business application connected to the index.</p>
7    pub application_id: ::std::option::Option<::std::string::String>,
8    /// <p>The identifier of the Amazon Q Business index.</p>
9    pub index_id: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the Amazon Q Business index.</p>
11    pub display_name: ::std::option::Option<::std::string::String>,
12    /// <p>The description of the Amazon Q Business index.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>The storage capacity units you want to provision for your Amazon Q Business index. You can add and remove capacity to fit your usage needs.</p>
15    pub capacity_configuration: ::std::option::Option<crate::types::IndexCapacityConfiguration>,
16    /// <p>Configuration information for document metadata or fields. Document metadata are fields or attributes associated with your documents. For example, the company department name associated with each document. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/business-use-dg/doc-attributes-types.html#doc-attributes">Understanding document attributes</a>.</p>
17    pub document_attribute_configurations: ::std::option::Option<::std::vec::Vec<crate::types::DocumentAttributeConfiguration>>,
18}
19impl UpdateIndexInput {
20    /// <p>The identifier of the Amazon Q Business application connected to the index.</p>
21    pub fn application_id(&self) -> ::std::option::Option<&str> {
22        self.application_id.as_deref()
23    }
24    /// <p>The identifier of the Amazon Q Business index.</p>
25    pub fn index_id(&self) -> ::std::option::Option<&str> {
26        self.index_id.as_deref()
27    }
28    /// <p>The name of the Amazon Q Business index.</p>
29    pub fn display_name(&self) -> ::std::option::Option<&str> {
30        self.display_name.as_deref()
31    }
32    /// <p>The description of the Amazon Q Business index.</p>
33    pub fn description(&self) -> ::std::option::Option<&str> {
34        self.description.as_deref()
35    }
36    /// <p>The storage capacity units you want to provision for your Amazon Q Business index. You can add and remove capacity to fit your usage needs.</p>
37    pub fn capacity_configuration(&self) -> ::std::option::Option<&crate::types::IndexCapacityConfiguration> {
38        self.capacity_configuration.as_ref()
39    }
40    /// <p>Configuration information for document metadata or fields. Document metadata are fields or attributes associated with your documents. For example, the company department name associated with each document. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/business-use-dg/doc-attributes-types.html#doc-attributes">Understanding document attributes</a>.</p>
41    ///
42    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.document_attribute_configurations.is_none()`.
43    pub fn document_attribute_configurations(&self) -> &[crate::types::DocumentAttributeConfiguration] {
44        self.document_attribute_configurations.as_deref().unwrap_or_default()
45    }
46}
47impl UpdateIndexInput {
48    /// Creates a new builder-style object to manufacture [`UpdateIndexInput`](crate::operation::update_index::UpdateIndexInput).
49    pub fn builder() -> crate::operation::update_index::builders::UpdateIndexInputBuilder {
50        crate::operation::update_index::builders::UpdateIndexInputBuilder::default()
51    }
52}
53
54/// A builder for [`UpdateIndexInput`](crate::operation::update_index::UpdateIndexInput).
55#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
56#[non_exhaustive]
57pub struct UpdateIndexInputBuilder {
58    pub(crate) application_id: ::std::option::Option<::std::string::String>,
59    pub(crate) index_id: ::std::option::Option<::std::string::String>,
60    pub(crate) display_name: ::std::option::Option<::std::string::String>,
61    pub(crate) description: ::std::option::Option<::std::string::String>,
62    pub(crate) capacity_configuration: ::std::option::Option<crate::types::IndexCapacityConfiguration>,
63    pub(crate) document_attribute_configurations: ::std::option::Option<::std::vec::Vec<crate::types::DocumentAttributeConfiguration>>,
64}
65impl UpdateIndexInputBuilder {
66    /// <p>The identifier of the Amazon Q Business application connected to the index.</p>
67    /// This field is required.
68    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69        self.application_id = ::std::option::Option::Some(input.into());
70        self
71    }
72    /// <p>The identifier of the Amazon Q Business application connected to the index.</p>
73    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74        self.application_id = input;
75        self
76    }
77    /// <p>The identifier of the Amazon Q Business application connected to the index.</p>
78    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
79        &self.application_id
80    }
81    /// <p>The identifier of the Amazon Q Business index.</p>
82    /// This field is required.
83    pub fn index_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84        self.index_id = ::std::option::Option::Some(input.into());
85        self
86    }
87    /// <p>The identifier of the Amazon Q Business index.</p>
88    pub fn set_index_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89        self.index_id = input;
90        self
91    }
92    /// <p>The identifier of the Amazon Q Business index.</p>
93    pub fn get_index_id(&self) -> &::std::option::Option<::std::string::String> {
94        &self.index_id
95    }
96    /// <p>The name of the Amazon Q Business index.</p>
97    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98        self.display_name = ::std::option::Option::Some(input.into());
99        self
100    }
101    /// <p>The name of the Amazon Q Business index.</p>
102    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103        self.display_name = input;
104        self
105    }
106    /// <p>The name of the Amazon Q Business index.</p>
107    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
108        &self.display_name
109    }
110    /// <p>The description of the Amazon Q Business index.</p>
111    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
112        self.description = ::std::option::Option::Some(input.into());
113        self
114    }
115    /// <p>The description of the Amazon Q Business index.</p>
116    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
117        self.description = input;
118        self
119    }
120    /// <p>The description of the Amazon Q Business index.</p>
121    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
122        &self.description
123    }
124    /// <p>The storage capacity units you want to provision for your Amazon Q Business index. You can add and remove capacity to fit your usage needs.</p>
125    pub fn capacity_configuration(mut self, input: crate::types::IndexCapacityConfiguration) -> Self {
126        self.capacity_configuration = ::std::option::Option::Some(input);
127        self
128    }
129    /// <p>The storage capacity units you want to provision for your Amazon Q Business index. You can add and remove capacity to fit your usage needs.</p>
130    pub fn set_capacity_configuration(mut self, input: ::std::option::Option<crate::types::IndexCapacityConfiguration>) -> Self {
131        self.capacity_configuration = input;
132        self
133    }
134    /// <p>The storage capacity units you want to provision for your Amazon Q Business index. You can add and remove capacity to fit your usage needs.</p>
135    pub fn get_capacity_configuration(&self) -> &::std::option::Option<crate::types::IndexCapacityConfiguration> {
136        &self.capacity_configuration
137    }
138    /// Appends an item to `document_attribute_configurations`.
139    ///
140    /// To override the contents of this collection use [`set_document_attribute_configurations`](Self::set_document_attribute_configurations).
141    ///
142    /// <p>Configuration information for document metadata or fields. Document metadata are fields or attributes associated with your documents. For example, the company department name associated with each document. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/business-use-dg/doc-attributes-types.html#doc-attributes">Understanding document attributes</a>.</p>
143    pub fn document_attribute_configurations(mut self, input: crate::types::DocumentAttributeConfiguration) -> Self {
144        let mut v = self.document_attribute_configurations.unwrap_or_default();
145        v.push(input);
146        self.document_attribute_configurations = ::std::option::Option::Some(v);
147        self
148    }
149    /// <p>Configuration information for document metadata or fields. Document metadata are fields or attributes associated with your documents. For example, the company department name associated with each document. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/business-use-dg/doc-attributes-types.html#doc-attributes">Understanding document attributes</a>.</p>
150    pub fn set_document_attribute_configurations(
151        mut self,
152        input: ::std::option::Option<::std::vec::Vec<crate::types::DocumentAttributeConfiguration>>,
153    ) -> Self {
154        self.document_attribute_configurations = input;
155        self
156    }
157    /// <p>Configuration information for document metadata or fields. Document metadata are fields or attributes associated with your documents. For example, the company department name associated with each document. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/business-use-dg/doc-attributes-types.html#doc-attributes">Understanding document attributes</a>.</p>
158    pub fn get_document_attribute_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DocumentAttributeConfiguration>> {
159        &self.document_attribute_configurations
160    }
161    /// Consumes the builder and constructs a [`UpdateIndexInput`](crate::operation::update_index::UpdateIndexInput).
162    pub fn build(self) -> ::std::result::Result<crate::operation::update_index::UpdateIndexInput, ::aws_smithy_types::error::operation::BuildError> {
163        ::std::result::Result::Ok(crate::operation::update_index::UpdateIndexInput {
164            application_id: self.application_id,
165            index_id: self.index_id,
166            display_name: self.display_name,
167            description: self.description,
168            capacity_configuration: self.capacity_configuration,
169            document_attribute_configurations: self.document_attribute_configurations,
170        })
171    }
172}