aws_sdk_databasemigration/types/
_availability_zone.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The name of an Availability Zone for use during database migration. <code>AvailabilityZone</code> is an optional parameter to the <a href="https://docs.aws.amazon.com/dms/latest/APIReference/API_CreateReplicationInstance.html"> <code>CreateReplicationInstance</code> </a> operation, and it’s value relates to the Amazon Web Services Region of an endpoint. For example, the availability zone of an endpoint in the us-east-1 region might be us-east-1a, us-east-1b, us-east-1c, or us-east-1d.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AvailabilityZone {
7    /// <p>The name of the Availability Zone.</p>
8    pub name: ::std::option::Option<::std::string::String>,
9}
10impl AvailabilityZone {
11    /// <p>The name of the Availability Zone.</p>
12    pub fn name(&self) -> ::std::option::Option<&str> {
13        self.name.as_deref()
14    }
15}
16impl AvailabilityZone {
17    /// Creates a new builder-style object to manufacture [`AvailabilityZone`](crate::types::AvailabilityZone).
18    pub fn builder() -> crate::types::builders::AvailabilityZoneBuilder {
19        crate::types::builders::AvailabilityZoneBuilder::default()
20    }
21}
22
23/// A builder for [`AvailabilityZone`](crate::types::AvailabilityZone).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct AvailabilityZoneBuilder {
27    pub(crate) name: ::std::option::Option<::std::string::String>,
28}
29impl AvailabilityZoneBuilder {
30    /// <p>The name of the Availability Zone.</p>
31    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
32        self.name = ::std::option::Option::Some(input.into());
33        self
34    }
35    /// <p>The name of the Availability Zone.</p>
36    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
37        self.name = input;
38        self
39    }
40    /// <p>The name of the Availability Zone.</p>
41    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
42        &self.name
43    }
44    /// Consumes the builder and constructs a [`AvailabilityZone`](crate::types::AvailabilityZone).
45    pub fn build(self) -> crate::types::AvailabilityZone {
46        crate::types::AvailabilityZone { name: self.name }
47    }
48}