Struct aws_sdk_kafka::model::prometheus::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for Prometheus
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn jmx_exporter(self, input: JmxExporter) -> Self
pub fn jmx_exporter(self, input: JmxExporter) -> Self
Indicates whether you want to turn on or turn off the JMX Exporter.
sourcepub fn set_jmx_exporter(self, input: Option<JmxExporter>) -> Self
pub fn set_jmx_exporter(self, input: Option<JmxExporter>) -> Self
Indicates whether you want to turn on or turn off the JMX Exporter.
Examples found in repository?
src/json_deser.rs (lines 5179-5183)
5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213
pub(crate) fn deser_structure_crate_model_prometheus<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::Prometheus>, 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::prometheus::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() {
"jmxExporter" => {
builder = builder.set_jmx_exporter(
crate::json_deser::deser_structure_crate_model_jmx_exporter(
tokens,
)?,
);
}
"nodeExporter" => {
builder = builder.set_node_exporter(
crate::json_deser::deser_structure_crate_model_node_exporter(
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 node_exporter(self, input: NodeExporter) -> Self
pub fn node_exporter(self, input: NodeExporter) -> Self
Indicates whether you want to turn on or turn off the Node Exporter.
sourcepub fn set_node_exporter(self, input: Option<NodeExporter>) -> Self
pub fn set_node_exporter(self, input: Option<NodeExporter>) -> Self
Indicates whether you want to turn on or turn off the Node Exporter.
Examples found in repository?
src/json_deser.rs (lines 5186-5190)
5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213
pub(crate) fn deser_structure_crate_model_prometheus<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::Prometheus>, 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::prometheus::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() {
"jmxExporter" => {
builder = builder.set_jmx_exporter(
crate::json_deser::deser_structure_crate_model_jmx_exporter(
tokens,
)?,
);
}
"nodeExporter" => {
builder = builder.set_node_exporter(
crate::json_deser::deser_structure_crate_model_node_exporter(
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) -> Prometheus
pub fn build(self) -> Prometheus
Consumes the builder and constructs a Prometheus
.
Examples found in repository?
src/json_deser.rs (line 5205)
5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213
pub(crate) fn deser_structure_crate_model_prometheus<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::Prometheus>, 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::prometheus::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() {
"jmxExporter" => {
builder = builder.set_jmx_exporter(
crate::json_deser::deser_structure_crate_model_jmx_exporter(
tokens,
)?,
);
}
"nodeExporter" => {
builder = builder.set_node_exporter(
crate::json_deser::deser_structure_crate_model_node_exporter(
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",
),
),
}
}