aws_sdk_support/types/_severity_level.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A code and name pair that represents the severity level of a support case. The available values depend on the support plan for the account. For more information, see <a href="https://docs.aws.amazon.com/awssupport/latest/user/case-management.html#choosing-severity">Choosing a severity</a> in the <i>Amazon Web Services Support User Guide</i>.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SeverityLevel {
7 /// <p>The code for case severity level.</p>
8 /// <p>Valid values: <code>low</code> | <code>normal</code> | <code>high</code> | <code>urgent</code> | <code>critical</code></p>
9 pub code: ::std::option::Option<::std::string::String>,
10 /// <p>The name of the severity level that corresponds to the severity level code.</p><note>
11 /// <p>The values returned by the API are different from the values that appear in the Amazon Web Services Support Center. For example, the API uses the code <code>low</code>, but the name appears as General guidance in Support Center.</p>
12 /// <p>The following are the API code names and how they appear in the console:</p>
13 /// <ul>
14 /// <li>
15 /// <p><code>low</code> - General guidance</p></li>
16 /// <li>
17 /// <p><code>normal</code> - System impaired</p></li>
18 /// <li>
19 /// <p><code>high</code> - Production system impaired</p></li>
20 /// <li>
21 /// <p><code>urgent</code> - Production system down</p></li>
22 /// <li>
23 /// <p><code>critical</code> - Business-critical system down</p></li>
24 /// </ul>
25 /// </note>
26 /// <p>For more information, see <a href="https://docs.aws.amazon.com/awssupport/latest/user/case-management.html#choosing-severity">Choosing a severity</a> in the <i>Amazon Web Services Support User Guide</i>.</p>
27 pub name: ::std::option::Option<::std::string::String>,
28}
29impl SeverityLevel {
30 /// <p>The code for case severity level.</p>
31 /// <p>Valid values: <code>low</code> | <code>normal</code> | <code>high</code> | <code>urgent</code> | <code>critical</code></p>
32 pub fn code(&self) -> ::std::option::Option<&str> {
33 self.code.as_deref()
34 }
35 /// <p>The name of the severity level that corresponds to the severity level code.</p><note>
36 /// <p>The values returned by the API are different from the values that appear in the Amazon Web Services Support Center. For example, the API uses the code <code>low</code>, but the name appears as General guidance in Support Center.</p>
37 /// <p>The following are the API code names and how they appear in the console:</p>
38 /// <ul>
39 /// <li>
40 /// <p><code>low</code> - General guidance</p></li>
41 /// <li>
42 /// <p><code>normal</code> - System impaired</p></li>
43 /// <li>
44 /// <p><code>high</code> - Production system impaired</p></li>
45 /// <li>
46 /// <p><code>urgent</code> - Production system down</p></li>
47 /// <li>
48 /// <p><code>critical</code> - Business-critical system down</p></li>
49 /// </ul>
50 /// </note>
51 /// <p>For more information, see <a href="https://docs.aws.amazon.com/awssupport/latest/user/case-management.html#choosing-severity">Choosing a severity</a> in the <i>Amazon Web Services Support User Guide</i>.</p>
52 pub fn name(&self) -> ::std::option::Option<&str> {
53 self.name.as_deref()
54 }
55}
56impl SeverityLevel {
57 /// Creates a new builder-style object to manufacture [`SeverityLevel`](crate::types::SeverityLevel).
58 pub fn builder() -> crate::types::builders::SeverityLevelBuilder {
59 crate::types::builders::SeverityLevelBuilder::default()
60 }
61}
62
63/// A builder for [`SeverityLevel`](crate::types::SeverityLevel).
64#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
65#[non_exhaustive]
66pub struct SeverityLevelBuilder {
67 pub(crate) code: ::std::option::Option<::std::string::String>,
68 pub(crate) name: ::std::option::Option<::std::string::String>,
69}
70impl SeverityLevelBuilder {
71 /// <p>The code for case severity level.</p>
72 /// <p>Valid values: <code>low</code> | <code>normal</code> | <code>high</code> | <code>urgent</code> | <code>critical</code></p>
73 pub fn code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74 self.code = ::std::option::Option::Some(input.into());
75 self
76 }
77 /// <p>The code for case severity level.</p>
78 /// <p>Valid values: <code>low</code> | <code>normal</code> | <code>high</code> | <code>urgent</code> | <code>critical</code></p>
79 pub fn set_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80 self.code = input;
81 self
82 }
83 /// <p>The code for case severity level.</p>
84 /// <p>Valid values: <code>low</code> | <code>normal</code> | <code>high</code> | <code>urgent</code> | <code>critical</code></p>
85 pub fn get_code(&self) -> &::std::option::Option<::std::string::String> {
86 &self.code
87 }
88 /// <p>The name of the severity level that corresponds to the severity level code.</p><note>
89 /// <p>The values returned by the API are different from the values that appear in the Amazon Web Services Support Center. For example, the API uses the code <code>low</code>, but the name appears as General guidance in Support Center.</p>
90 /// <p>The following are the API code names and how they appear in the console:</p>
91 /// <ul>
92 /// <li>
93 /// <p><code>low</code> - General guidance</p></li>
94 /// <li>
95 /// <p><code>normal</code> - System impaired</p></li>
96 /// <li>
97 /// <p><code>high</code> - Production system impaired</p></li>
98 /// <li>
99 /// <p><code>urgent</code> - Production system down</p></li>
100 /// <li>
101 /// <p><code>critical</code> - Business-critical system down</p></li>
102 /// </ul>
103 /// </note>
104 /// <p>For more information, see <a href="https://docs.aws.amazon.com/awssupport/latest/user/case-management.html#choosing-severity">Choosing a severity</a> in the <i>Amazon Web Services Support User Guide</i>.</p>
105 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
106 self.name = ::std::option::Option::Some(input.into());
107 self
108 }
109 /// <p>The name of the severity level that corresponds to the severity level code.</p><note>
110 /// <p>The values returned by the API are different from the values that appear in the Amazon Web Services Support Center. For example, the API uses the code <code>low</code>, but the name appears as General guidance in Support Center.</p>
111 /// <p>The following are the API code names and how they appear in the console:</p>
112 /// <ul>
113 /// <li>
114 /// <p><code>low</code> - General guidance</p></li>
115 /// <li>
116 /// <p><code>normal</code> - System impaired</p></li>
117 /// <li>
118 /// <p><code>high</code> - Production system impaired</p></li>
119 /// <li>
120 /// <p><code>urgent</code> - Production system down</p></li>
121 /// <li>
122 /// <p><code>critical</code> - Business-critical system down</p></li>
123 /// </ul>
124 /// </note>
125 /// <p>For more information, see <a href="https://docs.aws.amazon.com/awssupport/latest/user/case-management.html#choosing-severity">Choosing a severity</a> in the <i>Amazon Web Services Support User Guide</i>.</p>
126 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127 self.name = input;
128 self
129 }
130 /// <p>The name of the severity level that corresponds to the severity level code.</p><note>
131 /// <p>The values returned by the API are different from the values that appear in the Amazon Web Services Support Center. For example, the API uses the code <code>low</code>, but the name appears as General guidance in Support Center.</p>
132 /// <p>The following are the API code names and how they appear in the console:</p>
133 /// <ul>
134 /// <li>
135 /// <p><code>low</code> - General guidance</p></li>
136 /// <li>
137 /// <p><code>normal</code> - System impaired</p></li>
138 /// <li>
139 /// <p><code>high</code> - Production system impaired</p></li>
140 /// <li>
141 /// <p><code>urgent</code> - Production system down</p></li>
142 /// <li>
143 /// <p><code>critical</code> - Business-critical system down</p></li>
144 /// </ul>
145 /// </note>
146 /// <p>For more information, see <a href="https://docs.aws.amazon.com/awssupport/latest/user/case-management.html#choosing-severity">Choosing a severity</a> in the <i>Amazon Web Services Support User Guide</i>.</p>
147 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
148 &self.name
149 }
150 /// Consumes the builder and constructs a [`SeverityLevel`](crate::types::SeverityLevel).
151 pub fn build(self) -> crate::types::SeverityLevel {
152 crate::types::SeverityLevel {
153 code: self.code,
154 name: self.name,
155 }
156 }
157}