aws_sdk_iot/operation/delete_command/_delete_command_output.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteCommandOutput {
/// <p>The status code for the command deletion request. The status code is in the 200 range for a successful request.</p>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
pub status_code: i32,
_request_id: Option<String>,
}
impl DeleteCommandOutput {
/// <p>The status code for the command deletion request. The status code is in the 200 range for a successful request.</p>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
pub fn status_code(&self) -> i32 {
self.status_code
}
}
impl ::aws_types::request_id::RequestId for DeleteCommandOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DeleteCommandOutput {
/// Creates a new builder-style object to manufacture [`DeleteCommandOutput`](crate::operation::delete_command::DeleteCommandOutput).
pub fn builder() -> crate::operation::delete_command::builders::DeleteCommandOutputBuilder {
crate::operation::delete_command::builders::DeleteCommandOutputBuilder::default()
}
}
/// A builder for [`DeleteCommandOutput`](crate::operation::delete_command::DeleteCommandOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteCommandOutputBuilder {
pub(crate) status_code: ::std::option::Option<i32>,
_request_id: Option<String>,
}
impl DeleteCommandOutputBuilder {
/// <p>The status code for the command deletion request. The status code is in the 200 range for a successful request.</p>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
pub fn status_code(mut self, input: i32) -> Self {
self.status_code = ::std::option::Option::Some(input);
self
}
/// <p>The status code for the command deletion request. The status code is in the 200 range for a successful request.</p>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
pub fn set_status_code(mut self, input: ::std::option::Option<i32>) -> Self {
self.status_code = input;
self
}
/// <p>The status code for the command deletion request. The status code is in the 200 range for a successful request.</p>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
pub fn get_status_code(&self) -> &::std::option::Option<i32> {
&self.status_code
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`DeleteCommandOutput`](crate::operation::delete_command::DeleteCommandOutput).
pub fn build(self) -> crate::operation::delete_command::DeleteCommandOutput {
crate::operation::delete_command::DeleteCommandOutput {
status_code: self.status_code.unwrap_or_default(),
_request_id: self._request_id,
}
}
}