public Session withDuration(Integer duration) {
        setDuration(duration);
        return this;
    }
<p>
The duration of the session, in milliseconds.
</p>

@param duration
       The duration of the session, in milliseconds.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/Session.java