Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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;
 
 
Container for the parameters to the DescribeStream operation.

Describes the specified stream.

The information about the stream includes its current status, its Amazon Resource Name (ARN), and an array of shard objects. For each shard object, there is information about the hash key and sequence number ranges that the shard spans, and the IDs of any earlier shards that played in a role in creating the shard. A sequence number is the identifier associated with every record ingested in the Amazon Kinesis stream. The sequence number is assigned when a record is put into the stream.

You can limit the number of returned shards using the Limit parameter. The number of shards in a stream may be too large to return from a single call to DescribeStream . You can detect this by using the HasMoreShards flag in the returned output. HasMoreShards is set to true when there is more data available.

DescribeStream is a paginated operation. If there are more shards available, you can request them using the shard ID of the last shard returned. Specify this ID in the ExclusiveStartShardId parameter in a subsequent request to DescribeStream .

DescribeStream has a limit of 10 transactions per second per account.

 
 public class DescribeStreamRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The name of the stream to describe.

Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9_.-]+

 
     private String streamName;

    
The maximum number of shards to return.

Constraints:
Range: 1 - 10000

 
     private Integer limit;

    
The shard ID of the shard to start with.

Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9_.-]+

 
     private String exclusiveStartShardId;

    
The name of the stream to describe.

Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9_.-]+

Returns:
The name of the stream to describe.
 
     public String getStreamName() {
         return ;
     }
    
    
The name of the stream to describe.

Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9_.-]+

Parameters:
streamName The name of the stream to describe.
    public void setStreamName(String streamName) {
        this. = streamName;
    }
    
    
The name of the stream to describe.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9_.-]+

Parameters:
streamName The name of the stream to describe.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeStreamRequest withStreamName(String streamName) {
        this. = streamName;
        return this;
    }

    
The maximum number of shards to return.

Constraints:
Range: 1 - 10000

Returns:
The maximum number of shards to return.
    public Integer getLimit() {
        return ;
    }
    
    
The maximum number of shards to return.

Constraints:
Range: 1 - 10000

Parameters:
limit The maximum number of shards to return.
    public void setLimit(Integer limit) {
        this. = limit;
    }
    
    
The maximum number of shards to return.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 1 - 10000

Parameters:
limit The maximum number of shards to return.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeStreamRequest withLimit(Integer limit) {
        this. = limit;
        return this;
    }

    
The shard ID of the shard to start with.

Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9_.-]+

Returns:
The shard ID of the shard to start with.
    public String getExclusiveStartShardId() {
        return ;
    }
    
    
The shard ID of the shard to start with.

Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9_.-]+

Parameters:
exclusiveStartShardId The shard ID of the shard to start with.
    public void setExclusiveStartShardId(String exclusiveStartShardId) {
        this. = exclusiveStartShardId;
    }
    
    
The shard ID of the shard to start with.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9_.-]+

Parameters:
exclusiveStartShardId The shard ID of the shard to start with.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeStreamRequest withExclusiveStartShardId(String exclusiveStartShardId) {
        this. = exclusiveStartShardId;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getStreamName() != nullsb.append("StreamName: " + getStreamName() + ",");
        if (getLimit() != nullsb.append("Limit: " + getLimit() + ",");
        if (getExclusiveStartShardId() != nullsb.append("ExclusiveStartShardId: " + getExclusiveStartShardId() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getStreamName() == null) ? 0 : getStreamName().hashCode()); 
        hashCode = prime * hashCode + ((getLimit() == null) ? 0 : getLimit().hashCode()); 
        hashCode = prime * hashCode + ((getExclusiveStartShardId() == null) ? 0 : getExclusiveStartShardId().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DescribeStreamRequest == falsereturn false;
        DescribeStreamRequest other = (DescribeStreamRequest)obj;
        
        if (other.getStreamName() == null ^ this.getStreamName() == nullreturn false;
        if (other.getStreamName() != null && other.getStreamName().equals(this.getStreamName()) == falsereturn false
        if (other.getLimit() == null ^ this.getLimit() == nullreturn false;
        if (other.getLimit() != null && other.getLimit().equals(this.getLimit()) == falsereturn false
        if (other.getExclusiveStartShardId() == null ^ this.getExclusiveStartShardId() == nullreturn false;
        if (other.getExclusiveStartShardId() != null && other.getExclusiveStartShardId().equals(this.getExclusiveStartShardId()) == falsereturn false
        return true;
    }
    
    @Override
    public DescribeStreamRequest clone() {
        
            return (DescribeStreamRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X