com.ksc.network.vpc.model.InternetGateways.DescribeInternetGatewaysRequest Maven / Gradle / Ivy
package com.ksc.network.vpc.model.InternetGateways;
import com.ksc.KscWebServiceRequest;
import com.ksc.Request;
import com.ksc.model.DryRunSupportedRequest;
import com.ksc.model.Filter;
import com.ksc.network.vpc.transform.InternetGateways.DescribeInternetGatewaysRequestMarshaller;
import lombok.ToString;
/**
*
* Contains the parameters for DescribeInternetGateways.
*
*/
@ToString
public class DescribeInternetGatewaysRequest extends KscWebServiceRequest implements
DryRunSupportedRequest {
/**
*
* One or more InternetGateway IDs.
*
*
* Default: Describes all your InternetGateways.
*
*/
private com.ksc.internal.SdkInternalList internetGatewayIds;
private com.ksc.internal.SdkInternalList filters;
/**
*
* One or more InternetGateway IDs.
*
*
* Default: Describes all your InternetGateways.
*
*
* @return One or more InternetGateway IDs.
*
* Default: Describes all your InternetGateways.
*/
public java.util.List getInternetGatewayIds() {
if (internetGatewayIds == null) {
internetGatewayIds = new com.ksc.internal.SdkInternalList();
}
return internetGatewayIds;
}
/**
*
* One or more InternetGateway IDs.
*
*
* Default: Describes all your InternetGateways.
*
*
* @param internetGatewayIds
* One or more InternetGateway IDs.
*
* Default: Describes all your InternetGateways.
*/
public void setInternetGatewayIds(java.util.Collection internetGatewayIds) {
if (internetGatewayIds == null) {
this.internetGatewayIds = null;
return;
}
this.internetGatewayIds = new com.ksc.internal.SdkInternalList(internetGatewayIds);
}
/**
*
* One or more InternetGateway IDs.
*
*
* Default: Describes all your InternetGateways.
*
*
* NOTE: This method appends the values to the existing list (if
* any). Use {@link #setInternetGatewayIds(java.util.Collection)} or
* {@link #withInternetGatewayIds(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param internetGatewayIds
* One or more InternetGateway IDs.
*
* Default: Describes all your InternetGateways.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public DescribeInternetGatewaysRequest withInternetGatewayIds(String... internetGatewayIds) {
if (this.internetGatewayIds == null) {
setInternetGatewayIds(new com.ksc.internal.SdkInternalList(
internetGatewayIds.length));
}
for (String ele : internetGatewayIds) {
this.internetGatewayIds.add(ele);
}
return this;
}
/**
*
* One or more InternetGateway IDs.
*
*
* Default: Describes all your InternetGateways.
*
*
* @param internetGatewayIds
* One or more InternetGateway IDs.
*
* Default: Describes all your InternetGateways.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public DescribeInternetGatewaysRequest withInternetGatewayIds(java.util.Collection internetGatewayIds) {
setInternetGatewayIds(internetGatewayIds);
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 DescribeInternetGatewaysRequest 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 DescribeInternetGatewaysRequest 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 DescribeInternetGatewaysRequestMarshaller()
.marshall(this);
request.addParameter("DryRun", Boolean.toString(true));
return request;
}
}