All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.dlm.model.Action Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Data Lifecycle Manager module holds the client classes that are used for communicating with Amazon Data Lifecycle Manager Service

The newest version!
/*
 * Copyright 2019-2024 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 crossRegionCopy; /** *

* 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 getCrossRegionCopy() { return crossRegionCopy; } /** *

* The rule for copying shared snapshots across Regions. *

* * @param crossRegionCopy * The rule for copying shared snapshots across Regions. */ public void setCrossRegionCopy(java.util.Collection crossRegionCopy) { if (crossRegionCopy == null) { this.crossRegionCopy = null; return; } this.crossRegionCopy = new java.util.ArrayList(crossRegionCopy); } /** *

* 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(crossRegionCopy.length)); } for (CrossRegionCopyAction ele : crossRegionCopy) { this.crossRegionCopy.add(ele); } return this; } /** *

* 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 crossRegionCopy) { setCrossRegionCopy(crossRegionCopy); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getCrossRegionCopy() != null) sb.append("CrossRegionCopy: ").append(getCrossRegionCopy()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Action == false) return false; Action other = (Action) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getCrossRegionCopy() == null ^ this.getCrossRegionCopy() == null) return false; if (other.getCrossRegionCopy() != null && other.getCrossRegionCopy().equals(this.getCrossRegionCopy()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getCrossRegionCopy() == null) ? 0 : getCrossRegionCopy().hashCode()); return hashCode; } @Override public Action clone() { try { return (Action) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.dlm.model.transform.ActionMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy