aws-sdk-iam 1.109.0

AWS SDK for AWS Identity and Access Management
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains the response to a successful <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_UploadServerCertificate.html">UploadServerCertificate</a> request.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UploadServerCertificateOutput {
    /// <p>The meta information of the uploaded server certificate without its certificate body, certificate chain, and private key.</p>
    pub server_certificate_metadata: ::std::option::Option<crate::types::ServerCertificateMetadata>,
    /// <p>A list of tags that are attached to the new IAM server certificate. The returned list of tags is sorted by tag key. For more information about tagging, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html">Tagging IAM resources</a> in the <i>IAM User Guide</i>.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    _request_id: Option<String>,
}
impl UploadServerCertificateOutput {
    /// <p>The meta information of the uploaded server certificate without its certificate body, certificate chain, and private key.</p>
    pub fn server_certificate_metadata(&self) -> ::std::option::Option<&crate::types::ServerCertificateMetadata> {
        self.server_certificate_metadata.as_ref()
    }
    /// <p>A list of tags that are attached to the new IAM server certificate. The returned list of tags is sorted by tag key. For more information about tagging, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html">Tagging IAM resources</a> in the <i>IAM User Guide</i>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for UploadServerCertificateOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UploadServerCertificateOutput {
    /// Creates a new builder-style object to manufacture [`UploadServerCertificateOutput`](crate::operation::upload_server_certificate::UploadServerCertificateOutput).
    pub fn builder() -> crate::operation::upload_server_certificate::builders::UploadServerCertificateOutputBuilder {
        crate::operation::upload_server_certificate::builders::UploadServerCertificateOutputBuilder::default()
    }
}

/// A builder for [`UploadServerCertificateOutput`](crate::operation::upload_server_certificate::UploadServerCertificateOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UploadServerCertificateOutputBuilder {
    pub(crate) server_certificate_metadata: ::std::option::Option<crate::types::ServerCertificateMetadata>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    _request_id: Option<String>,
}
impl UploadServerCertificateOutputBuilder {
    /// <p>The meta information of the uploaded server certificate without its certificate body, certificate chain, and private key.</p>
    pub fn server_certificate_metadata(mut self, input: crate::types::ServerCertificateMetadata) -> Self {
        self.server_certificate_metadata = ::std::option::Option::Some(input);
        self
    }
    /// <p>The meta information of the uploaded server certificate without its certificate body, certificate chain, and private key.</p>
    pub fn set_server_certificate_metadata(mut self, input: ::std::option::Option<crate::types::ServerCertificateMetadata>) -> Self {
        self.server_certificate_metadata = input;
        self
    }
    /// <p>The meta information of the uploaded server certificate without its certificate body, certificate chain, and private key.</p>
    pub fn get_server_certificate_metadata(&self) -> &::std::option::Option<crate::types::ServerCertificateMetadata> {
        &self.server_certificate_metadata
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A list of tags that are attached to the new IAM server certificate. The returned list of tags is sorted by tag key. For more information about tagging, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html">Tagging IAM resources</a> in the <i>IAM User Guide</i>.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of tags that are attached to the new IAM server certificate. The returned list of tags is sorted by tag key. For more information about tagging, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html">Tagging IAM resources</a> in the <i>IAM User Guide</i>.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>A list of tags that are attached to the new IAM server certificate. The returned list of tags is sorted by tag key. For more information about tagging, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html">Tagging IAM resources</a> in the <i>IAM User Guide</i>.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    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 [`UploadServerCertificateOutput`](crate::operation::upload_server_certificate::UploadServerCertificateOutput).
    pub fn build(self) -> crate::operation::upload_server_certificate::UploadServerCertificateOutput {
        crate::operation::upload_server_certificate::UploadServerCertificateOutput {
            server_certificate_metadata: self.server_certificate_metadata,
            tags: self.tags,
            _request_id: self._request_id,
        }
    }
}