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 UpdateImageInput {
6/// <p>A list of properties to delete. Only the <code>Description</code> and <code>DisplayName</code> properties can be deleted.</p>
7pub delete_properties: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8/// <p>The new description for the image.</p>
9pub description: ::std::option::Option<::std::string::String>,
10/// <p>The new display name for the image.</p>
11pub display_name: ::std::option::Option<::std::string::String>,
12/// <p>The name of the image to update.</p>
13pub image_name: ::std::option::Option<::std::string::String>,
14/// <p>The new ARN for the IAM role that enables Amazon SageMaker AI to perform tasks on your behalf.</p>
15pub role_arn: ::std::option::Option<::std::string::String>,
16}
17impl UpdateImageInput {
18/// <p>A list of properties to delete. Only the <code>Description</code> and <code>DisplayName</code> properties can be deleted.</p>
19 ///
20 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.delete_properties.is_none()`.
21pub fn delete_properties(&self) -> &[::std::string::String] {
22self.delete_properties.as_deref().unwrap_or_default()
23 }
24/// <p>The new description for the image.</p>
25pub fn description(&self) -> ::std::option::Option<&str> {
26self.description.as_deref()
27 }
28/// <p>The new display name for the image.</p>
29pub fn display_name(&self) -> ::std::option::Option<&str> {
30self.display_name.as_deref()
31 }
32/// <p>The name of the image to update.</p>
33pub fn image_name(&self) -> ::std::option::Option<&str> {
34self.image_name.as_deref()
35 }
36/// <p>The new ARN for the IAM role that enables Amazon SageMaker AI to perform tasks on your behalf.</p>
37pub fn role_arn(&self) -> ::std::option::Option<&str> {
38self.role_arn.as_deref()
39 }
40}
41impl UpdateImageInput {
42/// Creates a new builder-style object to manufacture [`UpdateImageInput`](crate::operation::update_image::UpdateImageInput).
43pub fn builder() -> crate::operation::update_image::builders::UpdateImageInputBuilder {
44crate::operation::update_image::builders::UpdateImageInputBuilder::default()
45 }
46}
4748/// A builder for [`UpdateImageInput`](crate::operation::update_image::UpdateImageInput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct UpdateImageInputBuilder {
52pub(crate) delete_properties: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
53pub(crate) description: ::std::option::Option<::std::string::String>,
54pub(crate) display_name: ::std::option::Option<::std::string::String>,
55pub(crate) image_name: ::std::option::Option<::std::string::String>,
56pub(crate) role_arn: ::std::option::Option<::std::string::String>,
57}
58impl UpdateImageInputBuilder {
59/// Appends an item to `delete_properties`.
60 ///
61 /// To override the contents of this collection use [`set_delete_properties`](Self::set_delete_properties).
62 ///
63 /// <p>A list of properties to delete. Only the <code>Description</code> and <code>DisplayName</code> properties can be deleted.</p>
64pub fn delete_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
65let mut v = self.delete_properties.unwrap_or_default();
66 v.push(input.into());
67self.delete_properties = ::std::option::Option::Some(v);
68self
69}
70/// <p>A list of properties to delete. Only the <code>Description</code> and <code>DisplayName</code> properties can be deleted.</p>
71pub fn set_delete_properties(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
72self.delete_properties = input;
73self
74}
75/// <p>A list of properties to delete. Only the <code>Description</code> and <code>DisplayName</code> properties can be deleted.</p>
76pub fn get_delete_properties(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
77&self.delete_properties
78 }
79/// <p>The new description for the image.</p>
80pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81self.description = ::std::option::Option::Some(input.into());
82self
83}
84/// <p>The new description for the image.</p>
85pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86self.description = input;
87self
88}
89/// <p>The new description for the image.</p>
90pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
91&self.description
92 }
93/// <p>The new display name for the image.</p>
94pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95self.display_name = ::std::option::Option::Some(input.into());
96self
97}
98/// <p>The new display name for the image.</p>
99pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100self.display_name = input;
101self
102}
103/// <p>The new display name for the image.</p>
104pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
105&self.display_name
106 }
107/// <p>The name of the image to update.</p>
108 /// This field is required.
109pub fn image_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110self.image_name = ::std::option::Option::Some(input.into());
111self
112}
113/// <p>The name of the image to update.</p>
114pub fn set_image_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115self.image_name = input;
116self
117}
118/// <p>The name of the image to update.</p>
119pub fn get_image_name(&self) -> &::std::option::Option<::std::string::String> {
120&self.image_name
121 }
122/// <p>The new ARN for the IAM role that enables Amazon SageMaker AI to perform tasks on your behalf.</p>
123pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124self.role_arn = ::std::option::Option::Some(input.into());
125self
126}
127/// <p>The new ARN for the IAM role that enables Amazon SageMaker AI to perform tasks on your behalf.</p>
128pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129self.role_arn = input;
130self
131}
132/// <p>The new ARN for the IAM role that enables Amazon SageMaker AI to perform tasks on your behalf.</p>
133pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
134&self.role_arn
135 }
136/// Consumes the builder and constructs a [`UpdateImageInput`](crate::operation::update_image::UpdateImageInput).
137pub fn build(self) -> ::std::result::Result<crate::operation::update_image::UpdateImageInput, ::aws_smithy_types::error::operation::BuildError> {
138 ::std::result::Result::Ok(crate::operation::update_image::UpdateImageInput {
139 delete_properties: self.delete_properties,
140 description: self.description,
141 display_name: self.display_name,
142 image_name: self.image_name,
143 role_arn: self.role_arn,
144 })
145 }
146}