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

com.amazonaws.services.kinesis.model.ListShardsResult 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.778
Show newest version
/*
 * Copyright 2019-2024 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;

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

    /**
     * 

* An array of JSON objects. Each object represents one shard and specifies the IDs of the shard, the shard's * parent, and the shard that's adjacent to the shard's parent. Each object also contains the starting and ending * hash keys and the starting and ending sequence numbers for the shard. *

*/ private com.amazonaws.internal.SdkInternalList shards; /** *

* 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. * For more information about the use of this pagination token when calling the ListShards operation, * see ListShardsInput$NextToken. *

* *

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

* An array of JSON objects. Each object represents one shard and specifies the IDs of the shard, the shard's * parent, and the shard that's adjacent to the shard's parent. Each object also contains the starting and ending * hash keys and the starting and ending sequence numbers for the shard. *

* * @return An array of JSON objects. Each object represents one shard and specifies the IDs of the shard, the * shard's parent, and the shard that's adjacent to the shard's parent. Each object also contains the * starting and ending hash keys and the starting and ending sequence numbers for the shard. */ public java.util.List getShards() { if (shards == null) { shards = new com.amazonaws.internal.SdkInternalList(); } return shards; } /** *

* An array of JSON objects. Each object represents one shard and specifies the IDs of the shard, the shard's * parent, and the shard that's adjacent to the shard's parent. Each object also contains the starting and ending * hash keys and the starting and ending sequence numbers for the shard. *

* * @param shards * An array of JSON objects. Each object represents one shard and specifies the IDs of the shard, the shard's * parent, and the shard that's adjacent to the shard's parent. Each object also contains the starting and * ending hash keys and the starting and ending sequence numbers for the shard. */ public void setShards(java.util.Collection shards) { if (shards == null) { this.shards = null; return; } this.shards = new com.amazonaws.internal.SdkInternalList(shards); } /** *

* An array of JSON objects. Each object represents one shard and specifies the IDs of the shard, the shard's * parent, and the shard that's adjacent to the shard's parent. Each object also contains the starting and ending * hash keys and the starting and ending sequence numbers for the shard. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setShards(java.util.Collection)} or {@link #withShards(java.util.Collection)} if you want to override the * existing values. *

* * @param shards * An array of JSON objects. Each object represents one shard and specifies the IDs of the shard, the shard's * parent, and the shard that's adjacent to the shard's parent. Each object also contains the starting and * ending hash keys and the starting and ending sequence numbers for the shard. * @return Returns a reference to this object so that method calls can be chained together. */ public ListShardsResult withShards(Shard... shards) { if (this.shards == null) { setShards(new com.amazonaws.internal.SdkInternalList(shards.length)); } for (Shard ele : shards) { this.shards.add(ele); } return this; } /** *

* An array of JSON objects. Each object represents one shard and specifies the IDs of the shard, the shard's * parent, and the shard that's adjacent to the shard's parent. Each object also contains the starting and ending * hash keys and the starting and ending sequence numbers for the shard. *

* * @param shards * An array of JSON objects. Each object represents one shard and specifies the IDs of the shard, the shard's * parent, and the shard that's adjacent to the shard's parent. Each object also contains the starting and * ending hash keys and the starting and ending sequence numbers for the shard. * @return Returns a reference to this object so that method calls can be chained together. */ public ListShardsResult withShards(java.util.Collection shards) { setShards(shards); 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. * For more information about the use of this pagination token when calling the ListShards operation, * see ListShardsInput$NextToken. *

* *

* 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. For more information about the use of this * pagination token when calling the ListShards operation, see * ListShardsInput$NextToken.

*

* 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. * For more information about the use of this pagination token when calling the ListShards operation, * see ListShardsInput$NextToken. *

* *

* 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. For more information about the use of this * pagination token when calling the ListShards operation, see * ListShardsInput$NextToken.

*

* 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. * For more information about the use of this pagination token when calling the ListShards operation, * see ListShardsInput$NextToken. *

* *

* 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. For more information about the use of this * pagination token when calling the ListShards operation, see * ListShardsInput$NextToken.

*

* 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 ListShardsResult withNextToken(String nextToken) { setNextToken(nextToken); 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 (getShards() != null) sb.append("Shards: ").append(getShards()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListShardsResult == false) return false; ListShardsResult other = (ListShardsResult) obj; if (other.getShards() == null ^ this.getShards() == null) return false; if (other.getShards() != null && other.getShards().equals(this.getShards()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getShards() == null) ? 0 : getShards().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); return hashCode; } @Override public ListShardsResult clone() { try { return (ListShardsResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy