aws_sdk_iotsitewise/operation/create_dashboard/
_create_dashboard_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateDashboardOutput {
6 pub dashboard_id: ::std::string::String,
8 pub dashboard_arn: ::std::string::String,
11 _request_id: Option<String>,
12}
13impl CreateDashboardOutput {
14 pub fn dashboard_id(&self) -> &str {
16 use std::ops::Deref;
17 self.dashboard_id.deref()
18 }
19 pub fn dashboard_arn(&self) -> &str {
22 use std::ops::Deref;
23 self.dashboard_arn.deref()
24 }
25}
26impl ::aws_types::request_id::RequestId for CreateDashboardOutput {
27 fn request_id(&self) -> Option<&str> {
28 self._request_id.as_deref()
29 }
30}
31impl CreateDashboardOutput {
32 pub fn builder() -> crate::operation::create_dashboard::builders::CreateDashboardOutputBuilder {
34 crate::operation::create_dashboard::builders::CreateDashboardOutputBuilder::default()
35 }
36}
37
38#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct CreateDashboardOutputBuilder {
42 pub(crate) dashboard_id: ::std::option::Option<::std::string::String>,
43 pub(crate) dashboard_arn: ::std::option::Option<::std::string::String>,
44 _request_id: Option<String>,
45}
46impl CreateDashboardOutputBuilder {
47 pub fn dashboard_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
50 self.dashboard_id = ::std::option::Option::Some(input.into());
51 self
52 }
53 pub fn set_dashboard_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
55 self.dashboard_id = input;
56 self
57 }
58 pub fn get_dashboard_id(&self) -> &::std::option::Option<::std::string::String> {
60 &self.dashboard_id
61 }
62 pub fn dashboard_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66 self.dashboard_arn = ::std::option::Option::Some(input.into());
67 self
68 }
69 pub fn set_dashboard_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72 self.dashboard_arn = input;
73 self
74 }
75 pub fn get_dashboard_arn(&self) -> &::std::option::Option<::std::string::String> {
78 &self.dashboard_arn
79 }
80 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
81 self._request_id = Some(request_id.into());
82 self
83 }
84
85 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
86 self._request_id = request_id;
87 self
88 }
89 pub fn build(
94 self,
95 ) -> ::std::result::Result<crate::operation::create_dashboard::CreateDashboardOutput, ::aws_smithy_types::error::operation::BuildError> {
96 ::std::result::Result::Ok(crate::operation::create_dashboard::CreateDashboardOutput {
97 dashboard_id: self.dashboard_id.ok_or_else(|| {
98 ::aws_smithy_types::error::operation::BuildError::missing_field(
99 "dashboard_id",
100 "dashboard_id was not specified but it is required when building CreateDashboardOutput",
101 )
102 })?,
103 dashboard_arn: self.dashboard_arn.ok_or_else(|| {
104 ::aws_smithy_types::error::operation::BuildError::missing_field(
105 "dashboard_arn",
106 "dashboard_arn was not specified but it is required when building CreateDashboardOutput",
107 )
108 })?,
109 _request_id: self._request_id,
110 })
111 }
112}