aws_sdk_iot/operation/delete_command/_delete_command_output.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 DeleteCommandOutput {
6 /// <p>The status code for the command deletion request. The status code is in the 200 range for a successful request.</p>
7 /// <ul>
8 /// <li>
9 /// <p>If the command hasn't been deprecated, or has been deprecated for a duration that is shorter than the maximum time out duration of 12 hours, when calling the <code>DeleteCommand</code> request, the deletion will be scheduled and a 202 status code will be returned. While the command is being deleted, it will be in a <code>pendingDeletion</code> state. Once the time out duration has been reached, the command will be permanently removed from your account.</p></li>
10 /// <li>
11 /// <p>If the command has been deprecated for a duration that is longer than the maximum time out duration of 12 hours, when calling the <code>DeleteCommand</code> request, the command will be deleted immediately and a 204 status code will be returned.</p></li>
12 /// </ul>
13 pub status_code: i32,
14 _request_id: Option<String>,
15}
16impl DeleteCommandOutput {
17 /// <p>The status code for the command deletion request. The status code is in the 200 range for a successful request.</p>
18 /// <ul>
19 /// <li>
20 /// <p>If the command hasn't been deprecated, or has been deprecated for a duration that is shorter than the maximum time out duration of 12 hours, when calling the <code>DeleteCommand</code> request, the deletion will be scheduled and a 202 status code will be returned. While the command is being deleted, it will be in a <code>pendingDeletion</code> state. Once the time out duration has been reached, the command will be permanently removed from your account.</p></li>
21 /// <li>
22 /// <p>If the command has been deprecated for a duration that is longer than the maximum time out duration of 12 hours, when calling the <code>DeleteCommand</code> request, the command will be deleted immediately and a 204 status code will be returned.</p></li>
23 /// </ul>
24 pub fn status_code(&self) -> i32 {
25 self.status_code
26 }
27}
28impl ::aws_types::request_id::RequestId for DeleteCommandOutput {
29 fn request_id(&self) -> Option<&str> {
30 self._request_id.as_deref()
31 }
32}
33impl DeleteCommandOutput {
34 /// Creates a new builder-style object to manufacture [`DeleteCommandOutput`](crate::operation::delete_command::DeleteCommandOutput).
35 pub fn builder() -> crate::operation::delete_command::builders::DeleteCommandOutputBuilder {
36 crate::operation::delete_command::builders::DeleteCommandOutputBuilder::default()
37 }
38}
39
40/// A builder for [`DeleteCommandOutput`](crate::operation::delete_command::DeleteCommandOutput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct DeleteCommandOutputBuilder {
44 pub(crate) status_code: ::std::option::Option<i32>,
45 _request_id: Option<String>,
46}
47impl DeleteCommandOutputBuilder {
48 /// <p>The status code for the command deletion request. The status code is in the 200 range for a successful request.</p>
49 /// <ul>
50 /// <li>
51 /// <p>If the command hasn't been deprecated, or has been deprecated for a duration that is shorter than the maximum time out duration of 12 hours, when calling the <code>DeleteCommand</code> request, the deletion will be scheduled and a 202 status code will be returned. While the command is being deleted, it will be in a <code>pendingDeletion</code> state. Once the time out duration has been reached, the command will be permanently removed from your account.</p></li>
52 /// <li>
53 /// <p>If the command has been deprecated for a duration that is longer than the maximum time out duration of 12 hours, when calling the <code>DeleteCommand</code> request, the command will be deleted immediately and a 204 status code will be returned.</p></li>
54 /// </ul>
55 pub fn status_code(mut self, input: i32) -> Self {
56 self.status_code = ::std::option::Option::Some(input);
57 self
58 }
59 /// <p>The status code for the command deletion request. The status code is in the 200 range for a successful request.</p>
60 /// <ul>
61 /// <li>
62 /// <p>If the command hasn't been deprecated, or has been deprecated for a duration that is shorter than the maximum time out duration of 12 hours, when calling the <code>DeleteCommand</code> request, the deletion will be scheduled and a 202 status code will be returned. While the command is being deleted, it will be in a <code>pendingDeletion</code> state. Once the time out duration has been reached, the command will be permanently removed from your account.</p></li>
63 /// <li>
64 /// <p>If the command has been deprecated for a duration that is longer than the maximum time out duration of 12 hours, when calling the <code>DeleteCommand</code> request, the command will be deleted immediately and a 204 status code will be returned.</p></li>
65 /// </ul>
66 pub fn set_status_code(mut self, input: ::std::option::Option<i32>) -> Self {
67 self.status_code = input;
68 self
69 }
70 /// <p>The status code for the command deletion request. The status code is in the 200 range for a successful request.</p>
71 /// <ul>
72 /// <li>
73 /// <p>If the command hasn't been deprecated, or has been deprecated for a duration that is shorter than the maximum time out duration of 12 hours, when calling the <code>DeleteCommand</code> request, the deletion will be scheduled and a 202 status code will be returned. While the command is being deleted, it will be in a <code>pendingDeletion</code> state. Once the time out duration has been reached, the command will be permanently removed from your account.</p></li>
74 /// <li>
75 /// <p>If the command has been deprecated for a duration that is longer than the maximum time out duration of 12 hours, when calling the <code>DeleteCommand</code> request, the command will be deleted immediately and a 204 status code will be returned.</p></li>
76 /// </ul>
77 pub fn get_status_code(&self) -> &::std::option::Option<i32> {
78 &self.status_code
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 /// Consumes the builder and constructs a [`DeleteCommandOutput`](crate::operation::delete_command::DeleteCommandOutput).
90 pub fn build(self) -> crate::operation::delete_command::DeleteCommandOutput {
91 crate::operation::delete_command::DeleteCommandOutput {
92 status_code: self.status_code.unwrap_or_default(),
93 _request_id: self._request_id,
94 }
95 }
96}