aws-sdk-rum 1.97.0

AWS SDK for CloudWatch RUM
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 DeleteResourcePolicyInput {
    /// <p>The app monitor that you want to remove the resource policy from.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Specifies a specific policy revision to delete. Provide a <code>PolicyRevisionId</code> to ensure an atomic delete operation. If the revision ID that you provide doesn't match the latest policy revision ID, the request will be rejected with an <code>InvalidPolicyRevisionIdException</code> error.</p>
    pub policy_revision_id: ::std::option::Option<::std::string::String>,
}
impl DeleteResourcePolicyInput {
    /// <p>The app monitor that you want to remove the resource policy from.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Specifies a specific policy revision to delete. Provide a <code>PolicyRevisionId</code> to ensure an atomic delete operation. If the revision ID that you provide doesn't match the latest policy revision ID, the request will be rejected with an <code>InvalidPolicyRevisionIdException</code> error.</p>
    pub fn policy_revision_id(&self) -> ::std::option::Option<&str> {
        self.policy_revision_id.as_deref()
    }
}
impl DeleteResourcePolicyInput {
    /// Creates a new builder-style object to manufacture [`DeleteResourcePolicyInput`](crate::operation::delete_resource_policy::DeleteResourcePolicyInput).
    pub fn builder() -> crate::operation::delete_resource_policy::builders::DeleteResourcePolicyInputBuilder {
        crate::operation::delete_resource_policy::builders::DeleteResourcePolicyInputBuilder::default()
    }
}

/// A builder for [`DeleteResourcePolicyInput`](crate::operation::delete_resource_policy::DeleteResourcePolicyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteResourcePolicyInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) policy_revision_id: ::std::option::Option<::std::string::String>,
}
impl DeleteResourcePolicyInputBuilder {
    /// <p>The app monitor that you want to remove the resource policy from.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The app monitor that you want to remove the resource policy from.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The app monitor that you want to remove the resource policy from.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Specifies a specific policy revision to delete. Provide a <code>PolicyRevisionId</code> to ensure an atomic delete operation. If the revision ID that you provide doesn't match the latest policy revision ID, the request will be rejected with an <code>InvalidPolicyRevisionIdException</code> error.</p>
    pub fn policy_revision_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.policy_revision_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies a specific policy revision to delete. Provide a <code>PolicyRevisionId</code> to ensure an atomic delete operation. If the revision ID that you provide doesn't match the latest policy revision ID, the request will be rejected with an <code>InvalidPolicyRevisionIdException</code> error.</p>
    pub fn set_policy_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.policy_revision_id = input;
        self
    }
    /// <p>Specifies a specific policy revision to delete. Provide a <code>PolicyRevisionId</code> to ensure an atomic delete operation. If the revision ID that you provide doesn't match the latest policy revision ID, the request will be rejected with an <code>InvalidPolicyRevisionIdException</code> error.</p>
    pub fn get_policy_revision_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.policy_revision_id
    }
    /// Consumes the builder and constructs a [`DeleteResourcePolicyInput`](crate::operation::delete_resource_policy::DeleteResourcePolicyInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_resource_policy::DeleteResourcePolicyInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::delete_resource_policy::DeleteResourcePolicyInput {
            name: self.name,
            policy_revision_id: self.policy_revision_id,
        })
    }
}