aws_sdk_cloudhsm/operation/create_hapg/
_create_hapg_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateHapgInput {
7 pub label: ::std::option::Option<::std::string::String>,
9}
10impl CreateHapgInput {
11 pub fn label(&self) -> ::std::option::Option<&str> {
13 self.label.as_deref()
14 }
15}
16impl CreateHapgInput {
17 pub fn builder() -> crate::operation::create_hapg::builders::CreateHapgInputBuilder {
19 crate::operation::create_hapg::builders::CreateHapgInputBuilder::default()
20 }
21}
22
23#[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 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 pub fn set_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
38 self.label = input;
39 self
40 }
41 pub fn get_label(&self) -> &::std::option::Option<::std::string::String> {
43 &self.label
44 }
45 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}