aws-sdk-iotmanagedintegrations 1.42.0

AWS SDK for Managed integrations for AWS IoT Device Management
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 GetSchemaVersionInput {
    /// <p>The type of schema version.</p>
    pub r#type: ::std::option::Option<crate::types::SchemaVersionType>,
    /// <p>Schema id with a version specified. If the version is missing, it defaults to latest version.</p>
    pub schema_versioned_id: ::std::option::Option<::std::string::String>,
    /// <p>The format of the schema version.</p>
    pub format: ::std::option::Option<crate::types::SchemaVersionFormat>,
}
impl GetSchemaVersionInput {
    /// <p>The type of schema version.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::SchemaVersionType> {
        self.r#type.as_ref()
    }
    /// <p>Schema id with a version specified. If the version is missing, it defaults to latest version.</p>
    pub fn schema_versioned_id(&self) -> ::std::option::Option<&str> {
        self.schema_versioned_id.as_deref()
    }
    /// <p>The format of the schema version.</p>
    pub fn format(&self) -> ::std::option::Option<&crate::types::SchemaVersionFormat> {
        self.format.as_ref()
    }
}
impl GetSchemaVersionInput {
    /// Creates a new builder-style object to manufacture [`GetSchemaVersionInput`](crate::operation::get_schema_version::GetSchemaVersionInput).
    pub fn builder() -> crate::operation::get_schema_version::builders::GetSchemaVersionInputBuilder {
        crate::operation::get_schema_version::builders::GetSchemaVersionInputBuilder::default()
    }
}

/// A builder for [`GetSchemaVersionInput`](crate::operation::get_schema_version::GetSchemaVersionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetSchemaVersionInputBuilder {
    pub(crate) r#type: ::std::option::Option<crate::types::SchemaVersionType>,
    pub(crate) schema_versioned_id: ::std::option::Option<::std::string::String>,
    pub(crate) format: ::std::option::Option<crate::types::SchemaVersionFormat>,
}
impl GetSchemaVersionInputBuilder {
    /// <p>The type of schema version.</p>
    /// This field is required.
    pub fn r#type(mut self, input: crate::types::SchemaVersionType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of schema version.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::SchemaVersionType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of schema version.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::SchemaVersionType> {
        &self.r#type
    }
    /// <p>Schema id with a version specified. If the version is missing, it defaults to latest version.</p>
    /// This field is required.
    pub fn schema_versioned_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.schema_versioned_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Schema id with a version specified. If the version is missing, it defaults to latest version.</p>
    pub fn set_schema_versioned_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.schema_versioned_id = input;
        self
    }
    /// <p>Schema id with a version specified. If the version is missing, it defaults to latest version.</p>
    pub fn get_schema_versioned_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.schema_versioned_id
    }
    /// <p>The format of the schema version.</p>
    pub fn format(mut self, input: crate::types::SchemaVersionFormat) -> Self {
        self.format = ::std::option::Option::Some(input);
        self
    }
    /// <p>The format of the schema version.</p>
    pub fn set_format(mut self, input: ::std::option::Option<crate::types::SchemaVersionFormat>) -> Self {
        self.format = input;
        self
    }
    /// <p>The format of the schema version.</p>
    pub fn get_format(&self) -> &::std::option::Option<crate::types::SchemaVersionFormat> {
        &self.format
    }
    /// Consumes the builder and constructs a [`GetSchemaVersionInput`](crate::operation::get_schema_version::GetSchemaVersionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_schema_version::GetSchemaVersionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_schema_version::GetSchemaVersionInput {
            r#type: self.r#type,
            schema_versioned_id: self.schema_versioned_id,
            format: self.format,
        })
    }
}