public Component withType(ComponentType type) {
        this.type = type.toString();
        return this;
    }
<p>
The component type specifies whether Image Builder uses the component to build the image or only to test it.
</p>

@param type
       The component type specifies whether Image Builder uses the component to build the image or only to test
       it.
@return Returns a reference to this object so that method calls can be chained together.
@see ComponentType
aws-java-sdk-imagebuilder/src/main/java/com/amazonaws/services/imagebuilder/model/Component.java