/**
  * A list of filters used to match properties for VPN Gateways. For a complete reference to the
  * available filter keys for this operation, see the <a
  * href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/">Amazon EC2 API
  * reference</a>.
  *
  * <p>Returns a reference to this object so that method calls can be chained together.
  *
  * @param filters A list of filters used to match properties for VPN Gateways. For a complete
  *     reference to the available filter keys for this operation, see the <a
  *     href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/">Amazon EC2 API
  *     reference</a>.
  * @return A reference to this updated object so that method calls can be chained together.
  */
 public DescribeVpnGatewaysRequest withFilters(Filter... filters) {
   if (getFilters() == null) setFilters(new java.util.ArrayList<Filter>(filters.length));
   for (Filter value : filters) {
     getFilters().add(value);
   }
   return this;
 }
  @Override
  public void doWork() throws BuildException {
    DescribeVpnGatewaysRequest request = new DescribeVpnGatewaysRequest();

    if (gatewayIds != null) {
      request.setVpnGatewayIds(CollectionsHelper.asList(gatewayIds));
    }

    if (filters != null) {
      request.setFilters(filters);
    }

    DescribeVpnGatewaysResult result = getEc2Client().describeVpnGateways(request);

    for (VpnGateway gateway : result.getVpnGateways()) {
      this.setPropertyThreadSafe(property, gateway.toString());

      for (Task task : tasks) {
        task.perform();
      }
    }
  }