Skip to main content

aws_sdk_workdocs/operation/remove_all_resource_permissions/
_remove_all_resource_permissions_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)]
5pub struct RemoveAllResourcePermissionsInput {
6    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
7    pub authentication_token: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the resource.</p>
9    pub resource_id: ::std::option::Option<::std::string::String>,
10}
11impl RemoveAllResourcePermissionsInput {
12    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
13    pub fn authentication_token(&self) -> ::std::option::Option<&str> {
14        self.authentication_token.as_deref()
15    }
16    /// <p>The ID of the resource.</p>
17    pub fn resource_id(&self) -> ::std::option::Option<&str> {
18        self.resource_id.as_deref()
19    }
20}
21impl ::std::fmt::Debug for RemoveAllResourcePermissionsInput {
22    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23        let mut formatter = f.debug_struct("RemoveAllResourcePermissionsInput");
24        formatter.field("authentication_token", &"*** Sensitive Data Redacted ***");
25        formatter.field("resource_id", &self.resource_id);
26        formatter.finish()
27    }
28}
29impl RemoveAllResourcePermissionsInput {
30    /// Creates a new builder-style object to manufacture [`RemoveAllResourcePermissionsInput`](crate::operation::remove_all_resource_permissions::RemoveAllResourcePermissionsInput).
31    pub fn builder() -> crate::operation::remove_all_resource_permissions::builders::RemoveAllResourcePermissionsInputBuilder {
32        crate::operation::remove_all_resource_permissions::builders::RemoveAllResourcePermissionsInputBuilder::default()
33    }
34}
35
36/// A builder for [`RemoveAllResourcePermissionsInput`](crate::operation::remove_all_resource_permissions::RemoveAllResourcePermissionsInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
38#[non_exhaustive]
39pub struct RemoveAllResourcePermissionsInputBuilder {
40    pub(crate) authentication_token: ::std::option::Option<::std::string::String>,
41    pub(crate) resource_id: ::std::option::Option<::std::string::String>,
42}
43impl RemoveAllResourcePermissionsInputBuilder {
44    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
45    pub fn authentication_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.authentication_token = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
50    pub fn set_authentication_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.authentication_token = input;
52        self
53    }
54    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
55    pub fn get_authentication_token(&self) -> &::std::option::Option<::std::string::String> {
56        &self.authentication_token
57    }
58    /// <p>The ID of the resource.</p>
59    /// This field is required.
60    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.resource_id = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The ID of the resource.</p>
65    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.resource_id = input;
67        self
68    }
69    /// <p>The ID of the resource.</p>
70    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
71        &self.resource_id
72    }
73    /// Consumes the builder and constructs a [`RemoveAllResourcePermissionsInput`](crate::operation::remove_all_resource_permissions::RemoveAllResourcePermissionsInput).
74    pub fn build(
75        self,
76    ) -> ::std::result::Result<
77        crate::operation::remove_all_resource_permissions::RemoveAllResourcePermissionsInput,
78        ::aws_smithy_types::error::operation::BuildError,
79    > {
80        ::std::result::Result::Ok(crate::operation::remove_all_resource_permissions::RemoveAllResourcePermissionsInput {
81            authentication_token: self.authentication_token,
82            resource_id: self.resource_id,
83        })
84    }
85}
86impl ::std::fmt::Debug for RemoveAllResourcePermissionsInputBuilder {
87    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
88        let mut formatter = f.debug_struct("RemoveAllResourcePermissionsInputBuilder");
89        formatter.field("authentication_token", &"*** Sensitive Data Redacted ***");
90        formatter.field("resource_id", &self.resource_id);
91        formatter.finish()
92    }
93}