aws-sdk-imagebuilder 1.111.0

AWS SDK for EC2 Image Builder
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 GetComponentPolicyInput {
    /// <p>The Amazon Resource Name (ARN) of the component whose policy you want to retrieve.</p>
    pub component_arn: ::std::option::Option<::std::string::String>,
}
impl GetComponentPolicyInput {
    /// <p>The Amazon Resource Name (ARN) of the component whose policy you want to retrieve.</p>
    pub fn component_arn(&self) -> ::std::option::Option<&str> {
        self.component_arn.as_deref()
    }
}
impl GetComponentPolicyInput {
    /// Creates a new builder-style object to manufacture [`GetComponentPolicyInput`](crate::operation::get_component_policy::GetComponentPolicyInput).
    pub fn builder() -> crate::operation::get_component_policy::builders::GetComponentPolicyInputBuilder {
        crate::operation::get_component_policy::builders::GetComponentPolicyInputBuilder::default()
    }
}

/// A builder for [`GetComponentPolicyInput`](crate::operation::get_component_policy::GetComponentPolicyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetComponentPolicyInputBuilder {
    pub(crate) component_arn: ::std::option::Option<::std::string::String>,
}
impl GetComponentPolicyInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the component whose policy you want to retrieve.</p>
    /// This field is required.
    pub fn component_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.component_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the component whose policy you want to retrieve.</p>
    pub fn set_component_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.component_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the component whose policy you want to retrieve.</p>
    pub fn get_component_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.component_arn
    }
    /// Consumes the builder and constructs a [`GetComponentPolicyInput`](crate::operation::get_component_policy::GetComponentPolicyInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_component_policy::GetComponentPolicyInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_component_policy::GetComponentPolicyInput {
            component_arn: self.component_arn,
        })
    }
}