// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The information for each resource record set that you want to change.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Change {
/// <p>The action to perform:</p>
/// <ul>
/// <li> <p> <code>CREATE</code>: Creates a resource record set that has the specified values.</p> </li>
/// <li> <p> <code>DELETE</code>: Deletes a existing resource record set.</p> <important>
/// <p>To delete the resource record set that is associated with a traffic policy instance, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeleteTrafficPolicyInstance.html">DeleteTrafficPolicyInstance</a>. Amazon Route 53 will delete the resource record set automatically. If you delete the resource record set by using <code>ChangeResourceRecordSets</code>, Route 53 doesn't automatically delete the traffic policy instance, and you'll continue to be charged for it even though it's no longer in use. </p>
/// </important> </li>
/// <li> <p> <code>UPSERT</code>: If a resource record set doesn't already exist, Route 53 creates it. If a resource record set does exist, Route 53 updates it with the values in the request.</p> </li>
/// </ul>
#[doc(hidden)]
pub action: std::option::Option<crate::types::ChangeAction>,
/// <p>Information about the resource record set to create, delete, or update.</p>
#[doc(hidden)]
pub resource_record_set: std::option::Option<crate::types::ResourceRecordSet>,
}
impl Change {
/// <p>The action to perform:</p>
/// <ul>
/// <li> <p> <code>CREATE</code>: Creates a resource record set that has the specified values.</p> </li>
/// <li> <p> <code>DELETE</code>: Deletes a existing resource record set.</p> <important>
/// <p>To delete the resource record set that is associated with a traffic policy instance, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeleteTrafficPolicyInstance.html">DeleteTrafficPolicyInstance</a>. Amazon Route 53 will delete the resource record set automatically. If you delete the resource record set by using <code>ChangeResourceRecordSets</code>, Route 53 doesn't automatically delete the traffic policy instance, and you'll continue to be charged for it even though it's no longer in use. </p>
/// </important> </li>
/// <li> <p> <code>UPSERT</code>: If a resource record set doesn't already exist, Route 53 creates it. If a resource record set does exist, Route 53 updates it with the values in the request.</p> </li>
/// </ul>
pub fn action(&self) -> std::option::Option<&crate::types::ChangeAction> {
self.action.as_ref()
}
/// <p>Information about the resource record set to create, delete, or update.</p>
pub fn resource_record_set(&self) -> std::option::Option<&crate::types::ResourceRecordSet> {
self.resource_record_set.as_ref()
}
}
impl Change {
/// Creates a new builder-style object to manufacture [`Change`](crate::types::Change).
pub fn builder() -> crate::types::builders::ChangeBuilder {
crate::types::builders::ChangeBuilder::default()
}
}
/// A builder for [`Change`](crate::types::Change).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ChangeBuilder {
pub(crate) action: std::option::Option<crate::types::ChangeAction>,
pub(crate) resource_record_set: std::option::Option<crate::types::ResourceRecordSet>,
}
impl ChangeBuilder {
/// <p>The action to perform:</p>
/// <ul>
/// <li> <p> <code>CREATE</code>: Creates a resource record set that has the specified values.</p> </li>
/// <li> <p> <code>DELETE</code>: Deletes a existing resource record set.</p> <important>
/// <p>To delete the resource record set that is associated with a traffic policy instance, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeleteTrafficPolicyInstance.html">DeleteTrafficPolicyInstance</a>. Amazon Route 53 will delete the resource record set automatically. If you delete the resource record set by using <code>ChangeResourceRecordSets</code>, Route 53 doesn't automatically delete the traffic policy instance, and you'll continue to be charged for it even though it's no longer in use. </p>
/// </important> </li>
/// <li> <p> <code>UPSERT</code>: If a resource record set doesn't already exist, Route 53 creates it. If a resource record set does exist, Route 53 updates it with the values in the request.</p> </li>
/// </ul>
pub fn action(mut self, input: crate::types::ChangeAction) -> Self {
self.action = Some(input);
self
}
/// <p>The action to perform:</p>
/// <ul>
/// <li> <p> <code>CREATE</code>: Creates a resource record set that has the specified values.</p> </li>
/// <li> <p> <code>DELETE</code>: Deletes a existing resource record set.</p> <important>
/// <p>To delete the resource record set that is associated with a traffic policy instance, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeleteTrafficPolicyInstance.html">DeleteTrafficPolicyInstance</a>. Amazon Route 53 will delete the resource record set automatically. If you delete the resource record set by using <code>ChangeResourceRecordSets</code>, Route 53 doesn't automatically delete the traffic policy instance, and you'll continue to be charged for it even though it's no longer in use. </p>
/// </important> </li>
/// <li> <p> <code>UPSERT</code>: If a resource record set doesn't already exist, Route 53 creates it. If a resource record set does exist, Route 53 updates it with the values in the request.</p> </li>
/// </ul>
pub fn set_action(mut self, input: std::option::Option<crate::types::ChangeAction>) -> Self {
self.action = input;
self
}
/// <p>Information about the resource record set to create, delete, or update.</p>
pub fn resource_record_set(mut self, input: crate::types::ResourceRecordSet) -> Self {
self.resource_record_set = Some(input);
self
}
/// <p>Information about the resource record set to create, delete, or update.</p>
pub fn set_resource_record_set(
mut self,
input: std::option::Option<crate::types::ResourceRecordSet>,
) -> Self {
self.resource_record_set = input;
self
}
/// Consumes the builder and constructs a [`Change`](crate::types::Change).
pub fn build(self) -> crate::types::Change {
crate::types::Change {
action: self.action,
resource_record_set: self.resource_record_set,
}
}
}