aws-sdk-route53 1.112.0

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

/// <p>A request to delete a specified traffic policy version.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteTrafficPolicyInput {
    /// <p>The ID of the traffic policy that you want to delete.</p>
    pub id: ::std::option::Option<::std::string::String>,
    /// <p>The version number of the traffic policy that you want to delete.</p>
    pub version: ::std::option::Option<i32>,
}
impl DeleteTrafficPolicyInput {
    /// <p>The ID of the traffic policy that you want to delete.</p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The version number of the traffic policy that you want to delete.</p>
    pub fn version(&self) -> ::std::option::Option<i32> {
        self.version
    }
}
impl DeleteTrafficPolicyInput {
    /// Creates a new builder-style object to manufacture [`DeleteTrafficPolicyInput`](crate::operation::delete_traffic_policy::DeleteTrafficPolicyInput).
    pub fn builder() -> crate::operation::delete_traffic_policy::builders::DeleteTrafficPolicyInputBuilder {
        crate::operation::delete_traffic_policy::builders::DeleteTrafficPolicyInputBuilder::default()
    }
}

/// A builder for [`DeleteTrafficPolicyInput`](crate::operation::delete_traffic_policy::DeleteTrafficPolicyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteTrafficPolicyInputBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) version: ::std::option::Option<i32>,
}
impl DeleteTrafficPolicyInputBuilder {
    /// <p>The ID of the traffic policy that you want to delete.</p>
    /// This field is required.
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the traffic policy that you want to delete.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The ID of the traffic policy that you want to delete.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>The version number of the traffic policy that you want to delete.</p>
    /// This field is required.
    pub fn version(mut self, input: i32) -> Self {
        self.version = ::std::option::Option::Some(input);
        self
    }
    /// <p>The version number of the traffic policy that you want to delete.</p>
    pub fn set_version(mut self, input: ::std::option::Option<i32>) -> Self {
        self.version = input;
        self
    }
    /// <p>The version number of the traffic policy that you want to delete.</p>
    pub fn get_version(&self) -> &::std::option::Option<i32> {
        &self.version
    }
    /// Consumes the builder and constructs a [`DeleteTrafficPolicyInput`](crate::operation::delete_traffic_policy::DeleteTrafficPolicyInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_traffic_policy::DeleteTrafficPolicyInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::delete_traffic_policy::DeleteTrafficPolicyInput {
            id: self.id,
            version: self.version,
        })
    }
}