aws_sdk_networkmanager/types/
_bandwidth.rs

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