aws-sdk-backupexternal 1.0.0

AWS SDK for AWS Backup External
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)]
pub struct GetAgentDownloadOutput {
    /// The URL to download the agent installer.
    pub agent_download_url: ::std::string::String,
    /// The version of the agent available for download.
    pub agent_version: ::std::string::String,
    /// Public URL of the certificate that signed the installer.
    pub signing_certificate_download_url: ::std::option::Option<::std::string::String>,
    /// Presigned URL for this appliance's agent certificate bundle, passed to the agent installer. Valid for 15 minutes.
    pub agent_certificate_bundle_download_url: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetAgentDownloadOutput {
    /// The URL to download the agent installer.
    pub fn agent_download_url(&self) -> &str {
        use std::ops::Deref;
        self.agent_download_url.deref()
    }
    /// The version of the agent available for download.
    pub fn agent_version(&self) -> &str {
        use std::ops::Deref;
        self.agent_version.deref()
    }
    /// Public URL of the certificate that signed the installer.
    pub fn signing_certificate_download_url(&self) -> ::std::option::Option<&str> {
        self.signing_certificate_download_url.as_deref()
    }
    /// Presigned URL for this appliance's agent certificate bundle, passed to the agent installer. Valid for 15 minutes.
    pub fn agent_certificate_bundle_download_url(&self) -> ::std::option::Option<&str> {
        self.agent_certificate_bundle_download_url.as_deref()
    }
}
impl ::std::fmt::Debug for GetAgentDownloadOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetAgentDownloadOutput");
        formatter.field("agent_download_url", &"*** Sensitive Data Redacted ***");
        formatter.field("agent_version", &self.agent_version);
        formatter.field("signing_certificate_download_url", &"*** Sensitive Data Redacted ***");
        formatter.field("agent_certificate_bundle_download_url", &"*** Sensitive Data Redacted ***");
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl ::aws_types::request_id::RequestId for GetAgentDownloadOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetAgentDownloadOutput {
    /// Creates a new builder-style object to manufacture [`GetAgentDownloadOutput`](crate::operation::get_agent_download::GetAgentDownloadOutput).
    pub fn builder() -> crate::operation::get_agent_download::builders::GetAgentDownloadOutputBuilder {
        crate::operation::get_agent_download::builders::GetAgentDownloadOutputBuilder::default()
    }
}

/// A builder for [`GetAgentDownloadOutput`](crate::operation::get_agent_download::GetAgentDownloadOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetAgentDownloadOutputBuilder {
    pub(crate) agent_download_url: ::std::option::Option<::std::string::String>,
    pub(crate) agent_version: ::std::option::Option<::std::string::String>,
    pub(crate) signing_certificate_download_url: ::std::option::Option<::std::string::String>,
    pub(crate) agent_certificate_bundle_download_url: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetAgentDownloadOutputBuilder {
    /// The URL to download the agent installer.
    /// This field is required.
    pub fn agent_download_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_download_url = ::std::option::Option::Some(input.into());
        self
    }
    /// The URL to download the agent installer.
    pub fn set_agent_download_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_download_url = input;
        self
    }
    /// The URL to download the agent installer.
    pub fn get_agent_download_url(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_download_url
    }
    /// The version of the agent available for download.
    /// This field is required.
    pub fn agent_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_version = ::std::option::Option::Some(input.into());
        self
    }
    /// The version of the agent available for download.
    pub fn set_agent_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_version = input;
        self
    }
    /// The version of the agent available for download.
    pub fn get_agent_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_version
    }
    /// Public URL of the certificate that signed the installer.
    pub fn signing_certificate_download_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.signing_certificate_download_url = ::std::option::Option::Some(input.into());
        self
    }
    /// Public URL of the certificate that signed the installer.
    pub fn set_signing_certificate_download_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.signing_certificate_download_url = input;
        self
    }
    /// Public URL of the certificate that signed the installer.
    pub fn get_signing_certificate_download_url(&self) -> &::std::option::Option<::std::string::String> {
        &self.signing_certificate_download_url
    }
    /// Presigned URL for this appliance's agent certificate bundle, passed to the agent installer. Valid for 15 minutes.
    pub fn agent_certificate_bundle_download_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_certificate_bundle_download_url = ::std::option::Option::Some(input.into());
        self
    }
    /// Presigned URL for this appliance's agent certificate bundle, passed to the agent installer. Valid for 15 minutes.
    pub fn set_agent_certificate_bundle_download_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_certificate_bundle_download_url = input;
        self
    }
    /// Presigned URL for this appliance's agent certificate bundle, passed to the agent installer. Valid for 15 minutes.
    pub fn get_agent_certificate_bundle_download_url(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_certificate_bundle_download_url
    }
    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 [`GetAgentDownloadOutput`](crate::operation::get_agent_download::GetAgentDownloadOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`agent_download_url`](crate::operation::get_agent_download::builders::GetAgentDownloadOutputBuilder::agent_download_url)
    /// - [`agent_version`](crate::operation::get_agent_download::builders::GetAgentDownloadOutputBuilder::agent_version)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_agent_download::GetAgentDownloadOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_agent_download::GetAgentDownloadOutput {
            agent_download_url: self.agent_download_url.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "agent_download_url",
                    "agent_download_url was not specified but it is required when building GetAgentDownloadOutput",
                )
            })?,
            agent_version: self.agent_version.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "agent_version",
                    "agent_version was not specified but it is required when building GetAgentDownloadOutput",
                )
            })?,
            signing_certificate_download_url: self.signing_certificate_download_url,
            agent_certificate_bundle_download_url: self.agent_certificate_bundle_download_url,
            _request_id: self._request_id,
        })
    }
}
impl ::std::fmt::Debug for GetAgentDownloadOutputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetAgentDownloadOutputBuilder");
        formatter.field("agent_download_url", &"*** Sensitive Data Redacted ***");
        formatter.field("agent_version", &self.agent_version);
        formatter.field("signing_certificate_download_url", &"*** Sensitive Data Redacted ***");
        formatter.field("agent_certificate_bundle_download_url", &"*** Sensitive Data Redacted ***");
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}