aws-sdk-shield 1.98.0

AWS SDK for AWS Shield
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The mitigation applied to a DDoS attack.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Mitigation {
    /// <p>The name of the mitigation taken for this attack.</p>
    pub mitigation_name: ::std::option::Option<::std::string::String>,
}
impl Mitigation {
    /// <p>The name of the mitigation taken for this attack.</p>
    pub fn mitigation_name(&self) -> ::std::option::Option<&str> {
        self.mitigation_name.as_deref()
    }
}
impl Mitigation {
    /// Creates a new builder-style object to manufacture [`Mitigation`](crate::types::Mitigation).
    pub fn builder() -> crate::types::builders::MitigationBuilder {
        crate::types::builders::MitigationBuilder::default()
    }
}

/// A builder for [`Mitigation`](crate::types::Mitigation).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct MitigationBuilder {
    pub(crate) mitigation_name: ::std::option::Option<::std::string::String>,
}
impl MitigationBuilder {
    /// <p>The name of the mitigation taken for this attack.</p>
    pub fn mitigation_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.mitigation_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the mitigation taken for this attack.</p>
    pub fn set_mitigation_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.mitigation_name = input;
        self
    }
    /// <p>The name of the mitigation taken for this attack.</p>
    pub fn get_mitigation_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.mitigation_name
    }
    /// Consumes the builder and constructs a [`Mitigation`](crate::types::Mitigation).
    pub fn build(self) -> crate::types::Mitigation {
        crate::types::Mitigation {
            mitigation_name: self.mitigation_name,
        }
    }
}