Skip to main content

aws_sdk_cloudformation/operation/deregister_type/
_deregister_type_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 DeregisterTypeInput {
6    /// <p>The Amazon Resource Name (ARN) of the extension.</p>
7    /// <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
8    pub arn: ::std::option::Option<::std::string::String>,
9    /// <p>The kind of extension.</p>
10    /// <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
11    pub r#type: ::std::option::Option<crate::types::RegistryType>,
12    /// <p>The name of the extension.</p>
13    /// <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
14    pub type_name: ::std::option::Option<::std::string::String>,
15    /// <p>The ID of a specific version of the extension. The version ID is the value at the end of the Amazon Resource Name (ARN) assigned to the extension version when it is registered.</p>
16    pub version_id: ::std::option::Option<::std::string::String>,
17}
18impl DeregisterTypeInput {
19    /// <p>The Amazon Resource Name (ARN) of the extension.</p>
20    /// <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
21    pub fn arn(&self) -> ::std::option::Option<&str> {
22        self.arn.as_deref()
23    }
24    /// <p>The kind of extension.</p>
25    /// <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
26    pub fn r#type(&self) -> ::std::option::Option<&crate::types::RegistryType> {
27        self.r#type.as_ref()
28    }
29    /// <p>The name of the extension.</p>
30    /// <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
31    pub fn type_name(&self) -> ::std::option::Option<&str> {
32        self.type_name.as_deref()
33    }
34    /// <p>The ID of a specific version of the extension. The version ID is the value at the end of the Amazon Resource Name (ARN) assigned to the extension version when it is registered.</p>
35    pub fn version_id(&self) -> ::std::option::Option<&str> {
36        self.version_id.as_deref()
37    }
38}
39impl DeregisterTypeInput {
40    /// Creates a new builder-style object to manufacture [`DeregisterTypeInput`](crate::operation::deregister_type::DeregisterTypeInput).
41    pub fn builder() -> crate::operation::deregister_type::builders::DeregisterTypeInputBuilder {
42        crate::operation::deregister_type::builders::DeregisterTypeInputBuilder::default()
43    }
44}
45
46/// A builder for [`DeregisterTypeInput`](crate::operation::deregister_type::DeregisterTypeInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct DeregisterTypeInputBuilder {
50    pub(crate) arn: ::std::option::Option<::std::string::String>,
51    pub(crate) r#type: ::std::option::Option<crate::types::RegistryType>,
52    pub(crate) type_name: ::std::option::Option<::std::string::String>,
53    pub(crate) version_id: ::std::option::Option<::std::string::String>,
54}
55impl DeregisterTypeInputBuilder {
56    /// <p>The Amazon Resource Name (ARN) of the extension.</p>
57    /// <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
58    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.arn = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>The Amazon Resource Name (ARN) of the extension.</p>
63    /// <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
64    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.arn = input;
66        self
67    }
68    /// <p>The Amazon Resource Name (ARN) of the extension.</p>
69    /// <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
70    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
71        &self.arn
72    }
73    /// <p>The kind of extension.</p>
74    /// <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
75    pub fn r#type(mut self, input: crate::types::RegistryType) -> Self {
76        self.r#type = ::std::option::Option::Some(input);
77        self
78    }
79    /// <p>The kind of extension.</p>
80    /// <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
81    pub fn set_type(mut self, input: ::std::option::Option<crate::types::RegistryType>) -> Self {
82        self.r#type = input;
83        self
84    }
85    /// <p>The kind of extension.</p>
86    /// <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
87    pub fn get_type(&self) -> &::std::option::Option<crate::types::RegistryType> {
88        &self.r#type
89    }
90    /// <p>The name of the extension.</p>
91    /// <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
92    pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93        self.type_name = ::std::option::Option::Some(input.into());
94        self
95    }
96    /// <p>The name of the extension.</p>
97    /// <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
98    pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.type_name = input;
100        self
101    }
102    /// <p>The name of the extension.</p>
103    /// <p>Conditional: You must specify either <code>TypeName</code> and <code>Type</code>, or <code>Arn</code>.</p>
104    pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
105        &self.type_name
106    }
107    /// <p>The ID of a specific version of the extension. The version ID is the value at the end of the Amazon Resource Name (ARN) assigned to the extension version when it is registered.</p>
108    pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109        self.version_id = ::std::option::Option::Some(input.into());
110        self
111    }
112    /// <p>The ID of a specific version of the extension. The version ID is the value at the end of the Amazon Resource Name (ARN) assigned to the extension version when it is registered.</p>
113    pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114        self.version_id = input;
115        self
116    }
117    /// <p>The ID of a specific version of the extension. The version ID is the value at the end of the Amazon Resource Name (ARN) assigned to the extension version when it is registered.</p>
118    pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
119        &self.version_id
120    }
121    /// Consumes the builder and constructs a [`DeregisterTypeInput`](crate::operation::deregister_type::DeregisterTypeInput).
122    pub fn build(
123        self,
124    ) -> ::std::result::Result<crate::operation::deregister_type::DeregisterTypeInput, ::aws_smithy_types::error::operation::BuildError> {
125        ::std::result::Result::Ok(crate::operation::deregister_type::DeregisterTypeInput {
126            arn: self.arn,
127            r#type: self.r#type,
128            type_name: self.type_name,
129            version_id: self.version_id,
130        })
131    }
132}