aws_sdk_applicationinsights/types/
_configuration_event.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The event information.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ConfigurationEvent {
7    /// <p>The name of the resource group of the application to which the configuration event belongs.</p>
8    pub resource_group_name: ::std::option::Option<::std::string::String>,
9    /// <p>The Amazon Web Services account ID for the owner of the application to which the configuration event belongs.</p>
10    pub account_id: ::std::option::Option<::std::string::String>,
11    /// <p>The resource monitored by Application Insights.</p>
12    pub monitored_resource_arn: ::std::option::Option<::std::string::String>,
13    /// <p>The status of the configuration update event. Possible values include INFO, WARN, and ERROR.</p>
14    pub event_status: ::std::option::Option<crate::types::ConfigurationEventStatus>,
15    /// <p>The resource type that Application Insights attempted to configure, for example, CLOUDWATCH_ALARM.</p>
16    pub event_resource_type: ::std::option::Option<crate::types::ConfigurationEventResourceType>,
17    /// <p>The timestamp of the event.</p>
18    pub event_time: ::std::option::Option<::aws_smithy_types::DateTime>,
19    /// <p>The details of the event in plain text.</p>
20    pub event_detail: ::std::option::Option<::std::string::String>,
21    /// <p>The name of the resource Application Insights attempted to configure.</p>
22    pub event_resource_name: ::std::option::Option<::std::string::String>,
23}
24impl ConfigurationEvent {
25    /// <p>The name of the resource group of the application to which the configuration event belongs.</p>
26    pub fn resource_group_name(&self) -> ::std::option::Option<&str> {
27        self.resource_group_name.as_deref()
28    }
29    /// <p>The Amazon Web Services account ID for the owner of the application to which the configuration event belongs.</p>
30    pub fn account_id(&self) -> ::std::option::Option<&str> {
31        self.account_id.as_deref()
32    }
33    /// <p>The resource monitored by Application Insights.</p>
34    pub fn monitored_resource_arn(&self) -> ::std::option::Option<&str> {
35        self.monitored_resource_arn.as_deref()
36    }
37    /// <p>The status of the configuration update event. Possible values include INFO, WARN, and ERROR.</p>
38    pub fn event_status(&self) -> ::std::option::Option<&crate::types::ConfigurationEventStatus> {
39        self.event_status.as_ref()
40    }
41    /// <p>The resource type that Application Insights attempted to configure, for example, CLOUDWATCH_ALARM.</p>
42    pub fn event_resource_type(&self) -> ::std::option::Option<&crate::types::ConfigurationEventResourceType> {
43        self.event_resource_type.as_ref()
44    }
45    /// <p>The timestamp of the event.</p>
46    pub fn event_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
47        self.event_time.as_ref()
48    }
49    /// <p>The details of the event in plain text.</p>
50    pub fn event_detail(&self) -> ::std::option::Option<&str> {
51        self.event_detail.as_deref()
52    }
53    /// <p>The name of the resource Application Insights attempted to configure.</p>
54    pub fn event_resource_name(&self) -> ::std::option::Option<&str> {
55        self.event_resource_name.as_deref()
56    }
57}
58impl ConfigurationEvent {
59    /// Creates a new builder-style object to manufacture [`ConfigurationEvent`](crate::types::ConfigurationEvent).
60    pub fn builder() -> crate::types::builders::ConfigurationEventBuilder {
61        crate::types::builders::ConfigurationEventBuilder::default()
62    }
63}
64
65/// A builder for [`ConfigurationEvent`](crate::types::ConfigurationEvent).
66#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
67#[non_exhaustive]
68pub struct ConfigurationEventBuilder {
69    pub(crate) resource_group_name: ::std::option::Option<::std::string::String>,
70    pub(crate) account_id: ::std::option::Option<::std::string::String>,
71    pub(crate) monitored_resource_arn: ::std::option::Option<::std::string::String>,
72    pub(crate) event_status: ::std::option::Option<crate::types::ConfigurationEventStatus>,
73    pub(crate) event_resource_type: ::std::option::Option<crate::types::ConfigurationEventResourceType>,
74    pub(crate) event_time: ::std::option::Option<::aws_smithy_types::DateTime>,
75    pub(crate) event_detail: ::std::option::Option<::std::string::String>,
76    pub(crate) event_resource_name: ::std::option::Option<::std::string::String>,
77}
78impl ConfigurationEventBuilder {
79    /// <p>The name of the resource group of the application to which the configuration event belongs.</p>
80    pub fn resource_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.resource_group_name = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The name of the resource group of the application to which the configuration event belongs.</p>
85    pub fn set_resource_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.resource_group_name = input;
87        self
88    }
89    /// <p>The name of the resource group of the application to which the configuration event belongs.</p>
90    pub fn get_resource_group_name(&self) -> &::std::option::Option<::std::string::String> {
91        &self.resource_group_name
92    }
93    /// <p>The Amazon Web Services account ID for the owner of the application to which the configuration event belongs.</p>
94    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95        self.account_id = ::std::option::Option::Some(input.into());
96        self
97    }
98    /// <p>The Amazon Web Services account ID for the owner of the application to which the configuration event belongs.</p>
99    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.account_id = input;
101        self
102    }
103    /// <p>The Amazon Web Services account ID for the owner of the application to which the configuration event belongs.</p>
104    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
105        &self.account_id
106    }
107    /// <p>The resource monitored by Application Insights.</p>
108    pub fn monitored_resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109        self.monitored_resource_arn = ::std::option::Option::Some(input.into());
110        self
111    }
112    /// <p>The resource monitored by Application Insights.</p>
113    pub fn set_monitored_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114        self.monitored_resource_arn = input;
115        self
116    }
117    /// <p>The resource monitored by Application Insights.</p>
118    pub fn get_monitored_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
119        &self.monitored_resource_arn
120    }
121    /// <p>The status of the configuration update event. Possible values include INFO, WARN, and ERROR.</p>
122    pub fn event_status(mut self, input: crate::types::ConfigurationEventStatus) -> Self {
123        self.event_status = ::std::option::Option::Some(input);
124        self
125    }
126    /// <p>The status of the configuration update event. Possible values include INFO, WARN, and ERROR.</p>
127    pub fn set_event_status(mut self, input: ::std::option::Option<crate::types::ConfigurationEventStatus>) -> Self {
128        self.event_status = input;
129        self
130    }
131    /// <p>The status of the configuration update event. Possible values include INFO, WARN, and ERROR.</p>
132    pub fn get_event_status(&self) -> &::std::option::Option<crate::types::ConfigurationEventStatus> {
133        &self.event_status
134    }
135    /// <p>The resource type that Application Insights attempted to configure, for example, CLOUDWATCH_ALARM.</p>
136    pub fn event_resource_type(mut self, input: crate::types::ConfigurationEventResourceType) -> Self {
137        self.event_resource_type = ::std::option::Option::Some(input);
138        self
139    }
140    /// <p>The resource type that Application Insights attempted to configure, for example, CLOUDWATCH_ALARM.</p>
141    pub fn set_event_resource_type(mut self, input: ::std::option::Option<crate::types::ConfigurationEventResourceType>) -> Self {
142        self.event_resource_type = input;
143        self
144    }
145    /// <p>The resource type that Application Insights attempted to configure, for example, CLOUDWATCH_ALARM.</p>
146    pub fn get_event_resource_type(&self) -> &::std::option::Option<crate::types::ConfigurationEventResourceType> {
147        &self.event_resource_type
148    }
149    /// <p>The timestamp of the event.</p>
150    pub fn event_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
151        self.event_time = ::std::option::Option::Some(input);
152        self
153    }
154    /// <p>The timestamp of the event.</p>
155    pub fn set_event_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
156        self.event_time = input;
157        self
158    }
159    /// <p>The timestamp of the event.</p>
160    pub fn get_event_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
161        &self.event_time
162    }
163    /// <p>The details of the event in plain text.</p>
164    pub fn event_detail(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165        self.event_detail = ::std::option::Option::Some(input.into());
166        self
167    }
168    /// <p>The details of the event in plain text.</p>
169    pub fn set_event_detail(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170        self.event_detail = input;
171        self
172    }
173    /// <p>The details of the event in plain text.</p>
174    pub fn get_event_detail(&self) -> &::std::option::Option<::std::string::String> {
175        &self.event_detail
176    }
177    /// <p>The name of the resource Application Insights attempted to configure.</p>
178    pub fn event_resource_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179        self.event_resource_name = ::std::option::Option::Some(input.into());
180        self
181    }
182    /// <p>The name of the resource Application Insights attempted to configure.</p>
183    pub fn set_event_resource_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184        self.event_resource_name = input;
185        self
186    }
187    /// <p>The name of the resource Application Insights attempted to configure.</p>
188    pub fn get_event_resource_name(&self) -> &::std::option::Option<::std::string::String> {
189        &self.event_resource_name
190    }
191    /// Consumes the builder and constructs a [`ConfigurationEvent`](crate::types::ConfigurationEvent).
192    pub fn build(self) -> crate::types::ConfigurationEvent {
193        crate::types::ConfigurationEvent {
194            resource_group_name: self.resource_group_name,
195            account_id: self.account_id,
196            monitored_resource_arn: self.monitored_resource_arn,
197            event_status: self.event_status,
198            event_resource_type: self.event_resource_type,
199            event_time: self.event_time,
200            event_detail: self.event_detail,
201            event_resource_name: self.event_resource_name,
202        }
203    }
204}