aws_sdk_dynamodb/operation/delete_resource_policy/
_delete_resource_policy_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 DeleteResourcePolicyOutput {
6    /// <p>A unique string that represents the revision ID of the policy. If you're comparing revision IDs, make sure to always use string comparison logic.</p>
7    /// <p>This value will be empty if you make a request against a resource without a policy.</p>
8    pub revision_id: ::std::option::Option<::std::string::String>,
9    _request_id: Option<String>,
10}
11impl DeleteResourcePolicyOutput {
12    /// <p>A unique string that represents the revision ID of the policy. If you're comparing revision IDs, make sure to always use string comparison logic.</p>
13    /// <p>This value will be empty if you make a request against a resource without a policy.</p>
14    pub fn revision_id(&self) -> ::std::option::Option<&str> {
15        self.revision_id.as_deref()
16    }
17}
18impl ::aws_types::request_id::RequestId for DeleteResourcePolicyOutput {
19    fn request_id(&self) -> Option<&str> {
20        self._request_id.as_deref()
21    }
22}
23impl DeleteResourcePolicyOutput {
24    /// Creates a new builder-style object to manufacture [`DeleteResourcePolicyOutput`](crate::operation::delete_resource_policy::DeleteResourcePolicyOutput).
25    pub fn builder() -> crate::operation::delete_resource_policy::builders::DeleteResourcePolicyOutputBuilder {
26        crate::operation::delete_resource_policy::builders::DeleteResourcePolicyOutputBuilder::default()
27    }
28}
29
30/// A builder for [`DeleteResourcePolicyOutput`](crate::operation::delete_resource_policy::DeleteResourcePolicyOutput).
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct DeleteResourcePolicyOutputBuilder {
34    pub(crate) revision_id: ::std::option::Option<::std::string::String>,
35    _request_id: Option<String>,
36}
37impl DeleteResourcePolicyOutputBuilder {
38    /// <p>A unique string that represents the revision ID of the policy. If you're comparing revision IDs, make sure to always use string comparison logic.</p>
39    /// <p>This value will be empty if you make a request against a resource without a policy.</p>
40    pub fn revision_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
41        self.revision_id = ::std::option::Option::Some(input.into());
42        self
43    }
44    /// <p>A unique string that represents the revision ID of the policy. If you're comparing revision IDs, make sure to always use string comparison logic.</p>
45    /// <p>This value will be empty if you make a request against a resource without a policy.</p>
46    pub fn set_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
47        self.revision_id = input;
48        self
49    }
50    /// <p>A unique string that represents the revision ID of the policy. If you're comparing revision IDs, make sure to always use string comparison logic.</p>
51    /// <p>This value will be empty if you make a request against a resource without a policy.</p>
52    pub fn get_revision_id(&self) -> &::std::option::Option<::std::string::String> {
53        &self.revision_id
54    }
55    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
56        self._request_id = Some(request_id.into());
57        self
58    }
59
60    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
61        self._request_id = request_id;
62        self
63    }
64    /// Consumes the builder and constructs a [`DeleteResourcePolicyOutput`](crate::operation::delete_resource_policy::DeleteResourcePolicyOutput).
65    pub fn build(self) -> crate::operation::delete_resource_policy::DeleteResourcePolicyOutput {
66        crate::operation::delete_resource_policy::DeleteResourcePolicyOutput {
67            revision_id: self.revision_id,
68            _request_id: self._request_id,
69        }
70    }
71}