Skip to main content

aws_sdk_cloudwatch/types/
_dashboard_validation_message.rs

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