public Session withMaxExpirationTime(java.util.Date maxExpirationTime) {
        setMaxExpirationTime(maxExpirationTime);
        return this;
    }
<p>
The time when the streaming session is set to expire. This time is based on the
<code>MaxUserDurationinSeconds</code> value, which determines the maximum length of time that a streaming session
can run. A streaming session might end earlier than the time specified in <code>SessionMaxExpirationTime</code>,
when the <code>DisconnectTimeOutInSeconds</code> elapses or the user chooses to end his or her session. If the
<code>DisconnectTimeOutInSeconds</code> elapses, or the user chooses to end his or her session, the streaming
instance is terminated and the streaming session ends.
</p>

@param maxExpirationTime
       The time when the streaming session is set to expire. This time is based on the
       <code>MaxUserDurationinSeconds</code> value, which determines the maximum length of time that a streaming
       session can run. A streaming session might end earlier than the time specified in
       <code>SessionMaxExpirationTime</code>, when the <code>DisconnectTimeOutInSeconds</code> elapses or the
       user chooses to end his or her session. If the <code>DisconnectTimeOutInSeconds</code> elapses, or the
       user chooses to end his or her session, the streaming instance is terminated and the streaming session
       ends.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-appstream/src/main/java/com/amazonaws/services/appstream/model/Session.java