Struct aws_sdk_kafka::model::prometheus_info::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for PrometheusInfo
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn jmx_exporter(self, input: JmxExporterInfo) -> Self
pub fn jmx_exporter(self, input: JmxExporterInfo) -> Self
Indicates whether you want to turn on or turn off the JMX Exporter.
sourcepub fn set_jmx_exporter(self, input: Option<JmxExporterInfo>) -> Self
pub fn set_jmx_exporter(self, input: Option<JmxExporterInfo>) -> Self
Indicates whether you want to turn on or turn off the JMX Exporter.
Examples found in repository?
src/json_deser.rs (lines 6440-6442)
6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470
pub(crate) fn deser_structure_crate_model_prometheus_info<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::PrometheusInfo>,
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_info::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_info(tokens)?
);
}
"nodeExporter" => {
builder = builder.set_node_exporter(
crate::json_deser::deser_structure_crate_model_node_exporter_info(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: NodeExporterInfo) -> Self
pub fn node_exporter(self, input: NodeExporterInfo) -> Self
Indicates whether you want to turn on or turn off the Node Exporter.
sourcepub fn set_node_exporter(self, input: Option<NodeExporterInfo>) -> Self
pub fn set_node_exporter(self, input: Option<NodeExporterInfo>) -> Self
Indicates whether you want to turn on or turn off the Node Exporter.
Examples found in repository?
src/json_deser.rs (lines 6445-6447)
6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470
pub(crate) fn deser_structure_crate_model_prometheus_info<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::PrometheusInfo>,
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_info::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_info(tokens)?
);
}
"nodeExporter" => {
builder = builder.set_node_exporter(
crate::json_deser::deser_structure_crate_model_node_exporter_info(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) -> PrometheusInfo
pub fn build(self) -> PrometheusInfo
Consumes the builder and constructs a PrometheusInfo
.
Examples found in repository?
src/json_deser.rs (line 6462)
6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470
pub(crate) fn deser_structure_crate_model_prometheus_info<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::PrometheusInfo>,
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_info::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_info(tokens)?
);
}
"nodeExporter" => {
builder = builder.set_node_exporter(
crate::json_deser::deser_structure_crate_model_node_exporter_info(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",
),
),
}
}