Struct aws_sdk_grafana::model::role_values::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for RoleValues
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn editor(self, input: impl Into<String>) -> Self
pub fn editor(self, input: impl Into<String>) -> Self
Appends an item to editor
.
To override the contents of this collection use set_editor
.
A list of groups from the SAML assertion attribute to grant the Grafana Editor
role to.
sourcepub fn set_editor(self, input: Option<Vec<String>>) -> Self
pub fn set_editor(self, input: Option<Vec<String>>) -> Self
A list of groups from the SAML assertion attribute to grant the Grafana Editor
role to.
Examples found in repository?
src/json_deser.rs (lines 2849-2851)
2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879
pub(crate) fn deser_structure_crate_model_role_values<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::RoleValues>, 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::role_values::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() {
"editor" => {
builder = builder.set_editor(
crate::json_deser::deser_list_com_amazonaws_grafana_role_value_list(tokens)?
);
}
"admin" => {
builder = builder.set_admin(
crate::json_deser::deser_list_com_amazonaws_grafana_role_value_list(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 admin(self, input: impl Into<String>) -> Self
pub fn admin(self, input: impl Into<String>) -> Self
Appends an item to admin
.
To override the contents of this collection use set_admin
.
A list of groups from the SAML assertion attribute to grant the Grafana Admin
role to.
sourcepub fn set_admin(self, input: Option<Vec<String>>) -> Self
pub fn set_admin(self, input: Option<Vec<String>>) -> Self
A list of groups from the SAML assertion attribute to grant the Grafana Admin
role to.
Examples found in repository?
src/json_deser.rs (lines 2854-2856)
2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879
pub(crate) fn deser_structure_crate_model_role_values<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::RoleValues>, 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::role_values::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() {
"editor" => {
builder = builder.set_editor(
crate::json_deser::deser_list_com_amazonaws_grafana_role_value_list(tokens)?
);
}
"admin" => {
builder = builder.set_admin(
crate::json_deser::deser_list_com_amazonaws_grafana_role_value_list(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) -> RoleValues
pub fn build(self) -> RoleValues
Consumes the builder and constructs a RoleValues
.
Examples found in repository?
src/json_deser.rs (line 2871)
2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879
pub(crate) fn deser_structure_crate_model_role_values<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::RoleValues>, 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::role_values::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() {
"editor" => {
builder = builder.set_editor(
crate::json_deser::deser_list_com_amazonaws_grafana_role_value_list(tokens)?
);
}
"admin" => {
builder = builder.set_admin(
crate::json_deser::deser_list_com_amazonaws_grafana_role_value_list(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",
),
),
}
}