aws_sdk_vpclattice/operation/create_rule/
_create_rule_output.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateRuleOutput {
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 r#match: ::std::option::Option<crate::types::RuleMatch>,
pub priority: ::std::option::Option<i32>,
pub action: ::std::option::Option<crate::types::RuleAction>,
_request_id: Option<String>,
}
impl CreateRuleOutput {
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 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()
}
}
impl ::aws_types::request_id::RequestId for CreateRuleOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateRuleOutput {
pub fn builder() -> crate::operation::create_rule::builders::CreateRuleOutputBuilder {
crate::operation::create_rule::builders::CreateRuleOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateRuleOutputBuilder {
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) r#match: ::std::option::Option<crate::types::RuleMatch>,
pub(crate) priority: ::std::option::Option<i32>,
pub(crate) action: ::std::option::Option<crate::types::RuleAction>,
_request_id: Option<String>,
}
impl CreateRuleOutputBuilder {
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 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(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::create_rule::CreateRuleOutput {
crate::operation::create_rule::CreateRuleOutput {
arn: self.arn,
id: self.id,
name: self.name,
r#match: self.r#match,
priority: self.priority,
action: self.action,
_request_id: self._request_id,
}
}
}