public Resource withType(String type) {
        setType(type);
        return this;
    }
<p>
The type of the resource that details are provided for. If possible, set <code>Type</code> to one of the
supported resource types. For example, if the resource is an EC2 instance, then set <code>Type</code> to
<code>AwsEc2Instance</code>.
</p>
<p>
If the resource does not match any of the provided types, then set <code>Type</code> to <code>Other</code>.
</p>
<p>
Length Constraints: Minimum length of 1. Maximum length of 256.
</p>

@param type
       The type of the resource that details are provided for. If possible, set <code>Type</code> to one of the
       supported resource types. For example, if the resource is an EC2 instance, then set <code>Type</code> to
       <code>AwsEc2Instance</code>.</p>
       <p>
       If the resource does not match any of the provided types, then set <code>Type</code> to <code>Other</code>
       .
       </p>
       <p>
       Length Constraints: Minimum length of 1. Maximum length of 256.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-securityhub/src/main/java/com/amazonaws/services/securityhub/model/Resource.java