
com.amazonaws.services.rds.model.DBSecurityGroup Maven / Gradle / Ivy
/*
* Copyright 2010-2011 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;
/**
*
*
*
*/
public class DBSecurityGroup {
/**
* Provides the AWS ID of the owner of a specific DB Security Group.
*/
private String ownerId;
/**
* Specifies the name of the DB Security Group.
*/
private String dBSecurityGroupName;
/**
* Provides the description of the database security group.
*/
private String dBSecurityGroupDescription;
/**
* Contains a list of EC2SecurityGroup elements.
*/
private java.util.List eC2SecurityGroups;
/**
* Contains a list of IPRange elements.
*/
private java.util.List iPRanges;
/**
* Provides the AWS ID of the owner of a specific DB Security Group.
*
* @return Provides the AWS ID of the owner of a specific DB Security Group.
*/
public String getOwnerId() {
return ownerId;
}
/**
* Provides the AWS ID of the owner of a specific DB Security Group.
*
* @param ownerId Provides the AWS ID of the owner of a specific DB Security Group.
*/
public void setOwnerId(String ownerId) {
this.ownerId = ownerId;
}
/**
* Provides the AWS ID of the owner of a specific DB Security Group.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param ownerId Provides the AWS ID of the owner of a specific DB Security Group.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DBSecurityGroup withOwnerId(String ownerId) {
this.ownerId = ownerId;
return this;
}
/**
* Specifies the name of the DB Security Group.
*
* @return Specifies the name of the DB Security Group.
*/
public String getDBSecurityGroupName() {
return dBSecurityGroupName;
}
/**
* Specifies the name of the DB Security Group.
*
* @param dBSecurityGroupName Specifies the name of the DB Security Group.
*/
public void setDBSecurityGroupName(String dBSecurityGroupName) {
this.dBSecurityGroupName = dBSecurityGroupName;
}
/**
* Specifies the name of the DB Security Group.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param dBSecurityGroupName Specifies the name of the DB Security Group.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DBSecurityGroup withDBSecurityGroupName(String dBSecurityGroupName) {
this.dBSecurityGroupName = dBSecurityGroupName;
return this;
}
/**
* Provides the description of the database security group.
*
* @return Provides the description of the database security group.
*/
public String getDBSecurityGroupDescription() {
return dBSecurityGroupDescription;
}
/**
* Provides the description of the database security group.
*
* @param dBSecurityGroupDescription Provides the description of the database security group.
*/
public void setDBSecurityGroupDescription(String dBSecurityGroupDescription) {
this.dBSecurityGroupDescription = dBSecurityGroupDescription;
}
/**
* Provides the description of the database security group.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param dBSecurityGroupDescription Provides the description of the database security group.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DBSecurityGroup withDBSecurityGroupDescription(String dBSecurityGroupDescription) {
this.dBSecurityGroupDescription = dBSecurityGroupDescription;
return this;
}
/**
* Contains a list of EC2SecurityGroup elements.
*
* @return Contains a list of EC2SecurityGroup elements.
*/
public java.util.List getEC2SecurityGroups() {
if (eC2SecurityGroups == null) {
eC2SecurityGroups = new java.util.ArrayList();
}
return eC2SecurityGroups;
}
/**
* Contains a list of EC2SecurityGroup elements.
*
* @param eC2SecurityGroups Contains a list of EC2SecurityGroup elements.
*/
public void setEC2SecurityGroups(java.util.Collection eC2SecurityGroups) {
java.util.List eC2SecurityGroupsCopy = new java.util.ArrayList();
if (eC2SecurityGroups != null) {
eC2SecurityGroupsCopy.addAll(eC2SecurityGroups);
}
this.eC2SecurityGroups = eC2SecurityGroupsCopy;
}
/**
* Contains a list of EC2SecurityGroup elements.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param eC2SecurityGroups Contains a list of EC2SecurityGroup elements.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DBSecurityGroup withEC2SecurityGroups(EC2SecurityGroup... eC2SecurityGroups) {
for (EC2SecurityGroup value : eC2SecurityGroups) {
getEC2SecurityGroups().add(value);
}
return this;
}
/**
* Contains a list of EC2SecurityGroup elements.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param eC2SecurityGroups Contains a list of EC2SecurityGroup elements.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DBSecurityGroup withEC2SecurityGroups(java.util.Collection eC2SecurityGroups) {
java.util.List eC2SecurityGroupsCopy = new java.util.ArrayList();
if (eC2SecurityGroups != null) {
eC2SecurityGroupsCopy.addAll(eC2SecurityGroups);
}
this.eC2SecurityGroups = eC2SecurityGroupsCopy;
return this;
}
/**
* Contains a list of IPRange elements.
*
* @return Contains a list of IPRange elements.
*/
public java.util.List getIPRanges() {
if (iPRanges == null) {
iPRanges = new java.util.ArrayList();
}
return iPRanges;
}
/**
* Contains a list of IPRange elements.
*
* @param iPRanges Contains a list of IPRange elements.
*/
public void setIPRanges(java.util.Collection iPRanges) {
java.util.List iPRangesCopy = new java.util.ArrayList();
if (iPRanges != null) {
iPRangesCopy.addAll(iPRanges);
}
this.iPRanges = iPRangesCopy;
}
/**
* Contains a list of IPRange elements.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param iPRanges Contains a list of IPRange elements.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DBSecurityGroup withIPRanges(IPRange... iPRanges) {
for (IPRange value : iPRanges) {
getIPRanges().add(value);
}
return this;
}
/**
* Contains a list of IPRange elements.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param iPRanges Contains a list of IPRange elements.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DBSecurityGroup withIPRanges(java.util.Collection iPRanges) {
java.util.List iPRangesCopy = new java.util.ArrayList();
if (iPRanges != null) {
iPRangesCopy.addAll(iPRanges);
}
this.iPRanges = iPRangesCopy;
return this;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
sb.append("OwnerId: " + ownerId + ", ");
sb.append("DBSecurityGroupName: " + dBSecurityGroupName + ", ");
sb.append("DBSecurityGroupDescription: " + dBSecurityGroupDescription + ", ");
sb.append("EC2SecurityGroups: " + eC2SecurityGroups + ", ");
sb.append("IPRanges: " + iPRanges + ", ");
sb.append("}");
return sb.toString();
}
}