aws-sdk-cloudextensions 1.0.0

AWS SDK for AWS Cloud Extensions
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// A released, immutable extension package. Represents a versioned unit of compute that can be deployed to profiles via profile entries. Each extension version is a published snapshot of an extension draft.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetExtensionOutput {
    /// The extension's id, in the form namespace:name, such as aws:secretsmanager.
    pub id: ::std::string::String,
    /// The extension's display name.
    pub display_name: ::std::string::String,
    /// The Amazon Resource Name (ARN) of the extension.
    pub arn: ::std::string::String,
    /// The semantic version of this release.
    pub version: ::std::string::String,
    /// A short summary of what the extension does, suitable for a catalog listing.
    pub overview: ::std::option::Option<::std::string::String>,
    /// A link to external documentation for this extension.
    pub documentation_link: ::std::option::Option<::std::string::String>,
    /// Author-provided notes describing what changed in this release.
    pub release_notes: ::std::option::Option<::std::string::String>,
    /// The timestamp when this version was released.
    pub released_at: ::aws_smithy_types::DateTime,
    /// A full description of the extension's purpose and functionality.
    pub description: ::std::option::Option<::std::string::String>,
    /// The settings, capabilities and interfaces declared by this extension version.
    pub configuration: ::std::option::Option<crate::types::ExtensionConfiguration>,
    _request_id: Option<String>,
}
impl GetExtensionOutput {
    /// The extension's id, in the form namespace:name, such as aws:secretsmanager.
    pub fn id(&self) -> &str {
        use std::ops::Deref;
        self.id.deref()
    }
    /// The extension's display name.
    pub fn display_name(&self) -> &str {
        use std::ops::Deref;
        self.display_name.deref()
    }
    /// The Amazon Resource Name (ARN) of the extension.
    pub fn arn(&self) -> &str {
        use std::ops::Deref;
        self.arn.deref()
    }
    /// The semantic version of this release.
    pub fn version(&self) -> &str {
        use std::ops::Deref;
        self.version.deref()
    }
    /// A short summary of what the extension does, suitable for a catalog listing.
    pub fn overview(&self) -> ::std::option::Option<&str> {
        self.overview.as_deref()
    }
    /// A link to external documentation for this extension.
    pub fn documentation_link(&self) -> ::std::option::Option<&str> {
        self.documentation_link.as_deref()
    }
    /// Author-provided notes describing what changed in this release.
    pub fn release_notes(&self) -> ::std::option::Option<&str> {
        self.release_notes.as_deref()
    }
    /// The timestamp when this version was released.
    pub fn released_at(&self) -> &::aws_smithy_types::DateTime {
        &self.released_at
    }
    /// A full description of the extension's purpose and functionality.
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// The settings, capabilities and interfaces declared by this extension version.
    pub fn configuration(&self) -> ::std::option::Option<&crate::types::ExtensionConfiguration> {
        self.configuration.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetExtensionOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetExtensionOutput {
    /// Creates a new builder-style object to manufacture [`GetExtensionOutput`](crate::operation::get_extension::GetExtensionOutput).
    pub fn builder() -> crate::operation::get_extension::builders::GetExtensionOutputBuilder {
        crate::operation::get_extension::builders::GetExtensionOutputBuilder::default()
    }
}

/// A builder for [`GetExtensionOutput`](crate::operation::get_extension::GetExtensionOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetExtensionOutputBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) display_name: ::std::option::Option<::std::string::String>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) version: ::std::option::Option<::std::string::String>,
    pub(crate) overview: ::std::option::Option<::std::string::String>,
    pub(crate) documentation_link: ::std::option::Option<::std::string::String>,
    pub(crate) release_notes: ::std::option::Option<::std::string::String>,
    pub(crate) released_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) configuration: ::std::option::Option<crate::types::ExtensionConfiguration>,
    _request_id: Option<String>,
}
impl GetExtensionOutputBuilder {
    /// The extension's id, in the form namespace:name, such as aws:secretsmanager.
    /// This field is required.
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// The extension's id, in the form namespace:name, such as aws:secretsmanager.
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// The extension's id, in the form namespace:name, such as aws:secretsmanager.
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// The extension's display name.
    /// This field is required.
    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.display_name = ::std::option::Option::Some(input.into());
        self
    }
    /// The extension's display name.
    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.display_name = input;
        self
    }
    /// The extension's display name.
    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.display_name
    }
    /// The Amazon Resource Name (ARN) of the extension.
    /// This field is required.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of the extension.
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// The Amazon Resource Name (ARN) of the extension.
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// The semantic version of this release.
    /// This field is required.
    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.version = ::std::option::Option::Some(input.into());
        self
    }
    /// The semantic version of this release.
    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.version = input;
        self
    }
    /// The semantic version of this release.
    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.version
    }
    /// A short summary of what the extension does, suitable for a catalog listing.
    pub fn overview(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.overview = ::std::option::Option::Some(input.into());
        self
    }
    /// A short summary of what the extension does, suitable for a catalog listing.
    pub fn set_overview(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.overview = input;
        self
    }
    /// A short summary of what the extension does, suitable for a catalog listing.
    pub fn get_overview(&self) -> &::std::option::Option<::std::string::String> {
        &self.overview
    }
    /// A link to external documentation for this extension.
    pub fn documentation_link(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.documentation_link = ::std::option::Option::Some(input.into());
        self
    }
    /// A link to external documentation for this extension.
    pub fn set_documentation_link(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.documentation_link = input;
        self
    }
    /// A link to external documentation for this extension.
    pub fn get_documentation_link(&self) -> &::std::option::Option<::std::string::String> {
        &self.documentation_link
    }
    /// Author-provided notes describing what changed in this release.
    pub fn release_notes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.release_notes = ::std::option::Option::Some(input.into());
        self
    }
    /// Author-provided notes describing what changed in this release.
    pub fn set_release_notes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.release_notes = input;
        self
    }
    /// Author-provided notes describing what changed in this release.
    pub fn get_release_notes(&self) -> &::std::option::Option<::std::string::String> {
        &self.release_notes
    }
    /// The timestamp when this version was released.
    /// This field is required.
    pub fn released_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.released_at = ::std::option::Option::Some(input);
        self
    }
    /// The timestamp when this version was released.
    pub fn set_released_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.released_at = input;
        self
    }
    /// The timestamp when this version was released.
    pub fn get_released_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.released_at
    }
    /// A full description of the extension's purpose and functionality.
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// A full description of the extension's purpose and functionality.
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// A full description of the extension's purpose and functionality.
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// The settings, capabilities and interfaces declared by this extension version.
    pub fn configuration(mut self, input: crate::types::ExtensionConfiguration) -> Self {
        self.configuration = ::std::option::Option::Some(input);
        self
    }
    /// The settings, capabilities and interfaces declared by this extension version.
    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::ExtensionConfiguration>) -> Self {
        self.configuration = input;
        self
    }
    /// The settings, capabilities and interfaces declared by this extension version.
    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::ExtensionConfiguration> {
        &self.configuration
    }
    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 [`GetExtensionOutput`](crate::operation::get_extension::GetExtensionOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`id`](crate::operation::get_extension::builders::GetExtensionOutputBuilder::id)
    /// - [`display_name`](crate::operation::get_extension::builders::GetExtensionOutputBuilder::display_name)
    /// - [`arn`](crate::operation::get_extension::builders::GetExtensionOutputBuilder::arn)
    /// - [`version`](crate::operation::get_extension::builders::GetExtensionOutputBuilder::version)
    /// - [`released_at`](crate::operation::get_extension::builders::GetExtensionOutputBuilder::released_at)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_extension::GetExtensionOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_extension::GetExtensionOutput {
            id: self.id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "id",
                    "id was not specified but it is required when building GetExtensionOutput",
                )
            })?,
            display_name: self.display_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "display_name",
                    "display_name was not specified but it is required when building GetExtensionOutput",
                )
            })?,
            arn: self.arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "arn",
                    "arn was not specified but it is required when building GetExtensionOutput",
                )
            })?,
            version: self.version.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "version",
                    "version was not specified but it is required when building GetExtensionOutput",
                )
            })?,
            overview: self.overview,
            documentation_link: self.documentation_link,
            release_notes: self.release_notes,
            released_at: self.released_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "released_at",
                    "released_at was not specified but it is required when building GetExtensionOutput",
                )
            })?,
            description: self.description,
            configuration: self.configuration,
            _request_id: self._request_id,
        })
    }
}