/* * Copyright 2018-2023 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.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateClusterV2Request extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name of the cluster. *
*/ private String clusterName; /** ** A map of tags that you want the cluster to have. *
*/ private java.util.Map* Information about the provisioned cluster. *
*/ private ProvisionedRequest provisioned; /** ** Information about the serverless cluster. *
*/ private ServerlessRequest serverless; /** ** The name of the cluster. *
* * @param clusterName ** The name of the cluster. *
*/ public void setClusterName(String clusterName) { this.clusterName = clusterName; } /** ** The name of the cluster. *
* * @return* The name of the cluster. *
*/ public String getClusterName() { return this.clusterName; } /** ** The name of the cluster. *
* * @param clusterName ** The name of the cluster. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterV2Request withClusterName(String clusterName) { setClusterName(clusterName); return this; } /** ** A map of tags that you want the cluster to have. *
* * @return* A map of tags that you want the cluster to have. *
*/ public java.util.Map* A map of tags that you want the cluster to have. *
* * @param tags ** A map of tags that you want the cluster to have. *
*/ public void setTags(java.util.Map* A map of tags that you want the cluster to have. *
* * @param tags ** A map of tags that you want the cluster to have. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterV2Request withTags(java.util.Map* Information about the provisioned cluster. *
* * @param provisioned ** Information about the provisioned cluster. *
*/ public void setProvisioned(ProvisionedRequest provisioned) { this.provisioned = provisioned; } /** ** Information about the provisioned cluster. *
* * @return* Information about the provisioned cluster. *
*/ public ProvisionedRequest getProvisioned() { return this.provisioned; } /** ** Information about the provisioned cluster. *
* * @param provisioned ** Information about the provisioned cluster. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterV2Request withProvisioned(ProvisionedRequest provisioned) { setProvisioned(provisioned); return this; } /** ** Information about the serverless cluster. *
* * @param serverless ** Information about the serverless cluster. *
*/ public void setServerless(ServerlessRequest serverless) { this.serverless = serverless; } /** ** Information about the serverless cluster. *
* * @return* Information about the serverless cluster. *
*/ public ServerlessRequest getServerless() { return this.serverless; } /** ** Information about the serverless cluster. *
* * @param serverless ** Information about the serverless cluster. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterV2Request withServerless(ServerlessRequest serverless) { setServerless(serverless); 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 (getClusterName() != null) sb.append("ClusterName: ").append(getClusterName()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getProvisioned() != null) sb.append("Provisioned: ").append(getProvisioned()).append(","); if (getServerless() != null) sb.append("Serverless: ").append(getServerless()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateClusterV2Request == false) return false; CreateClusterV2Request other = (CreateClusterV2Request) obj; if (other.getClusterName() == null ^ this.getClusterName() == null) return false; if (other.getClusterName() != null && other.getClusterName().equals(this.getClusterName()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getProvisioned() == null ^ this.getProvisioned() == null) return false; if (other.getProvisioned() != null && other.getProvisioned().equals(this.getProvisioned()) == false) return false; if (other.getServerless() == null ^ this.getServerless() == null) return false; if (other.getServerless() != null && other.getServerless().equals(this.getServerless()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClusterName() == null) ? 0 : getClusterName().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getProvisioned() == null) ? 0 : getProvisioned().hashCode()); hashCode = prime * hashCode + ((getServerless() == null) ? 0 : getServerless().hashCode()); return hashCode; } @Override public CreateClusterV2Request clone() { return (CreateClusterV2Request) super.clone(); } }