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

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

There is a newer version: 2.20.1
Show newest version
/*
 * Copyright 2010-2014 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 com.amazonaws.AmazonWebServiceRequest;

/**
 * Container for the parameters to the {@link com.amazonaws.services.kinesis.AmazonKinesis#listStreams(ListStreamsRequest) ListStreams operation}.
 * 

* This operation returns an array of the names of all the streams that * are associated with the AWS account making the * ListStreams request. A given AWS account can have many * streams active at one time. *

*

* The number of streams may be too large to return from a single call * to ListStreams . * You can limit the number of returned streams using the * Limit parameter. If you do not specify a value for the * Limit parameter, Amazon Kinesis uses the default limit, * which is currently 10. *

*

* You can detect if there are more streams available to list by using * the HasMoreStreams flag from the returned output. If * there are more streams available, you can request more streams by * using the name of the last stream returned by the * ListStreams request in the * ExclusiveStartStreamName parameter in a subsequent * request to ListStreams . * The group of stream names returned by the subsequent * request is then added to the list. You can continue this process until * all the stream names have been collected in the list. *

*

* ListStreams has a limit of 5 transactions per second per * account. *

* * @see com.amazonaws.services.kinesis.AmazonKinesis#listStreams(ListStreamsRequest) */ public class ListStreamsRequest extends AmazonWebServiceRequest implements Serializable { /** * The maximum number of streams to list. *

* Constraints:
* Range: 1 - 10000
*/ private Integer limit; /** * The name of the stream to start the list with. *

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_.-]+
*/ private String exclusiveStartStreamName; /** * The maximum number of streams to list. *

* Constraints:
* Range: 1 - 10000
* * @return The maximum number of streams to list. */ public Integer getLimit() { return limit; } /** * The maximum number of streams to list. *

* Constraints:
* Range: 1 - 10000
* * @param limit The maximum number of streams to list. */ public void setLimit(Integer limit) { this.limit = limit; } /** * The maximum number of streams to list. *

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

* Constraints:
* Range: 1 - 10000
* * @param limit The maximum number of streams to list. * * @return A reference to this updated object so that method calls can be chained * together. */ public ListStreamsRequest withLimit(Integer limit) { this.limit = limit; return this; } /** * The name of the stream to start the list with. *

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_.-]+
* * @return The name of the stream to start the list with. */ public String getExclusiveStartStreamName() { return exclusiveStartStreamName; } /** * The name of the stream to start the list with. *

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_.-]+
* * @param exclusiveStartStreamName The name of the stream to start the list with. */ public void setExclusiveStartStreamName(String exclusiveStartStreamName) { this.exclusiveStartStreamName = exclusiveStartStreamName; } /** * The name of the stream to start the list with. *

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

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9_.-]+
* * @param exclusiveStartStreamName The name of the stream to start the list with. * * @return A reference to this updated object so that method calls can be chained * together. */ public ListStreamsRequest withExclusiveStartStreamName(String exclusiveStartStreamName) { this.exclusiveStartStreamName = exclusiveStartStreamName; 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 (getLimit() != null) sb.append("Limit: " + getLimit() + ","); if (getExclusiveStartStreamName() != null) sb.append("ExclusiveStartStreamName: " + getExclusiveStartStreamName() ); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLimit() == null) ? 0 : getLimit().hashCode()); hashCode = prime * hashCode + ((getExclusiveStartStreamName() == null) ? 0 : getExclusiveStartStreamName().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListStreamsRequest == false) return false; ListStreamsRequest other = (ListStreamsRequest)obj; if (other.getLimit() == null ^ this.getLimit() == null) return false; if (other.getLimit() != null && other.getLimit().equals(this.getLimit()) == false) return false; if (other.getExclusiveStartStreamName() == null ^ this.getExclusiveStartStreamName() == null) return false; if (other.getExclusiveStartStreamName() != null && other.getExclusiveStartStreamName().equals(this.getExclusiveStartStreamName()) == false) return false; return true; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy