com.ksc.network.vpc.model.subnet.DescribeSubnetsRequest Maven / Gradle / Ivy
package com.ksc.network.vpc.model.subnet;
import com.ksc.KscWebServiceRequest;
import com.ksc.Request;
import com.ksc.model.DryRunSupportedRequest;
import com.ksc.model.Filter;
import com.ksc.network.vpc.transform.subnet.DescribeSubnetsRequestMarshaller;
import lombok.ToString;
/**
*
* Contains the parameters for DescribeSubnets.
*
*/
@ToString
public class DescribeSubnetsRequest extends KscWebServiceRequest implements
DryRunSupportedRequest {
public DescribeSubnetsRequest(){
initParam("com.ksc.network.vpc.KSC%sClient", "describeSubnets", "vpc", "2016-03-04",this.getClass());
}
/**
*
* One or more Subnet IDs.
*
*
* Default: Describes all your Subnets.
*
*/
private com.ksc.internal.SdkInternalList subnetIds;
private com.ksc.internal.SdkInternalList filters;
/**
*
* One or more Subnet IDs.
*
*
* Default: Describes all your Subnets.
*
*
* @return One or more Subnet IDs.
*
* Default: Describes all your Subnets.
*/
public java.util.List getSubnetIds() {
if (subnetIds == null) {
subnetIds = new com.ksc.internal.SdkInternalList();
}
return subnetIds;
}
/**
*
* One or more Subnet IDs.
*
*
* Default: Describes all your Subnets.
*
*
* @param subnetIds
* One or more Subnet IDs.
*
* Default: Describes all your Subnets.
*/
public void setSubnetIds(java.util.Collection subnetIds) {
if (subnetIds == null) {
this.subnetIds = null;
return;
}
this.subnetIds = new com.ksc.internal.SdkInternalList(subnetIds);
}
/**
*
* One or more Subnet IDs.
*
*
* Default: Describes all your Subnets.
*
*
* NOTE: This method appends the values to the existing list (if
* any). Use {@link #setSubnetIds(java.util.Collection)} or
* {@link #withSubnetIds(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param subnetIds
* One or more Subnet IDs.
*
* Default: Describes all your Subnets.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public DescribeSubnetsRequest withSubnetIds(String... subnetIds) {
if (this.subnetIds == null) {
setSubnetIds(new com.ksc.internal.SdkInternalList(
subnetIds.length));
}
for (String ele : subnetIds) {
this.subnetIds.add(ele);
}
return this;
}
/**
*
* One or more Subnet IDs.
*
*
* Default: Describes all your Subnets.
*
*
* @param subnetIds
* One or more Subnet IDs.
*
* Default: Describes all your Subnets.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public DescribeSubnetsRequest withSubnetIds(java.util.Collection subnetIds) {
setSubnetIds(subnetIds);
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 DescribeSubnetsRequest 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 DescribeSubnetsRequest 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;
}
}