aws_sdk_kendra/operation/update_experience/
_update_experience_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 UpdateExperienceInput {
6    /// <p>The identifier of your Amazon Kendra experience you want to update.</p>
7    pub id: ::std::option::Option<::std::string::String>,
8    /// <p>A new name for your Amazon Kendra experience.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The identifier of the index for your Amazon Kendra experience.</p>
11    pub index_id: ::std::option::Option<::std::string::String>,
12    /// <p>The Amazon Resource Name (ARN) of an IAM role with permission to access the <code>Query</code> API, <code>QuerySuggestions</code> API, <code>SubmitFeedback</code> API, and IAM Identity Center that stores your users and groups information. For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html">IAM roles for Amazon Kendra</a>.</p>
13    pub role_arn: ::std::option::Option<::std::string::String>,
14    /// <p>Configuration information you want to update for your Amazon Kendra experience.</p>
15    pub configuration: ::std::option::Option<crate::types::ExperienceConfiguration>,
16    /// <p>A new description for your Amazon Kendra experience.</p>
17    pub description: ::std::option::Option<::std::string::String>,
18}
19impl UpdateExperienceInput {
20    /// <p>The identifier of your Amazon Kendra experience you want to update.</p>
21    pub fn id(&self) -> ::std::option::Option<&str> {
22        self.id.as_deref()
23    }
24    /// <p>A new name for your Amazon Kendra experience.</p>
25    pub fn name(&self) -> ::std::option::Option<&str> {
26        self.name.as_deref()
27    }
28    /// <p>The identifier of the index for your Amazon Kendra experience.</p>
29    pub fn index_id(&self) -> ::std::option::Option<&str> {
30        self.index_id.as_deref()
31    }
32    /// <p>The Amazon Resource Name (ARN) of an IAM role with permission to access the <code>Query</code> API, <code>QuerySuggestions</code> API, <code>SubmitFeedback</code> API, and IAM Identity Center that stores your users and groups information. For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html">IAM roles for Amazon Kendra</a>.</p>
33    pub fn role_arn(&self) -> ::std::option::Option<&str> {
34        self.role_arn.as_deref()
35    }
36    /// <p>Configuration information you want to update for your Amazon Kendra experience.</p>
37    pub fn configuration(&self) -> ::std::option::Option<&crate::types::ExperienceConfiguration> {
38        self.configuration.as_ref()
39    }
40    /// <p>A new description for your Amazon Kendra experience.</p>
41    pub fn description(&self) -> ::std::option::Option<&str> {
42        self.description.as_deref()
43    }
44}
45impl UpdateExperienceInput {
46    /// Creates a new builder-style object to manufacture [`UpdateExperienceInput`](crate::operation::update_experience::UpdateExperienceInput).
47    pub fn builder() -> crate::operation::update_experience::builders::UpdateExperienceInputBuilder {
48        crate::operation::update_experience::builders::UpdateExperienceInputBuilder::default()
49    }
50}
51
52/// A builder for [`UpdateExperienceInput`](crate::operation::update_experience::UpdateExperienceInput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct UpdateExperienceInputBuilder {
56    pub(crate) id: ::std::option::Option<::std::string::String>,
57    pub(crate) name: ::std::option::Option<::std::string::String>,
58    pub(crate) index_id: ::std::option::Option<::std::string::String>,
59    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
60    pub(crate) configuration: ::std::option::Option<crate::types::ExperienceConfiguration>,
61    pub(crate) description: ::std::option::Option<::std::string::String>,
62}
63impl UpdateExperienceInputBuilder {
64    /// <p>The identifier of your Amazon Kendra experience you want to update.</p>
65    /// This field is required.
66    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.id = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The identifier of your Amazon Kendra experience you want to update.</p>
71    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.id = input;
73        self
74    }
75    /// <p>The identifier of your Amazon Kendra experience you want to update.</p>
76    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
77        &self.id
78    }
79    /// <p>A new name for your Amazon Kendra experience.</p>
80    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.name = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>A new name for your Amazon Kendra experience.</p>
85    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.name = input;
87        self
88    }
89    /// <p>A new name for your Amazon Kendra experience.</p>
90    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
91        &self.name
92    }
93    /// <p>The identifier of the index for your Amazon Kendra experience.</p>
94    /// This field is required.
95    pub fn index_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.index_id = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>The identifier of the index for your Amazon Kendra experience.</p>
100    pub fn set_index_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.index_id = input;
102        self
103    }
104    /// <p>The identifier of the index for your Amazon Kendra experience.</p>
105    pub fn get_index_id(&self) -> &::std::option::Option<::std::string::String> {
106        &self.index_id
107    }
108    /// <p>The Amazon Resource Name (ARN) of an IAM role with permission to access the <code>Query</code> API, <code>QuerySuggestions</code> API, <code>SubmitFeedback</code> API, and IAM Identity Center that stores your users and groups information. For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html">IAM roles for Amazon Kendra</a>.</p>
109    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110        self.role_arn = ::std::option::Option::Some(input.into());
111        self
112    }
113    /// <p>The Amazon Resource Name (ARN) of an IAM role with permission to access the <code>Query</code> API, <code>QuerySuggestions</code> API, <code>SubmitFeedback</code> API, and IAM Identity Center that stores your users and groups information. For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html">IAM roles for Amazon Kendra</a>.</p>
114    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115        self.role_arn = input;
116        self
117    }
118    /// <p>The Amazon Resource Name (ARN) of an IAM role with permission to access the <code>Query</code> API, <code>QuerySuggestions</code> API, <code>SubmitFeedback</code> API, and IAM Identity Center that stores your users and groups information. For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html">IAM roles for Amazon Kendra</a>.</p>
119    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
120        &self.role_arn
121    }
122    /// <p>Configuration information you want to update for your Amazon Kendra experience.</p>
123    pub fn configuration(mut self, input: crate::types::ExperienceConfiguration) -> Self {
124        self.configuration = ::std::option::Option::Some(input);
125        self
126    }
127    /// <p>Configuration information you want to update for your Amazon Kendra experience.</p>
128    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::ExperienceConfiguration>) -> Self {
129        self.configuration = input;
130        self
131    }
132    /// <p>Configuration information you want to update for your Amazon Kendra experience.</p>
133    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::ExperienceConfiguration> {
134        &self.configuration
135    }
136    /// <p>A new description for your Amazon Kendra experience.</p>
137    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138        self.description = ::std::option::Option::Some(input.into());
139        self
140    }
141    /// <p>A new description for your Amazon Kendra experience.</p>
142    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143        self.description = input;
144        self
145    }
146    /// <p>A new description for your Amazon Kendra experience.</p>
147    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
148        &self.description
149    }
150    /// Consumes the builder and constructs a [`UpdateExperienceInput`](crate::operation::update_experience::UpdateExperienceInput).
151    pub fn build(
152        self,
153    ) -> ::std::result::Result<crate::operation::update_experience::UpdateExperienceInput, ::aws_smithy_types::error::operation::BuildError> {
154        ::std::result::Result::Ok(crate::operation::update_experience::UpdateExperienceInput {
155            id: self.id,
156            name: self.name,
157            index_id: self.index_id,
158            role_arn: self.role_arn,
159            configuration: self.configuration,
160            description: self.description,
161        })
162    }
163}