aws_sdk_sagemaker/operation/update_image/
_update_image_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateImageInput {
6 pub delete_properties: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8 pub description: ::std::option::Option<::std::string::String>,
10 pub display_name: ::std::option::Option<::std::string::String>,
12 pub image_name: ::std::option::Option<::std::string::String>,
14 pub role_arn: ::std::option::Option<::std::string::String>,
16}
17impl UpdateImageInput {
18 pub fn delete_properties(&self) -> &[::std::string::String] {
22 self.delete_properties.as_deref().unwrap_or_default()
23 }
24 pub fn description(&self) -> ::std::option::Option<&str> {
26 self.description.as_deref()
27 }
28 pub fn display_name(&self) -> ::std::option::Option<&str> {
30 self.display_name.as_deref()
31 }
32 pub fn image_name(&self) -> ::std::option::Option<&str> {
34 self.image_name.as_deref()
35 }
36 pub fn role_arn(&self) -> ::std::option::Option<&str> {
38 self.role_arn.as_deref()
39 }
40}
41impl UpdateImageInput {
42 pub fn builder() -> crate::operation::update_image::builders::UpdateImageInputBuilder {
44 crate::operation::update_image::builders::UpdateImageInputBuilder::default()
45 }
46}
47
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct UpdateImageInputBuilder {
52 pub(crate) delete_properties: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
53 pub(crate) description: ::std::option::Option<::std::string::String>,
54 pub(crate) display_name: ::std::option::Option<::std::string::String>,
55 pub(crate) image_name: ::std::option::Option<::std::string::String>,
56 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
57}
58impl UpdateImageInputBuilder {
59 pub fn delete_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
65 let mut v = self.delete_properties.unwrap_or_default();
66 v.push(input.into());
67 self.delete_properties = ::std::option::Option::Some(v);
68 self
69 }
70 pub fn set_delete_properties(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
72 self.delete_properties = input;
73 self
74 }
75 pub fn get_delete_properties(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
77 &self.delete_properties
78 }
79 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.description = ::std::option::Option::Some(input.into());
82 self
83 }
84 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.description = input;
87 self
88 }
89 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
91 &self.description
92 }
93 pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95 self.display_name = ::std::option::Option::Some(input.into());
96 self
97 }
98 pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100 self.display_name = input;
101 self
102 }
103 pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
105 &self.display_name
106 }
107 pub fn image_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110 self.image_name = ::std::option::Option::Some(input.into());
111 self
112 }
113 pub fn set_image_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115 self.image_name = input;
116 self
117 }
118 pub fn get_image_name(&self) -> &::std::option::Option<::std::string::String> {
120 &self.image_name
121 }
122 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124 self.role_arn = ::std::option::Option::Some(input.into());
125 self
126 }
127 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129 self.role_arn = input;
130 self
131 }
132 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
134 &self.role_arn
135 }
136 pub 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}