aws-sdk-bedrockdataautomationruntime 1.57.0

AWS SDK for Runtime for Amazon Bedrock Data Automation
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Structure for single blueprint entity.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Blueprint {
    /// Arn of blueprint.
    pub blueprint_arn: ::std::string::String,
    /// Version of blueprint.
    pub version: ::std::option::Option<::std::string::String>,
    /// Stage of blueprint.
    pub stage: ::std::option::Option<crate::types::BlueprintStage>,
}
impl Blueprint {
    /// Arn of blueprint.
    pub fn blueprint_arn(&self) -> &str {
        use std::ops::Deref;
        self.blueprint_arn.deref()
    }
    /// Version of blueprint.
    pub fn version(&self) -> ::std::option::Option<&str> {
        self.version.as_deref()
    }
    /// Stage of blueprint.
    pub fn stage(&self) -> ::std::option::Option<&crate::types::BlueprintStage> {
        self.stage.as_ref()
    }
}
impl Blueprint {
    /// Creates a new builder-style object to manufacture [`Blueprint`](crate::types::Blueprint).
    pub fn builder() -> crate::types::builders::BlueprintBuilder {
        crate::types::builders::BlueprintBuilder::default()
    }
}

/// A builder for [`Blueprint`](crate::types::Blueprint).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BlueprintBuilder {
    pub(crate) blueprint_arn: ::std::option::Option<::std::string::String>,
    pub(crate) version: ::std::option::Option<::std::string::String>,
    pub(crate) stage: ::std::option::Option<crate::types::BlueprintStage>,
}
impl BlueprintBuilder {
    /// Arn of blueprint.
    /// This field is required.
    pub fn blueprint_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.blueprint_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// Arn of blueprint.
    pub fn set_blueprint_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.blueprint_arn = input;
        self
    }
    /// Arn of blueprint.
    pub fn get_blueprint_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.blueprint_arn
    }
    /// Version of blueprint.
    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.version = ::std::option::Option::Some(input.into());
        self
    }
    /// Version of blueprint.
    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.version = input;
        self
    }
    /// Version of blueprint.
    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.version
    }
    /// Stage of blueprint.
    pub fn stage(mut self, input: crate::types::BlueprintStage) -> Self {
        self.stage = ::std::option::Option::Some(input);
        self
    }
    /// Stage of blueprint.
    pub fn set_stage(mut self, input: ::std::option::Option<crate::types::BlueprintStage>) -> Self {
        self.stage = input;
        self
    }
    /// Stage of blueprint.
    pub fn get_stage(&self) -> &::std::option::Option<crate::types::BlueprintStage> {
        &self.stage
    }
    /// Consumes the builder and constructs a [`Blueprint`](crate::types::Blueprint).
    /// This method will fail if any of the following fields are not set:
    /// - [`blueprint_arn`](crate::types::builders::BlueprintBuilder::blueprint_arn)
    pub fn build(self) -> ::std::result::Result<crate::types::Blueprint, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::Blueprint {
            blueprint_arn: self.blueprint_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "blueprint_arn",
                    "blueprint_arn was not specified but it is required when building Blueprint",
                )
            })?,
            version: self.version,
            stage: self.stage,
        })
    }
}