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 GetComponentPolicyOutput {
    /// <p>The request ID that uniquely identifies this request.</p>
    pub request_id: ::std::option::Option<::std::string::String>,
    /// <p>The component policy.</p>
    pub policy: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetComponentPolicyOutput {
    /// <p>The request ID that uniquely identifies this request.</p>
    pub fn request_id(&self) -> ::std::option::Option<&str> {
        self.request_id.as_deref()
    }
    /// <p>The component policy.</p>
    pub fn policy(&self) -> ::std::option::Option<&str> {
        self.policy.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for GetComponentPolicyOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetComponentPolicyOutput {
    /// Creates a new builder-style object to manufacture [`GetComponentPolicyOutput`](crate::operation::get_component_policy::GetComponentPolicyOutput).
    pub fn builder() -> crate::operation::get_component_policy::builders::GetComponentPolicyOutputBuilder {
        crate::operation::get_component_policy::builders::GetComponentPolicyOutputBuilder::default()
    }
}

/// A builder for [`GetComponentPolicyOutput`](crate::operation::get_component_policy::GetComponentPolicyOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetComponentPolicyOutputBuilder {
    pub(crate) request_id: ::std::option::Option<::std::string::String>,
    pub(crate) policy: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetComponentPolicyOutputBuilder {
    /// <p>The request ID that uniquely identifies this request.</p>
    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.request_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The request ID that uniquely identifies this request.</p>
    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.request_id = input;
        self
    }
    /// <p>The request ID that uniquely identifies this request.</p>
    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.request_id
    }
    /// <p>The component policy.</p>
    pub fn policy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.policy = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The component policy.</p>
    pub fn set_policy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.policy = input;
        self
    }
    /// <p>The component policy.</p>
    pub fn get_policy(&self) -> &::std::option::Option<::std::string::String> {
        &self.policy
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetComponentPolicyOutput`](crate::operation::get_component_policy::GetComponentPolicyOutput).
    pub fn build(self) -> crate::operation::get_component_policy::GetComponentPolicyOutput {
        crate::operation::get_component_policy::GetComponentPolicyOutput {
            request_id: self.request_id,
            policy: self.policy,
            _request_id: self._request_id,
        }
    }
}