public InstanceState withName(InstanceStateName name) {
        this.name = name.toString();
        return this;
    }
<p>
The current state of the instance.
</p>

@param name
       The current state of the instance.
@return Returns a reference to this object so that method calls can be chained together.
@see InstanceStateName
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/InstanceState.java