
com.amazonaws.services.kafka.model.ClusterOperationInfo Maven / Gradle / Ivy
/*
* 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.kafka.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Returns information about a cluster operation.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ClusterOperationInfo implements Serializable, Cloneable, StructuredPojo {
/**
*
* The ID of the API request that triggered this operation.
*
*/
private String clientRequestId;
/**
*
* ARN of the cluster.
*
*/
private String clusterArn;
/**
*
* The time that the operation was created.
*
*/
private java.util.Date creationTime;
/**
*
* The time at which the operation finished.
*
*/
private java.util.Date endTime;
/**
*
* Describes the error if the operation fails.
*
*/
private ErrorInfo errorInfo;
/**
*
* ARN of the cluster operation.
*
*/
private String operationArn;
/**
*
* State of the cluster operation.
*
*/
private String operationState;
/**
*
* Steps completed during the operation.
*
*/
private java.util.List operationSteps;
/**
*
* Type of the cluster operation.
*
*/
private String operationType;
/**
*
* Information about cluster attributes before a cluster is updated.
*
*/
private MutableClusterInfo sourceClusterInfo;
/**
*
* Information about cluster attributes after a cluster is updated.
*
*/
private MutableClusterInfo targetClusterInfo;
/**
*
* Description of the VPC connection for CreateVpcConnection and DeleteVpcConnection operations.
*
*/
private VpcConnectionInfo vpcConnectionInfo;
/**
*
* The ID of the API request that triggered this operation.
*
*
* @param clientRequestId
*
* The ID of the API request that triggered this operation.
*
*/
public void setClientRequestId(String clientRequestId) {
this.clientRequestId = clientRequestId;
}
/**
*
* The ID of the API request that triggered this operation.
*
*
* @return
* The ID of the API request that triggered this operation.
*
*/
public String getClientRequestId() {
return this.clientRequestId;
}
/**
*
* The ID of the API request that triggered this operation.
*
*
* @param clientRequestId
*
* The ID of the API request that triggered this operation.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterOperationInfo withClientRequestId(String clientRequestId) {
setClientRequestId(clientRequestId);
return this;
}
/**
*
* ARN of the cluster.
*
*
* @param clusterArn
*
* ARN of the cluster.
*
*/
public void setClusterArn(String clusterArn) {
this.clusterArn = clusterArn;
}
/**
*
* ARN of the cluster.
*
*
* @return
* ARN of the cluster.
*
*/
public String getClusterArn() {
return this.clusterArn;
}
/**
*
* ARN of the cluster.
*
*
* @param clusterArn
*
* ARN of the cluster.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterOperationInfo withClusterArn(String clusterArn) {
setClusterArn(clusterArn);
return this;
}
/**
*
* The time that the operation was created.
*
*
* @param creationTime
*
* The time that the operation was created.
*
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* The time that the operation was created.
*
*
* @return
* The time that the operation was created.
*
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* The time that the operation was created.
*
*
* @param creationTime
*
* The time that the operation was created.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterOperationInfo withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* The time at which the operation finished.
*
*
* @param endTime
*
* The time at which the operation finished.
*
*/
public void setEndTime(java.util.Date endTime) {
this.endTime = endTime;
}
/**
*
* The time at which the operation finished.
*
*
* @return
* The time at which the operation finished.
*
*/
public java.util.Date getEndTime() {
return this.endTime;
}
/**
*
* The time at which the operation finished.
*
*
* @param endTime
*
* The time at which the operation finished.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterOperationInfo withEndTime(java.util.Date endTime) {
setEndTime(endTime);
return this;
}
/**
*
* Describes the error if the operation fails.
*
*
* @param errorInfo
*
* Describes the error if the operation fails.
*
*/
public void setErrorInfo(ErrorInfo errorInfo) {
this.errorInfo = errorInfo;
}
/**
*
* Describes the error if the operation fails.
*
*
* @return
* Describes the error if the operation fails.
*
*/
public ErrorInfo getErrorInfo() {
return this.errorInfo;
}
/**
*
* Describes the error if the operation fails.
*
*
* @param errorInfo
*
* Describes the error if the operation fails.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterOperationInfo withErrorInfo(ErrorInfo errorInfo) {
setErrorInfo(errorInfo);
return this;
}
/**
*
* ARN of the cluster operation.
*
*
* @param operationArn
*
* ARN of the cluster operation.
*
*/
public void setOperationArn(String operationArn) {
this.operationArn = operationArn;
}
/**
*
* ARN of the cluster operation.
*
*
* @return
* ARN of the cluster operation.
*
*/
public String getOperationArn() {
return this.operationArn;
}
/**
*
* ARN of the cluster operation.
*
*
* @param operationArn
*
* ARN of the cluster operation.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterOperationInfo withOperationArn(String operationArn) {
setOperationArn(operationArn);
return this;
}
/**
*
* State of the cluster operation.
*
*
* @param operationState
*
* State of the cluster operation.
*
*/
public void setOperationState(String operationState) {
this.operationState = operationState;
}
/**
*
* State of the cluster operation.
*
*
* @return
* State of the cluster operation.
*
*/
public String getOperationState() {
return this.operationState;
}
/**
*
* State of the cluster operation.
*
*
* @param operationState
*
* State of the cluster operation.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterOperationInfo withOperationState(String operationState) {
setOperationState(operationState);
return this;
}
/**
*
* Steps completed during the operation.
*
*
* @return
* Steps completed during the operation.
*
*/
public java.util.List getOperationSteps() {
return operationSteps;
}
/**
*
* Steps completed during the operation.
*
*
* @param operationSteps
*
* Steps completed during the operation.
*
*/
public void setOperationSteps(java.util.Collection operationSteps) {
if (operationSteps == null) {
this.operationSteps = null;
return;
}
this.operationSteps = new java.util.ArrayList(operationSteps);
}
/**
*
* Steps completed during the operation.
*
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setOperationSteps(java.util.Collection)} or {@link #withOperationSteps(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param operationSteps
*
* Steps completed during the operation.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterOperationInfo withOperationSteps(ClusterOperationStep... operationSteps) {
if (this.operationSteps == null) {
setOperationSteps(new java.util.ArrayList(operationSteps.length));
}
for (ClusterOperationStep ele : operationSteps) {
this.operationSteps.add(ele);
}
return this;
}
/**
*
* Steps completed during the operation.
*
*
* @param operationSteps
*
* Steps completed during the operation.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterOperationInfo withOperationSteps(java.util.Collection operationSteps) {
setOperationSteps(operationSteps);
return this;
}
/**
*
* Type of the cluster operation.
*
*
* @param operationType
*
* Type of the cluster operation.
*
*/
public void setOperationType(String operationType) {
this.operationType = operationType;
}
/**
*
* Type of the cluster operation.
*
*
* @return
* Type of the cluster operation.
*
*/
public String getOperationType() {
return this.operationType;
}
/**
*
* Type of the cluster operation.
*
*
* @param operationType
*
* Type of the cluster operation.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterOperationInfo withOperationType(String operationType) {
setOperationType(operationType);
return this;
}
/**
*
* Information about cluster attributes before a cluster is updated.
*
*
* @param sourceClusterInfo
*
* Information about cluster attributes before a cluster is updated.
*
*/
public void setSourceClusterInfo(MutableClusterInfo sourceClusterInfo) {
this.sourceClusterInfo = sourceClusterInfo;
}
/**
*
* Information about cluster attributes before a cluster is updated.
*
*
* @return
* Information about cluster attributes before a cluster is updated.
*
*/
public MutableClusterInfo getSourceClusterInfo() {
return this.sourceClusterInfo;
}
/**
*
* Information about cluster attributes before a cluster is updated.
*
*
* @param sourceClusterInfo
*
* Information about cluster attributes before a cluster is updated.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterOperationInfo withSourceClusterInfo(MutableClusterInfo sourceClusterInfo) {
setSourceClusterInfo(sourceClusterInfo);
return this;
}
/**
*
* Information about cluster attributes after a cluster is updated.
*
*
* @param targetClusterInfo
*
* Information about cluster attributes after a cluster is updated.
*
*/
public void setTargetClusterInfo(MutableClusterInfo targetClusterInfo) {
this.targetClusterInfo = targetClusterInfo;
}
/**
*
* Information about cluster attributes after a cluster is updated.
*
*
* @return
* Information about cluster attributes after a cluster is updated.
*
*/
public MutableClusterInfo getTargetClusterInfo() {
return this.targetClusterInfo;
}
/**
*
* Information about cluster attributes after a cluster is updated.
*
*
* @param targetClusterInfo
*
* Information about cluster attributes after a cluster is updated.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterOperationInfo withTargetClusterInfo(MutableClusterInfo targetClusterInfo) {
setTargetClusterInfo(targetClusterInfo);
return this;
}
/**
*
* Description of the VPC connection for CreateVpcConnection and DeleteVpcConnection operations.
*
*
* @param vpcConnectionInfo
*
* Description of the VPC connection for CreateVpcConnection and DeleteVpcConnection operations.
*
*/
public void setVpcConnectionInfo(VpcConnectionInfo vpcConnectionInfo) {
this.vpcConnectionInfo = vpcConnectionInfo;
}
/**
*
* Description of the VPC connection for CreateVpcConnection and DeleteVpcConnection operations.
*
*
* @return
* Description of the VPC connection for CreateVpcConnection and DeleteVpcConnection operations.
*
*/
public VpcConnectionInfo getVpcConnectionInfo() {
return this.vpcConnectionInfo;
}
/**
*
* Description of the VPC connection for CreateVpcConnection and DeleteVpcConnection operations.
*
*
* @param vpcConnectionInfo
*
* Description of the VPC connection for CreateVpcConnection and DeleteVpcConnection operations.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterOperationInfo withVpcConnectionInfo(VpcConnectionInfo vpcConnectionInfo) {
setVpcConnectionInfo(vpcConnectionInfo);
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 (getClientRequestId() != null)
sb.append("ClientRequestId: ").append(getClientRequestId()).append(",");
if (getClusterArn() != null)
sb.append("ClusterArn: ").append(getClusterArn()).append(",");
if (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime()).append(",");
if (getEndTime() != null)
sb.append("EndTime: ").append(getEndTime()).append(",");
if (getErrorInfo() != null)
sb.append("ErrorInfo: ").append(getErrorInfo()).append(",");
if (getOperationArn() != null)
sb.append("OperationArn: ").append(getOperationArn()).append(",");
if (getOperationState() != null)
sb.append("OperationState: ").append(getOperationState()).append(",");
if (getOperationSteps() != null)
sb.append("OperationSteps: ").append(getOperationSteps()).append(",");
if (getOperationType() != null)
sb.append("OperationType: ").append(getOperationType()).append(",");
if (getSourceClusterInfo() != null)
sb.append("SourceClusterInfo: ").append(getSourceClusterInfo()).append(",");
if (getTargetClusterInfo() != null)
sb.append("TargetClusterInfo: ").append(getTargetClusterInfo()).append(",");
if (getVpcConnectionInfo() != null)
sb.append("VpcConnectionInfo: ").append(getVpcConnectionInfo());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ClusterOperationInfo == false)
return false;
ClusterOperationInfo other = (ClusterOperationInfo) obj;
if (other.getClientRequestId() == null ^ this.getClientRequestId() == null)
return false;
if (other.getClientRequestId() != null && other.getClientRequestId().equals(this.getClientRequestId()) == false)
return false;
if (other.getClusterArn() == null ^ this.getClusterArn() == null)
return false;
if (other.getClusterArn() != null && other.getClusterArn().equals(this.getClusterArn()) == false)
return false;
if (other.getCreationTime() == null ^ this.getCreationTime() == null)
return false;
if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false)
return false;
if (other.getEndTime() == null ^ this.getEndTime() == null)
return false;
if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false)
return false;
if (other.getErrorInfo() == null ^ this.getErrorInfo() == null)
return false;
if (other.getErrorInfo() != null && other.getErrorInfo().equals(this.getErrorInfo()) == false)
return false;
if (other.getOperationArn() == null ^ this.getOperationArn() == null)
return false;
if (other.getOperationArn() != null && other.getOperationArn().equals(this.getOperationArn()) == false)
return false;
if (other.getOperationState() == null ^ this.getOperationState() == null)
return false;
if (other.getOperationState() != null && other.getOperationState().equals(this.getOperationState()) == false)
return false;
if (other.getOperationSteps() == null ^ this.getOperationSteps() == null)
return false;
if (other.getOperationSteps() != null && other.getOperationSteps().equals(this.getOperationSteps()) == false)
return false;
if (other.getOperationType() == null ^ this.getOperationType() == null)
return false;
if (other.getOperationType() != null && other.getOperationType().equals(this.getOperationType()) == false)
return false;
if (other.getSourceClusterInfo() == null ^ this.getSourceClusterInfo() == null)
return false;
if (other.getSourceClusterInfo() != null && other.getSourceClusterInfo().equals(this.getSourceClusterInfo()) == false)
return false;
if (other.getTargetClusterInfo() == null ^ this.getTargetClusterInfo() == null)
return false;
if (other.getTargetClusterInfo() != null && other.getTargetClusterInfo().equals(this.getTargetClusterInfo()) == false)
return false;
if (other.getVpcConnectionInfo() == null ^ this.getVpcConnectionInfo() == null)
return false;
if (other.getVpcConnectionInfo() != null && other.getVpcConnectionInfo().equals(this.getVpcConnectionInfo()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getClientRequestId() == null) ? 0 : getClientRequestId().hashCode());
hashCode = prime * hashCode + ((getClusterArn() == null) ? 0 : getClusterArn().hashCode());
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
hashCode = prime * hashCode + ((getErrorInfo() == null) ? 0 : getErrorInfo().hashCode());
hashCode = prime * hashCode + ((getOperationArn() == null) ? 0 : getOperationArn().hashCode());
hashCode = prime * hashCode + ((getOperationState() == null) ? 0 : getOperationState().hashCode());
hashCode = prime * hashCode + ((getOperationSteps() == null) ? 0 : getOperationSteps().hashCode());
hashCode = prime * hashCode + ((getOperationType() == null) ? 0 : getOperationType().hashCode());
hashCode = prime * hashCode + ((getSourceClusterInfo() == null) ? 0 : getSourceClusterInfo().hashCode());
hashCode = prime * hashCode + ((getTargetClusterInfo() == null) ? 0 : getTargetClusterInfo().hashCode());
hashCode = prime * hashCode + ((getVpcConnectionInfo() == null) ? 0 : getVpcConnectionInfo().hashCode());
return hashCode;
}
@Override
public ClusterOperationInfo clone() {
try {
return (ClusterOperationInfo) 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.kafka.model.transform.ClusterOperationInfoMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}