aws-sdk-glue 1.147.0

AWS SDK for AWS Glue
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 DeleteSchemaVersionsInput {
    /// <p>This is a wrapper structure that may contain the schema name and Amazon Resource Name (ARN).</p>
    pub schema_id: ::std::option::Option<crate::types::SchemaId>,
    /// <p>A version range may be supplied which may be of the format:</p>
    /// <ul>
    /// <li>
    /// <p>a single version number, 5</p></li>
    /// <li>
    /// <p>a range, 5-8 : deletes versions 5, 6, 7, 8</p></li>
    /// </ul>
    pub versions: ::std::option::Option<::std::string::String>,
}
impl DeleteSchemaVersionsInput {
    /// <p>This is a wrapper structure that may contain the schema name and Amazon Resource Name (ARN).</p>
    pub fn schema_id(&self) -> ::std::option::Option<&crate::types::SchemaId> {
        self.schema_id.as_ref()
    }
    /// <p>A version range may be supplied which may be of the format:</p>
    /// <ul>
    /// <li>
    /// <p>a single version number, 5</p></li>
    /// <li>
    /// <p>a range, 5-8 : deletes versions 5, 6, 7, 8</p></li>
    /// </ul>
    pub fn versions(&self) -> ::std::option::Option<&str> {
        self.versions.as_deref()
    }
}
impl DeleteSchemaVersionsInput {
    /// Creates a new builder-style object to manufacture [`DeleteSchemaVersionsInput`](crate::operation::delete_schema_versions::DeleteSchemaVersionsInput).
    pub fn builder() -> crate::operation::delete_schema_versions::builders::DeleteSchemaVersionsInputBuilder {
        crate::operation::delete_schema_versions::builders::DeleteSchemaVersionsInputBuilder::default()
    }
}

/// A builder for [`DeleteSchemaVersionsInput`](crate::operation::delete_schema_versions::DeleteSchemaVersionsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteSchemaVersionsInputBuilder {
    pub(crate) schema_id: ::std::option::Option<crate::types::SchemaId>,
    pub(crate) versions: ::std::option::Option<::std::string::String>,
}
impl DeleteSchemaVersionsInputBuilder {
    /// <p>This is a wrapper structure that may contain the schema name and Amazon Resource Name (ARN).</p>
    /// This field is required.
    pub fn schema_id(mut self, input: crate::types::SchemaId) -> Self {
        self.schema_id = ::std::option::Option::Some(input);
        self
    }
    /// <p>This is a wrapper structure that may contain the schema name and Amazon Resource Name (ARN).</p>
    pub fn set_schema_id(mut self, input: ::std::option::Option<crate::types::SchemaId>) -> Self {
        self.schema_id = input;
        self
    }
    /// <p>This is a wrapper structure that may contain the schema name and Amazon Resource Name (ARN).</p>
    pub fn get_schema_id(&self) -> &::std::option::Option<crate::types::SchemaId> {
        &self.schema_id
    }
    /// <p>A version range may be supplied which may be of the format:</p>
    /// <ul>
    /// <li>
    /// <p>a single version number, 5</p></li>
    /// <li>
    /// <p>a range, 5-8 : deletes versions 5, 6, 7, 8</p></li>
    /// </ul>
    /// This field is required.
    pub fn versions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.versions = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A version range may be supplied which may be of the format:</p>
    /// <ul>
    /// <li>
    /// <p>a single version number, 5</p></li>
    /// <li>
    /// <p>a range, 5-8 : deletes versions 5, 6, 7, 8</p></li>
    /// </ul>
    pub fn set_versions(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.versions = input;
        self
    }
    /// <p>A version range may be supplied which may be of the format:</p>
    /// <ul>
    /// <li>
    /// <p>a single version number, 5</p></li>
    /// <li>
    /// <p>a range, 5-8 : deletes versions 5, 6, 7, 8</p></li>
    /// </ul>
    pub fn get_versions(&self) -> &::std::option::Option<::std::string::String> {
        &self.versions
    }
    /// Consumes the builder and constructs a [`DeleteSchemaVersionsInput`](crate::operation::delete_schema_versions::DeleteSchemaVersionsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_schema_versions::DeleteSchemaVersionsInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::delete_schema_versions::DeleteSchemaVersionsInput {
            schema_id: self.schema_id,
            versions: self.versions,
        })
    }
}