aws_sdk_qbusiness/operation/update_plugin/
_update_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 UpdatePluginInput {
6    /// <p>The identifier of the application the plugin is attached to.</p>
7    pub application_id: ::std::option::Option<::std::string::String>,
8    /// <p>The identifier of the plugin.</p>
9    pub plugin_id: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the plugin.</p>
11    pub display_name: ::std::option::Option<::std::string::String>,
12    /// <p>The status of the plugin.</p>
13    pub state: ::std::option::Option<crate::types::PluginState>,
14    /// <p>The source URL used for plugin configuration.</p>
15    pub server_url: ::std::option::Option<::std::string::String>,
16    /// <p>The configuration for a custom plugin.</p>
17    pub custom_plugin_configuration: ::std::option::Option<crate::types::CustomPluginConfiguration>,
18    /// <p>The authentication configuration the plugin is using.</p>
19    pub auth_configuration: ::std::option::Option<crate::types::PluginAuthConfiguration>,
20}
21impl UpdatePluginInput {
22    /// <p>The identifier of the application the plugin is attached to.</p>
23    pub fn application_id(&self) -> ::std::option::Option<&str> {
24        self.application_id.as_deref()
25    }
26    /// <p>The identifier of the plugin.</p>
27    pub fn plugin_id(&self) -> ::std::option::Option<&str> {
28        self.plugin_id.as_deref()
29    }
30    /// <p>The name of the plugin.</p>
31    pub fn display_name(&self) -> ::std::option::Option<&str> {
32        self.display_name.as_deref()
33    }
34    /// <p>The status of the plugin.</p>
35    pub fn state(&self) -> ::std::option::Option<&crate::types::PluginState> {
36        self.state.as_ref()
37    }
38    /// <p>The source URL used for plugin configuration.</p>
39    pub fn server_url(&self) -> ::std::option::Option<&str> {
40        self.server_url.as_deref()
41    }
42    /// <p>The configuration for a custom plugin.</p>
43    pub fn custom_plugin_configuration(&self) -> ::std::option::Option<&crate::types::CustomPluginConfiguration> {
44        self.custom_plugin_configuration.as_ref()
45    }
46    /// <p>The authentication configuration the plugin is using.</p>
47    pub fn auth_configuration(&self) -> ::std::option::Option<&crate::types::PluginAuthConfiguration> {
48        self.auth_configuration.as_ref()
49    }
50}
51impl UpdatePluginInput {
52    /// Creates a new builder-style object to manufacture [`UpdatePluginInput`](crate::operation::update_plugin::UpdatePluginInput).
53    pub fn builder() -> crate::operation::update_plugin::builders::UpdatePluginInputBuilder {
54        crate::operation::update_plugin::builders::UpdatePluginInputBuilder::default()
55    }
56}
57
58/// A builder for [`UpdatePluginInput`](crate::operation::update_plugin::UpdatePluginInput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct UpdatePluginInputBuilder {
62    pub(crate) application_id: ::std::option::Option<::std::string::String>,
63    pub(crate) plugin_id: ::std::option::Option<::std::string::String>,
64    pub(crate) display_name: ::std::option::Option<::std::string::String>,
65    pub(crate) state: ::std::option::Option<crate::types::PluginState>,
66    pub(crate) server_url: ::std::option::Option<::std::string::String>,
67    pub(crate) custom_plugin_configuration: ::std::option::Option<crate::types::CustomPluginConfiguration>,
68    pub(crate) auth_configuration: ::std::option::Option<crate::types::PluginAuthConfiguration>,
69}
70impl UpdatePluginInputBuilder {
71    /// <p>The identifier of the application the plugin is attached to.</p>
72    /// This field is required.
73    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.application_id = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The identifier of the application the plugin is attached to.</p>
78    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.application_id = input;
80        self
81    }
82    /// <p>The identifier of the application the plugin is attached to.</p>
83    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
84        &self.application_id
85    }
86    /// <p>The identifier of the plugin.</p>
87    /// This field is required.
88    pub fn plugin_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89        self.plugin_id = ::std::option::Option::Some(input.into());
90        self
91    }
92    /// <p>The identifier of the plugin.</p>
93    pub fn set_plugin_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94        self.plugin_id = input;
95        self
96    }
97    /// <p>The identifier of the plugin.</p>
98    pub fn get_plugin_id(&self) -> &::std::option::Option<::std::string::String> {
99        &self.plugin_id
100    }
101    /// <p>The name of the plugin.</p>
102    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103        self.display_name = ::std::option::Option::Some(input.into());
104        self
105    }
106    /// <p>The name of the plugin.</p>
107    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108        self.display_name = input;
109        self
110    }
111    /// <p>The name of the plugin.</p>
112    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
113        &self.display_name
114    }
115    /// <p>The status of the plugin.</p>
116    pub fn state(mut self, input: crate::types::PluginState) -> Self {
117        self.state = ::std::option::Option::Some(input);
118        self
119    }
120    /// <p>The status of the plugin.</p>
121    pub fn set_state(mut self, input: ::std::option::Option<crate::types::PluginState>) -> Self {
122        self.state = input;
123        self
124    }
125    /// <p>The status of the plugin.</p>
126    pub fn get_state(&self) -> &::std::option::Option<crate::types::PluginState> {
127        &self.state
128    }
129    /// <p>The source URL used for plugin configuration.</p>
130    pub fn server_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.server_url = ::std::option::Option::Some(input.into());
132        self
133    }
134    /// <p>The source URL used for plugin configuration.</p>
135    pub fn set_server_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.server_url = input;
137        self
138    }
139    /// <p>The source URL used for plugin configuration.</p>
140    pub fn get_server_url(&self) -> &::std::option::Option<::std::string::String> {
141        &self.server_url
142    }
143    /// <p>The configuration for a custom plugin.</p>
144    pub fn custom_plugin_configuration(mut self, input: crate::types::CustomPluginConfiguration) -> Self {
145        self.custom_plugin_configuration = ::std::option::Option::Some(input);
146        self
147    }
148    /// <p>The configuration for a custom plugin.</p>
149    pub fn set_custom_plugin_configuration(mut self, input: ::std::option::Option<crate::types::CustomPluginConfiguration>) -> Self {
150        self.custom_plugin_configuration = input;
151        self
152    }
153    /// <p>The configuration for a custom plugin.</p>
154    pub fn get_custom_plugin_configuration(&self) -> &::std::option::Option<crate::types::CustomPluginConfiguration> {
155        &self.custom_plugin_configuration
156    }
157    /// <p>The authentication configuration the plugin is using.</p>
158    pub fn auth_configuration(mut self, input: crate::types::PluginAuthConfiguration) -> Self {
159        self.auth_configuration = ::std::option::Option::Some(input);
160        self
161    }
162    /// <p>The authentication configuration the plugin is using.</p>
163    pub fn set_auth_configuration(mut self, input: ::std::option::Option<crate::types::PluginAuthConfiguration>) -> Self {
164        self.auth_configuration = input;
165        self
166    }
167    /// <p>The authentication configuration the plugin is using.</p>
168    pub fn get_auth_configuration(&self) -> &::std::option::Option<crate::types::PluginAuthConfiguration> {
169        &self.auth_configuration
170    }
171    /// Consumes the builder and constructs a [`UpdatePluginInput`](crate::operation::update_plugin::UpdatePluginInput).
172    pub fn build(
173        self,
174    ) -> ::std::result::Result<crate::operation::update_plugin::UpdatePluginInput, ::aws_smithy_types::error::operation::BuildError> {
175        ::std::result::Result::Ok(crate::operation::update_plugin::UpdatePluginInput {
176            application_id: self.application_id,
177            plugin_id: self.plugin_id,
178            display_name: self.display_name,
179            state: self.state,
180            server_url: self.server_url,
181            custom_plugin_configuration: self.custom_plugin_configuration,
182            auth_configuration: self.auth_configuration,
183        })
184    }
185}