pub struct Builder { /* private fields */ }Expand description
A builder for BackendStoragePermissions.
Implementations§
source§impl Builder
impl Builder
sourcepub fn authenticated(self, input: AuthenticatedElement) -> Self
pub fn authenticated(self, input: AuthenticatedElement) -> Self
Appends an item to authenticated.
To override the contents of this collection use set_authenticated.
Lists all authenticated user read, write, and delete permissions for your S3 bucket.
sourcepub fn set_authenticated(self, input: Option<Vec<AuthenticatedElement>>) -> Self
pub fn set_authenticated(self, input: Option<Vec<AuthenticatedElement>>) -> Self
Lists all authenticated user read, write, and delete permissions for your S3 bucket.
Examples found in repository?
src/json_deser.rs (lines 3603-3605)
3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633
pub(crate) fn deser_structure_crate_model_backend_storage_permissions<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::BackendStoragePermissions>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::backend_storage_permissions::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"authenticated" => {
builder = builder.set_authenticated(
crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of_authenticated_element(tokens)?
);
}
"unAuthenticated" => {
builder = builder.set_un_authenticated(
crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of_un_authenticated_element(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn un_authenticated(self, input: UnAuthenticatedElement) -> Self
pub fn un_authenticated(self, input: UnAuthenticatedElement) -> Self
Appends an item to un_authenticated.
To override the contents of this collection use set_un_authenticated.
Lists all unauthenticated user read, write, and delete permissions for your S3 bucket.
sourcepub fn set_un_authenticated(
self,
input: Option<Vec<UnAuthenticatedElement>>
) -> Self
pub fn set_un_authenticated(
self,
input: Option<Vec<UnAuthenticatedElement>>
) -> Self
Lists all unauthenticated user read, write, and delete permissions for your S3 bucket.
Examples found in repository?
src/json_deser.rs (lines 3608-3610)
3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633
pub(crate) fn deser_structure_crate_model_backend_storage_permissions<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::BackendStoragePermissions>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::backend_storage_permissions::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"authenticated" => {
builder = builder.set_authenticated(
crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of_authenticated_element(tokens)?
);
}
"unAuthenticated" => {
builder = builder.set_un_authenticated(
crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of_un_authenticated_element(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn build(self) -> BackendStoragePermissions
pub fn build(self) -> BackendStoragePermissions
Consumes the builder and constructs a BackendStoragePermissions.
Examples found in repository?
src/json_deser.rs (line 3625)
3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633
pub(crate) fn deser_structure_crate_model_backend_storage_permissions<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::BackendStoragePermissions>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::backend_storage_permissions::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"authenticated" => {
builder = builder.set_authenticated(
crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of_authenticated_element(tokens)?
);
}
"unAuthenticated" => {
builder = builder.set_un_authenticated(
crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of_un_authenticated_element(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}