public ListShardsResult withNextToken(String nextToken) {
        setNextToken(nextToken);
        return this;
    }
<p>
When the number of shards in the data stream is greater than the default value for the <code>MaxResults</code>
parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of
shards in the data stream, the response includes a pagination token named <code>NextToken</code>. You can specify
this <code>NextToken</code> value in a subsequent call to <code>ListShards</code> to list the next set of shards.
For more information about the use of this pagination token when calling the <code>ListShards</code> operation,
see <a>ListShardsInput$NextToken</a>.
</p>
<important>
<p>
Tokens expire after 300 seconds. When you obtain a value for <code>NextToken</code> in the response to a call to
<code>ListShards</code>, you have 300 seconds to use that value. If you specify an expired token in a call to
<code>ListShards</code>, you get <code>ExpiredNextTokenException</code>.
</p>
</important>

@param nextToken
       When the number of shards in the data stream is greater than the default value for the
       <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that
       is less than the number of shards in the data stream, the response includes a pagination token named
       <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to
       <code>ListShards</code> to list the next set of shards. For more information about the use of this
       pagination token when calling the <code>ListShards</code> operation, see
       <a>ListShardsInput$NextToken</a>.</p> <important>
       <p>
       Tokens expire after 300 seconds. When you obtain a value for <code>NextToken</code> in the response to a
       call to <code>ListShards</code>, you have 300 seconds to use that value. If you specify an expired token
       in a call to <code>ListShards</code>, you get <code>ExpiredNextTokenException</code>.
       </p>
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/model/ListShardsResult.java