aws-sdk-cloudwatchlogs 1.82.0

AWS SDK for Amazon CloudWatch Logs
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteAccountPolicyInput {
    /// <p>The name of the policy to delete.</p>
    pub policy_name: ::std::option::Option<::std::string::String>,
    /// <p>The type of policy to delete.</p>
    pub policy_type: ::std::option::Option<crate::types::PolicyType>,
}
impl DeleteAccountPolicyInput {
    /// <p>The name of the policy to delete.</p>
    pub fn policy_name(&self) -> ::std::option::Option<&str> {
        self.policy_name.as_deref()
    }
    /// <p>The type of policy to delete.</p>
    pub fn policy_type(&self) -> ::std::option::Option<&crate::types::PolicyType> {
        self.policy_type.as_ref()
    }
}
impl DeleteAccountPolicyInput {
    /// Creates a new builder-style object to manufacture [`DeleteAccountPolicyInput`](crate::operation::delete_account_policy::DeleteAccountPolicyInput).
    pub fn builder() -> crate::operation::delete_account_policy::builders::DeleteAccountPolicyInputBuilder {
        crate::operation::delete_account_policy::builders::DeleteAccountPolicyInputBuilder::default()
    }
}

/// A builder for [`DeleteAccountPolicyInput`](crate::operation::delete_account_policy::DeleteAccountPolicyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteAccountPolicyInputBuilder {
    pub(crate) policy_name: ::std::option::Option<::std::string::String>,
    pub(crate) policy_type: ::std::option::Option<crate::types::PolicyType>,
}
impl DeleteAccountPolicyInputBuilder {
    /// <p>The name of the policy to delete.</p>
    /// This field is required.
    pub fn policy_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.policy_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the policy to delete.</p>
    pub fn set_policy_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.policy_name = input;
        self
    }
    /// <p>The name of the policy to delete.</p>
    pub fn get_policy_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.policy_name
    }
    /// <p>The type of policy to delete.</p>
    /// This field is required.
    pub fn policy_type(mut self, input: crate::types::PolicyType) -> Self {
        self.policy_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of policy to delete.</p>
    pub fn set_policy_type(mut self, input: ::std::option::Option<crate::types::PolicyType>) -> Self {
        self.policy_type = input;
        self
    }
    /// <p>The type of policy to delete.</p>
    pub fn get_policy_type(&self) -> &::std::option::Option<crate::types::PolicyType> {
        &self.policy_type
    }
    /// Consumes the builder and constructs a [`DeleteAccountPolicyInput`](crate::operation::delete_account_policy::DeleteAccountPolicyInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_account_policy::DeleteAccountPolicyInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::delete_account_policy::DeleteAccountPolicyInput {
            policy_name: self.policy_name,
            policy_type: self.policy_type,
        })
    }
}