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

com.amazonaws.services.dynamodbv2.model.SourceTableFeatureDetails Maven / Gradle / Ivy

/*
 * Copyright 2010-2018 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.dynamodbv2.model;

import java.io.Serializable;

/**
 * 

* Contains the details of the features enabled on the table when the backup was * created. For example, LSIs, GSIs, streams, TTL. *

*/ public class SourceTableFeatureDetails implements Serializable { /** *

* Represents the LSI properties for the table when the backup was created. * It includes the IndexName, KeySchema and Projection for the LSIs on the * table at the time of backup. *

*/ private java.util.List localSecondaryIndexes; /** *

* Represents the GSI properties for the table when the backup was created. * It includes the IndexName, KeySchema, Projection and * ProvisionedThroughput for the GSIs on the table at the time of backup. *

*/ private java.util.List globalSecondaryIndexes; /** *

* Stream settings on the table when the backup was created. *

*/ private StreamSpecification streamDescription; /** *

* Time to Live settings on the table when the backup was created. *

*/ private TimeToLiveDescription timeToLiveDescription; /** *

* The description of the server-side encryption status on the table when * the backup was created. *

*/ private SSEDescription sSEDescription; /** *

* Represents the LSI properties for the table when the backup was created. * It includes the IndexName, KeySchema and Projection for the LSIs on the * table at the time of backup. *

* * @return

* Represents the LSI properties for the table when the backup was * created. It includes the IndexName, KeySchema and Projection for * the LSIs on the table at the time of backup. *

*/ public java.util.List getLocalSecondaryIndexes() { return localSecondaryIndexes; } /** *

* Represents the LSI properties for the table when the backup was created. * It includes the IndexName, KeySchema and Projection for the LSIs on the * table at the time of backup. *

* * @param localSecondaryIndexes

* Represents the LSI properties for the table when the backup * was created. It includes the IndexName, KeySchema and * Projection for the LSIs on the table at the time of backup. *

*/ public void setLocalSecondaryIndexes( java.util.Collection localSecondaryIndexes) { if (localSecondaryIndexes == null) { this.localSecondaryIndexes = null; return; } this.localSecondaryIndexes = new java.util.ArrayList( localSecondaryIndexes); } /** *

* Represents the LSI properties for the table when the backup was created. * It includes the IndexName, KeySchema and Projection for the LSIs on the * table at the time of backup. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param localSecondaryIndexes

* Represents the LSI properties for the table when the backup * was created. It includes the IndexName, KeySchema and * Projection for the LSIs on the table at the time of backup. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SourceTableFeatureDetails withLocalSecondaryIndexes( LocalSecondaryIndexInfo... localSecondaryIndexes) { if (getLocalSecondaryIndexes() == null) { this.localSecondaryIndexes = new java.util.ArrayList( localSecondaryIndexes.length); } for (LocalSecondaryIndexInfo value : localSecondaryIndexes) { this.localSecondaryIndexes.add(value); } return this; } /** *

* Represents the LSI properties for the table when the backup was created. * It includes the IndexName, KeySchema and Projection for the LSIs on the * table at the time of backup. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param localSecondaryIndexes

* Represents the LSI properties for the table when the backup * was created. It includes the IndexName, KeySchema and * Projection for the LSIs on the table at the time of backup. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SourceTableFeatureDetails withLocalSecondaryIndexes( java.util.Collection localSecondaryIndexes) { setLocalSecondaryIndexes(localSecondaryIndexes); return this; } /** *

* Represents the GSI properties for the table when the backup was created. * It includes the IndexName, KeySchema, Projection and * ProvisionedThroughput for the GSIs on the table at the time of backup. *

* * @return

* Represents the GSI properties for the table when the backup was * created. It includes the IndexName, KeySchema, Projection and * ProvisionedThroughput for the GSIs on the table at the time of * backup. *

*/ public java.util.List getGlobalSecondaryIndexes() { return globalSecondaryIndexes; } /** *

* Represents the GSI properties for the table when the backup was created. * It includes the IndexName, KeySchema, Projection and * ProvisionedThroughput for the GSIs on the table at the time of backup. *

* * @param globalSecondaryIndexes

* Represents the GSI properties for the table when the backup * was created. It includes the IndexName, KeySchema, Projection * and ProvisionedThroughput for the GSIs on the table at the * time of backup. *

*/ public void setGlobalSecondaryIndexes( java.util.Collection globalSecondaryIndexes) { if (globalSecondaryIndexes == null) { this.globalSecondaryIndexes = null; return; } this.globalSecondaryIndexes = new java.util.ArrayList( globalSecondaryIndexes); } /** *

* Represents the GSI properties for the table when the backup was created. * It includes the IndexName, KeySchema, Projection and * ProvisionedThroughput for the GSIs on the table at the time of backup. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param globalSecondaryIndexes

* Represents the GSI properties for the table when the backup * was created. It includes the IndexName, KeySchema, Projection * and ProvisionedThroughput for the GSIs on the table at the * time of backup. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SourceTableFeatureDetails withGlobalSecondaryIndexes( GlobalSecondaryIndexInfo... globalSecondaryIndexes) { if (getGlobalSecondaryIndexes() == null) { this.globalSecondaryIndexes = new java.util.ArrayList( globalSecondaryIndexes.length); } for (GlobalSecondaryIndexInfo value : globalSecondaryIndexes) { this.globalSecondaryIndexes.add(value); } return this; } /** *

* Represents the GSI properties for the table when the backup was created. * It includes the IndexName, KeySchema, Projection and * ProvisionedThroughput for the GSIs on the table at the time of backup. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param globalSecondaryIndexes

* Represents the GSI properties for the table when the backup * was created. It includes the IndexName, KeySchema, Projection * and ProvisionedThroughput for the GSIs on the table at the * time of backup. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SourceTableFeatureDetails withGlobalSecondaryIndexes( java.util.Collection globalSecondaryIndexes) { setGlobalSecondaryIndexes(globalSecondaryIndexes); return this; } /** *

* Stream settings on the table when the backup was created. *

* * @return

* Stream settings on the table when the backup was created. *

*/ public StreamSpecification getStreamDescription() { return streamDescription; } /** *

* Stream settings on the table when the backup was created. *

* * @param streamDescription

* Stream settings on the table when the backup was created. *

*/ public void setStreamDescription(StreamSpecification streamDescription) { this.streamDescription = streamDescription; } /** *

* Stream settings on the table when the backup was created. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param streamDescription

* Stream settings on the table when the backup was created. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SourceTableFeatureDetails withStreamDescription(StreamSpecification streamDescription) { this.streamDescription = streamDescription; return this; } /** *

* Time to Live settings on the table when the backup was created. *

* * @return

* Time to Live settings on the table when the backup was created. *

*/ public TimeToLiveDescription getTimeToLiveDescription() { return timeToLiveDescription; } /** *

* Time to Live settings on the table when the backup was created. *

* * @param timeToLiveDescription

* Time to Live settings on the table when the backup was * created. *

*/ public void setTimeToLiveDescription(TimeToLiveDescription timeToLiveDescription) { this.timeToLiveDescription = timeToLiveDescription; } /** *

* Time to Live settings on the table when the backup was created. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param timeToLiveDescription

* Time to Live settings on the table when the backup was * created. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SourceTableFeatureDetails withTimeToLiveDescription( TimeToLiveDescription timeToLiveDescription) { this.timeToLiveDescription = timeToLiveDescription; return this; } /** *

* The description of the server-side encryption status on the table when * the backup was created. *

* * @return

* The description of the server-side encryption status on the table * when the backup was created. *

*/ public SSEDescription getSSEDescription() { return sSEDescription; } /** *

* The description of the server-side encryption status on the table when * the backup was created. *

* * @param sSEDescription

* The description of the server-side encryption status on the * table when the backup was created. *

*/ public void setSSEDescription(SSEDescription sSEDescription) { this.sSEDescription = sSEDescription; } /** *

* The description of the server-side encryption status on the table when * the backup was created. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param sSEDescription

* The description of the server-side encryption status on the * table when the backup was created. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SourceTableFeatureDetails withSSEDescription(SSEDescription sSEDescription) { this.sSEDescription = sSEDescription; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getLocalSecondaryIndexes() != null) sb.append("LocalSecondaryIndexes: " + getLocalSecondaryIndexes() + ","); if (getGlobalSecondaryIndexes() != null) sb.append("GlobalSecondaryIndexes: " + getGlobalSecondaryIndexes() + ","); if (getStreamDescription() != null) sb.append("StreamDescription: " + getStreamDescription() + ","); if (getTimeToLiveDescription() != null) sb.append("TimeToLiveDescription: " + getTimeToLiveDescription() + ","); if (getSSEDescription() != null) sb.append("SSEDescription: " + getSSEDescription()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLocalSecondaryIndexes() == null) ? 0 : getLocalSecondaryIndexes().hashCode()); hashCode = prime * hashCode + ((getGlobalSecondaryIndexes() == null) ? 0 : getGlobalSecondaryIndexes() .hashCode()); hashCode = prime * hashCode + ((getStreamDescription() == null) ? 0 : getStreamDescription().hashCode()); hashCode = prime * hashCode + ((getTimeToLiveDescription() == null) ? 0 : getTimeToLiveDescription().hashCode()); hashCode = prime * hashCode + ((getSSEDescription() == null) ? 0 : getSSEDescription().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SourceTableFeatureDetails == false) return false; SourceTableFeatureDetails other = (SourceTableFeatureDetails) obj; if (other.getLocalSecondaryIndexes() == null ^ this.getLocalSecondaryIndexes() == null) return false; if (other.getLocalSecondaryIndexes() != null && other.getLocalSecondaryIndexes().equals(this.getLocalSecondaryIndexes()) == false) return false; if (other.getGlobalSecondaryIndexes() == null ^ this.getGlobalSecondaryIndexes() == null) return false; if (other.getGlobalSecondaryIndexes() != null && other.getGlobalSecondaryIndexes().equals(this.getGlobalSecondaryIndexes()) == false) return false; if (other.getStreamDescription() == null ^ this.getStreamDescription() == null) return false; if (other.getStreamDescription() != null && other.getStreamDescription().equals(this.getStreamDescription()) == false) return false; if (other.getTimeToLiveDescription() == null ^ this.getTimeToLiveDescription() == null) return false; if (other.getTimeToLiveDescription() != null && other.getTimeToLiveDescription().equals(this.getTimeToLiveDescription()) == false) return false; if (other.getSSEDescription() == null ^ this.getSSEDescription() == null) return false; if (other.getSSEDescription() != null && other.getSSEDescription().equals(this.getSSEDescription()) == false) return false; return true; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy