com.ksc.network.vpc.model.SecurityGroups.DescribeSecurityGroupsRequest Maven / Gradle / Ivy
package com.ksc.network.vpc.model.SecurityGroups;
import com.ksc.KscWebServiceRequest;
import com.ksc.Request;
import com.ksc.model.DryRunSupportedRequest;
import com.ksc.model.Filter;
import lombok.EqualsAndHashCode;
import lombok.ToString;
/**
*
* Contains the parameters for DescribeSecurityGroups.
*
*/
@ToString
@EqualsAndHashCode
public class DescribeSecurityGroupsRequest
extends KscWebServiceRequest
implements DryRunSupportedRequest {
public DescribeSecurityGroupsRequest() {
initParam("com.ksc.network.vpc.KSC%sClient", "describeSecurityGroups", "vpc", "2016-03-04",
this.getClass());
}
/**
*
* One or more SecurityGroup IDs.
*
*
* Default: Describes all your SecurityGroups.
*
*/
private com.ksc.internal.SdkInternalList securityGroupIds;
private com.ksc.internal.SdkInternalList filters;
/**
*
* One or more SecurityGroup IDs.
*
*
* Default: Describes all your SecurityGroups.
*
*
* @return One or more SecurityGroup IDs.
*
*
* Default: Describes all your SecurityGroups.
*/
public java.util.List getSecurityGroupIds() {
if (securityGroupIds == null) {
securityGroupIds = new com.ksc.internal.SdkInternalList();
}
return securityGroupIds;
}
/**
*
* One or more SecurityGroup IDs.
*
*
* Default: Describes all your SecurityGroups.
*
*
* @param securityGroupIds
* One or more SecurityGroup IDs.
*
*
* Default: Describes all your SecurityGroups.
*/
public void setSecurityGroupIds(java.util.Collection securityGroupIds) {
if (securityGroupIds == null) {
this.securityGroupIds = null;
return;
}
this.securityGroupIds = new com.ksc.internal.SdkInternalList(securityGroupIds);
}
/**
*
* One or more SecurityGroup IDs.
*
*
* Default: Describes all your SecurityGroups.
*
*
* NOTE: This method appends the values to the existing list (if
* any). Use {@link #setSecurityGroupIds(java.util.Collection)} or
* {@link #withSecurityGroupIds(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param securityGroupIds
* One or more SecurityGroup IDs.
*
*
* Default: Describes all your SecurityGroups.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public DescribeSecurityGroupsRequest withSecurityGroupIds(String... securityGroupIds) {
if (this.securityGroupIds == null) {
setSecurityGroupIds(
new com.ksc.internal.SdkInternalList(securityGroupIds.length));
}
for (String ele : securityGroupIds) {
this.securityGroupIds.add(ele);
}
return this;
}
/**
*
* One or more SecurityGroup IDs.
*
*
* Default: Describes all your SecurityGroups.
*
*
* @param securityGroupIds
* One or more SecurityGroup IDs.
*
*
* Default: Describes all your SecurityGroups.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public DescribeSecurityGroupsRequest withSecurityGroupIds(
java.util.Collection securityGroupIds) {
setSecurityGroupIds(securityGroupIds);
return this;
}
public java.util.List getFilters() {
if (filters == null) {
filters = new com.ksc.internal.SdkInternalList();
}
return filters;
}
public void setFilters(java.util.Collection filters) {
if (filters == null) {
this.filters = null;
return;
}
this.filters = new com.ksc.internal.SdkInternalList(filters);
}
public DescribeSecurityGroupsRequest withFilters(Filter... filters) {
if (this.filters == null) {
setFilters(new com.ksc.internal.SdkInternalList(filters.length));
}
for (Filter ele : filters) {
this.filters.add(ele);
}
return this;
}
public DescribeSecurityGroupsRequest withFilters(java.util.Collection filters) {
setFilters(filters);
return this;
}
/**
* This method is intended for internal use only. Returns the marshaled
* request configured with additional parameters to enable operation
* dry-run.
*/
@Override
public Request getDryRunRequest() {
/*
* Request request = new
* DescribeSubnetsRequestMarshaller() .marshall(this);
* request.addParameter("DryRun", Boolean.toString(true)); return
* request;
*/
return null;
}
}