/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.dlm.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* [Event-based policies only] Specifies an action for an event-based policy. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Action implements Serializable, Cloneable, StructuredPojo { /** ** A descriptive name for the action. *
*/ private String name; /** ** The rule for copying shared snapshots across Regions. *
*/ private java.util.List* A descriptive name for the action. *
* * @param name * A descriptive name for the action. */ public void setName(String name) { this.name = name; } /** ** A descriptive name for the action. *
* * @return A descriptive name for the action. */ public String getName() { return this.name; } /** ** A descriptive name for the action. *
* * @param name * A descriptive name for the action. * @return Returns a reference to this object so that method calls can be chained together. */ public Action withName(String name) { setName(name); return this; } /** ** The rule for copying shared snapshots across Regions. *
* * @return The rule for copying shared snapshots across Regions. */ public java.util.List* The rule for copying shared snapshots across Regions. *
* * @param crossRegionCopy * The rule for copying shared snapshots across Regions. */ public void setCrossRegionCopy(java.util.Collection* The rule for copying shared snapshots across Regions. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setCrossRegionCopy(java.util.Collection)} or {@link #withCrossRegionCopy(java.util.Collection)} if you * want to override the existing values. *
* * @param crossRegionCopy * The rule for copying shared snapshots across Regions. * @return Returns a reference to this object so that method calls can be chained together. */ public Action withCrossRegionCopy(CrossRegionCopyAction... crossRegionCopy) { if (this.crossRegionCopy == null) { setCrossRegionCopy(new java.util.ArrayList* The rule for copying shared snapshots across Regions. *
* * @param crossRegionCopy * The rule for copying shared snapshots across Regions. * @return Returns a reference to this object so that method calls can be chained together. */ public Action withCrossRegionCopy(java.util.Collection