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