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

software.amazon.awssdk.services.kinesis.model.ListStreamsResponse 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.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Represents the output for ListStreams. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ListStreamsResponse extends KinesisResponse implements ToCopyableBuilder { private final List streamNames; private final Boolean hasMoreStreams; private ListStreamsResponse(BuilderImpl builder) { super(builder); this.streamNames = builder.streamNames; this.hasMoreStreams = builder.hasMoreStreams; } /** *

* The names of the streams that are associated with the AWS account making the ListStreams request. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

* * @return The names of the streams that are associated with the AWS account making the ListStreams * request. */ public List streamNames() { return streamNames; } /** *

* If set to true, there are more streams available to list. *

* * @return If set to true, there are more streams available to list. */ public Boolean hasMoreStreams() { return hasMoreStreams; } @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(streamNames()); hashCode = 31 * hashCode + Objects.hashCode(hasMoreStreams()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ListStreamsResponse)) { return false; } ListStreamsResponse other = (ListStreamsResponse) obj; return Objects.equals(streamNames(), other.streamNames()) && Objects.equals(hasMoreStreams(), other.hasMoreStreams()); } @Override public String toString() { return ToString.builder("ListStreamsResponse").add("StreamNames", streamNames()).add("HasMoreStreams", hasMoreStreams()) .build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "StreamNames": return Optional.ofNullable(clazz.cast(streamNames())); case "HasMoreStreams": return Optional.ofNullable(clazz.cast(hasMoreStreams())); default: return Optional.empty(); } } public interface Builder extends KinesisResponse.Builder, CopyableBuilder { /** *

* The names of the streams that are associated with the AWS account making the ListStreams * request. *

* * @param streamNames * The names of the streams that are associated with the AWS account making the ListStreams * request. * @return Returns a reference to this object so that method calls can be chained together. */ Builder streamNames(Collection streamNames); /** *

* The names of the streams that are associated with the AWS account making the ListStreams * request. *

* * @param streamNames * The names of the streams that are associated with the AWS account making the ListStreams * request. * @return Returns a reference to this object so that method calls can be chained together. */ Builder streamNames(String... streamNames); /** *

* If set to true, there are more streams available to list. *

* * @param hasMoreStreams * If set to true, there are more streams available to list. * @return Returns a reference to this object so that method calls can be chained together. */ Builder hasMoreStreams(Boolean hasMoreStreams); } static final class BuilderImpl extends KinesisResponse.BuilderImpl implements Builder { private List streamNames = DefaultSdkAutoConstructList.getInstance(); private Boolean hasMoreStreams; private BuilderImpl() { } private BuilderImpl(ListStreamsResponse model) { super(model); streamNames(model.streamNames); hasMoreStreams(model.hasMoreStreams); } public final Collection getStreamNames() { return streamNames; } @Override public final Builder streamNames(Collection streamNames) { this.streamNames = StreamNameListCopier.copy(streamNames); return this; } @Override @SafeVarargs public final Builder streamNames(String... streamNames) { streamNames(Arrays.asList(streamNames)); return this; } public final void setStreamNames(Collection streamNames) { this.streamNames = StreamNameListCopier.copy(streamNames); } public final Boolean getHasMoreStreams() { return hasMoreStreams; } @Override public final Builder hasMoreStreams(Boolean hasMoreStreams) { this.hasMoreStreams = hasMoreStreams; return this; } public final void setHasMoreStreams(Boolean hasMoreStreams) { this.hasMoreStreams = hasMoreStreams; } @Override public ListStreamsResponse build() { return new ListStreamsResponse(this); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy