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.772
Show newest version
/*
 * Copyright 2016-2021 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; /** *

* Specify this parameter to indicate that you want to list the shards starting with the shard whose ID immediately * follows ExclusiveStartShardId. *

*

* 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 10,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; private ShardFilter shardFilter; /** *

* 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; } /** *

* Specify this parameter to indicate that you want to list the shards starting with the shard whose ID immediately * follows ExclusiveStartShardId. *

*

* 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 * Specify this parameter to indicate that you want to list the shards starting with the shard whose ID * immediately follows ExclusiveStartShardId.

*

* 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; } /** *

* Specify this parameter to indicate that you want to list the shards starting with the shard whose ID immediately * follows ExclusiveStartShardId. *

*

* 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 Specify this parameter to indicate that you want to list the shards starting with the shard whose ID * immediately follows ExclusiveStartShardId.

*

* 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; } /** *

* Specify this parameter to indicate that you want to list the shards starting with the shard whose ID immediately * follows ExclusiveStartShardId. *

*

* 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 * Specify this parameter to indicate that you want to list the shards starting with the shard whose ID * immediately follows ExclusiveStartShardId.

*

* 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 10,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 10,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 10,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 10,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 10,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 10,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; } /** * @param shardFilter */ public void setShardFilter(ShardFilter shardFilter) { this.shardFilter = shardFilter; } /** * @return */ public ShardFilter getShardFilter() { return this.shardFilter; } /** * @param shardFilter * @return Returns a reference to this object so that method calls can be chained together. */ public ListShardsRequest withShardFilter(ShardFilter shardFilter) { setShardFilter(shardFilter); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @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()).append(","); if (getShardFilter() != null) sb.append("ShardFilter: ").append(getShardFilter()); 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; if (other.getShardFilter() == null ^ this.getShardFilter() == null) return false; if (other.getShardFilter() != null && other.getShardFilter().equals(this.getShardFilter()) == 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()); hashCode = prime * hashCode + ((getShardFilter() == null) ? 0 : getShardFilter().hashCode()); return hashCode; } @Override public ListShardsRequest clone() { return (ListShardsRequest) super.clone(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy