#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeProtectionOutput {
pub protection: ::std::option::Option<crate::types::Protection>,
_request_id: Option<String>,
}
impl DescribeProtectionOutput {
pub fn protection(&self) -> ::std::option::Option<&crate::types::Protection> {
self.protection.as_ref()
}
}
impl ::aws_types::request_id::RequestId for DescribeProtectionOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeProtectionOutput {
pub fn builder() -> crate::operation::describe_protection::builders::DescribeProtectionOutputBuilder {
crate::operation::describe_protection::builders::DescribeProtectionOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DescribeProtectionOutputBuilder {
pub(crate) protection: ::std::option::Option<crate::types::Protection>,
_request_id: Option<String>,
}
impl DescribeProtectionOutputBuilder {
pub fn protection(mut self, input: crate::types::Protection) -> Self {
self.protection = ::std::option::Option::Some(input);
self
}
pub fn set_protection(mut self, input: ::std::option::Option<crate::types::Protection>) -> Self {
self.protection = input;
self
}
pub fn get_protection(&self) -> &::std::option::Option<crate::types::Protection> {
&self.protection
}
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_protection::DescribeProtectionOutput {
crate::operation::describe_protection::DescribeProtectionOutput {
protection: self.protection,
_request_id: self._request_id,
}
}
}