// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. ///

Returns information about an approval rule.

#[non_exhaustive] #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)] pub struct ApprovalRule { ///

The system-generated ID of the approval rule.

pub approval_rule_id: ::std::option::Option<::std::string::String>, ///

The name of the approval rule.

pub approval_rule_name: ::std::option::Option<::std::string::String>, ///

The content of the approval rule.

pub approval_rule_content: ::std::option::Option<::std::string::String>, ///

The SHA-256 hash signature for the content of the approval rule.

pub rule_content_sha256: ::std::option::Option<::std::string::String>, ///

The date the approval rule was most recently changed, in timestamp format.

pub last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>, ///

The date the approval rule was created, in timestamp format.

pub creation_date: ::std::option::Option<::aws_smithy_types::DateTime>, ///

The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule.

pub last_modified_user: ::std::option::Option<::std::string::String>, ///

The approval rule template used to create the rule.

pub origin_approval_rule_template: ::std::option::Option, } impl ApprovalRule { ///

The system-generated ID of the approval rule.

pub fn approval_rule_id(&self) -> ::std::option::Option<&str> { self.approval_rule_id.as_deref() } ///

The name of the approval rule.

pub fn approval_rule_name(&self) -> ::std::option::Option<&str> { self.approval_rule_name.as_deref() } ///

The content of the approval rule.

pub fn approval_rule_content(&self) -> ::std::option::Option<&str> { self.approval_rule_content.as_deref() } ///

The SHA-256 hash signature for the content of the approval rule.

pub fn rule_content_sha256(&self) -> ::std::option::Option<&str> { self.rule_content_sha256.as_deref() } ///

The date the approval rule was most recently changed, in timestamp format.

pub fn last_modified_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> { self.last_modified_date.as_ref() } ///

The date the approval rule was created, in timestamp format.

pub fn creation_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> { self.creation_date.as_ref() } ///

The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule.

pub fn last_modified_user(&self) -> ::std::option::Option<&str> { self.last_modified_user.as_deref() } ///

The approval rule template used to create the rule.

pub fn origin_approval_rule_template(&self) -> ::std::option::Option<&crate::types::OriginApprovalRuleTemplate> { self.origin_approval_rule_template.as_ref() } } impl ApprovalRule { /// Creates a new builder-style object to manufacture [`ApprovalRule`](crate::types::ApprovalRule). pub fn builder() -> crate::types::builders::ApprovalRuleBuilder { crate::types::builders::ApprovalRuleBuilder::default() } } /// A builder for [`ApprovalRule`](crate::types::ApprovalRule). #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)] #[non_exhaustive] pub struct ApprovalRuleBuilder { pub(crate) approval_rule_id: ::std::option::Option<::std::string::String>, pub(crate) approval_rule_name: ::std::option::Option<::std::string::String>, pub(crate) approval_rule_content: ::std::option::Option<::std::string::String>, pub(crate) rule_content_sha256: ::std::option::Option<::std::string::String>, pub(crate) last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>, pub(crate) creation_date: ::std::option::Option<::aws_smithy_types::DateTime>, pub(crate) last_modified_user: ::std::option::Option<::std::string::String>, pub(crate) origin_approval_rule_template: ::std::option::Option, } impl ApprovalRuleBuilder { ///

The system-generated ID of the approval rule.

pub fn approval_rule_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.approval_rule_id = ::std::option::Option::Some(input.into()); self } ///

The system-generated ID of the approval rule.

pub fn set_approval_rule_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.approval_rule_id = input; self } ///

The system-generated ID of the approval rule.

pub fn get_approval_rule_id(&self) -> &::std::option::Option<::std::string::String> { &self.approval_rule_id } ///

The name of the approval rule.

pub fn approval_rule_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.approval_rule_name = ::std::option::Option::Some(input.into()); self } ///

The name of the approval rule.

pub fn set_approval_rule_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.approval_rule_name = input; self } ///

The name of the approval rule.

pub fn get_approval_rule_name(&self) -> &::std::option::Option<::std::string::String> { &self.approval_rule_name } ///

The content of the approval rule.

pub fn approval_rule_content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.approval_rule_content = ::std::option::Option::Some(input.into()); self } ///

The content of the approval rule.

pub fn set_approval_rule_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.approval_rule_content = input; self } ///

The content of the approval rule.

pub fn get_approval_rule_content(&self) -> &::std::option::Option<::std::string::String> { &self.approval_rule_content } ///

The SHA-256 hash signature for the content of the approval rule.

pub fn rule_content_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.rule_content_sha256 = ::std::option::Option::Some(input.into()); self } ///

The SHA-256 hash signature for the content of the approval rule.

pub fn set_rule_content_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.rule_content_sha256 = input; self } ///

The SHA-256 hash signature for the content of the approval rule.

pub fn get_rule_content_sha256(&self) -> &::std::option::Option<::std::string::String> { &self.rule_content_sha256 } ///

The date the approval rule was most recently changed, in timestamp format.

pub fn last_modified_date(mut self, input: ::aws_smithy_types::DateTime) -> Self { self.last_modified_date = ::std::option::Option::Some(input); self } ///

The date the approval rule was most recently changed, in timestamp format.

pub fn set_last_modified_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { self.last_modified_date = input; self } ///

The date the approval rule was most recently changed, in timestamp format.

pub fn get_last_modified_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { &self.last_modified_date } ///

The date the approval rule was created, in timestamp format.

pub fn creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self { self.creation_date = ::std::option::Option::Some(input); self } ///

The date the approval rule was created, in timestamp format.

pub fn set_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self { self.creation_date = input; self } ///

The date the approval rule was created, in timestamp format.

pub fn get_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> { &self.creation_date } ///

The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule.

pub fn last_modified_user(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self { self.last_modified_user = ::std::option::Option::Some(input.into()); self } ///

The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule.

pub fn set_last_modified_user(mut self, input: ::std::option::Option<::std::string::String>) -> Self { self.last_modified_user = input; self } ///

The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule.

pub fn get_last_modified_user(&self) -> &::std::option::Option<::std::string::String> { &self.last_modified_user } ///

The approval rule template used to create the rule.

pub fn origin_approval_rule_template(mut self, input: crate::types::OriginApprovalRuleTemplate) -> Self { self.origin_approval_rule_template = ::std::option::Option::Some(input); self } ///

The approval rule template used to create the rule.

pub fn set_origin_approval_rule_template(mut self, input: ::std::option::Option) -> Self { self.origin_approval_rule_template = input; self } ///

The approval rule template used to create the rule.

pub fn get_origin_approval_rule_template(&self) -> &::std::option::Option { &self.origin_approval_rule_template } /// Consumes the builder and constructs a [`ApprovalRule`](crate::types::ApprovalRule). pub fn build(self) -> crate::types::ApprovalRule { crate::types::ApprovalRule { approval_rule_id: self.approval_rule_id, approval_rule_name: self.approval_rule_name, approval_rule_content: self.approval_rule_content, rule_content_sha256: self.rule_content_sha256, last_modified_date: self.last_modified_date, creation_date: self.creation_date, last_modified_user: self.last_modified_user, origin_approval_rule_template: self.origin_approval_rule_template, } } }