aws-sdk-internetmonitor 1.101.0

AWS SDK for Amazon CloudWatch Internet Monitor
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StopQueryInput {
    /// <p>The name of the monitor.</p>
    pub monitor_name: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the query that you want to stop. A <code>QueryId</code> is an internally-generated identifier for a specific query.</p>
    pub query_id: ::std::option::Option<::std::string::String>,
}
impl StopQueryInput {
    /// <p>The name of the monitor.</p>
    pub fn monitor_name(&self) -> ::std::option::Option<&str> {
        self.monitor_name.as_deref()
    }
    /// <p>The ID of the query that you want to stop. A <code>QueryId</code> is an internally-generated identifier for a specific query.</p>
    pub fn query_id(&self) -> ::std::option::Option<&str> {
        self.query_id.as_deref()
    }
}
impl StopQueryInput {
    /// Creates a new builder-style object to manufacture [`StopQueryInput`](crate::operation::stop_query::StopQueryInput).
    pub fn builder() -> crate::operation::stop_query::builders::StopQueryInputBuilder {
        crate::operation::stop_query::builders::StopQueryInputBuilder::default()
    }
}

/// A builder for [`StopQueryInput`](crate::operation::stop_query::StopQueryInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StopQueryInputBuilder {
    pub(crate) monitor_name: ::std::option::Option<::std::string::String>,
    pub(crate) query_id: ::std::option::Option<::std::string::String>,
}
impl StopQueryInputBuilder {
    /// <p>The name of the monitor.</p>
    /// This field is required.
    pub fn monitor_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.monitor_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the monitor.</p>
    pub fn set_monitor_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.monitor_name = input;
        self
    }
    /// <p>The name of the monitor.</p>
    pub fn get_monitor_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.monitor_name
    }
    /// <p>The ID of the query that you want to stop. A <code>QueryId</code> is an internally-generated identifier for a specific query.</p>
    /// This field is required.
    pub fn query_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.query_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the query that you want to stop. A <code>QueryId</code> is an internally-generated identifier for a specific query.</p>
    pub fn set_query_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.query_id = input;
        self
    }
    /// <p>The ID of the query that you want to stop. A <code>QueryId</code> is an internally-generated identifier for a specific query.</p>
    pub fn get_query_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.query_id
    }
    /// Consumes the builder and constructs a [`StopQueryInput`](crate::operation::stop_query::StopQueryInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::stop_query::StopQueryInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::stop_query::StopQueryInput {
            monitor_name: self.monitor_name,
            query_id: self.query_id,
        })
    }
}