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
// 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 UpdatePermissionsInput {
    /// <p>An array of structures that contain the permission updates to make.</p>
    #[doc(hidden)]
    pub update_instruction_batch:
        std::option::Option<std::vec::Vec<crate::types::UpdateInstruction>>,
    /// <p>The ID of the workspace to update.</p>
    #[doc(hidden)]
    pub workspace_id: std::option::Option<std::string::String>,
}
impl UpdatePermissionsInput {
    /// <p>An array of structures that contain the permission updates to make.</p>
    pub fn update_instruction_batch(
        &self,
    ) -> std::option::Option<&[crate::types::UpdateInstruction]> {
        self.update_instruction_batch.as_deref()
    }
    /// <p>The ID of the workspace to update.</p>
    pub fn workspace_id(&self) -> std::option::Option<&str> {
        self.workspace_id.as_deref()
    }
}
impl UpdatePermissionsInput {
    /// Creates a new builder-style object to manufacture [`UpdatePermissionsInput`](crate::operation::update_permissions::UpdatePermissionsInput).
    pub fn builder() -> crate::operation::update_permissions::builders::UpdatePermissionsInputBuilder
    {
        crate::operation::update_permissions::builders::UpdatePermissionsInputBuilder::default()
    }
}

/// A builder for [`UpdatePermissionsInput`](crate::operation::update_permissions::UpdatePermissionsInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct UpdatePermissionsInputBuilder {
    pub(crate) update_instruction_batch:
        std::option::Option<std::vec::Vec<crate::types::UpdateInstruction>>,
    pub(crate) workspace_id: std::option::Option<std::string::String>,
}
impl UpdatePermissionsInputBuilder {
    /// Appends an item to `update_instruction_batch`.
    ///
    /// To override the contents of this collection use [`set_update_instruction_batch`](Self::set_update_instruction_batch).
    ///
    /// <p>An array of structures that contain the permission updates to make.</p>
    pub fn update_instruction_batch(mut self, input: crate::types::UpdateInstruction) -> Self {
        let mut v = self.update_instruction_batch.unwrap_or_default();
        v.push(input);
        self.update_instruction_batch = Some(v);
        self
    }
    /// <p>An array of structures that contain the permission updates to make.</p>
    pub fn set_update_instruction_batch(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::UpdateInstruction>>,
    ) -> Self {
        self.update_instruction_batch = input;
        self
    }
    /// <p>The ID of the workspace to update.</p>
    pub fn workspace_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.workspace_id = Some(input.into());
        self
    }
    /// <p>The ID of the workspace to update.</p>
    pub fn set_workspace_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.workspace_id = input;
        self
    }
    /// Consumes the builder and constructs a [`UpdatePermissionsInput`](crate::operation::update_permissions::UpdatePermissionsInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::update_permissions::UpdatePermissionsInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(
            crate::operation::update_permissions::UpdatePermissionsInput {
                update_instruction_batch: self.update_instruction_batch,
                workspace_id: self.workspace_id,
            },
        )
    }
}