aws-sdk-oam 1.64.0

AWS SDK for CloudWatch Observability Access Manager
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 GetSinkPolicyInput {
    /// <p>The ARN of the sink to retrieve the policy of.</p>
    pub sink_identifier: ::std::option::Option<::std::string::String>,
}
impl GetSinkPolicyInput {
    /// <p>The ARN of the sink to retrieve the policy of.</p>
    pub fn sink_identifier(&self) -> ::std::option::Option<&str> {
        self.sink_identifier.as_deref()
    }
}
impl GetSinkPolicyInput {
    /// Creates a new builder-style object to manufacture [`GetSinkPolicyInput`](crate::operation::get_sink_policy::GetSinkPolicyInput).
    pub fn builder() -> crate::operation::get_sink_policy::builders::GetSinkPolicyInputBuilder {
        crate::operation::get_sink_policy::builders::GetSinkPolicyInputBuilder::default()
    }
}

/// A builder for [`GetSinkPolicyInput`](crate::operation::get_sink_policy::GetSinkPolicyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetSinkPolicyInputBuilder {
    pub(crate) sink_identifier: ::std::option::Option<::std::string::String>,
}
impl GetSinkPolicyInputBuilder {
    /// <p>The ARN of the sink to retrieve the policy of.</p>
    /// This field is required.
    pub fn sink_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.sink_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the sink to retrieve the policy of.</p>
    pub fn set_sink_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.sink_identifier = input;
        self
    }
    /// <p>The ARN of the sink to retrieve the policy of.</p>
    pub fn get_sink_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.sink_identifier
    }
    /// Consumes the builder and constructs a [`GetSinkPolicyInput`](crate::operation::get_sink_policy::GetSinkPolicyInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_sink_policy::GetSinkPolicyInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_sink_policy::GetSinkPolicyInput {
            sink_identifier: self.sink_identifier,
        })
    }
}