aws-sdk-oam 1.95.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 GetSinkInput {
    /// <p>The ARN of the sink to retrieve information for.</p>
    pub identifier: ::std::option::Option<::std::string::String>,
    /// <p>Specifies whether to include the tags associated with the sink in the response. When <code>IncludeTags</code> is set to <code>true</code> and the caller has the required permission, <code>oam:ListTagsForResource</code>, the API will return the tags for the specified resource. If the caller doesn't have the required permission, <code>oam:ListTagsForResource</code>, the API will raise an exception.</p>
    /// <p>The default value is <code>false</code>.</p>
    pub include_tags: ::std::option::Option<bool>,
}
impl GetSinkInput {
    /// <p>The ARN of the sink to retrieve information for.</p>
    pub fn identifier(&self) -> ::std::option::Option<&str> {
        self.identifier.as_deref()
    }
    /// <p>Specifies whether to include the tags associated with the sink in the response. When <code>IncludeTags</code> is set to <code>true</code> and the caller has the required permission, <code>oam:ListTagsForResource</code>, the API will return the tags for the specified resource. If the caller doesn't have the required permission, <code>oam:ListTagsForResource</code>, the API will raise an exception.</p>
    /// <p>The default value is <code>false</code>.</p>
    pub fn include_tags(&self) -> ::std::option::Option<bool> {
        self.include_tags
    }
}
impl GetSinkInput {
    /// Creates a new builder-style object to manufacture [`GetSinkInput`](crate::operation::get_sink::GetSinkInput).
    pub fn builder() -> crate::operation::get_sink::builders::GetSinkInputBuilder {
        crate::operation::get_sink::builders::GetSinkInputBuilder::default()
    }
}

/// A builder for [`GetSinkInput`](crate::operation::get_sink::GetSinkInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetSinkInputBuilder {
    pub(crate) identifier: ::std::option::Option<::std::string::String>,
    pub(crate) include_tags: ::std::option::Option<bool>,
}
impl GetSinkInputBuilder {
    /// <p>The ARN of the sink to retrieve information for.</p>
    /// This field is required.
    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the sink to retrieve information for.</p>
    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.identifier = input;
        self
    }
    /// <p>The ARN of the sink to retrieve information for.</p>
    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.identifier
    }
    /// <p>Specifies whether to include the tags associated with the sink in the response. When <code>IncludeTags</code> is set to <code>true</code> and the caller has the required permission, <code>oam:ListTagsForResource</code>, the API will return the tags for the specified resource. If the caller doesn't have the required permission, <code>oam:ListTagsForResource</code>, the API will raise an exception.</p>
    /// <p>The default value is <code>false</code>.</p>
    pub fn include_tags(mut self, input: bool) -> Self {
        self.include_tags = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether to include the tags associated with the sink in the response. When <code>IncludeTags</code> is set to <code>true</code> and the caller has the required permission, <code>oam:ListTagsForResource</code>, the API will return the tags for the specified resource. If the caller doesn't have the required permission, <code>oam:ListTagsForResource</code>, the API will raise an exception.</p>
    /// <p>The default value is <code>false</code>.</p>
    pub fn set_include_tags(mut self, input: ::std::option::Option<bool>) -> Self {
        self.include_tags = input;
        self
    }
    /// <p>Specifies whether to include the tags associated with the sink in the response. When <code>IncludeTags</code> is set to <code>true</code> and the caller has the required permission, <code>oam:ListTagsForResource</code>, the API will return the tags for the specified resource. If the caller doesn't have the required permission, <code>oam:ListTagsForResource</code>, the API will raise an exception.</p>
    /// <p>The default value is <code>false</code>.</p>
    pub fn get_include_tags(&self) -> &::std::option::Option<bool> {
        &self.include_tags
    }
    /// Consumes the builder and constructs a [`GetSinkInput`](crate::operation::get_sink::GetSinkInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_sink::GetSinkInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_sink::GetSinkInput {
            identifier: self.identifier,
            include_tags: self.include_tags,
        })
    }
}