aws_sdk_apigateway/operation/update_account/_update_account_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Requests API Gateway to change information about the current Account resource.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateAccountInput {
7 /// <p>For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch Operations</a>.</p>
8 pub patch_operations: ::std::option::Option<::std::vec::Vec<crate::types::PatchOperation>>,
9}
10impl UpdateAccountInput {
11 /// <p>For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch Operations</a>.</p>
12 ///
13 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.patch_operations.is_none()`.
14 pub fn patch_operations(&self) -> &[crate::types::PatchOperation] {
15 self.patch_operations.as_deref().unwrap_or_default()
16 }
17}
18impl UpdateAccountInput {
19 /// Creates a new builder-style object to manufacture [`UpdateAccountInput`](crate::operation::update_account::UpdateAccountInput).
20 pub fn builder() -> crate::operation::update_account::builders::UpdateAccountInputBuilder {
21 crate::operation::update_account::builders::UpdateAccountInputBuilder::default()
22 }
23}
24
25/// A builder for [`UpdateAccountInput`](crate::operation::update_account::UpdateAccountInput).
26#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
27#[non_exhaustive]
28pub struct UpdateAccountInputBuilder {
29 pub(crate) patch_operations: ::std::option::Option<::std::vec::Vec<crate::types::PatchOperation>>,
30}
31impl UpdateAccountInputBuilder {
32 /// Appends an item to `patch_operations`.
33 ///
34 /// To override the contents of this collection use [`set_patch_operations`](Self::set_patch_operations).
35 ///
36 /// <p>For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch Operations</a>.</p>
37 pub fn patch_operations(mut self, input: crate::types::PatchOperation) -> Self {
38 let mut v = self.patch_operations.unwrap_or_default();
39 v.push(input);
40 self.patch_operations = ::std::option::Option::Some(v);
41 self
42 }
43 /// <p>For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch Operations</a>.</p>
44 pub fn set_patch_operations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PatchOperation>>) -> Self {
45 self.patch_operations = input;
46 self
47 }
48 /// <p>For more information about supported patch operations, see <a href="https://docs.aws.amazon.com/apigateway/latest/api/patch-operations.html">Patch Operations</a>.</p>
49 pub fn get_patch_operations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PatchOperation>> {
50 &self.patch_operations
51 }
52 /// Consumes the builder and constructs a [`UpdateAccountInput`](crate::operation::update_account::UpdateAccountInput).
53 pub fn build(
54 self,
55 ) -> ::std::result::Result<crate::operation::update_account::UpdateAccountInput, ::aws_smithy_types::error::operation::BuildError> {
56 ::std::result::Result::Ok(crate::operation::update_account::UpdateAccountInput {
57 patch_operations: self.patch_operations,
58 })
59 }
60}