aws_sdk_appstream/operation/copy_image/
_copy_image_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 CopyImageInput {
6    /// <p>The name of the image to copy.</p>
7    pub source_image_name: ::std::option::Option<::std::string::String>,
8    /// <p>The name that the image will have when it is copied to the destination.</p>
9    pub destination_image_name: ::std::option::Option<::std::string::String>,
10    /// <p>The destination region to which the image will be copied. This parameter is required, even if you are copying an image within the same region.</p>
11    pub destination_region: ::std::option::Option<::std::string::String>,
12    /// <p>The description that the image will have when it is copied to the destination.</p>
13    pub destination_image_description: ::std::option::Option<::std::string::String>,
14}
15impl CopyImageInput {
16    /// <p>The name of the image to copy.</p>
17    pub fn source_image_name(&self) -> ::std::option::Option<&str> {
18        self.source_image_name.as_deref()
19    }
20    /// <p>The name that the image will have when it is copied to the destination.</p>
21    pub fn destination_image_name(&self) -> ::std::option::Option<&str> {
22        self.destination_image_name.as_deref()
23    }
24    /// <p>The destination region to which the image will be copied. This parameter is required, even if you are copying an image within the same region.</p>
25    pub fn destination_region(&self) -> ::std::option::Option<&str> {
26        self.destination_region.as_deref()
27    }
28    /// <p>The description that the image will have when it is copied to the destination.</p>
29    pub fn destination_image_description(&self) -> ::std::option::Option<&str> {
30        self.destination_image_description.as_deref()
31    }
32}
33impl CopyImageInput {
34    /// Creates a new builder-style object to manufacture [`CopyImageInput`](crate::operation::copy_image::CopyImageInput).
35    pub fn builder() -> crate::operation::copy_image::builders::CopyImageInputBuilder {
36        crate::operation::copy_image::builders::CopyImageInputBuilder::default()
37    }
38}
39
40/// A builder for [`CopyImageInput`](crate::operation::copy_image::CopyImageInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct CopyImageInputBuilder {
44    pub(crate) source_image_name: ::std::option::Option<::std::string::String>,
45    pub(crate) destination_image_name: ::std::option::Option<::std::string::String>,
46    pub(crate) destination_region: ::std::option::Option<::std::string::String>,
47    pub(crate) destination_image_description: ::std::option::Option<::std::string::String>,
48}
49impl CopyImageInputBuilder {
50    /// <p>The name of the image to copy.</p>
51    /// This field is required.
52    pub fn source_image_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.source_image_name = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The name of the image to copy.</p>
57    pub fn set_source_image_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.source_image_name = input;
59        self
60    }
61    /// <p>The name of the image to copy.</p>
62    pub fn get_source_image_name(&self) -> &::std::option::Option<::std::string::String> {
63        &self.source_image_name
64    }
65    /// <p>The name that the image will have when it is copied to the destination.</p>
66    /// This field is required.
67    pub fn destination_image_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.destination_image_name = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The name that the image will have when it is copied to the destination.</p>
72    pub fn set_destination_image_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.destination_image_name = input;
74        self
75    }
76    /// <p>The name that the image will have when it is copied to the destination.</p>
77    pub fn get_destination_image_name(&self) -> &::std::option::Option<::std::string::String> {
78        &self.destination_image_name
79    }
80    /// <p>The destination region to which the image will be copied. This parameter is required, even if you are copying an image within the same region.</p>
81    /// This field is required.
82    pub fn destination_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.destination_region = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The destination region to which the image will be copied. This parameter is required, even if you are copying an image within the same region.</p>
87    pub fn set_destination_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.destination_region = input;
89        self
90    }
91    /// <p>The destination region to which the image will be copied. This parameter is required, even if you are copying an image within the same region.</p>
92    pub fn get_destination_region(&self) -> &::std::option::Option<::std::string::String> {
93        &self.destination_region
94    }
95    /// <p>The description that the image will have when it is copied to the destination.</p>
96    pub fn destination_image_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97        self.destination_image_description = ::std::option::Option::Some(input.into());
98        self
99    }
100    /// <p>The description that the image will have when it is copied to the destination.</p>
101    pub fn set_destination_image_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102        self.destination_image_description = input;
103        self
104    }
105    /// <p>The description that the image will have when it is copied to the destination.</p>
106    pub fn get_destination_image_description(&self) -> &::std::option::Option<::std::string::String> {
107        &self.destination_image_description
108    }
109    /// Consumes the builder and constructs a [`CopyImageInput`](crate::operation::copy_image::CopyImageInput).
110    pub fn build(self) -> ::std::result::Result<crate::operation::copy_image::CopyImageInput, ::aws_smithy_types::error::operation::BuildError> {
111        ::std::result::Result::Ok(crate::operation::copy_image::CopyImageInput {
112            source_image_name: self.source_image_name,
113            destination_image_name: self.destination_image_name,
114            destination_region: self.destination_region,
115            destination_image_description: self.destination_image_description,
116        })
117    }
118}