com.amazonaws.services.rds.model.DBProxyTargetGroup Maven / Gradle / Ivy
Show all versions of aws-java-sdk-rds 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.rds.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* Represents a set of RDS DB instances, Aurora DB clusters, or both that a proxy can connect to. Currently, each target
* group is associated with exactly one RDS DB instance or Aurora DB cluster.
*
*
* This data type is used as a response element in the DescribeDBProxyTargetGroups
action.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DBProxyTargetGroup implements Serializable, Cloneable {
/**
*
* The identifier for the RDS proxy associated with this target group.
*
*/
private String dBProxyName;
/**
*
* The identifier for the target group. This name must be unique for all target groups owned by your Amazon Web
* Services account in the specified Amazon Web Services Region.
*
*/
private String targetGroupName;
/**
*
* The Amazon Resource Name (ARN) representing the target group.
*
*/
private String targetGroupArn;
/**
*
* Indicates whether this target group is the first one used for connection requests by the associated proxy.
* Because each proxy is currently associated with a single target group, currently this setting is always
* true
.
*
*/
private Boolean isDefault;
/**
*
* The current status of this target group. A status of available
means the target group is correctly
* associated with a database. Other values indicate that you must wait for the target group to be ready, or take
* some action to resolve an issue.
*
*/
private String status;
/**
*
* The settings that determine the size and behavior of the connection pool for the target group.
*
*/
private ConnectionPoolConfigurationInfo connectionPoolConfig;
/**
*
* The date and time when the target group was first created.
*
*/
private java.util.Date createdDate;
/**
*
* The date and time when the target group was last updated.
*
*/
private java.util.Date updatedDate;
/**
*
* The identifier for the RDS proxy associated with this target group.
*
*
* @param dBProxyName
* The identifier for the RDS proxy associated with this target group.
*/
public void setDBProxyName(String dBProxyName) {
this.dBProxyName = dBProxyName;
}
/**
*
* The identifier for the RDS proxy associated with this target group.
*
*
* @return The identifier for the RDS proxy associated with this target group.
*/
public String getDBProxyName() {
return this.dBProxyName;
}
/**
*
* The identifier for the RDS proxy associated with this target group.
*
*
* @param dBProxyName
* The identifier for the RDS proxy associated with this target group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DBProxyTargetGroup withDBProxyName(String dBProxyName) {
setDBProxyName(dBProxyName);
return this;
}
/**
*
* The identifier for the target group. This name must be unique for all target groups owned by your Amazon Web
* Services account in the specified Amazon Web Services Region.
*
*
* @param targetGroupName
* The identifier for the target group. This name must be unique for all target groups owned by your Amazon
* Web Services account in the specified Amazon Web Services Region.
*/
public void setTargetGroupName(String targetGroupName) {
this.targetGroupName = targetGroupName;
}
/**
*
* The identifier for the target group. This name must be unique for all target groups owned by your Amazon Web
* Services account in the specified Amazon Web Services Region.
*
*
* @return The identifier for the target group. This name must be unique for all target groups owned by your Amazon
* Web Services account in the specified Amazon Web Services Region.
*/
public String getTargetGroupName() {
return this.targetGroupName;
}
/**
*
* The identifier for the target group. This name must be unique for all target groups owned by your Amazon Web
* Services account in the specified Amazon Web Services Region.
*
*
* @param targetGroupName
* The identifier for the target group. This name must be unique for all target groups owned by your Amazon
* Web Services account in the specified Amazon Web Services Region.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DBProxyTargetGroup withTargetGroupName(String targetGroupName) {
setTargetGroupName(targetGroupName);
return this;
}
/**
*
* The Amazon Resource Name (ARN) representing the target group.
*
*
* @param targetGroupArn
* The Amazon Resource Name (ARN) representing the target group.
*/
public void setTargetGroupArn(String targetGroupArn) {
this.targetGroupArn = targetGroupArn;
}
/**
*
* The Amazon Resource Name (ARN) representing the target group.
*
*
* @return The Amazon Resource Name (ARN) representing the target group.
*/
public String getTargetGroupArn() {
return this.targetGroupArn;
}
/**
*
* The Amazon Resource Name (ARN) representing the target group.
*
*
* @param targetGroupArn
* The Amazon Resource Name (ARN) representing the target group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DBProxyTargetGroup withTargetGroupArn(String targetGroupArn) {
setTargetGroupArn(targetGroupArn);
return this;
}
/**
*
* Indicates whether this target group is the first one used for connection requests by the associated proxy.
* Because each proxy is currently associated with a single target group, currently this setting is always
* true
.
*
*
* @param isDefault
* Indicates whether this target group is the first one used for connection requests by the associated proxy.
* Because each proxy is currently associated with a single target group, currently this setting is always
* true
.
*/
public void setIsDefault(Boolean isDefault) {
this.isDefault = isDefault;
}
/**
*
* Indicates whether this target group is the first one used for connection requests by the associated proxy.
* Because each proxy is currently associated with a single target group, currently this setting is always
* true
.
*
*
* @return Indicates whether this target group is the first one used for connection requests by the associated
* proxy. Because each proxy is currently associated with a single target group, currently this setting is
* always true
.
*/
public Boolean getIsDefault() {
return this.isDefault;
}
/**
*
* Indicates whether this target group is the first one used for connection requests by the associated proxy.
* Because each proxy is currently associated with a single target group, currently this setting is always
* true
.
*
*
* @param isDefault
* Indicates whether this target group is the first one used for connection requests by the associated proxy.
* Because each proxy is currently associated with a single target group, currently this setting is always
* true
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DBProxyTargetGroup withIsDefault(Boolean isDefault) {
setIsDefault(isDefault);
return this;
}
/**
*
* Indicates whether this target group is the first one used for connection requests by the associated proxy.
* Because each proxy is currently associated with a single target group, currently this setting is always
* true
.
*
*
* @return Indicates whether this target group is the first one used for connection requests by the associated
* proxy. Because each proxy is currently associated with a single target group, currently this setting is
* always true
.
*/
public Boolean isDefault() {
return this.isDefault;
}
/**
*
* The current status of this target group. A status of available
means the target group is correctly
* associated with a database. Other values indicate that you must wait for the target group to be ready, or take
* some action to resolve an issue.
*
*
* @param status
* The current status of this target group. A status of available
means the target group is
* correctly associated with a database. Other values indicate that you must wait for the target group to be
* ready, or take some action to resolve an issue.
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The current status of this target group. A status of available
means the target group is correctly
* associated with a database. Other values indicate that you must wait for the target group to be ready, or take
* some action to resolve an issue.
*
*
* @return The current status of this target group. A status of available
means the target group is
* correctly associated with a database. Other values indicate that you must wait for the target group to be
* ready, or take some action to resolve an issue.
*/
public String getStatus() {
return this.status;
}
/**
*
* The current status of this target group. A status of available
means the target group is correctly
* associated with a database. Other values indicate that you must wait for the target group to be ready, or take
* some action to resolve an issue.
*
*
* @param status
* The current status of this target group. A status of available
means the target group is
* correctly associated with a database. Other values indicate that you must wait for the target group to be
* ready, or take some action to resolve an issue.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DBProxyTargetGroup withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The settings that determine the size and behavior of the connection pool for the target group.
*
*
* @param connectionPoolConfig
* The settings that determine the size and behavior of the connection pool for the target group.
*/
public void setConnectionPoolConfig(ConnectionPoolConfigurationInfo connectionPoolConfig) {
this.connectionPoolConfig = connectionPoolConfig;
}
/**
*
* The settings that determine the size and behavior of the connection pool for the target group.
*
*
* @return The settings that determine the size and behavior of the connection pool for the target group.
*/
public ConnectionPoolConfigurationInfo getConnectionPoolConfig() {
return this.connectionPoolConfig;
}
/**
*
* The settings that determine the size and behavior of the connection pool for the target group.
*
*
* @param connectionPoolConfig
* The settings that determine the size and behavior of the connection pool for the target group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DBProxyTargetGroup withConnectionPoolConfig(ConnectionPoolConfigurationInfo connectionPoolConfig) {
setConnectionPoolConfig(connectionPoolConfig);
return this;
}
/**
*
* The date and time when the target group was first created.
*
*
* @param createdDate
* The date and time when the target group was first created.
*/
public void setCreatedDate(java.util.Date createdDate) {
this.createdDate = createdDate;
}
/**
*
* The date and time when the target group was first created.
*
*
* @return The date and time when the target group was first created.
*/
public java.util.Date getCreatedDate() {
return this.createdDate;
}
/**
*
* The date and time when the target group was first created.
*
*
* @param createdDate
* The date and time when the target group was first created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DBProxyTargetGroup withCreatedDate(java.util.Date createdDate) {
setCreatedDate(createdDate);
return this;
}
/**
*
* The date and time when the target group was last updated.
*
*
* @param updatedDate
* The date and time when the target group was last updated.
*/
public void setUpdatedDate(java.util.Date updatedDate) {
this.updatedDate = updatedDate;
}
/**
*
* The date and time when the target group was last updated.
*
*
* @return The date and time when the target group was last updated.
*/
public java.util.Date getUpdatedDate() {
return this.updatedDate;
}
/**
*
* The date and time when the target group was last updated.
*
*
* @param updatedDate
* The date and time when the target group was last updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DBProxyTargetGroup withUpdatedDate(java.util.Date updatedDate) {
setUpdatedDate(updatedDate);
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 (getTargetGroupArn() != null)
sb.append("TargetGroupArn: ").append(getTargetGroupArn()).append(",");
if (getIsDefault() != null)
sb.append("IsDefault: ").append(getIsDefault()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getConnectionPoolConfig() != null)
sb.append("ConnectionPoolConfig: ").append(getConnectionPoolConfig()).append(",");
if (getCreatedDate() != null)
sb.append("CreatedDate: ").append(getCreatedDate()).append(",");
if (getUpdatedDate() != null)
sb.append("UpdatedDate: ").append(getUpdatedDate());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DBProxyTargetGroup == false)
return false;
DBProxyTargetGroup other = (DBProxyTargetGroup) 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.getTargetGroupArn() == null ^ this.getTargetGroupArn() == null)
return false;
if (other.getTargetGroupArn() != null && other.getTargetGroupArn().equals(this.getTargetGroupArn()) == false)
return false;
if (other.getIsDefault() == null ^ this.getIsDefault() == null)
return false;
if (other.getIsDefault() != null && other.getIsDefault().equals(this.getIsDefault()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getConnectionPoolConfig() == null ^ this.getConnectionPoolConfig() == null)
return false;
if (other.getConnectionPoolConfig() != null && other.getConnectionPoolConfig().equals(this.getConnectionPoolConfig()) == false)
return false;
if (other.getCreatedDate() == null ^ this.getCreatedDate() == null)
return false;
if (other.getCreatedDate() != null && other.getCreatedDate().equals(this.getCreatedDate()) == false)
return false;
if (other.getUpdatedDate() == null ^ this.getUpdatedDate() == null)
return false;
if (other.getUpdatedDate() != null && other.getUpdatedDate().equals(this.getUpdatedDate()) == 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 + ((getTargetGroupArn() == null) ? 0 : getTargetGroupArn().hashCode());
hashCode = prime * hashCode + ((getIsDefault() == null) ? 0 : getIsDefault().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getConnectionPoolConfig() == null) ? 0 : getConnectionPoolConfig().hashCode());
hashCode = prime * hashCode + ((getCreatedDate() == null) ? 0 : getCreatedDate().hashCode());
hashCode = prime * hashCode + ((getUpdatedDate() == null) ? 0 : getUpdatedDate().hashCode());
return hashCode;
}
@Override
public DBProxyTargetGroup clone() {
try {
return (DBProxyTargetGroup) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}