/* * 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.rds.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 DeregisterDBProxyTargetsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The identifier of the DBProxy that is associated with the DBProxyTargetGroup. *

*/ private String dBProxyName; /** *

* The identifier of the DBProxyTargetGroup. *

*/ private String targetGroupName; /** *

* One or more DB instance identifiers. *

*/ private com.amazonaws.internal.SdkInternalList dBInstanceIdentifiers; /** *

* One or more DB cluster identifiers. *

*/ private com.amazonaws.internal.SdkInternalList dBClusterIdentifiers; /** *

* The identifier of the DBProxy that is associated with the DBProxyTargetGroup. *

* * @param dBProxyName * The identifier of the DBProxy that is associated with the DBProxyTargetGroup. */ public void setDBProxyName(String dBProxyName) { this.dBProxyName = dBProxyName; } /** *

* The identifier of the DBProxy that is associated with the DBProxyTargetGroup. *

* * @return The identifier of the DBProxy that is associated with the DBProxyTargetGroup. */ public String getDBProxyName() { return this.dBProxyName; } /** *

* The identifier of the DBProxy that is associated with the DBProxyTargetGroup. *

* * @param dBProxyName * The identifier of the DBProxy that is associated with the DBProxyTargetGroup. * @return Returns a reference to this object so that method calls can be chained together. */ public DeregisterDBProxyTargetsRequest withDBProxyName(String dBProxyName) { setDBProxyName(dBProxyName); return this; } /** *

* The identifier of the DBProxyTargetGroup. *

* * @param targetGroupName * The identifier of the DBProxyTargetGroup. */ public void setTargetGroupName(String targetGroupName) { this.targetGroupName = targetGroupName; } /** *

* The identifier of the DBProxyTargetGroup. *

* * @return The identifier of the DBProxyTargetGroup. */ public String getTargetGroupName() { return this.targetGroupName; } /** *

* The identifier of the DBProxyTargetGroup. *

* * @param targetGroupName * The identifier of the DBProxyTargetGroup. * @return Returns a reference to this object so that method calls can be chained together. */ public DeregisterDBProxyTargetsRequest withTargetGroupName(String targetGroupName) { setTargetGroupName(targetGroupName); return this; } /** *

* One or more DB instance identifiers. *

* * @return One or more DB instance identifiers. */ public java.util.List getDBInstanceIdentifiers() { if (dBInstanceIdentifiers == null) { dBInstanceIdentifiers = new com.amazonaws.internal.SdkInternalList(); } return dBInstanceIdentifiers; } /** *

* One or more DB instance identifiers. *

* * @param dBInstanceIdentifiers * One or more DB instance identifiers. */ public void setDBInstanceIdentifiers(java.util.Collection dBInstanceIdentifiers) { if (dBInstanceIdentifiers == null) { this.dBInstanceIdentifiers = null; return; } this.dBInstanceIdentifiers = new com.amazonaws.internal.SdkInternalList(dBInstanceIdentifiers); } /** *

* One or more DB instance identifiers. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setDBInstanceIdentifiers(java.util.Collection)} or * {@link #withDBInstanceIdentifiers(java.util.Collection)} if you want to override the existing values. *

* * @param dBInstanceIdentifiers * One or more DB instance identifiers. * @return Returns a reference to this object so that method calls can be chained together. */ public DeregisterDBProxyTargetsRequest withDBInstanceIdentifiers(String... dBInstanceIdentifiers) { if (this.dBInstanceIdentifiers == null) { setDBInstanceIdentifiers(new com.amazonaws.internal.SdkInternalList(dBInstanceIdentifiers.length)); } for (String ele : dBInstanceIdentifiers) { this.dBInstanceIdentifiers.add(ele); } return this; } /** *

* One or more DB instance identifiers. *

* * @param dBInstanceIdentifiers * One or more DB instance identifiers. * @return Returns a reference to this object so that method calls can be chained together. */ public DeregisterDBProxyTargetsRequest withDBInstanceIdentifiers(java.util.Collection dBInstanceIdentifiers) { setDBInstanceIdentifiers(dBInstanceIdentifiers); return this; } /** *

* One or more DB cluster identifiers. *

* * @return One or more DB cluster identifiers. */ public java.util.List getDBClusterIdentifiers() { if (dBClusterIdentifiers == null) { dBClusterIdentifiers = new com.amazonaws.internal.SdkInternalList(); } return dBClusterIdentifiers; } /** *

* One or more DB cluster identifiers. *

* * @param dBClusterIdentifiers * One or more DB cluster identifiers. */ public void setDBClusterIdentifiers(java.util.Collection dBClusterIdentifiers) { if (dBClusterIdentifiers == null) { this.dBClusterIdentifiers = null; return; } this.dBClusterIdentifiers = new com.amazonaws.internal.SdkInternalList(dBClusterIdentifiers); } /** *

* One or more DB cluster identifiers. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setDBClusterIdentifiers(java.util.Collection)} or {@link #withDBClusterIdentifiers(java.util.Collection)} * if you want to override the existing values. *

* * @param dBClusterIdentifiers * One or more DB cluster identifiers. * @return Returns a reference to this object so that method calls can be chained together. */ public DeregisterDBProxyTargetsRequest withDBClusterIdentifiers(String... dBClusterIdentifiers) { if (this.dBClusterIdentifiers == null) { setDBClusterIdentifiers(new com.amazonaws.internal.SdkInternalList(dBClusterIdentifiers.length)); } for (String ele : dBClusterIdentifiers) { this.dBClusterIdentifiers.add(ele); } return this; } /** *

* One or more DB cluster identifiers. *

* * @param dBClusterIdentifiers * One or more DB cluster identifiers. * @return Returns a reference to this object so that method calls can be chained together. */ public DeregisterDBProxyTargetsRequest withDBClusterIdentifiers(java.util.Collection dBClusterIdentifiers) { setDBClusterIdentifiers(dBClusterIdentifiers); 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 (getDBProxyName() != null) sb.append("DBProxyName: ").append(getDBProxyName()).append(","); if (getTargetGroupName() != null) sb.append("TargetGroupName: ").append(getTargetGroupName()).append(","); if (getDBInstanceIdentifiers() != null) sb.append("DBInstanceIdentifiers: ").append(getDBInstanceIdentifiers()).append(","); if (getDBClusterIdentifiers() != null) sb.append("DBClusterIdentifiers: ").append(getDBClusterIdentifiers()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeregisterDBProxyTargetsRequest == false) return false; DeregisterDBProxyTargetsRequest other = (DeregisterDBProxyTargetsRequest) obj; if (other.getDBProxyName() == null ^ this.getDBProxyName() == null) return false; if (other.getDBProxyName() != null && other.getDBProxyName().equals(this.getDBProxyName()) == false) return false; if (other.getTargetGroupName() == null ^ this.getTargetGroupName() == null) return false; if (other.getTargetGroupName() != null && other.getTargetGroupName().equals(this.getTargetGroupName()) == false) return false; if (other.getDBInstanceIdentifiers() == null ^ this.getDBInstanceIdentifiers() == null) return false; if (other.getDBInstanceIdentifiers() != null && other.getDBInstanceIdentifiers().equals(this.getDBInstanceIdentifiers()) == false) return false; if (other.getDBClusterIdentifiers() == null ^ this.getDBClusterIdentifiers() == null) return false; if (other.getDBClusterIdentifiers() != null && other.getDBClusterIdentifiers().equals(this.getDBClusterIdentifiers()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDBProxyName() == null) ? 0 : getDBProxyName().hashCode()); hashCode = prime * hashCode + ((getTargetGroupName() == null) ? 0 : getTargetGroupName().hashCode()); hashCode = prime * hashCode + ((getDBInstanceIdentifiers() == null) ? 0 : getDBInstanceIdentifiers().hashCode()); hashCode = prime * hashCode + ((getDBClusterIdentifiers() == null) ? 0 : getDBClusterIdentifiers().hashCode()); return hashCode; } @Override public DeregisterDBProxyTargetsRequest clone() { return (DeregisterDBProxyTargetsRequest) super.clone(); } }