aws-sdk-lexmodelbuilding 1.100.0

AWS SDK for Amazon Lex Model Building Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[deprecated(note = "Amazon Lex V1 is deprecated. Use Amazon Lex V2 instead.", since = "2025-09-08")]
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetIntentInput {
    /// <p>The name of the intent. The name is case sensitive.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The version of the intent.</p>
    pub version: ::std::option::Option<::std::string::String>,
}
impl GetIntentInput {
    /// <p>The name of the intent. The name is case sensitive.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The version of the intent.</p>
    pub fn version(&self) -> ::std::option::Option<&str> {
        self.version.as_deref()
    }
}
impl GetIntentInput {
    /// Creates a new builder-style object to manufacture [`GetIntentInput`](crate::operation::get_intent::GetIntentInput).
    pub fn builder() -> crate::operation::get_intent::builders::GetIntentInputBuilder {
        crate::operation::get_intent::builders::GetIntentInputBuilder::default()
    }
}

/// A builder for [`GetIntentInput`](crate::operation::get_intent::GetIntentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetIntentInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) version: ::std::option::Option<::std::string::String>,
}
impl GetIntentInputBuilder {
    /// <p>The name of the intent. The name is case sensitive.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the intent. The name is case sensitive.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the intent. The name is case sensitive.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The version of the intent.</p>
    /// 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
    }
    /// <p>The version of the intent.</p>
    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.version = input;
        self
    }
    /// <p>The version of the intent.</p>
    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.version
    }
    /// Consumes the builder and constructs a [`GetIntentInput`](crate::operation::get_intent::GetIntentInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_intent::GetIntentInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_intent::GetIntentInput {
            name: self.name,
            version: self.version,
        })
    }
}