All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.kinesis.model.ListShardsRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Kinesis module holds the client classes that are used for communicating with Amazon Kinesis Service

There is a newer version: 1.12.725
Show newest version
/*
 * Copyright 2013-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.kinesis.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 * 
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListShardsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The name of the data stream whose shards you want to list. *

*

* You cannot specify this parameter if you specify the NextToken parameter. *

*/ private String streamName; /** *

* When the number of shards in the data stream is greater than the default value for the MaxResults * parameter, or if you explicitly specify a value for MaxResults that is less than the number of * shards in the data stream, the response includes a pagination token named NextToken. You can specify * this NextToken value in a subsequent call to ListShards to list the next set of shards. *

*

* Don't specify StreamName or StreamCreationTimestamp if you specify * NextToken because the latter unambiguously identifies the stream. *

*

* You can optionally specify a value for the MaxResults parameter when you specify * NextToken. If you specify a MaxResults value that is less than the number of shards * that the operation returns if you don't specify MaxResults, the response will contain a new * NextToken value. You can use the new NextToken value in a subsequent call to the * ListShards operation. *

* *

* Tokens expire after 300 seconds. When you obtain a value for NextToken in the response to a call to * ListShards, you have 300 seconds to use that value. If you specify an expired token in a call to * ListShards, you get ExpiredNextTokenException. *

*
*/ private String nextToken; /** *

* The ID of the shard to start the list with. *

*

* If you don't specify this parameter, the default behavior is for ListShards to list the shards * starting with the first one in the stream. *

*

* You cannot specify this parameter if you specify NextToken. *

*/ private String exclusiveStartShardId; /** *

* The maximum number of shards to return in a single call to ListShards. The minimum value you can * specify for this parameter is 1, and the maximum is 1,000, which is also the default. *

*

* When the number of shards to be listed is greater than the value of MaxResults, the response * contains a NextToken value that you can use in a subsequent call to ListShards to list * the next set of shards. *

*/ private Integer maxResults; /** *

* Specify this input parameter to distinguish data streams that have the same name. For example, if you create a * data stream and then delete it, and you later create another data stream with the same name, you can use this * input parameter to specify which of the two streams you want to list the shards for. *

*

* You cannot specify this parameter if you specify the NextToken parameter. *

*/ private java.util.Date streamCreationTimestamp; /** *

* The name of the data stream whose shards you want to list. *

*

* You cannot specify this parameter if you specify the NextToken parameter. *

* * @param streamName * The name of the data stream whose shards you want to list.

*

* You cannot specify this parameter if you specify the NextToken parameter. */ public void setStreamName(String streamName) { this.streamName = streamName; } /** *

* The name of the data stream whose shards you want to list. *

*

* You cannot specify this parameter if you specify the NextToken parameter. *

* * @return The name of the data stream whose shards you want to list.

*

* You cannot specify this parameter if you specify the NextToken parameter. */ public String getStreamName() { return this.streamName; } /** *

* The name of the data stream whose shards you want to list. *

*

* You cannot specify this parameter if you specify the NextToken parameter. *

* * @param streamName * The name of the data stream whose shards you want to list.

*

* You cannot specify this parameter if you specify the NextToken parameter. * @return Returns a reference to this object so that method calls can be chained together. */ public ListShardsRequest withStreamName(String streamName) { setStreamName(streamName); return this; } /** *

* When the number of shards in the data stream is greater than the default value for the MaxResults * parameter, or if you explicitly specify a value for MaxResults that is less than the number of * shards in the data stream, the response includes a pagination token named NextToken. You can specify * this NextToken value in a subsequent call to ListShards to list the next set of shards. *

*

* Don't specify StreamName or StreamCreationTimestamp if you specify * NextToken because the latter unambiguously identifies the stream. *

*

* You can optionally specify a value for the MaxResults parameter when you specify * NextToken. If you specify a MaxResults value that is less than the number of shards * that the operation returns if you don't specify MaxResults, the response will contain a new * NextToken value. You can use the new NextToken value in a subsequent call to the * ListShards operation. *

* *

* Tokens expire after 300 seconds. When you obtain a value for NextToken in the response to a call to * ListShards, you have 300 seconds to use that value. If you specify an expired token in a call to * ListShards, you get ExpiredNextTokenException. *

*
* * @param nextToken * When the number of shards in the data stream is greater than the default value for the * MaxResults parameter, or if you explicitly specify a value for MaxResults that * is less than the number of shards in the data stream, the response includes a pagination token named * NextToken. You can specify this NextToken value in a subsequent call to * ListShards to list the next set of shards.

*

* Don't specify StreamName or StreamCreationTimestamp if you specify * NextToken because the latter unambiguously identifies the stream. *

*

* You can optionally specify a value for the MaxResults parameter when you specify * NextToken. If you specify a MaxResults value that is less than the number of * shards that the operation returns if you don't specify MaxResults, the response will contain * a new NextToken value. You can use the new NextToken value in a subsequent call * to the ListShards operation. *

* *

* Tokens expire after 300 seconds. When you obtain a value for NextToken in the response to a * call to ListShards, you have 300 seconds to use that value. If you specify an expired token * in a call to ListShards, you get ExpiredNextTokenException. *

*/ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** *

* When the number of shards in the data stream is greater than the default value for the MaxResults * parameter, or if you explicitly specify a value for MaxResults that is less than the number of * shards in the data stream, the response includes a pagination token named NextToken. You can specify * this NextToken value in a subsequent call to ListShards to list the next set of shards. *

*

* Don't specify StreamName or StreamCreationTimestamp if you specify * NextToken because the latter unambiguously identifies the stream. *

*

* You can optionally specify a value for the MaxResults parameter when you specify * NextToken. If you specify a MaxResults value that is less than the number of shards * that the operation returns if you don't specify MaxResults, the response will contain a new * NextToken value. You can use the new NextToken value in a subsequent call to the * ListShards operation. *

* *

* Tokens expire after 300 seconds. When you obtain a value for NextToken in the response to a call to * ListShards, you have 300 seconds to use that value. If you specify an expired token in a call to * ListShards, you get ExpiredNextTokenException. *

*
* * @return When the number of shards in the data stream is greater than the default value for the * MaxResults parameter, or if you explicitly specify a value for MaxResults that * is less than the number of shards in the data stream, the response includes a pagination token named * NextToken. You can specify this NextToken value in a subsequent call to * ListShards to list the next set of shards.

*

* Don't specify StreamName or StreamCreationTimestamp if you specify * NextToken because the latter unambiguously identifies the stream. *

*

* You can optionally specify a value for the MaxResults parameter when you specify * NextToken. If you specify a MaxResults value that is less than the number of * shards that the operation returns if you don't specify MaxResults, the response will contain * a new NextToken value. You can use the new NextToken value in a subsequent call * to the ListShards operation. *

* *

* Tokens expire after 300 seconds. When you obtain a value for NextToken in the response to a * call to ListShards, you have 300 seconds to use that value. If you specify an expired token * in a call to ListShards, you get ExpiredNextTokenException. *

*/ public String getNextToken() { return this.nextToken; } /** *

* When the number of shards in the data stream is greater than the default value for the MaxResults * parameter, or if you explicitly specify a value for MaxResults that is less than the number of * shards in the data stream, the response includes a pagination token named NextToken. You can specify * this NextToken value in a subsequent call to ListShards to list the next set of shards. *

*

* Don't specify StreamName or StreamCreationTimestamp if you specify * NextToken because the latter unambiguously identifies the stream. *

*

* You can optionally specify a value for the MaxResults parameter when you specify * NextToken. If you specify a MaxResults value that is less than the number of shards * that the operation returns if you don't specify MaxResults, the response will contain a new * NextToken value. You can use the new NextToken value in a subsequent call to the * ListShards operation. *

* *

* Tokens expire after 300 seconds. When you obtain a value for NextToken in the response to a call to * ListShards, you have 300 seconds to use that value. If you specify an expired token in a call to * ListShards, you get ExpiredNextTokenException. *

*
* * @param nextToken * When the number of shards in the data stream is greater than the default value for the * MaxResults parameter, or if you explicitly specify a value for MaxResults that * is less than the number of shards in the data stream, the response includes a pagination token named * NextToken. You can specify this NextToken value in a subsequent call to * ListShards to list the next set of shards.

*

* Don't specify StreamName or StreamCreationTimestamp if you specify * NextToken because the latter unambiguously identifies the stream. *

*

* You can optionally specify a value for the MaxResults parameter when you specify * NextToken. If you specify a MaxResults value that is less than the number of * shards that the operation returns if you don't specify MaxResults, the response will contain * a new NextToken value. You can use the new NextToken value in a subsequent call * to the ListShards operation. *

* *

* Tokens expire after 300 seconds. When you obtain a value for NextToken in the response to a * call to ListShards, you have 300 seconds to use that value. If you specify an expired token * in a call to ListShards, you get ExpiredNextTokenException. *

* @return Returns a reference to this object so that method calls can be chained together. */ public ListShardsRequest withNextToken(String nextToken) { setNextToken(nextToken); return this; } /** *

* The ID of the shard to start the list with. *

*

* If you don't specify this parameter, the default behavior is for ListShards to list the shards * starting with the first one in the stream. *

*

* You cannot specify this parameter if you specify NextToken. *

* * @param exclusiveStartShardId * The ID of the shard to start the list with.

*

* If you don't specify this parameter, the default behavior is for ListShards to list the * shards starting with the first one in the stream. *

*

* You cannot specify this parameter if you specify NextToken. */ public void setExclusiveStartShardId(String exclusiveStartShardId) { this.exclusiveStartShardId = exclusiveStartShardId; } /** *

* The ID of the shard to start the list with. *

*

* If you don't specify this parameter, the default behavior is for ListShards to list the shards * starting with the first one in the stream. *

*

* You cannot specify this parameter if you specify NextToken. *

* * @return The ID of the shard to start the list with.

*

* If you don't specify this parameter, the default behavior is for ListShards to list the * shards starting with the first one in the stream. *

*

* You cannot specify this parameter if you specify NextToken. */ public String getExclusiveStartShardId() { return this.exclusiveStartShardId; } /** *

* The ID of the shard to start the list with. *

*

* If you don't specify this parameter, the default behavior is for ListShards to list the shards * starting with the first one in the stream. *

*

* You cannot specify this parameter if you specify NextToken. *

* * @param exclusiveStartShardId * The ID of the shard to start the list with.

*

* If you don't specify this parameter, the default behavior is for ListShards to list the * shards starting with the first one in the stream. *

*

* You cannot specify this parameter if you specify NextToken. * @return Returns a reference to this object so that method calls can be chained together. */ public ListShardsRequest withExclusiveStartShardId(String exclusiveStartShardId) { setExclusiveStartShardId(exclusiveStartShardId); return this; } /** *

* The maximum number of shards to return in a single call to ListShards. The minimum value you can * specify for this parameter is 1, and the maximum is 1,000, which is also the default. *

*

* When the number of shards to be listed is greater than the value of MaxResults, the response * contains a NextToken value that you can use in a subsequent call to ListShards to list * the next set of shards. *

* * @param maxResults * The maximum number of shards to return in a single call to ListShards. The minimum value you * can specify for this parameter is 1, and the maximum is 1,000, which is also the default.

*

* When the number of shards to be listed is greater than the value of MaxResults, the response * contains a NextToken value that you can use in a subsequent call to ListShards * to list the next set of shards. */ public void setMaxResults(Integer maxResults) { this.maxResults = maxResults; } /** *

* The maximum number of shards to return in a single call to ListShards. The minimum value you can * specify for this parameter is 1, and the maximum is 1,000, which is also the default. *

*

* When the number of shards to be listed is greater than the value of MaxResults, the response * contains a NextToken value that you can use in a subsequent call to ListShards to list * the next set of shards. *

* * @return The maximum number of shards to return in a single call to ListShards. The minimum value you * can specify for this parameter is 1, and the maximum is 1,000, which is also the default.

*

* When the number of shards to be listed is greater than the value of MaxResults, the response * contains a NextToken value that you can use in a subsequent call to ListShards * to list the next set of shards. */ public Integer getMaxResults() { return this.maxResults; } /** *

* The maximum number of shards to return in a single call to ListShards. The minimum value you can * specify for this parameter is 1, and the maximum is 1,000, which is also the default. *

*

* When the number of shards to be listed is greater than the value of MaxResults, the response * contains a NextToken value that you can use in a subsequent call to ListShards to list * the next set of shards. *

* * @param maxResults * The maximum number of shards to return in a single call to ListShards. The minimum value you * can specify for this parameter is 1, and the maximum is 1,000, which is also the default.

*

* When the number of shards to be listed is greater than the value of MaxResults, the response * contains a NextToken value that you can use in a subsequent call to ListShards * to list the next set of shards. * @return Returns a reference to this object so that method calls can be chained together. */ public ListShardsRequest withMaxResults(Integer maxResults) { setMaxResults(maxResults); return this; } /** *

* Specify this input parameter to distinguish data streams that have the same name. For example, if you create a * data stream and then delete it, and you later create another data stream with the same name, you can use this * input parameter to specify which of the two streams you want to list the shards for. *

*

* You cannot specify this parameter if you specify the NextToken parameter. *

* * @param streamCreationTimestamp * Specify this input parameter to distinguish data streams that have the same name. For example, if you * create a data stream and then delete it, and you later create another data stream with the same name, you * can use this input parameter to specify which of the two streams you want to list the shards for.

*

* You cannot specify this parameter if you specify the NextToken parameter. */ public void setStreamCreationTimestamp(java.util.Date streamCreationTimestamp) { this.streamCreationTimestamp = streamCreationTimestamp; } /** *

* Specify this input parameter to distinguish data streams that have the same name. For example, if you create a * data stream and then delete it, and you later create another data stream with the same name, you can use this * input parameter to specify which of the two streams you want to list the shards for. *

*

* You cannot specify this parameter if you specify the NextToken parameter. *

* * @return Specify this input parameter to distinguish data streams that have the same name. For example, if you * create a data stream and then delete it, and you later create another data stream with the same name, you * can use this input parameter to specify which of the two streams you want to list the shards for.

*

* You cannot specify this parameter if you specify the NextToken parameter. */ public java.util.Date getStreamCreationTimestamp() { return this.streamCreationTimestamp; } /** *

* Specify this input parameter to distinguish data streams that have the same name. For example, if you create a * data stream and then delete it, and you later create another data stream with the same name, you can use this * input parameter to specify which of the two streams you want to list the shards for. *

*

* You cannot specify this parameter if you specify the NextToken parameter. *

* * @param streamCreationTimestamp * Specify this input parameter to distinguish data streams that have the same name. For example, if you * create a data stream and then delete it, and you later create another data stream with the same name, you * can use this input parameter to specify which of the two streams you want to list the shards for.

*

* You cannot specify this parameter if you specify the NextToken parameter. * @return Returns a reference to this object so that method calls can be chained together. */ public ListShardsRequest withStreamCreationTimestamp(java.util.Date streamCreationTimestamp) { setStreamCreationTimestamp(streamCreationTimestamp); return this; } /** * Returns a string representation of this object; useful for testing and debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getStreamName() != null) sb.append("StreamName: ").append(getStreamName()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()).append(","); if (getExclusiveStartShardId() != null) sb.append("ExclusiveStartShardId: ").append(getExclusiveStartShardId()).append(","); if (getMaxResults() != null) sb.append("MaxResults: ").append(getMaxResults()).append(","); if (getStreamCreationTimestamp() != null) sb.append("StreamCreationTimestamp: ").append(getStreamCreationTimestamp()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListShardsRequest == false) return false; ListShardsRequest other = (ListShardsRequest) obj; if (other.getStreamName() == null ^ this.getStreamName() == null) return false; if (other.getStreamName() != null && other.getStreamName().equals(this.getStreamName()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getExclusiveStartShardId() == null ^ this.getExclusiveStartShardId() == null) return false; if (other.getExclusiveStartShardId() != null && other.getExclusiveStartShardId().equals(this.getExclusiveStartShardId()) == false) return false; if (other.getMaxResults() == null ^ this.getMaxResults() == null) return false; if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false) return false; if (other.getStreamCreationTimestamp() == null ^ this.getStreamCreationTimestamp() == null) return false; if (other.getStreamCreationTimestamp() != null && other.getStreamCreationTimestamp().equals(this.getStreamCreationTimestamp()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStreamName() == null) ? 0 : getStreamName().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getExclusiveStartShardId() == null) ? 0 : getExclusiveStartShardId().hashCode()); hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode()); hashCode = prime * hashCode + ((getStreamCreationTimestamp() == null) ? 0 : getStreamCreationTimestamp().hashCode()); return hashCode; } @Override public ListShardsRequest clone() { return (ListShardsRequest) super.clone(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy