com.amazonaws.services.dynamodbv2.model.DescribeStreamRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-dynamodb Show documentation
/*
* 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.dynamodbv2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* Represents the input of a DescribeStream
operation.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeStreamRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The Amazon Resource Name (ARN) for the stream.
*
*/
private String streamArn;
/**
*
* The maximum number of shard objects to return. The upper limit is 100.
*
*/
private Integer limit;
/**
*
* The shard ID of the first item that this operation will evaluate. Use the value that was returned for
* LastEvaluatedShardId
in the previous operation.
*
*/
private String exclusiveStartShardId;
/**
*
* The Amazon Resource Name (ARN) for the stream.
*
*
* @param streamArn
* The Amazon Resource Name (ARN) for the stream.
*/
public void setStreamArn(String streamArn) {
this.streamArn = streamArn;
}
/**
*
* The Amazon Resource Name (ARN) for the stream.
*
*
* @return The Amazon Resource Name (ARN) for the stream.
*/
public String getStreamArn() {
return this.streamArn;
}
/**
*
* The Amazon Resource Name (ARN) for the stream.
*
*
* @param streamArn
* The Amazon Resource Name (ARN) for the stream.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStreamRequest withStreamArn(String streamArn) {
setStreamArn(streamArn);
return this;
}
/**
*
* The maximum number of shard objects to return. The upper limit is 100.
*
*
* @param limit
* The maximum number of shard objects to return. The upper limit is 100.
*/
public void setLimit(Integer limit) {
this.limit = limit;
}
/**
*
* The maximum number of shard objects to return. The upper limit is 100.
*
*
* @return The maximum number of shard objects to return. The upper limit is 100.
*/
public Integer getLimit() {
return this.limit;
}
/**
*
* The maximum number of shard objects to return. The upper limit is 100.
*
*
* @param limit
* The maximum number of shard objects to return. The upper limit is 100.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStreamRequest withLimit(Integer limit) {
setLimit(limit);
return this;
}
/**
*
* The shard ID of the first item that this operation will evaluate. Use the value that was returned for
* LastEvaluatedShardId
in the previous operation.
*
*
* @param exclusiveStartShardId
* The shard ID of the first item that this operation will evaluate. Use the value that was returned for
* LastEvaluatedShardId
in the previous operation.
*/
public void setExclusiveStartShardId(String exclusiveStartShardId) {
this.exclusiveStartShardId = exclusiveStartShardId;
}
/**
*
* The shard ID of the first item that this operation will evaluate. Use the value that was returned for
* LastEvaluatedShardId
in the previous operation.
*
*
* @return The shard ID of the first item that this operation will evaluate. Use the value that was returned for
* LastEvaluatedShardId
in the previous operation.
*/
public String getExclusiveStartShardId() {
return this.exclusiveStartShardId;
}
/**
*
* The shard ID of the first item that this operation will evaluate. Use the value that was returned for
* LastEvaluatedShardId
in the previous operation.
*
*
* @param exclusiveStartShardId
* The shard ID of the first item that this operation will evaluate. Use the value that was returned for
* LastEvaluatedShardId
in the previous operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStreamRequest withExclusiveStartShardId(String exclusiveStartShardId) {
setExclusiveStartShardId(exclusiveStartShardId);
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 (getStreamArn() != null)
sb.append("StreamArn: ").append(getStreamArn()).append(",");
if (getLimit() != null)
sb.append("Limit: ").append(getLimit()).append(",");
if (getExclusiveStartShardId() != null)
sb.append("ExclusiveStartShardId: ").append(getExclusiveStartShardId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeStreamRequest == false)
return false;
DescribeStreamRequest other = (DescribeStreamRequest) obj;
if (other.getStreamArn() == null ^ this.getStreamArn() == null)
return false;
if (other.getStreamArn() != null && other.getStreamArn().equals(this.getStreamArn()) == false)
return false;
if (other.getLimit() == null ^ this.getLimit() == null)
return false;
if (other.getLimit() != null && other.getLimit().equals(this.getLimit()) == false)
return false;
if (other.getExclusiveStartShardId() == null ^ this.getExclusiveStartShardId() == null)
return false;
if (other.getExclusiveStartShardId() != null && other.getExclusiveStartShardId().equals(this.getExclusiveStartShardId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getStreamArn() == null) ? 0 : getStreamArn().hashCode());
hashCode = prime * hashCode + ((getLimit() == null) ? 0 : getLimit().hashCode());
hashCode = prime * hashCode + ((getExclusiveStartShardId() == null) ? 0 : getExclusiveStartShardId().hashCode());
return hashCode;
}
@Override
public DescribeStreamRequest clone() {
return (DescribeStreamRequest) super.clone();
}
}