#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeHapgOutput {
pub hapg_arn: ::std::option::Option<::std::string::String>,
pub hapg_serial: ::std::option::Option<::std::string::String>,
pub hsms_last_action_failed: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub hsms_pending_deletion: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub hsms_pending_registration: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub label: ::std::option::Option<::std::string::String>,
pub last_modified_timestamp: ::std::option::Option<::std::string::String>,
pub partition_serial_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub state: ::std::option::Option<crate::types::CloudHsmObjectState>,
_request_id: Option<String>,
}
impl DescribeHapgOutput {
pub fn hapg_arn(&self) -> ::std::option::Option<&str> {
self.hapg_arn.as_deref()
}
pub fn hapg_serial(&self) -> ::std::option::Option<&str> {
self.hapg_serial.as_deref()
}
pub fn hsms_last_action_failed(&self) -> &[::std::string::String] {
self.hsms_last_action_failed.as_deref().unwrap_or_default()
}
pub fn hsms_pending_deletion(&self) -> &[::std::string::String] {
self.hsms_pending_deletion.as_deref().unwrap_or_default()
}
pub fn hsms_pending_registration(&self) -> &[::std::string::String] {
self.hsms_pending_registration.as_deref().unwrap_or_default()
}
pub fn label(&self) -> ::std::option::Option<&str> {
self.label.as_deref()
}
pub fn last_modified_timestamp(&self) -> ::std::option::Option<&str> {
self.last_modified_timestamp.as_deref()
}
pub fn partition_serial_list(&self) -> &[::std::string::String] {
self.partition_serial_list.as_deref().unwrap_or_default()
}
pub fn state(&self) -> ::std::option::Option<&crate::types::CloudHsmObjectState> {
self.state.as_ref()
}
}
impl ::aws_types::request_id::RequestId for DescribeHapgOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeHapgOutput {
pub fn builder() -> crate::operation::describe_hapg::builders::DescribeHapgOutputBuilder {
crate::operation::describe_hapg::builders::DescribeHapgOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DescribeHapgOutputBuilder {
pub(crate) hapg_arn: ::std::option::Option<::std::string::String>,
pub(crate) hapg_serial: ::std::option::Option<::std::string::String>,
pub(crate) hsms_last_action_failed: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) hsms_pending_deletion: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) hsms_pending_registration: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) label: ::std::option::Option<::std::string::String>,
pub(crate) last_modified_timestamp: ::std::option::Option<::std::string::String>,
pub(crate) partition_serial_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) state: ::std::option::Option<crate::types::CloudHsmObjectState>,
_request_id: Option<String>,
}
impl DescribeHapgOutputBuilder {
pub fn hapg_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.hapg_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_hapg_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.hapg_arn = input;
self
}
pub fn get_hapg_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.hapg_arn
}
pub fn hapg_serial(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.hapg_serial = ::std::option::Option::Some(input.into());
self
}
pub fn set_hapg_serial(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.hapg_serial = input;
self
}
pub fn get_hapg_serial(&self) -> &::std::option::Option<::std::string::String> {
&self.hapg_serial
}
pub fn hsms_last_action_failed(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.hsms_last_action_failed.unwrap_or_default();
v.push(input.into());
self.hsms_last_action_failed = ::std::option::Option::Some(v);
self
}
pub fn set_hsms_last_action_failed(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.hsms_last_action_failed = input;
self
}
pub fn get_hsms_last_action_failed(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.hsms_last_action_failed
}
pub fn hsms_pending_deletion(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.hsms_pending_deletion.unwrap_or_default();
v.push(input.into());
self.hsms_pending_deletion = ::std::option::Option::Some(v);
self
}
pub fn set_hsms_pending_deletion(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.hsms_pending_deletion = input;
self
}
pub fn get_hsms_pending_deletion(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.hsms_pending_deletion
}
pub fn hsms_pending_registration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.hsms_pending_registration.unwrap_or_default();
v.push(input.into());
self.hsms_pending_registration = ::std::option::Option::Some(v);
self
}
pub fn set_hsms_pending_registration(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.hsms_pending_registration = input;
self
}
pub fn get_hsms_pending_registration(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.hsms_pending_registration
}
pub fn label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.label = ::std::option::Option::Some(input.into());
self
}
pub fn set_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.label = input;
self
}
pub fn get_label(&self) -> &::std::option::Option<::std::string::String> {
&self.label
}
pub fn last_modified_timestamp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.last_modified_timestamp = ::std::option::Option::Some(input.into());
self
}
pub fn set_last_modified_timestamp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.last_modified_timestamp = input;
self
}
pub fn get_last_modified_timestamp(&self) -> &::std::option::Option<::std::string::String> {
&self.last_modified_timestamp
}
pub fn partition_serial_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.partition_serial_list.unwrap_or_default();
v.push(input.into());
self.partition_serial_list = ::std::option::Option::Some(v);
self
}
pub fn set_partition_serial_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.partition_serial_list = input;
self
}
pub fn get_partition_serial_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.partition_serial_list
}
pub fn state(mut self, input: crate::types::CloudHsmObjectState) -> Self {
self.state = ::std::option::Option::Some(input);
self
}
pub fn set_state(mut self, input: ::std::option::Option<crate::types::CloudHsmObjectState>) -> Self {
self.state = input;
self
}
pub fn get_state(&self) -> &::std::option::Option<crate::types::CloudHsmObjectState> {
&self.state
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> crate::operation::describe_hapg::DescribeHapgOutput {
crate::operation::describe_hapg::DescribeHapgOutput {
hapg_arn: self.hapg_arn,
hapg_serial: self.hapg_serial,
hsms_last_action_failed: self.hsms_last_action_failed,
hsms_pending_deletion: self.hsms_pending_deletion,
hsms_pending_registration: self.hsms_pending_registration,
label: self.label,
last_modified_timestamp: self.last_modified_timestamp,
partition_serial_list: self.partition_serial_list,
state: self.state,
_request_id: self._request_id,
}
}
}