aws_sdk_vpclattice/operation/get_rule/
_get_rule_output.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetRuleOutput {
pub arn: ::std::option::Option<::std::string::String>,
pub id: ::std::option::Option<::std::string::String>,
pub name: ::std::option::Option<::std::string::String>,
pub is_default: ::std::option::Option<bool>,
pub r#match: ::std::option::Option<crate::types::RuleMatch>,
pub priority: ::std::option::Option<i32>,
pub action: ::std::option::Option<crate::types::RuleAction>,
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetRuleOutput {
pub fn arn(&self) -> ::std::option::Option<&str> {
self.arn.as_deref()
}
pub fn id(&self) -> ::std::option::Option<&str> {
self.id.as_deref()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn is_default(&self) -> ::std::option::Option<bool> {
self.is_default
}
pub fn r#match(&self) -> ::std::option::Option<&crate::types::RuleMatch> {
self.r#match.as_ref()
}
pub fn priority(&self) -> ::std::option::Option<i32> {
self.priority
}
pub fn action(&self) -> ::std::option::Option<&crate::types::RuleAction> {
self.action.as_ref()
}
pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn last_updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_updated_at.as_ref()
}
}
impl ::aws_types::request_id::RequestId for GetRuleOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetRuleOutput {
pub fn builder() -> crate::operation::get_rule::builders::GetRuleOutputBuilder {
crate::operation::get_rule::builders::GetRuleOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetRuleOutputBuilder {
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) is_default: ::std::option::Option<bool>,
pub(crate) r#match: ::std::option::Option<crate::types::RuleMatch>,
pub(crate) priority: ::std::option::Option<i32>,
pub(crate) action: ::std::option::Option<crate::types::RuleAction>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetRuleOutputBuilder {
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input;
self
}
pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
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 is_default(mut self, input: bool) -> Self {
self.is_default = ::std::option::Option::Some(input);
self
}
pub fn set_is_default(mut self, input: ::std::option::Option<bool>) -> Self {
self.is_default = input;
self
}
pub fn get_is_default(&self) -> &::std::option::Option<bool> {
&self.is_default
}
pub fn r#match(mut self, input: crate::types::RuleMatch) -> Self {
self.r#match = ::std::option::Option::Some(input);
self
}
pub fn set_match(mut self, input: ::std::option::Option<crate::types::RuleMatch>) -> Self {
self.r#match = input;
self
}
pub fn get_match(&self) -> &::std::option::Option<crate::types::RuleMatch> {
&self.r#match
}
pub fn priority(mut self, input: i32) -> Self {
self.priority = ::std::option::Option::Some(input);
self
}
pub fn set_priority(mut self, input: ::std::option::Option<i32>) -> Self {
self.priority = input;
self
}
pub fn get_priority(&self) -> &::std::option::Option<i32> {
&self.priority
}
pub fn action(mut self, input: crate::types::RuleAction) -> Self {
self.action = ::std::option::Option::Some(input);
self
}
pub fn set_action(mut self, input: ::std::option::Option<crate::types::RuleAction>) -> Self {
self.action = input;
self
}
pub fn get_action(&self) -> &::std::option::Option<crate::types::RuleAction> {
&self.action
}
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
pub fn last_updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_updated_at = ::std::option::Option::Some(input);
self
}
pub fn set_last_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_updated_at = input;
self
}
pub fn get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_updated_at
}
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::get_rule::GetRuleOutput {
crate::operation::get_rule::GetRuleOutput {
arn: self.arn,
id: self.id,
name: self.name,
is_default: self.is_default,
r#match: self.r#match,
priority: self.priority,
action: self.action,
created_at: self.created_at,
last_updated_at: self.last_updated_at,
_request_id: self._request_id,
}
}
}