com.amazonaws.services.elasticache.model.BatchApplyUpdateActionResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-elasticache Show documentation
/*
* 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.elasticache.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class BatchApplyUpdateActionResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* Update actions that have been processed successfully
*
*/
private com.amazonaws.internal.SdkInternalList processedUpdateActions;
/**
*
* Update actions that haven't been processed successfully
*
*/
private com.amazonaws.internal.SdkInternalList unprocessedUpdateActions;
/**
*
* Update actions that have been processed successfully
*
*
* @return Update actions that have been processed successfully
*/
public java.util.List getProcessedUpdateActions() {
if (processedUpdateActions == null) {
processedUpdateActions = new com.amazonaws.internal.SdkInternalList();
}
return processedUpdateActions;
}
/**
*
* Update actions that have been processed successfully
*
*
* @param processedUpdateActions
* Update actions that have been processed successfully
*/
public void setProcessedUpdateActions(java.util.Collection processedUpdateActions) {
if (processedUpdateActions == null) {
this.processedUpdateActions = null;
return;
}
this.processedUpdateActions = new com.amazonaws.internal.SdkInternalList(processedUpdateActions);
}
/**
*
* Update actions that have been processed successfully
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setProcessedUpdateActions(java.util.Collection)} or
* {@link #withProcessedUpdateActions(java.util.Collection)} if you want to override the existing values.
*
*
* @param processedUpdateActions
* Update actions that have been processed successfully
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchApplyUpdateActionResult withProcessedUpdateActions(ProcessedUpdateAction... processedUpdateActions) {
if (this.processedUpdateActions == null) {
setProcessedUpdateActions(new com.amazonaws.internal.SdkInternalList(processedUpdateActions.length));
}
for (ProcessedUpdateAction ele : processedUpdateActions) {
this.processedUpdateActions.add(ele);
}
return this;
}
/**
*
* Update actions that have been processed successfully
*
*
* @param processedUpdateActions
* Update actions that have been processed successfully
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchApplyUpdateActionResult withProcessedUpdateActions(java.util.Collection processedUpdateActions) {
setProcessedUpdateActions(processedUpdateActions);
return this;
}
/**
*
* Update actions that haven't been processed successfully
*
*
* @return Update actions that haven't been processed successfully
*/
public java.util.List getUnprocessedUpdateActions() {
if (unprocessedUpdateActions == null) {
unprocessedUpdateActions = new com.amazonaws.internal.SdkInternalList();
}
return unprocessedUpdateActions;
}
/**
*
* Update actions that haven't been processed successfully
*
*
* @param unprocessedUpdateActions
* Update actions that haven't been processed successfully
*/
public void setUnprocessedUpdateActions(java.util.Collection unprocessedUpdateActions) {
if (unprocessedUpdateActions == null) {
this.unprocessedUpdateActions = null;
return;
}
this.unprocessedUpdateActions = new com.amazonaws.internal.SdkInternalList(unprocessedUpdateActions);
}
/**
*
* Update actions that haven't been processed successfully
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setUnprocessedUpdateActions(java.util.Collection)} or
* {@link #withUnprocessedUpdateActions(java.util.Collection)} if you want to override the existing values.
*
*
* @param unprocessedUpdateActions
* Update actions that haven't been processed successfully
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchApplyUpdateActionResult withUnprocessedUpdateActions(UnprocessedUpdateAction... unprocessedUpdateActions) {
if (this.unprocessedUpdateActions == null) {
setUnprocessedUpdateActions(new com.amazonaws.internal.SdkInternalList(unprocessedUpdateActions.length));
}
for (UnprocessedUpdateAction ele : unprocessedUpdateActions) {
this.unprocessedUpdateActions.add(ele);
}
return this;
}
/**
*
* Update actions that haven't been processed successfully
*
*
* @param unprocessedUpdateActions
* Update actions that haven't been processed successfully
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchApplyUpdateActionResult withUnprocessedUpdateActions(java.util.Collection unprocessedUpdateActions) {
setUnprocessedUpdateActions(unprocessedUpdateActions);
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 (getProcessedUpdateActions() != null)
sb.append("ProcessedUpdateActions: ").append(getProcessedUpdateActions()).append(",");
if (getUnprocessedUpdateActions() != null)
sb.append("UnprocessedUpdateActions: ").append(getUnprocessedUpdateActions());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof BatchApplyUpdateActionResult == false)
return false;
BatchApplyUpdateActionResult other = (BatchApplyUpdateActionResult) obj;
if (other.getProcessedUpdateActions() == null ^ this.getProcessedUpdateActions() == null)
return false;
if (other.getProcessedUpdateActions() != null && other.getProcessedUpdateActions().equals(this.getProcessedUpdateActions()) == false)
return false;
if (other.getUnprocessedUpdateActions() == null ^ this.getUnprocessedUpdateActions() == null)
return false;
if (other.getUnprocessedUpdateActions() != null && other.getUnprocessedUpdateActions().equals(this.getUnprocessedUpdateActions()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getProcessedUpdateActions() == null) ? 0 : getProcessedUpdateActions().hashCode());
hashCode = prime * hashCode + ((getUnprocessedUpdateActions() == null) ? 0 : getUnprocessedUpdateActions().hashCode());
return hashCode;
}
@Override
public BatchApplyUpdateActionResult clone() {
try {
return (BatchApplyUpdateActionResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}