aws_sdk_cloudhsm/operation/create_hapg/
_create_hapg_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Contains the inputs for the <code>CreateHapgRequest</code> action.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateHapgInput {
7    /// <p>The label of the new high-availability partition group.</p>
8    pub label: ::std::option::Option<::std::string::String>,
9}
10impl CreateHapgInput {
11    /// <p>The label of the new high-availability partition group.</p>
12    pub fn label(&self) -> ::std::option::Option<&str> {
13        self.label.as_deref()
14    }
15}
16impl CreateHapgInput {
17    /// Creates a new builder-style object to manufacture [`CreateHapgInput`](crate::operation::create_hapg::CreateHapgInput).
18    pub fn builder() -> crate::operation::create_hapg::builders::CreateHapgInputBuilder {
19        crate::operation::create_hapg::builders::CreateHapgInputBuilder::default()
20    }
21}
22
23/// A builder for [`CreateHapgInput`](crate::operation::create_hapg::CreateHapgInput).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct CreateHapgInputBuilder {
27    pub(crate) label: ::std::option::Option<::std::string::String>,
28}
29impl CreateHapgInputBuilder {
30    /// <p>The label of the new high-availability partition group.</p>
31    /// This field is required.
32    pub fn label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
33        self.label = ::std::option::Option::Some(input.into());
34        self
35    }
36    /// <p>The label of the new high-availability partition group.</p>
37    pub fn set_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
38        self.label = input;
39        self
40    }
41    /// <p>The label of the new high-availability partition group.</p>
42    pub fn get_label(&self) -> &::std::option::Option<::std::string::String> {
43        &self.label
44    }
45    /// Consumes the builder and constructs a [`CreateHapgInput`](crate::operation::create_hapg::CreateHapgInput).
46    pub fn build(self) -> ::std::result::Result<crate::operation::create_hapg::CreateHapgInput, ::aws_smithy_types::error::operation::BuildError> {
47        ::std::result::Result::Ok(crate::operation::create_hapg::CreateHapgInput { label: self.label })
48    }
49}