aws_sdk_applicationinsights/operation/update_problem/_update_problem_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateProblemInput {
6 /// <p>The ID of the problem.</p>
7 pub problem_id: ::std::option::Option<::std::string::String>,
8 /// <p>The status of the problem. Arguments can be passed for only problems that show a status of <code>RECOVERING</code>.</p>
9 pub update_status: ::std::option::Option<crate::types::UpdateStatus>,
10 /// <p>The visibility of a problem. When you pass a value of <code>IGNORED</code>, the problem is removed from the default view, and all notifications for the problem are suspended. When <code>VISIBLE</code> is passed, the <code>IGNORED</code> action is reversed.</p>
11 pub visibility: ::std::option::Option<crate::types::Visibility>,
12}
13impl UpdateProblemInput {
14 /// <p>The ID of the problem.</p>
15 pub fn problem_id(&self) -> ::std::option::Option<&str> {
16 self.problem_id.as_deref()
17 }
18 /// <p>The status of the problem. Arguments can be passed for only problems that show a status of <code>RECOVERING</code>.</p>
19 pub fn update_status(&self) -> ::std::option::Option<&crate::types::UpdateStatus> {
20 self.update_status.as_ref()
21 }
22 /// <p>The visibility of a problem. When you pass a value of <code>IGNORED</code>, the problem is removed from the default view, and all notifications for the problem are suspended. When <code>VISIBLE</code> is passed, the <code>IGNORED</code> action is reversed.</p>
23 pub fn visibility(&self) -> ::std::option::Option<&crate::types::Visibility> {
24 self.visibility.as_ref()
25 }
26}
27impl UpdateProblemInput {
28 /// Creates a new builder-style object to manufacture [`UpdateProblemInput`](crate::operation::update_problem::UpdateProblemInput).
29 pub fn builder() -> crate::operation::update_problem::builders::UpdateProblemInputBuilder {
30 crate::operation::update_problem::builders::UpdateProblemInputBuilder::default()
31 }
32}
33
34/// A builder for [`UpdateProblemInput`](crate::operation::update_problem::UpdateProblemInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateProblemInputBuilder {
38 pub(crate) problem_id: ::std::option::Option<::std::string::String>,
39 pub(crate) update_status: ::std::option::Option<crate::types::UpdateStatus>,
40 pub(crate) visibility: ::std::option::Option<crate::types::Visibility>,
41}
42impl UpdateProblemInputBuilder {
43 /// <p>The ID of the problem.</p>
44 /// This field is required.
45 pub fn problem_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46 self.problem_id = ::std::option::Option::Some(input.into());
47 self
48 }
49 /// <p>The ID of the problem.</p>
50 pub fn set_problem_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51 self.problem_id = input;
52 self
53 }
54 /// <p>The ID of the problem.</p>
55 pub fn get_problem_id(&self) -> &::std::option::Option<::std::string::String> {
56 &self.problem_id
57 }
58 /// <p>The status of the problem. Arguments can be passed for only problems that show a status of <code>RECOVERING</code>.</p>
59 pub fn update_status(mut self, input: crate::types::UpdateStatus) -> Self {
60 self.update_status = ::std::option::Option::Some(input);
61 self
62 }
63 /// <p>The status of the problem. Arguments can be passed for only problems that show a status of <code>RECOVERING</code>.</p>
64 pub fn set_update_status(mut self, input: ::std::option::Option<crate::types::UpdateStatus>) -> Self {
65 self.update_status = input;
66 self
67 }
68 /// <p>The status of the problem. Arguments can be passed for only problems that show a status of <code>RECOVERING</code>.</p>
69 pub fn get_update_status(&self) -> &::std::option::Option<crate::types::UpdateStatus> {
70 &self.update_status
71 }
72 /// <p>The visibility of a problem. When you pass a value of <code>IGNORED</code>, the problem is removed from the default view, and all notifications for the problem are suspended. When <code>VISIBLE</code> is passed, the <code>IGNORED</code> action is reversed.</p>
73 pub fn visibility(mut self, input: crate::types::Visibility) -> Self {
74 self.visibility = ::std::option::Option::Some(input);
75 self
76 }
77 /// <p>The visibility of a problem. When you pass a value of <code>IGNORED</code>, the problem is removed from the default view, and all notifications for the problem are suspended. When <code>VISIBLE</code> is passed, the <code>IGNORED</code> action is reversed.</p>
78 pub fn set_visibility(mut self, input: ::std::option::Option<crate::types::Visibility>) -> Self {
79 self.visibility = input;
80 self
81 }
82 /// <p>The visibility of a problem. When you pass a value of <code>IGNORED</code>, the problem is removed from the default view, and all notifications for the problem are suspended. When <code>VISIBLE</code> is passed, the <code>IGNORED</code> action is reversed.</p>
83 pub fn get_visibility(&self) -> &::std::option::Option<crate::types::Visibility> {
84 &self.visibility
85 }
86 /// Consumes the builder and constructs a [`UpdateProblemInput`](crate::operation::update_problem::UpdateProblemInput).
87 pub fn build(
88 self,
89 ) -> ::std::result::Result<crate::operation::update_problem::UpdateProblemInput, ::aws_smithy_types::error::operation::BuildError> {
90 ::std::result::Result::Ok(crate::operation::update_problem::UpdateProblemInput {
91 problem_id: self.problem_id,
92 update_status: self.update_status,
93 visibility: self.visibility,
94 })
95 }
96}