aws_sdk_cloudwatch/types/
_dashboard_entry.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents a specific dashboard.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DashboardEntry {
7    /// <p>The name of the dashboard.</p>
8    pub dashboard_name: ::std::option::Option<::std::string::String>,
9    /// <p>The Amazon Resource Name (ARN) of the dashboard.</p>
10    pub dashboard_arn: ::std::option::Option<::std::string::String>,
11    /// <p>The time stamp of when the dashboard was last modified, either by an API call or through the console. This number is expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC.</p>
12    pub last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
13    /// <p>The size of the dashboard, in bytes.</p>
14    pub size: ::std::option::Option<i64>,
15}
16impl DashboardEntry {
17    /// <p>The name of the dashboard.</p>
18    pub fn dashboard_name(&self) -> ::std::option::Option<&str> {
19        self.dashboard_name.as_deref()
20    }
21    /// <p>The Amazon Resource Name (ARN) of the dashboard.</p>
22    pub fn dashboard_arn(&self) -> ::std::option::Option<&str> {
23        self.dashboard_arn.as_deref()
24    }
25    /// <p>The time stamp of when the dashboard was last modified, either by an API call or through the console. This number is expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC.</p>
26    pub fn last_modified(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
27        self.last_modified.as_ref()
28    }
29    /// <p>The size of the dashboard, in bytes.</p>
30    pub fn size(&self) -> ::std::option::Option<i64> {
31        self.size
32    }
33}
34impl DashboardEntry {
35    /// Creates a new builder-style object to manufacture [`DashboardEntry`](crate::types::DashboardEntry).
36    pub fn builder() -> crate::types::builders::DashboardEntryBuilder {
37        crate::types::builders::DashboardEntryBuilder::default()
38    }
39}
40
41/// A builder for [`DashboardEntry`](crate::types::DashboardEntry).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct DashboardEntryBuilder {
45    pub(crate) dashboard_name: ::std::option::Option<::std::string::String>,
46    pub(crate) dashboard_arn: ::std::option::Option<::std::string::String>,
47    pub(crate) last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
48    pub(crate) size: ::std::option::Option<i64>,
49}
50impl DashboardEntryBuilder {
51    /// <p>The name of the dashboard.</p>
52    pub fn dashboard_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.dashboard_name = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The name of the dashboard.</p>
57    pub fn set_dashboard_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.dashboard_name = input;
59        self
60    }
61    /// <p>The name of the dashboard.</p>
62    pub fn get_dashboard_name(&self) -> &::std::option::Option<::std::string::String> {
63        &self.dashboard_name
64    }
65    /// <p>The Amazon Resource Name (ARN) of the dashboard.</p>
66    pub fn dashboard_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.dashboard_arn = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The Amazon Resource Name (ARN) of the dashboard.</p>
71    pub fn set_dashboard_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.dashboard_arn = input;
73        self
74    }
75    /// <p>The Amazon Resource Name (ARN) of the dashboard.</p>
76    pub fn get_dashboard_arn(&self) -> &::std::option::Option<::std::string::String> {
77        &self.dashboard_arn
78    }
79    /// <p>The time stamp of when the dashboard was last modified, either by an API call or through the console. This number is expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC.</p>
80    pub fn last_modified(mut self, input: ::aws_smithy_types::DateTime) -> Self {
81        self.last_modified = ::std::option::Option::Some(input);
82        self
83    }
84    /// <p>The time stamp of when the dashboard was last modified, either by an API call or through the console. This number is expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC.</p>
85    pub fn set_last_modified(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
86        self.last_modified = input;
87        self
88    }
89    /// <p>The time stamp of when the dashboard was last modified, either by an API call or through the console. This number is expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC.</p>
90    pub fn get_last_modified(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
91        &self.last_modified
92    }
93    /// <p>The size of the dashboard, in bytes.</p>
94    pub fn size(mut self, input: i64) -> Self {
95        self.size = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>The size of the dashboard, in bytes.</p>
99    pub fn set_size(mut self, input: ::std::option::Option<i64>) -> Self {
100        self.size = input;
101        self
102    }
103    /// <p>The size of the dashboard, in bytes.</p>
104    pub fn get_size(&self) -> &::std::option::Option<i64> {
105        &self.size
106    }
107    /// Consumes the builder and constructs a [`DashboardEntry`](crate::types::DashboardEntry).
108    pub fn build(self) -> crate::types::DashboardEntry {
109        crate::types::DashboardEntry {
110            dashboard_name: self.dashboard_name,
111            dashboard_arn: self.dashboard_arn,
112            last_modified: self.last_modified,
113            size: self.size,
114        }
115    }
116}