aws-sdk-networkmonitor 1.88.0

AWS SDK for Amazon CloudWatch Network 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 GetProbeInput {
    /// <p>The name of the monitor associated with the probe. Run <code>ListMonitors</code> to get a list of monitor names.</p>
    pub monitor_name: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the probe to get information about. Run <code>GetMonitor</code> action to get a list of probes and probe IDs for the monitor.</p>
    pub probe_id: ::std::option::Option<::std::string::String>,
}
impl GetProbeInput {
    /// <p>The name of the monitor associated with the probe. Run <code>ListMonitors</code> to get a list of monitor names.</p>
    pub fn monitor_name(&self) -> ::std::option::Option<&str> {
        self.monitor_name.as_deref()
    }
    /// <p>The ID of the probe to get information about. Run <code>GetMonitor</code> action to get a list of probes and probe IDs for the monitor.</p>
    pub fn probe_id(&self) -> ::std::option::Option<&str> {
        self.probe_id.as_deref()
    }
}
impl GetProbeInput {
    /// Creates a new builder-style object to manufacture [`GetProbeInput`](crate::operation::get_probe::GetProbeInput).
    pub fn builder() -> crate::operation::get_probe::builders::GetProbeInputBuilder {
        crate::operation::get_probe::builders::GetProbeInputBuilder::default()
    }
}

/// A builder for [`GetProbeInput`](crate::operation::get_probe::GetProbeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetProbeInputBuilder {
    pub(crate) monitor_name: ::std::option::Option<::std::string::String>,
    pub(crate) probe_id: ::std::option::Option<::std::string::String>,
}
impl GetProbeInputBuilder {
    /// <p>The name of the monitor associated with the probe. Run <code>ListMonitors</code> to get a list of monitor names.</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 associated with the probe. Run <code>ListMonitors</code> to get a list of monitor names.</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 associated with the probe. Run <code>ListMonitors</code> to get a list of monitor names.</p>
    pub fn get_monitor_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.monitor_name
    }
    /// <p>The ID of the probe to get information about. Run <code>GetMonitor</code> action to get a list of probes and probe IDs for the monitor.</p>
    /// This field is required.
    pub fn probe_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.probe_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the probe to get information about. Run <code>GetMonitor</code> action to get a list of probes and probe IDs for the monitor.</p>
    pub fn set_probe_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.probe_id = input;
        self
    }
    /// <p>The ID of the probe to get information about. Run <code>GetMonitor</code> action to get a list of probes and probe IDs for the monitor.</p>
    pub fn get_probe_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.probe_id
    }
    /// Consumes the builder and constructs a [`GetProbeInput`](crate::operation::get_probe::GetProbeInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_probe::GetProbeInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_probe::GetProbeInput {
            monitor_name: self.monitor_name,
            probe_id: self.probe_id,
        })
    }
}