aws_sdk_elasticbeanstalk/types/
_queue.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Describes a queue.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Queue {
7    /// <p>The name of the queue.</p>
8    pub name: ::std::option::Option<::std::string::String>,
9    /// <p>The URL of the queue.</p>
10    pub url: ::std::option::Option<::std::string::String>,
11}
12impl Queue {
13    /// <p>The name of the queue.</p>
14    pub fn name(&self) -> ::std::option::Option<&str> {
15        self.name.as_deref()
16    }
17    /// <p>The URL of the queue.</p>
18    pub fn url(&self) -> ::std::option::Option<&str> {
19        self.url.as_deref()
20    }
21}
22impl Queue {
23    /// Creates a new builder-style object to manufacture [`Queue`](crate::types::Queue).
24    pub fn builder() -> crate::types::builders::QueueBuilder {
25        crate::types::builders::QueueBuilder::default()
26    }
27}
28
29/// A builder for [`Queue`](crate::types::Queue).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct QueueBuilder {
33    pub(crate) name: ::std::option::Option<::std::string::String>,
34    pub(crate) url: ::std::option::Option<::std::string::String>,
35}
36impl QueueBuilder {
37    /// <p>The name of the queue.</p>
38    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.name = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The name of the queue.</p>
43    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.name = input;
45        self
46    }
47    /// <p>The name of the queue.</p>
48    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
49        &self.name
50    }
51    /// <p>The URL of the queue.</p>
52    pub fn url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.url = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The URL of the queue.</p>
57    pub fn set_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.url = input;
59        self
60    }
61    /// <p>The URL of the queue.</p>
62    pub fn get_url(&self) -> &::std::option::Option<::std::string::String> {
63        &self.url
64    }
65    /// Consumes the builder and constructs a [`Queue`](crate::types::Queue).
66    pub fn build(self) -> crate::types::Queue {
67        crate::types::Queue {
68            name: self.name,
69            url: self.url,
70        }
71    }
72}