aws_sdk_ec2/types/
_delete_launch_template_versions_response_error_item.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Describes a launch template version that could not be deleted.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteLaunchTemplateVersionsResponseErrorItem {
7    /// <p>The ID of the launch template.</p>
8    pub launch_template_id: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the launch template.</p>
10    pub launch_template_name: ::std::option::Option<::std::string::String>,
11    /// <p>The version number of the launch template.</p>
12    pub version_number: ::std::option::Option<i64>,
13    /// <p>Information about the error.</p>
14    pub response_error: ::std::option::Option<crate::types::ResponseError>,
15}
16impl DeleteLaunchTemplateVersionsResponseErrorItem {
17    /// <p>The ID of the launch template.</p>
18    pub fn launch_template_id(&self) -> ::std::option::Option<&str> {
19        self.launch_template_id.as_deref()
20    }
21    /// <p>The name of the launch template.</p>
22    pub fn launch_template_name(&self) -> ::std::option::Option<&str> {
23        self.launch_template_name.as_deref()
24    }
25    /// <p>The version number of the launch template.</p>
26    pub fn version_number(&self) -> ::std::option::Option<i64> {
27        self.version_number
28    }
29    /// <p>Information about the error.</p>
30    pub fn response_error(&self) -> ::std::option::Option<&crate::types::ResponseError> {
31        self.response_error.as_ref()
32    }
33}
34impl DeleteLaunchTemplateVersionsResponseErrorItem {
35    /// Creates a new builder-style object to manufacture [`DeleteLaunchTemplateVersionsResponseErrorItem`](crate::types::DeleteLaunchTemplateVersionsResponseErrorItem).
36    pub fn builder() -> crate::types::builders::DeleteLaunchTemplateVersionsResponseErrorItemBuilder {
37        crate::types::builders::DeleteLaunchTemplateVersionsResponseErrorItemBuilder::default()
38    }
39}
40
41/// A builder for [`DeleteLaunchTemplateVersionsResponseErrorItem`](crate::types::DeleteLaunchTemplateVersionsResponseErrorItem).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct DeleteLaunchTemplateVersionsResponseErrorItemBuilder {
45    pub(crate) launch_template_id: ::std::option::Option<::std::string::String>,
46    pub(crate) launch_template_name: ::std::option::Option<::std::string::String>,
47    pub(crate) version_number: ::std::option::Option<i64>,
48    pub(crate) response_error: ::std::option::Option<crate::types::ResponseError>,
49}
50impl DeleteLaunchTemplateVersionsResponseErrorItemBuilder {
51    /// <p>The ID of the launch template.</p>
52    pub fn launch_template_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.launch_template_id = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The ID of the launch template.</p>
57    pub fn set_launch_template_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.launch_template_id = input;
59        self
60    }
61    /// <p>The ID of the launch template.</p>
62    pub fn get_launch_template_id(&self) -> &::std::option::Option<::std::string::String> {
63        &self.launch_template_id
64    }
65    /// <p>The name of the launch template.</p>
66    pub fn launch_template_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.launch_template_name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The name of the launch template.</p>
71    pub fn set_launch_template_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.launch_template_name = input;
73        self
74    }
75    /// <p>The name of the launch template.</p>
76    pub fn get_launch_template_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.launch_template_name
78    }
79    /// <p>The version number of the launch template.</p>
80    pub fn version_number(mut self, input: i64) -> Self {
81        self.version_number = ::std::option::Option::Some(input);
82        self
83    }
84    /// <p>The version number of the launch template.</p>
85    pub fn set_version_number(mut self, input: ::std::option::Option<i64>) -> Self {
86        self.version_number = input;
87        self
88    }
89    /// <p>The version number of the launch template.</p>
90    pub fn get_version_number(&self) -> &::std::option::Option<i64> {
91        &self.version_number
92    }
93    /// <p>Information about the error.</p>
94    pub fn response_error(mut self, input: crate::types::ResponseError) -> Self {
95        self.response_error = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>Information about the error.</p>
99    pub fn set_response_error(mut self, input: ::std::option::Option<crate::types::ResponseError>) -> Self {
100        self.response_error = input;
101        self
102    }
103    /// <p>Information about the error.</p>
104    pub fn get_response_error(&self) -> &::std::option::Option<crate::types::ResponseError> {
105        &self.response_error
106    }
107    /// Consumes the builder and constructs a [`DeleteLaunchTemplateVersionsResponseErrorItem`](crate::types::DeleteLaunchTemplateVersionsResponseErrorItem).
108    pub fn build(self) -> crate::types::DeleteLaunchTemplateVersionsResponseErrorItem {
109        crate::types::DeleteLaunchTemplateVersionsResponseErrorItem {
110            launch_template_id: self.launch_template_id,
111            launch_template_name: self.launch_template_name,
112            version_number: self.version_number,
113            response_error: self.response_error,
114        }
115    }
116}