#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetSecurityPolicyInput {
pub r#type: ::std::option::Option<crate::types::SecurityPolicyType>,
pub name: ::std::option::Option<::std::string::String>,
}
impl GetSecurityPolicyInput {
pub fn r#type(&self) -> ::std::option::Option<&crate::types::SecurityPolicyType> {
self.r#type.as_ref()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
}
impl GetSecurityPolicyInput {
pub fn builder() -> crate::operation::get_security_policy::builders::GetSecurityPolicyInputBuilder {
crate::operation::get_security_policy::builders::GetSecurityPolicyInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetSecurityPolicyInputBuilder {
pub(crate) r#type: ::std::option::Option<crate::types::SecurityPolicyType>,
pub(crate) name: ::std::option::Option<::std::string::String>,
}
impl GetSecurityPolicyInputBuilder {
pub fn r#type(mut self, input: crate::types::SecurityPolicyType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
pub fn set_type(mut self, input: ::std::option::Option<crate::types::SecurityPolicyType>) -> Self {
self.r#type = input;
self
}
pub fn get_type(&self) -> &::std::option::Option<crate::types::SecurityPolicyType> {
&self.r#type
}
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::get_security_policy::GetSecurityPolicyInput, ::aws_smithy_http::operation::error::BuildError> {
::std::result::Result::Ok(crate::operation::get_security_policy::GetSecurityPolicyInput {
r#type: self.r#type,
name: self.name,
})
}
}