Struct aws_sdk_serverlessapplicationrepository::model::application_policy_statement::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for ApplicationPolicyStatement.
Implementations§
source§impl Builder
impl Builder
sourcepub fn actions(self, input: impl Into<String>) -> Self
pub fn actions(self, input: impl Into<String>) -> Self
Appends an item to actions.
To override the contents of this collection use set_actions.
For the list of actions supported for this operation, see Application Permissions.
sourcepub fn set_actions(self, input: Option<Vec<String>>) -> Self
pub fn set_actions(self, input: Option<Vec<String>>) -> Self
For the list of actions supported for this operation, see Application Permissions.
Examples found in repository?
2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132
pub(crate) fn deser_structure_crate_model_application_policy_statement<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ApplicationPolicyStatement>,
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::application_policy_statement::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() {
"actions" => {
builder = builder.set_actions(
crate::json_deser::deser_list_com_amazonaws_serverlessapplicationrepository___list_of__string(tokens)?
);
}
"principalOrgIDs" => {
builder = builder.set_principal_org_i_ds(
crate::json_deser::deser_list_com_amazonaws_serverlessapplicationrepository___list_of__string(tokens)?
);
}
"principals" => {
builder = builder.set_principals(
crate::json_deser::deser_list_com_amazonaws_serverlessapplicationrepository___list_of__string(tokens)?
);
}
"statementId" => {
builder = builder.set_statement_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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 principal_org_i_ds(self, input: impl Into<String>) -> Self
pub fn principal_org_i_ds(self, input: impl Into<String>) -> Self
Appends an item to principal_org_i_ds.
To override the contents of this collection use set_principal_org_i_ds.
An array of PrinciplalOrgIDs, which corresponds to AWS IAM aws:PrincipalOrgID global condition key.
sourcepub fn set_principal_org_i_ds(self, input: Option<Vec<String>>) -> Self
pub fn set_principal_org_i_ds(self, input: Option<Vec<String>>) -> Self
An array of PrinciplalOrgIDs, which corresponds to AWS IAM aws:PrincipalOrgID global condition key.
Examples found in repository?
2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132
pub(crate) fn deser_structure_crate_model_application_policy_statement<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ApplicationPolicyStatement>,
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::application_policy_statement::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() {
"actions" => {
builder = builder.set_actions(
crate::json_deser::deser_list_com_amazonaws_serverlessapplicationrepository___list_of__string(tokens)?
);
}
"principalOrgIDs" => {
builder = builder.set_principal_org_i_ds(
crate::json_deser::deser_list_com_amazonaws_serverlessapplicationrepository___list_of__string(tokens)?
);
}
"principals" => {
builder = builder.set_principals(
crate::json_deser::deser_list_com_amazonaws_serverlessapplicationrepository___list_of__string(tokens)?
);
}
"statementId" => {
builder = builder.set_statement_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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 principals(self, input: impl Into<String>) -> Self
pub fn principals(self, input: impl Into<String>) -> Self
Appends an item to principals.
To override the contents of this collection use set_principals.
An array of AWS account IDs, or * to make the application public.
sourcepub fn set_principals(self, input: Option<Vec<String>>) -> Self
pub fn set_principals(self, input: Option<Vec<String>>) -> Self
An array of AWS account IDs, or * to make the application public.
Examples found in repository?
2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132
pub(crate) fn deser_structure_crate_model_application_policy_statement<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ApplicationPolicyStatement>,
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::application_policy_statement::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() {
"actions" => {
builder = builder.set_actions(
crate::json_deser::deser_list_com_amazonaws_serverlessapplicationrepository___list_of__string(tokens)?
);
}
"principalOrgIDs" => {
builder = builder.set_principal_org_i_ds(
crate::json_deser::deser_list_com_amazonaws_serverlessapplicationrepository___list_of__string(tokens)?
);
}
"principals" => {
builder = builder.set_principals(
crate::json_deser::deser_list_com_amazonaws_serverlessapplicationrepository___list_of__string(tokens)?
);
}
"statementId" => {
builder = builder.set_statement_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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 statement_id(self, input: impl Into<String>) -> Self
pub fn statement_id(self, input: impl Into<String>) -> Self
A unique ID for the statement.
sourcepub fn set_statement_id(self, input: Option<String>) -> Self
pub fn set_statement_id(self, input: Option<String>) -> Self
A unique ID for the statement.
Examples found in repository?
2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132
pub(crate) fn deser_structure_crate_model_application_policy_statement<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ApplicationPolicyStatement>,
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::application_policy_statement::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() {
"actions" => {
builder = builder.set_actions(
crate::json_deser::deser_list_com_amazonaws_serverlessapplicationrepository___list_of__string(tokens)?
);
}
"principalOrgIDs" => {
builder = builder.set_principal_org_i_ds(
crate::json_deser::deser_list_com_amazonaws_serverlessapplicationrepository___list_of__string(tokens)?
);
}
"principals" => {
builder = builder.set_principals(
crate::json_deser::deser_list_com_amazonaws_serverlessapplicationrepository___list_of__string(tokens)?
);
}
"statementId" => {
builder = builder.set_statement_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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) -> ApplicationPolicyStatement
pub fn build(self) -> ApplicationPolicyStatement
Consumes the builder and constructs a ApplicationPolicyStatement.
Examples found in repository?
2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132
pub(crate) fn deser_structure_crate_model_application_policy_statement<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ApplicationPolicyStatement>,
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::application_policy_statement::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() {
"actions" => {
builder = builder.set_actions(
crate::json_deser::deser_list_com_amazonaws_serverlessapplicationrepository___list_of__string(tokens)?
);
}
"principalOrgIDs" => {
builder = builder.set_principal_org_i_ds(
crate::json_deser::deser_list_com_amazonaws_serverlessapplicationrepository___list_of__string(tokens)?
);
}
"principals" => {
builder = builder.set_principals(
crate::json_deser::deser_list_com_amazonaws_serverlessapplicationrepository___list_of__string(tokens)?
);
}
"statementId" => {
builder = builder.set_statement_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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",
),
),
}
}