aws-sdk-glue 1.149.0

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

/// <p>Specifies an option value.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Option {
    /// <p>Specifies the value of the option.</p>
    pub value: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the label of the option.</p>
    pub label: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the description of the option.</p>
    pub description: ::std::option::Option<::std::string::String>,
}
impl Option {
    /// <p>Specifies the value of the option.</p>
    pub fn value(&self) -> ::std::option::Option<&str> {
        self.value.as_deref()
    }
    /// <p>Specifies the label of the option.</p>
    pub fn label(&self) -> ::std::option::Option<&str> {
        self.label.as_deref()
    }
    /// <p>Specifies the description of the option.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
}
impl Option {
    /// Creates a new builder-style object to manufacture [`Option`](crate::types::Option).
    pub fn builder() -> crate::types::builders::OptionBuilder {
        crate::types::builders::OptionBuilder::default()
    }
}

/// A builder for [`Option`](crate::types::Option).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct OptionBuilder {
    pub(crate) value: ::std::option::Option<::std::string::String>,
    pub(crate) label: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
}
impl OptionBuilder {
    /// <p>Specifies the value of the option.</p>
    pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.value = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the value of the option.</p>
    pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.value = input;
        self
    }
    /// <p>Specifies the value of the option.</p>
    pub fn get_value(&self) -> &::std::option::Option<::std::string::String> {
        &self.value
    }
    /// <p>Specifies the label of the option.</p>
    pub fn label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.label = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the label of the option.</p>
    pub fn set_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.label = input;
        self
    }
    /// <p>Specifies the label of the option.</p>
    pub fn get_label(&self) -> &::std::option::Option<::std::string::String> {
        &self.label
    }
    /// <p>Specifies the description of the option.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the description of the option.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>Specifies the description of the option.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Consumes the builder and constructs a [`Option`](crate::types::Option).
    pub fn build(self) -> crate::types::Option {
        crate::types::Option {
            value: self.value,
            label: self.label,
            description: self.description,
        }
    }
}