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

software.amazon.awssdk.services.kinesis.model.ListStreamConsumersRequest Maven / Gradle / Ivy

Go to download

A single bundled dependency that includes all service and dependent JARs with third-party libraries relocated to different namespaces.

There is a newer version: 2.5.20
Show newest version
/*
 * 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 software.amazon.awssdk.services.kinesis.model;

import java.time.Instant;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class ListStreamConsumersRequest extends KinesisRequest implements
        ToCopyableBuilder {
    private final String streamARN;

    private final String nextToken;

    private final Integer maxResults;

    private final Instant streamCreationTimestamp;

    private ListStreamConsumersRequest(BuilderImpl builder) {
        super(builder);
        this.streamARN = builder.streamARN;
        this.nextToken = builder.nextToken;
        this.maxResults = builder.maxResults;
        this.streamCreationTimestamp = builder.streamCreationTimestamp;
    }

    /**
     * 

* The ARN of the Kinesis data stream for which you want to list the registered consumers. For more information, see * * Amazon Resource Names (ARNs) and AWS Service Namespaces. *

* * @return The ARN of the Kinesis data stream for which you want to list the registered consumers. For more * information, see Amazon Resource Names (ARNs) and AWS Service Namespaces. */ public String streamARN() { return streamARN; } /** *

* When the number of consumers that are registered with 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 consumers that are registered with the data stream, the response includes a pagination token * named NextToken. You can specify this NextToken value in a subsequent call to * ListStreamConsumers to list the next set of registered consumers. *

*

* 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 consumers * 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 * ListStreamConsumers operation to list the next set of consumers. *

* *

* Tokens expire after 300 seconds. When you obtain a value for NextToken in the response to a call to * ListStreamConsumers, you have 300 seconds to use that value. If you specify an expired token in a * call to ListStreamConsumers, you get ExpiredNextTokenException. *

*
* * @return When the number of consumers that are registered with 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 consumers that are registered with the data * stream, the response includes a pagination token named NextToken. You can specify this * NextToken value in a subsequent call to ListStreamConsumers to list the next * set of registered consumers.

*

* 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 * consumers 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 ListStreamConsumers operation to list the next set of consumers. *

* *

* Tokens expire after 300 seconds. When you obtain a value for NextToken in the response to a * call to ListStreamConsumers, you have 300 seconds to use that value. If you specify an * expired token in a call to ListStreamConsumers, you get * ExpiredNextTokenException. *

*/ public String nextToken() { return nextToken; } /** *

* The maximum number of consumers that you want a single call of ListStreamConsumers to return. *

* * @return The maximum number of consumers that you want a single call of ListStreamConsumers to * return. */ public Integer maxResults() { return 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 consumers for. *

*

* You can't 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 consumers for.

*

* You can't specify this parameter if you specify the NextToken parameter. */ public Instant streamCreationTimestamp() { return streamCreationTimestamp; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(streamARN()); hashCode = 31 * hashCode + Objects.hashCode(nextToken()); hashCode = 31 * hashCode + Objects.hashCode(maxResults()); hashCode = 31 * hashCode + Objects.hashCode(streamCreationTimestamp()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ListStreamConsumersRequest)) { return false; } ListStreamConsumersRequest other = (ListStreamConsumersRequest) obj; return Objects.equals(streamARN(), other.streamARN()) && Objects.equals(nextToken(), other.nextToken()) && Objects.equals(maxResults(), other.maxResults()) && Objects.equals(streamCreationTimestamp(), other.streamCreationTimestamp()); } @Override public String toString() { return ToString.builder("ListStreamConsumersRequest").add("StreamARN", streamARN()).add("NextToken", nextToken()) .add("MaxResults", maxResults()).add("StreamCreationTimestamp", streamCreationTimestamp()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "StreamARN": return Optional.ofNullable(clazz.cast(streamARN())); case "NextToken": return Optional.ofNullable(clazz.cast(nextToken())); case "MaxResults": return Optional.ofNullable(clazz.cast(maxResults())); case "StreamCreationTimestamp": return Optional.ofNullable(clazz.cast(streamCreationTimestamp())); default: return Optional.empty(); } } public interface Builder extends KinesisRequest.Builder, CopyableBuilder { /** *

* The ARN of the Kinesis data stream for which you want to list the registered consumers. For more information, * see Amazon Resource Names (ARNs) and AWS Service Namespaces. *

* * @param streamARN * The ARN of the Kinesis data stream for which you want to list the registered consumers. For more * information, see Amazon Resource Names (ARNs) and AWS Service Namespaces. * @return Returns a reference to this object so that method calls can be chained together. */ Builder streamARN(String streamARN); /** *

* When the number of consumers that are registered with 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 consumers that are registered with the data stream, the response includes a * pagination token named NextToken. You can specify this NextToken value in a * subsequent call to ListStreamConsumers to list the next set of registered consumers. *

*

* 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 * consumers 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 ListStreamConsumers operation to list the next set of consumers. *

* *

* Tokens expire after 300 seconds. When you obtain a value for NextToken in the response to a call * to ListStreamConsumers, you have 300 seconds to use that value. If you specify an expired token * in a call to ListStreamConsumers, you get ExpiredNextTokenException. *

*
* * @param nextToken * When the number of consumers that are registered with 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 consumers that are registered with the data * stream, the response includes a pagination token named NextToken. You can specify this * NextToken value in a subsequent call to ListStreamConsumers to list the next * set of registered consumers.

*

* 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 * consumers 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 ListStreamConsumers operation to list the next set of consumers. *

* *

* Tokens expire after 300 seconds. When you obtain a value for NextToken in the response to * a call to ListStreamConsumers, you have 300 seconds to use that value. If you specify an * expired token in a call to ListStreamConsumers, you get * ExpiredNextTokenException. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder nextToken(String nextToken); /** *

* The maximum number of consumers that you want a single call of ListStreamConsumers to return. *

* * @param maxResults * The maximum number of consumers that you want a single call of ListStreamConsumers to * return. * @return Returns a reference to this object so that method calls can be chained together. */ Builder maxResults(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 consumers for. *

*

* You can't 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 consumers * for.

*

* You can't specify this parameter if you specify the NextToken parameter. * @return Returns a reference to this object so that method calls can be chained together. */ Builder streamCreationTimestamp(Instant streamCreationTimestamp); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends KinesisRequest.BuilderImpl implements Builder { private String streamARN; private String nextToken; private Integer maxResults; private Instant streamCreationTimestamp; private BuilderImpl() { } private BuilderImpl(ListStreamConsumersRequest model) { super(model); streamARN(model.streamARN); nextToken(model.nextToken); maxResults(model.maxResults); streamCreationTimestamp(model.streamCreationTimestamp); } public final String getStreamARN() { return streamARN; } @Override public final Builder streamARN(String streamARN) { this.streamARN = streamARN; return this; } public final void setStreamARN(String streamARN) { this.streamARN = streamARN; } public final String getNextToken() { return nextToken; } @Override public final Builder nextToken(String nextToken) { this.nextToken = nextToken; return this; } public final void setNextToken(String nextToken) { this.nextToken = nextToken; } public final Integer getMaxResults() { return maxResults; } @Override public final Builder maxResults(Integer maxResults) { this.maxResults = maxResults; return this; } public final void setMaxResults(Integer maxResults) { this.maxResults = maxResults; } public final Instant getStreamCreationTimestamp() { return streamCreationTimestamp; } @Override public final Builder streamCreationTimestamp(Instant streamCreationTimestamp) { this.streamCreationTimestamp = streamCreationTimestamp; return this; } public final void setStreamCreationTimestamp(Instant streamCreationTimestamp) { this.streamCreationTimestamp = streamCreationTimestamp; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public ListStreamConsumersRequest build() { return new ListStreamConsumersRequest(this); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy