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 UpdateProbeInput {
    /// <p>The name of the monitor that the probe was updated for.</p>
    pub monitor_name: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the probe to update.</p>
    pub probe_id: ::std::option::Option<::std::string::String>,
    /// <p>The state of the probe update.</p>
    pub state: ::std::option::Option<crate::types::ProbeState>,
    /// <p>The updated IP address for the probe destination. This must be either an IPv4 or IPv6 address.</p>
    pub destination: ::std::option::Option<::std::string::String>,
    /// <p>The updated port for the probe destination. This is required only if the <code>protocol</code> is <code>TCP</code> and must be a number between <code>1</code> and <code>65536</code>.</p>
    pub destination_port: ::std::option::Option<i32>,
    /// <p>The updated network protocol for the destination. This can be either <code>TCP</code> or <code>ICMP</code>. If the protocol is <code>TCP</code>, then <code>port</code> is also required.</p>
    pub protocol: ::std::option::Option<crate::types::Protocol>,
    /// <p>he updated packets size for network traffic between the source and destination. This must be a number between <code>56</code> and <code>8500</code>.</p>
    pub packet_size: ::std::option::Option<i32>,
}
impl UpdateProbeInput {
    /// <p>The name of the monitor that the probe was updated for.</p>
    pub fn monitor_name(&self) -> ::std::option::Option<&str> {
        self.monitor_name.as_deref()
    }
    /// <p>The ID of the probe to update.</p>
    pub fn probe_id(&self) -> ::std::option::Option<&str> {
        self.probe_id.as_deref()
    }
    /// <p>The state of the probe update.</p>
    pub fn state(&self) -> ::std::option::Option<&crate::types::ProbeState> {
        self.state.as_ref()
    }
    /// <p>The updated IP address for the probe destination. This must be either an IPv4 or IPv6 address.</p>
    pub fn destination(&self) -> ::std::option::Option<&str> {
        self.destination.as_deref()
    }
    /// <p>The updated port for the probe destination. This is required only if the <code>protocol</code> is <code>TCP</code> and must be a number between <code>1</code> and <code>65536</code>.</p>
    pub fn destination_port(&self) -> ::std::option::Option<i32> {
        self.destination_port
    }
    /// <p>The updated network protocol for the destination. This can be either <code>TCP</code> or <code>ICMP</code>. If the protocol is <code>TCP</code>, then <code>port</code> is also required.</p>
    pub fn protocol(&self) -> ::std::option::Option<&crate::types::Protocol> {
        self.protocol.as_ref()
    }
    /// <p>he updated packets size for network traffic between the source and destination. This must be a number between <code>56</code> and <code>8500</code>.</p>
    pub fn packet_size(&self) -> ::std::option::Option<i32> {
        self.packet_size
    }
}
impl UpdateProbeInput {
    /// Creates a new builder-style object to manufacture [`UpdateProbeInput`](crate::operation::update_probe::UpdateProbeInput).
    pub fn builder() -> crate::operation::update_probe::builders::UpdateProbeInputBuilder {
        crate::operation::update_probe::builders::UpdateProbeInputBuilder::default()
    }
}

/// A builder for [`UpdateProbeInput`](crate::operation::update_probe::UpdateProbeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateProbeInputBuilder {
    pub(crate) monitor_name: ::std::option::Option<::std::string::String>,
    pub(crate) probe_id: ::std::option::Option<::std::string::String>,
    pub(crate) state: ::std::option::Option<crate::types::ProbeState>,
    pub(crate) destination: ::std::option::Option<::std::string::String>,
    pub(crate) destination_port: ::std::option::Option<i32>,
    pub(crate) protocol: ::std::option::Option<crate::types::Protocol>,
    pub(crate) packet_size: ::std::option::Option<i32>,
}
impl UpdateProbeInputBuilder {
    /// <p>The name of the monitor that the probe was updated for.</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 that the probe was updated for.</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 that the probe was updated for.</p>
    pub fn get_monitor_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.monitor_name
    }
    /// <p>The ID of the probe to update.</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 update.</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 update.</p>
    pub fn get_probe_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.probe_id
    }
    /// <p>The state of the probe update.</p>
    pub fn state(mut self, input: crate::types::ProbeState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The state of the probe update.</p>
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::ProbeState>) -> Self {
        self.state = input;
        self
    }
    /// <p>The state of the probe update.</p>
    pub fn get_state(&self) -> &::std::option::Option<crate::types::ProbeState> {
        &self.state
    }
    /// <p>The updated IP address for the probe destination. This must be either an IPv4 or IPv6 address.</p>
    pub fn destination(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.destination = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The updated IP address for the probe destination. This must be either an IPv4 or IPv6 address.</p>
    pub fn set_destination(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.destination = input;
        self
    }
    /// <p>The updated IP address for the probe destination. This must be either an IPv4 or IPv6 address.</p>
    pub fn get_destination(&self) -> &::std::option::Option<::std::string::String> {
        &self.destination
    }
    /// <p>The updated port for the probe destination. This is required only if the <code>protocol</code> is <code>TCP</code> and must be a number between <code>1</code> and <code>65536</code>.</p>
    pub fn destination_port(mut self, input: i32) -> Self {
        self.destination_port = ::std::option::Option::Some(input);
        self
    }
    /// <p>The updated port for the probe destination. This is required only if the <code>protocol</code> is <code>TCP</code> and must be a number between <code>1</code> and <code>65536</code>.</p>
    pub fn set_destination_port(mut self, input: ::std::option::Option<i32>) -> Self {
        self.destination_port = input;
        self
    }
    /// <p>The updated port for the probe destination. This is required only if the <code>protocol</code> is <code>TCP</code> and must be a number between <code>1</code> and <code>65536</code>.</p>
    pub fn get_destination_port(&self) -> &::std::option::Option<i32> {
        &self.destination_port
    }
    /// <p>The updated network protocol for the destination. This can be either <code>TCP</code> or <code>ICMP</code>. If the protocol is <code>TCP</code>, then <code>port</code> is also required.</p>
    pub fn protocol(mut self, input: crate::types::Protocol) -> Self {
        self.protocol = ::std::option::Option::Some(input);
        self
    }
    /// <p>The updated network protocol for the destination. This can be either <code>TCP</code> or <code>ICMP</code>. If the protocol is <code>TCP</code>, then <code>port</code> is also required.</p>
    pub fn set_protocol(mut self, input: ::std::option::Option<crate::types::Protocol>) -> Self {
        self.protocol = input;
        self
    }
    /// <p>The updated network protocol for the destination. This can be either <code>TCP</code> or <code>ICMP</code>. If the protocol is <code>TCP</code>, then <code>port</code> is also required.</p>
    pub fn get_protocol(&self) -> &::std::option::Option<crate::types::Protocol> {
        &self.protocol
    }
    /// <p>he updated packets size for network traffic between the source and destination. This must be a number between <code>56</code> and <code>8500</code>.</p>
    pub fn packet_size(mut self, input: i32) -> Self {
        self.packet_size = ::std::option::Option::Some(input);
        self
    }
    /// <p>he updated packets size for network traffic between the source and destination. This must be a number between <code>56</code> and <code>8500</code>.</p>
    pub fn set_packet_size(mut self, input: ::std::option::Option<i32>) -> Self {
        self.packet_size = input;
        self
    }
    /// <p>he updated packets size for network traffic between the source and destination. This must be a number between <code>56</code> and <code>8500</code>.</p>
    pub fn get_packet_size(&self) -> &::std::option::Option<i32> {
        &self.packet_size
    }
    /// Consumes the builder and constructs a [`UpdateProbeInput`](crate::operation::update_probe::UpdateProbeInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::update_probe::UpdateProbeInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_probe::UpdateProbeInput {
            monitor_name: self.monitor_name,
            probe_id: self.probe_id,
            state: self.state,
            destination: self.destination,
            destination_port: self.destination_port,
            protocol: self.protocol,
            packet_size: self.packet_size,
        })
    }
}