com.amazonaws.services.elasticache.model.ProcessedUpdateAction 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;
/**
*
* Update action that has been processed for the corresponding apply/stop request
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ProcessedUpdateAction implements Serializable, Cloneable {
/**
*
* The ID of the replication group
*
*/
private String replicationGroupId;
/**
*
* The ID of the cache cluster
*
*/
private String cacheClusterId;
/**
*
* The unique ID of the service update
*
*/
private String serviceUpdateName;
/**
*
* The status of the update action on the Redis OSS cluster
*
*/
private String updateActionStatus;
/**
*
* The ID of the replication group
*
*
* @param replicationGroupId
* The ID of the replication group
*/
public void setReplicationGroupId(String replicationGroupId) {
this.replicationGroupId = replicationGroupId;
}
/**
*
* The ID of the replication group
*
*
* @return The ID of the replication group
*/
public String getReplicationGroupId() {
return this.replicationGroupId;
}
/**
*
* The ID of the replication group
*
*
* @param replicationGroupId
* The ID of the replication group
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProcessedUpdateAction withReplicationGroupId(String replicationGroupId) {
setReplicationGroupId(replicationGroupId);
return this;
}
/**
*
* The ID of the cache cluster
*
*
* @param cacheClusterId
* The ID of the cache cluster
*/
public void setCacheClusterId(String cacheClusterId) {
this.cacheClusterId = cacheClusterId;
}
/**
*
* The ID of the cache cluster
*
*
* @return The ID of the cache cluster
*/
public String getCacheClusterId() {
return this.cacheClusterId;
}
/**
*
* The ID of the cache cluster
*
*
* @param cacheClusterId
* The ID of the cache cluster
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProcessedUpdateAction withCacheClusterId(String cacheClusterId) {
setCacheClusterId(cacheClusterId);
return this;
}
/**
*
* The unique ID of the service update
*
*
* @param serviceUpdateName
* The unique ID of the service update
*/
public void setServiceUpdateName(String serviceUpdateName) {
this.serviceUpdateName = serviceUpdateName;
}
/**
*
* The unique ID of the service update
*
*
* @return The unique ID of the service update
*/
public String getServiceUpdateName() {
return this.serviceUpdateName;
}
/**
*
* The unique ID of the service update
*
*
* @param serviceUpdateName
* The unique ID of the service update
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProcessedUpdateAction withServiceUpdateName(String serviceUpdateName) {
setServiceUpdateName(serviceUpdateName);
return this;
}
/**
*
* The status of the update action on the Redis OSS cluster
*
*
* @param updateActionStatus
* The status of the update action on the Redis OSS cluster
* @see UpdateActionStatus
*/
public void setUpdateActionStatus(String updateActionStatus) {
this.updateActionStatus = updateActionStatus;
}
/**
*
* The status of the update action on the Redis OSS cluster
*
*
* @return The status of the update action on the Redis OSS cluster
* @see UpdateActionStatus
*/
public String getUpdateActionStatus() {
return this.updateActionStatus;
}
/**
*
* The status of the update action on the Redis OSS cluster
*
*
* @param updateActionStatus
* The status of the update action on the Redis OSS cluster
* @return Returns a reference to this object so that method calls can be chained together.
* @see UpdateActionStatus
*/
public ProcessedUpdateAction withUpdateActionStatus(String updateActionStatus) {
setUpdateActionStatus(updateActionStatus);
return this;
}
/**
*
* The status of the update action on the Redis OSS cluster
*
*
* @param updateActionStatus
* The status of the update action on the Redis OSS cluster
* @return Returns a reference to this object so that method calls can be chained together.
* @see UpdateActionStatus
*/
public ProcessedUpdateAction withUpdateActionStatus(UpdateActionStatus updateActionStatus) {
this.updateActionStatus = updateActionStatus.toString();
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 (getReplicationGroupId() != null)
sb.append("ReplicationGroupId: ").append(getReplicationGroupId()).append(",");
if (getCacheClusterId() != null)
sb.append("CacheClusterId: ").append(getCacheClusterId()).append(",");
if (getServiceUpdateName() != null)
sb.append("ServiceUpdateName: ").append(getServiceUpdateName()).append(",");
if (getUpdateActionStatus() != null)
sb.append("UpdateActionStatus: ").append(getUpdateActionStatus());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ProcessedUpdateAction == false)
return false;
ProcessedUpdateAction other = (ProcessedUpdateAction) obj;
if (other.getReplicationGroupId() == null ^ this.getReplicationGroupId() == null)
return false;
if (other.getReplicationGroupId() != null && other.getReplicationGroupId().equals(this.getReplicationGroupId()) == false)
return false;
if (other.getCacheClusterId() == null ^ this.getCacheClusterId() == null)
return false;
if (other.getCacheClusterId() != null && other.getCacheClusterId().equals(this.getCacheClusterId()) == false)
return false;
if (other.getServiceUpdateName() == null ^ this.getServiceUpdateName() == null)
return false;
if (other.getServiceUpdateName() != null && other.getServiceUpdateName().equals(this.getServiceUpdateName()) == false)
return false;
if (other.getUpdateActionStatus() == null ^ this.getUpdateActionStatus() == null)
return false;
if (other.getUpdateActionStatus() != null && other.getUpdateActionStatus().equals(this.getUpdateActionStatus()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getReplicationGroupId() == null) ? 0 : getReplicationGroupId().hashCode());
hashCode = prime * hashCode + ((getCacheClusterId() == null) ? 0 : getCacheClusterId().hashCode());
hashCode = prime * hashCode + ((getServiceUpdateName() == null) ? 0 : getServiceUpdateName().hashCode());
hashCode = prime * hashCode + ((getUpdateActionStatus() == null) ? 0 : getUpdateActionStatus().hashCode());
return hashCode;
}
@Override
public ProcessedUpdateAction clone() {
try {
return (ProcessedUpdateAction) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}