aws_sdk_comprehend/operation/update_flywheel/
_update_flywheel_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 UpdateFlywheelInput {
6    /// <p>The Amazon Resource Number (ARN) of the flywheel to update.</p>
7    pub flywheel_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The Amazon Resource Number (ARN) of the active model version.</p>
9    pub active_model_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data.</p>
11    pub data_access_role_arn: ::std::option::Option<::std::string::String>,
12    /// <p>Flywheel data security configuration.</p>
13    pub data_security_config: ::std::option::Option<crate::types::UpdateDataSecurityConfig>,
14}
15impl UpdateFlywheelInput {
16    /// <p>The Amazon Resource Number (ARN) of the flywheel to update.</p>
17    pub fn flywheel_arn(&self) -> ::std::option::Option<&str> {
18        self.flywheel_arn.as_deref()
19    }
20    /// <p>The Amazon Resource Number (ARN) of the active model version.</p>
21    pub fn active_model_arn(&self) -> ::std::option::Option<&str> {
22        self.active_model_arn.as_deref()
23    }
24    /// <p>The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data.</p>
25    pub fn data_access_role_arn(&self) -> ::std::option::Option<&str> {
26        self.data_access_role_arn.as_deref()
27    }
28    /// <p>Flywheel data security configuration.</p>
29    pub fn data_security_config(&self) -> ::std::option::Option<&crate::types::UpdateDataSecurityConfig> {
30        self.data_security_config.as_ref()
31    }
32}
33impl UpdateFlywheelInput {
34    /// Creates a new builder-style object to manufacture [`UpdateFlywheelInput`](crate::operation::update_flywheel::UpdateFlywheelInput).
35    pub fn builder() -> crate::operation::update_flywheel::builders::UpdateFlywheelInputBuilder {
36        crate::operation::update_flywheel::builders::UpdateFlywheelInputBuilder::default()
37    }
38}
39
40/// A builder for [`UpdateFlywheelInput`](crate::operation::update_flywheel::UpdateFlywheelInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateFlywheelInputBuilder {
44    pub(crate) flywheel_arn: ::std::option::Option<::std::string::String>,
45    pub(crate) active_model_arn: ::std::option::Option<::std::string::String>,
46    pub(crate) data_access_role_arn: ::std::option::Option<::std::string::String>,
47    pub(crate) data_security_config: ::std::option::Option<crate::types::UpdateDataSecurityConfig>,
48}
49impl UpdateFlywheelInputBuilder {
50    /// <p>The Amazon Resource Number (ARN) of the flywheel to update.</p>
51    /// This field is required.
52    pub fn flywheel_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.flywheel_arn = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The Amazon Resource Number (ARN) of the flywheel to update.</p>
57    pub fn set_flywheel_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.flywheel_arn = input;
59        self
60    }
61    /// <p>The Amazon Resource Number (ARN) of the flywheel to update.</p>
62    pub fn get_flywheel_arn(&self) -> &::std::option::Option<::std::string::String> {
63        &self.flywheel_arn
64    }
65    /// <p>The Amazon Resource Number (ARN) of the active model version.</p>
66    pub fn active_model_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.active_model_arn = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The Amazon Resource Number (ARN) of the active model version.</p>
71    pub fn set_active_model_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.active_model_arn = input;
73        self
74    }
75    /// <p>The Amazon Resource Number (ARN) of the active model version.</p>
76    pub fn get_active_model_arn(&self) -> &::std::option::Option<::std::string::String> {
77        &self.active_model_arn
78    }
79    /// <p>The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data.</p>
80    pub fn data_access_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.data_access_role_arn = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data.</p>
85    pub fn set_data_access_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.data_access_role_arn = input;
87        self
88    }
89    /// <p>The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data.</p>
90    pub fn get_data_access_role_arn(&self) -> &::std::option::Option<::std::string::String> {
91        &self.data_access_role_arn
92    }
93    /// <p>Flywheel data security configuration.</p>
94    pub fn data_security_config(mut self, input: crate::types::UpdateDataSecurityConfig) -> Self {
95        self.data_security_config = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>Flywheel data security configuration.</p>
99    pub fn set_data_security_config(mut self, input: ::std::option::Option<crate::types::UpdateDataSecurityConfig>) -> Self {
100        self.data_security_config = input;
101        self
102    }
103    /// <p>Flywheel data security configuration.</p>
104    pub fn get_data_security_config(&self) -> &::std::option::Option<crate::types::UpdateDataSecurityConfig> {
105        &self.data_security_config
106    }
107    /// Consumes the builder and constructs a [`UpdateFlywheelInput`](crate::operation::update_flywheel::UpdateFlywheelInput).
108    pub fn build(
109        self,
110    ) -> ::std::result::Result<crate::operation::update_flywheel::UpdateFlywheelInput, ::aws_smithy_types::error::operation::BuildError> {
111        ::std::result::Result::Ok(crate::operation::update_flywheel::UpdateFlywheelInput {
112            flywheel_arn: self.flywheel_arn,
113            active_model_arn: self.active_model_arn,
114            data_access_role_arn: self.data_access_role_arn,
115            data_security_config: self.data_security_config,
116        })
117    }
118}