public SpotInstanceRequest withState(SpotInstanceState state) {
        this.state = state.toString();
        return this;
    }
<p>
The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests.
For more information, see <a
href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html">Spot request status</a> in
the <i>Amazon EC2 User Guide</i>.
</p>

@param state
       The state of the Spot Instance request. Spot request status information helps track your Spot Instance
       requests. For more information, see <a
       href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html">Spot request
       status</a> in the <i>Amazon EC2 User Guide</i>.
@return Returns a reference to this object so that method calls can be chained together.
@see SpotInstanceState
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/SpotInstanceRequest.java