aws_sdk_qbusiness/operation/create_plugin/
_create_plugin_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 CreatePluginInput {
6    /// <p>The identifier of the application that will contain the plugin.</p>
7    pub application_id: ::std::option::Option<::std::string::String>,
8    /// <p>A the name for your plugin.</p>
9    pub display_name: ::std::option::Option<::std::string::String>,
10    /// <p>The type of plugin you want to create.</p>
11    pub r#type: ::std::option::Option<crate::types::PluginType>,
12    /// <p>Authentication configuration information for an Amazon Q Business plugin.</p>
13    pub auth_configuration: ::std::option::Option<crate::types::PluginAuthConfiguration>,
14    /// <p>The source URL used for plugin configuration.</p>
15    pub server_url: ::std::option::Option<::std::string::String>,
16    /// <p>Contains configuration for a custom plugin.</p>
17    pub custom_plugin_configuration: ::std::option::Option<crate::types::CustomPluginConfiguration>,
18    /// <p>A list of key-value pairs that identify or categorize the data source connector. You can also use tags to help control access to the data source connector. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.</p>
19    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
20    /// <p>A token that you provide to identify the request to create your Amazon Q Business plugin.</p>
21    pub client_token: ::std::option::Option<::std::string::String>,
22}
23impl CreatePluginInput {
24    /// <p>The identifier of the application that will contain the plugin.</p>
25    pub fn application_id(&self) -> ::std::option::Option<&str> {
26        self.application_id.as_deref()
27    }
28    /// <p>A the name for your plugin.</p>
29    pub fn display_name(&self) -> ::std::option::Option<&str> {
30        self.display_name.as_deref()
31    }
32    /// <p>The type of plugin you want to create.</p>
33    pub fn r#type(&self) -> ::std::option::Option<&crate::types::PluginType> {
34        self.r#type.as_ref()
35    }
36    /// <p>Authentication configuration information for an Amazon Q Business plugin.</p>
37    pub fn auth_configuration(&self) -> ::std::option::Option<&crate::types::PluginAuthConfiguration> {
38        self.auth_configuration.as_ref()
39    }
40    /// <p>The source URL used for plugin configuration.</p>
41    pub fn server_url(&self) -> ::std::option::Option<&str> {
42        self.server_url.as_deref()
43    }
44    /// <p>Contains configuration for a custom plugin.</p>
45    pub fn custom_plugin_configuration(&self) -> ::std::option::Option<&crate::types::CustomPluginConfiguration> {
46        self.custom_plugin_configuration.as_ref()
47    }
48    /// <p>A list of key-value pairs that identify or categorize the data source connector. You can also use tags to help control access to the data source connector. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.</p>
49    ///
50    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
51    pub fn tags(&self) -> &[crate::types::Tag] {
52        self.tags.as_deref().unwrap_or_default()
53    }
54    /// <p>A token that you provide to identify the request to create your Amazon Q Business plugin.</p>
55    pub fn client_token(&self) -> ::std::option::Option<&str> {
56        self.client_token.as_deref()
57    }
58}
59impl CreatePluginInput {
60    /// Creates a new builder-style object to manufacture [`CreatePluginInput`](crate::operation::create_plugin::CreatePluginInput).
61    pub fn builder() -> crate::operation::create_plugin::builders::CreatePluginInputBuilder {
62        crate::operation::create_plugin::builders::CreatePluginInputBuilder::default()
63    }
64}
65
66/// A builder for [`CreatePluginInput`](crate::operation::create_plugin::CreatePluginInput).
67#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
68#[non_exhaustive]
69pub struct CreatePluginInputBuilder {
70    pub(crate) application_id: ::std::option::Option<::std::string::String>,
71    pub(crate) display_name: ::std::option::Option<::std::string::String>,
72    pub(crate) r#type: ::std::option::Option<crate::types::PluginType>,
73    pub(crate) auth_configuration: ::std::option::Option<crate::types::PluginAuthConfiguration>,
74    pub(crate) server_url: ::std::option::Option<::std::string::String>,
75    pub(crate) custom_plugin_configuration: ::std::option::Option<crate::types::CustomPluginConfiguration>,
76    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
77    pub(crate) client_token: ::std::option::Option<::std::string::String>,
78}
79impl CreatePluginInputBuilder {
80    /// <p>The identifier of the application that will contain the plugin.</p>
81    /// This field is required.
82    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.application_id = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The identifier of the application that will contain the plugin.</p>
87    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.application_id = input;
89        self
90    }
91    /// <p>The identifier of the application that will contain the plugin.</p>
92    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
93        &self.application_id
94    }
95    /// <p>A the name for your plugin.</p>
96    /// This field is required.
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>A the name for your plugin.</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>A the name for your plugin.</p>
107    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
108        &self.display_name
109    }
110    /// <p>The type of plugin you want to create.</p>
111    /// This field is required.
112    pub fn r#type(mut self, input: crate::types::PluginType) -> Self {
113        self.r#type = ::std::option::Option::Some(input);
114        self
115    }
116    /// <p>The type of plugin you want to create.</p>
117    pub fn set_type(mut self, input: ::std::option::Option<crate::types::PluginType>) -> Self {
118        self.r#type = input;
119        self
120    }
121    /// <p>The type of plugin you want to create.</p>
122    pub fn get_type(&self) -> &::std::option::Option<crate::types::PluginType> {
123        &self.r#type
124    }
125    /// <p>Authentication configuration information for an Amazon Q Business plugin.</p>
126    /// This field is required.
127    pub fn auth_configuration(mut self, input: crate::types::PluginAuthConfiguration) -> Self {
128        self.auth_configuration = ::std::option::Option::Some(input);
129        self
130    }
131    /// <p>Authentication configuration information for an Amazon Q Business plugin.</p>
132    pub fn set_auth_configuration(mut self, input: ::std::option::Option<crate::types::PluginAuthConfiguration>) -> Self {
133        self.auth_configuration = input;
134        self
135    }
136    /// <p>Authentication configuration information for an Amazon Q Business plugin.</p>
137    pub fn get_auth_configuration(&self) -> &::std::option::Option<crate::types::PluginAuthConfiguration> {
138        &self.auth_configuration
139    }
140    /// <p>The source URL used for plugin configuration.</p>
141    pub fn server_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142        self.server_url = ::std::option::Option::Some(input.into());
143        self
144    }
145    /// <p>The source URL used for plugin configuration.</p>
146    pub fn set_server_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147        self.server_url = input;
148        self
149    }
150    /// <p>The source URL used for plugin configuration.</p>
151    pub fn get_server_url(&self) -> &::std::option::Option<::std::string::String> {
152        &self.server_url
153    }
154    /// <p>Contains configuration for a custom plugin.</p>
155    pub fn custom_plugin_configuration(mut self, input: crate::types::CustomPluginConfiguration) -> Self {
156        self.custom_plugin_configuration = ::std::option::Option::Some(input);
157        self
158    }
159    /// <p>Contains configuration for a custom plugin.</p>
160    pub fn set_custom_plugin_configuration(mut self, input: ::std::option::Option<crate::types::CustomPluginConfiguration>) -> Self {
161        self.custom_plugin_configuration = input;
162        self
163    }
164    /// <p>Contains configuration for a custom plugin.</p>
165    pub fn get_custom_plugin_configuration(&self) -> &::std::option::Option<crate::types::CustomPluginConfiguration> {
166        &self.custom_plugin_configuration
167    }
168    /// Appends an item to `tags`.
169    ///
170    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
171    ///
172    /// <p>A list of key-value pairs that identify or categorize the data source connector. You can also use tags to help control access to the data source connector. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.</p>
173    pub fn tags(mut self, input: crate::types::Tag) -> Self {
174        let mut v = self.tags.unwrap_or_default();
175        v.push(input);
176        self.tags = ::std::option::Option::Some(v);
177        self
178    }
179    /// <p>A list of key-value pairs that identify or categorize the data source connector. You can also use tags to help control access to the data source connector. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.</p>
180    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
181        self.tags = input;
182        self
183    }
184    /// <p>A list of key-value pairs that identify or categorize the data source connector. You can also use tags to help control access to the data source connector. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.</p>
185    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
186        &self.tags
187    }
188    /// <p>A token that you provide to identify the request to create your Amazon Q Business plugin.</p>
189    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
190        self.client_token = ::std::option::Option::Some(input.into());
191        self
192    }
193    /// <p>A token that you provide to identify the request to create your Amazon Q Business plugin.</p>
194    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
195        self.client_token = input;
196        self
197    }
198    /// <p>A token that you provide to identify the request to create your Amazon Q Business plugin.</p>
199    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
200        &self.client_token
201    }
202    /// Consumes the builder and constructs a [`CreatePluginInput`](crate::operation::create_plugin::CreatePluginInput).
203    pub fn build(
204        self,
205    ) -> ::std::result::Result<crate::operation::create_plugin::CreatePluginInput, ::aws_smithy_types::error::operation::BuildError> {
206        ::std::result::Result::Ok(crate::operation::create_plugin::CreatePluginInput {
207            application_id: self.application_id,
208            display_name: self.display_name,
209            r#type: self.r#type,
210            auth_configuration: self.auth_configuration,
211            server_url: self.server_url,
212            custom_plugin_configuration: self.custom_plugin_configuration,
213            tags: self.tags,
214            client_token: self.client_token,
215        })
216    }
217}