public IdFormat withResource(String resource) {
        setResource(resource);
        return this;
    }
<p>
The type of resource.
</p>

@param resource
       The type of resource.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/IdFormat.java