aws-sdk-rds 1.131.0

AWS SDK for Amazon Relational Database Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A time zone associated with a <code>DBInstance</code> or a <code>DBSnapshot</code>. This data type is an element in the response to the <code>DescribeDBInstances</code>, the <code>DescribeDBSnapshots</code>, and the <code>DescribeDBEngineVersions</code> actions.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Timezone {
    /// <p>The name of the time zone.</p>
    pub timezone_name: ::std::option::Option<::std::string::String>,
}
impl Timezone {
    /// <p>The name of the time zone.</p>
    pub fn timezone_name(&self) -> ::std::option::Option<&str> {
        self.timezone_name.as_deref()
    }
}
impl Timezone {
    /// Creates a new builder-style object to manufacture [`Timezone`](crate::types::Timezone).
    pub fn builder() -> crate::types::builders::TimezoneBuilder {
        crate::types::builders::TimezoneBuilder::default()
    }
}

/// A builder for [`Timezone`](crate::types::Timezone).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TimezoneBuilder {
    pub(crate) timezone_name: ::std::option::Option<::std::string::String>,
}
impl TimezoneBuilder {
    /// <p>The name of the time zone.</p>
    pub fn timezone_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.timezone_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the time zone.</p>
    pub fn set_timezone_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.timezone_name = input;
        self
    }
    /// <p>The name of the time zone.</p>
    pub fn get_timezone_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.timezone_name
    }
    /// Consumes the builder and constructs a [`Timezone`](crate::types::Timezone).
    pub fn build(self) -> crate::types::Timezone {
        crate::types::Timezone {
            timezone_name: self.timezone_name,
        }
    }
}