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

software.amazon.awssdk.services.kinesis.model.StreamDescription 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.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.core.protocol.ProtocolMarshaller;
import software.amazon.awssdk.core.protocol.StructuredPojo;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.services.kinesis.transform.StreamDescriptionMarshaller;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Represents the output for DescribeStream. *

*/ @Generated("software.amazon.awssdk:codegen") public final class StreamDescription implements StructuredPojo, ToCopyableBuilder { private final String streamName; private final String streamARN; private final String streamStatus; private final List shards; private final Boolean hasMoreShards; private final Integer retentionPeriodHours; private final Instant streamCreationTimestamp; private final List enhancedMonitoring; private final String encryptionType; private final String keyId; private StreamDescription(BuilderImpl builder) { this.streamName = builder.streamName; this.streamARN = builder.streamARN; this.streamStatus = builder.streamStatus; this.shards = builder.shards; this.hasMoreShards = builder.hasMoreShards; this.retentionPeriodHours = builder.retentionPeriodHours; this.streamCreationTimestamp = builder.streamCreationTimestamp; this.enhancedMonitoring = builder.enhancedMonitoring; this.encryptionType = builder.encryptionType; this.keyId = builder.keyId; } /** *

* The name of the stream being described. *

* * @return The name of the stream being described. */ public String streamName() { return streamName; } /** *

* The Amazon Resource Name (ARN) for the stream being described. *

* * @return The Amazon Resource Name (ARN) for the stream being described. */ public String streamARN() { return streamARN; } /** *

* The current status of the stream being described. The stream status is one of the following states: *

*
    *
  • *

    * CREATING - The stream is being created. Kinesis Data Streams immediately returns and sets * StreamStatus to CREATING. *

    *
  • *
  • *

    * DELETING - The stream is being deleted. The specified stream is in the DELETING state * until Kinesis Data Streams completes the deletion. *

    *
  • *
  • *

    * ACTIVE - The stream exists and is ready for read and write operations or deletion. You should * perform read and write operations only on an ACTIVE stream. *

    *
  • *
  • *

    * UPDATING - Shards in the stream are being merged or split. Read and write operations continue to * work while the stream is in the UPDATING state. *

    *
  • *
*

* If the service returns an enum value that is not available in the current SDK version, {@link #streamStatus} will * return {@link StreamStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #streamStatusAsString}. *

* * @return The current status of the stream being described. The stream status is one of the following states:

*
    *
  • *

    * CREATING - The stream is being created. Kinesis Data Streams immediately returns and sets * StreamStatus to CREATING. *

    *
  • *
  • *

    * DELETING - The stream is being deleted. The specified stream is in the DELETING * state until Kinesis Data Streams completes the deletion. *

    *
  • *
  • *

    * ACTIVE - The stream exists and is ready for read and write operations or deletion. You * should perform read and write operations only on an ACTIVE stream. *

    *
  • *
  • *

    * UPDATING - Shards in the stream are being merged or split. Read and write operations * continue to work while the stream is in the UPDATING state. *

    *
  • * @see StreamStatus */ public StreamStatus streamStatus() { return StreamStatus.fromValue(streamStatus); } /** *

    * The current status of the stream being described. The stream status is one of the following states: *

    *
      *
    • *

      * CREATING - The stream is being created. Kinesis Data Streams immediately returns and sets * StreamStatus to CREATING. *

      *
    • *
    • *

      * DELETING - The stream is being deleted. The specified stream is in the DELETING state * until Kinesis Data Streams completes the deletion. *

      *
    • *
    • *

      * ACTIVE - The stream exists and is ready for read and write operations or deletion. You should * perform read and write operations only on an ACTIVE stream. *

      *
    • *
    • *

      * UPDATING - Shards in the stream are being merged or split. Read and write operations continue to * work while the stream is in the UPDATING state. *

      *
    • *
    *

    * If the service returns an enum value that is not available in the current SDK version, {@link #streamStatus} will * return {@link StreamStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #streamStatusAsString}. *

    * * @return The current status of the stream being described. The stream status is one of the following states:

    *
      *
    • *

      * CREATING - The stream is being created. Kinesis Data Streams immediately returns and sets * StreamStatus to CREATING. *

      *
    • *
    • *

      * DELETING - The stream is being deleted. The specified stream is in the DELETING * state until Kinesis Data Streams completes the deletion. *

      *
    • *
    • *

      * ACTIVE - The stream exists and is ready for read and write operations or deletion. You * should perform read and write operations only on an ACTIVE stream. *

      *
    • *
    • *

      * UPDATING - Shards in the stream are being merged or split. Read and write operations * continue to work while the stream is in the UPDATING state. *

      *
    • * @see StreamStatus */ public String streamStatusAsString() { return streamStatus; } /** *

      * The shards that comprise the stream. *

      *

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

      * * @return The shards that comprise the stream. */ public List shards() { return shards; } /** *

      * If set to true, more shards in the stream are available to describe. *

      * * @return If set to true, more shards in the stream are available to describe. */ public Boolean hasMoreShards() { return hasMoreShards; } /** *

      * The current retention period, in hours. *

      * * @return The current retention period, in hours. */ public Integer retentionPeriodHours() { return retentionPeriodHours; } /** *

      * The approximate time that the stream was created. *

      * * @return The approximate time that the stream was created. */ public Instant streamCreationTimestamp() { return streamCreationTimestamp; } /** *

      * Represents the current enhanced monitoring settings of the stream. *

      *

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

      * * @return Represents the current enhanced monitoring settings of the stream. */ public List enhancedMonitoring() { return enhancedMonitoring; } /** *

      * The server-side encryption type used on the stream. This parameter can be one of the following values: *

      *
        *
      • *

        * NONE: Do not encrypt the records in the stream. *

        *
      • *
      • *

        * KMS: Use server-side encryption on the records in the stream using a customer-managed AWS KMS key. *

        *
      • *
      *

      * If the service returns an enum value that is not available in the current SDK version, {@link #encryptionType} * will return {@link EncryptionType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #encryptionTypeAsString}. *

      * * @return The server-side encryption type used on the stream. This parameter can be one of the following * values:

      *
        *
      • *

        * NONE: Do not encrypt the records in the stream. *

        *
      • *
      • *

        * KMS: Use server-side encryption on the records in the stream using a customer-managed AWS * KMS key. *

        *
      • * @see EncryptionType */ public EncryptionType encryptionType() { return EncryptionType.fromValue(encryptionType); } /** *

        * The server-side encryption type used on the stream. This parameter can be one of the following values: *

        *
          *
        • *

          * NONE: Do not encrypt the records in the stream. *

          *
        • *
        • *

          * KMS: Use server-side encryption on the records in the stream using a customer-managed AWS KMS key. *

          *
        • *
        *

        * If the service returns an enum value that is not available in the current SDK version, {@link #encryptionType} * will return {@link EncryptionType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #encryptionTypeAsString}. *

        * * @return The server-side encryption type used on the stream. This parameter can be one of the following * values:

        *
          *
        • *

          * NONE: Do not encrypt the records in the stream. *

          *
        • *
        • *

          * KMS: Use server-side encryption on the records in the stream using a customer-managed AWS * KMS key. *

          *
        • * @see EncryptionType */ public String encryptionTypeAsString() { return encryptionType; } /** *

          * The GUID for the customer-managed AWS KMS key to use for encryption. This value can be a globally unique * identifier, a fully specified ARN to either an alias or a key, or an alias name prefixed by "alias/".You can also * use a master key owned by Kinesis Data Streams by specifying the alias aws/kinesis. *

          *
            *
          • *

            * Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 *

            *
          • *
          • *

            * Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName *

            *
          • *
          • *

            * Globally unique key ID example: 12345678-1234-1234-1234-123456789012 *

            *
          • *
          • *

            * Alias name example: alias/MyAliasName *

            *
          • *
          • *

            * Master key owned by Kinesis Data Streams: alias/aws/kinesis *

            *
          • *
          * * @return The GUID for the customer-managed AWS KMS key to use for encryption. This value can be a globally unique * identifier, a fully specified ARN to either an alias or a key, or an alias name prefixed by "alias/".You * can also use a master key owned by Kinesis Data Streams by specifying the alias aws/kinesis * .

          *
            *
          • *

            * Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 *

            *
          • *
          • *

            * Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName *

            *
          • *
          • *

            * Globally unique key ID example: 12345678-1234-1234-1234-123456789012 *

            *
          • *
          • *

            * Alias name example: alias/MyAliasName *

            *
          • *
          • *

            * Master key owned by Kinesis Data Streams: alias/aws/kinesis *

            *
          • */ public String keyId() { return keyId; } @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(streamName()); hashCode = 31 * hashCode + Objects.hashCode(streamARN()); hashCode = 31 * hashCode + Objects.hashCode(streamStatusAsString()); hashCode = 31 * hashCode + Objects.hashCode(shards()); hashCode = 31 * hashCode + Objects.hashCode(hasMoreShards()); hashCode = 31 * hashCode + Objects.hashCode(retentionPeriodHours()); hashCode = 31 * hashCode + Objects.hashCode(streamCreationTimestamp()); hashCode = 31 * hashCode + Objects.hashCode(enhancedMonitoring()); hashCode = 31 * hashCode + Objects.hashCode(encryptionTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(keyId()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof StreamDescription)) { return false; } StreamDescription other = (StreamDescription) obj; return Objects.equals(streamName(), other.streamName()) && Objects.equals(streamARN(), other.streamARN()) && Objects.equals(streamStatusAsString(), other.streamStatusAsString()) && Objects.equals(shards(), other.shards()) && Objects.equals(hasMoreShards(), other.hasMoreShards()) && Objects.equals(retentionPeriodHours(), other.retentionPeriodHours()) && Objects.equals(streamCreationTimestamp(), other.streamCreationTimestamp()) && Objects.equals(enhancedMonitoring(), other.enhancedMonitoring()) && Objects.equals(encryptionTypeAsString(), other.encryptionTypeAsString()) && Objects.equals(keyId(), other.keyId()); } @Override public String toString() { return ToString.builder("StreamDescription").add("StreamName", streamName()).add("StreamARN", streamARN()) .add("StreamStatus", streamStatusAsString()).add("Shards", shards()).add("HasMoreShards", hasMoreShards()) .add("RetentionPeriodHours", retentionPeriodHours()).add("StreamCreationTimestamp", streamCreationTimestamp()) .add("EnhancedMonitoring", enhancedMonitoring()).add("EncryptionType", encryptionTypeAsString()) .add("KeyId", keyId()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "StreamName": return Optional.ofNullable(clazz.cast(streamName())); case "StreamARN": return Optional.ofNullable(clazz.cast(streamARN())); case "StreamStatus": return Optional.ofNullable(clazz.cast(streamStatusAsString())); case "Shards": return Optional.ofNullable(clazz.cast(shards())); case "HasMoreShards": return Optional.ofNullable(clazz.cast(hasMoreShards())); case "RetentionPeriodHours": return Optional.ofNullable(clazz.cast(retentionPeriodHours())); case "StreamCreationTimestamp": return Optional.ofNullable(clazz.cast(streamCreationTimestamp())); case "EnhancedMonitoring": return Optional.ofNullable(clazz.cast(enhancedMonitoring())); case "EncryptionType": return Optional.ofNullable(clazz.cast(encryptionTypeAsString())); case "KeyId": return Optional.ofNullable(clazz.cast(keyId())); default: return Optional.empty(); } } @SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { StreamDescriptionMarshaller.getInstance().marshall(this, protocolMarshaller); } public interface Builder extends CopyableBuilder { /** *

            * The name of the stream being described. *

            * * @param streamName * The name of the stream being described. * @return Returns a reference to this object so that method calls can be chained together. */ Builder streamName(String streamName); /** *

            * The Amazon Resource Name (ARN) for the stream being described. *

            * * @param streamARN * The Amazon Resource Name (ARN) for the stream being described. * @return Returns a reference to this object so that method calls can be chained together. */ Builder streamARN(String streamARN); /** *

            * The current status of the stream being described. The stream status is one of the following states: *

            *
              *
            • *

              * CREATING - The stream is being created. Kinesis Data Streams immediately returns and sets * StreamStatus to CREATING. *

              *
            • *
            • *

              * DELETING - The stream is being deleted. The specified stream is in the DELETING * state until Kinesis Data Streams completes the deletion. *

              *
            • *
            • *

              * ACTIVE - The stream exists and is ready for read and write operations or deletion. You should * perform read and write operations only on an ACTIVE stream. *

              *
            • *
            • *

              * UPDATING - Shards in the stream are being merged or split. Read and write operations continue to * work while the stream is in the UPDATING state. *

              *
            • *
            * * @param streamStatus * The current status of the stream being described. The stream status is one of the following * states:

            *
              *
            • *

              * CREATING - The stream is being created. Kinesis Data Streams immediately returns and sets * StreamStatus to CREATING. *

              *
            • *
            • *

              * DELETING - The stream is being deleted. The specified stream is in the * DELETING state until Kinesis Data Streams completes the deletion. *

              *
            • *
            • *

              * ACTIVE - The stream exists and is ready for read and write operations or deletion. You * should perform read and write operations only on an ACTIVE stream. *

              *
            • *
            • *

              * UPDATING - Shards in the stream are being merged or split. Read and write operations * continue to work while the stream is in the UPDATING state. *

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

              * The current status of the stream being described. The stream status is one of the following states: *

              *
                *
              • *

                * CREATING - The stream is being created. Kinesis Data Streams immediately returns and sets * StreamStatus to CREATING. *

                *
              • *
              • *

                * DELETING - The stream is being deleted. The specified stream is in the DELETING * state until Kinesis Data Streams completes the deletion. *

                *
              • *
              • *

                * ACTIVE - The stream exists and is ready for read and write operations or deletion. You should * perform read and write operations only on an ACTIVE stream. *

                *
              • *
              • *

                * UPDATING - Shards in the stream are being merged or split. Read and write operations continue to * work while the stream is in the UPDATING state. *

                *
              • *
              * * @param streamStatus * The current status of the stream being described. The stream status is one of the following * states:

              *
                *
              • *

                * CREATING - The stream is being created. Kinesis Data Streams immediately returns and sets * StreamStatus to CREATING. *

                *
              • *
              • *

                * DELETING - The stream is being deleted. The specified stream is in the * DELETING state until Kinesis Data Streams completes the deletion. *

                *
              • *
              • *

                * ACTIVE - The stream exists and is ready for read and write operations or deletion. You * should perform read and write operations only on an ACTIVE stream. *

                *
              • *
              • *

                * UPDATING - Shards in the stream are being merged or split. Read and write operations * continue to work while the stream is in the UPDATING state. *

                *
              • * @see StreamStatus * @return Returns a reference to this object so that method calls can be chained together. * @see StreamStatus */ Builder streamStatus(StreamStatus streamStatus); /** *

                * The shards that comprise the stream. *

                * * @param shards * The shards that comprise the stream. * @return Returns a reference to this object so that method calls can be chained together. */ Builder shards(Collection shards); /** *

                * The shards that comprise the stream. *

                * * @param shards * The shards that comprise the stream. * @return Returns a reference to this object so that method calls can be chained together. */ Builder shards(Shard... shards); /** *

                * The shards that comprise the stream. *

                * This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to create * one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its result * is passed to {@link #shards(List)}. * * @param shards * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #shards(List) */ Builder shards(Consumer... shards); /** *

                * If set to true, more shards in the stream are available to describe. *

                * * @param hasMoreShards * If set to true, more shards in the stream are available to describe. * @return Returns a reference to this object so that method calls can be chained together. */ Builder hasMoreShards(Boolean hasMoreShards); /** *

                * The current retention period, in hours. *

                * * @param retentionPeriodHours * The current retention period, in hours. * @return Returns a reference to this object so that method calls can be chained together. */ Builder retentionPeriodHours(Integer retentionPeriodHours); /** *

                * The approximate time that the stream was created. *

                * * @param streamCreationTimestamp * The approximate time that the stream was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder streamCreationTimestamp(Instant streamCreationTimestamp); /** *

                * Represents the current enhanced monitoring settings of the stream. *

                * * @param enhancedMonitoring * Represents the current enhanced monitoring settings of the stream. * @return Returns a reference to this object so that method calls can be chained together. */ Builder enhancedMonitoring(Collection enhancedMonitoring); /** *

                * Represents the current enhanced monitoring settings of the stream. *

                * * @param enhancedMonitoring * Represents the current enhanced monitoring settings of the stream. * @return Returns a reference to this object so that method calls can be chained together. */ Builder enhancedMonitoring(EnhancedMetrics... enhancedMonitoring); /** *

                * Represents the current enhanced monitoring settings of the stream. *

                * This is a convenience that creates an instance of the {@link List.Builder} avoiding the need * to create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and * its result is passed to {@link #enhancedMonitoring(List)}. * * @param enhancedMonitoring * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #enhancedMonitoring(List) */ Builder enhancedMonitoring(Consumer... enhancedMonitoring); /** *

                * The server-side encryption type used on the stream. This parameter can be one of the following values: *

                *
                  *
                • *

                  * NONE: Do not encrypt the records in the stream. *

                  *
                • *
                • *

                  * KMS: Use server-side encryption on the records in the stream using a customer-managed AWS KMS * key. *

                  *
                • *
                * * @param encryptionType * The server-side encryption type used on the stream. This parameter can be one of the following * values:

                *
                  *
                • *

                  * NONE: Do not encrypt the records in the stream. *

                  *
                • *
                • *

                  * KMS: Use server-side encryption on the records in the stream using a customer-managed AWS * KMS key. *

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

                  * The server-side encryption type used on the stream. This parameter can be one of the following values: *

                  *
                    *
                  • *

                    * NONE: Do not encrypt the records in the stream. *

                    *
                  • *
                  • *

                    * KMS: Use server-side encryption on the records in the stream using a customer-managed AWS KMS * key. *

                    *
                  • *
                  * * @param encryptionType * The server-side encryption type used on the stream. This parameter can be one of the following * values:

                  *
                    *
                  • *

                    * NONE: Do not encrypt the records in the stream. *

                    *
                  • *
                  • *

                    * KMS: Use server-side encryption on the records in the stream using a customer-managed AWS * KMS key. *

                    *
                  • * @see EncryptionType * @return Returns a reference to this object so that method calls can be chained together. * @see EncryptionType */ Builder encryptionType(EncryptionType encryptionType); /** *

                    * The GUID for the customer-managed AWS KMS key to use for encryption. This value can be a globally unique * identifier, a fully specified ARN to either an alias or a key, or an alias name prefixed by "alias/".You can * also use a master key owned by Kinesis Data Streams by specifying the alias aws/kinesis. *

                    *
                      *
                    • *

                      * Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 *

                      *
                    • *
                    • *

                      * Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName *

                      *
                    • *
                    • *

                      * Globally unique key ID example: 12345678-1234-1234-1234-123456789012 *

                      *
                    • *
                    • *

                      * Alias name example: alias/MyAliasName *

                      *
                    • *
                    • *

                      * Master key owned by Kinesis Data Streams: alias/aws/kinesis *

                      *
                    • *
                    * * @param keyId * The GUID for the customer-managed AWS KMS key to use for encryption. This value can be a globally * unique identifier, a fully specified ARN to either an alias or a key, or an alias name prefixed by * "alias/".You can also use a master key owned by Kinesis Data Streams by specifying the alias * aws/kinesis.

                    *
                      *
                    • *

                      * Key ARN example: * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 *

                      *
                    • *
                    • *

                      * Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName *

                      *
                    • *
                    • *

                      * Globally unique key ID example: 12345678-1234-1234-1234-123456789012 *

                      *
                    • *
                    • *

                      * Alias name example: alias/MyAliasName *

                      *
                    • *
                    • *

                      * Master key owned by Kinesis Data Streams: alias/aws/kinesis *

                      *
                    • * @return Returns a reference to this object so that method calls can be chained together. */ Builder keyId(String keyId); } static final class BuilderImpl implements Builder { private String streamName; private String streamARN; private String streamStatus; private List shards = DefaultSdkAutoConstructList.getInstance(); private Boolean hasMoreShards; private Integer retentionPeriodHours; private Instant streamCreationTimestamp; private List enhancedMonitoring = DefaultSdkAutoConstructList.getInstance(); private String encryptionType; private String keyId; private BuilderImpl() { } private BuilderImpl(StreamDescription model) { streamName(model.streamName); streamARN(model.streamARN); streamStatus(model.streamStatus); shards(model.shards); hasMoreShards(model.hasMoreShards); retentionPeriodHours(model.retentionPeriodHours); streamCreationTimestamp(model.streamCreationTimestamp); enhancedMonitoring(model.enhancedMonitoring); encryptionType(model.encryptionType); keyId(model.keyId); } public final String getStreamName() { return streamName; } @Override public final Builder streamName(String streamName) { this.streamName = streamName; return this; } public final void setStreamName(String streamName) { this.streamName = streamName; } 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 getStreamStatus() { return streamStatus; } @Override public final Builder streamStatus(String streamStatus) { this.streamStatus = streamStatus; return this; } @Override public final Builder streamStatus(StreamStatus streamStatus) { this.streamStatus(streamStatus.toString()); return this; } public final void setStreamStatus(String streamStatus) { this.streamStatus = streamStatus; } public final Collection getShards() { return shards != null ? shards.stream().map(Shard::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder shards(Collection shards) { this.shards = ShardListCopier.copy(shards); return this; } @Override @SafeVarargs public final Builder shards(Shard... shards) { shards(Arrays.asList(shards)); return this; } @Override @SafeVarargs public final Builder shards(Consumer... shards) { shards(Stream.of(shards).map(c -> Shard.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final void setShards(Collection shards) { this.shards = ShardListCopier.copyFromBuilder(shards); } public final Boolean getHasMoreShards() { return hasMoreShards; } @Override public final Builder hasMoreShards(Boolean hasMoreShards) { this.hasMoreShards = hasMoreShards; return this; } public final void setHasMoreShards(Boolean hasMoreShards) { this.hasMoreShards = hasMoreShards; } public final Integer getRetentionPeriodHours() { return retentionPeriodHours; } @Override public final Builder retentionPeriodHours(Integer retentionPeriodHours) { this.retentionPeriodHours = retentionPeriodHours; return this; } public final void setRetentionPeriodHours(Integer retentionPeriodHours) { this.retentionPeriodHours = retentionPeriodHours; } 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; } public final Collection getEnhancedMonitoring() { return enhancedMonitoring != null ? enhancedMonitoring.stream().map(EnhancedMetrics::toBuilder) .collect(Collectors.toList()) : null; } @Override public final Builder enhancedMonitoring(Collection enhancedMonitoring) { this.enhancedMonitoring = EnhancedMonitoringListCopier.copy(enhancedMonitoring); return this; } @Override @SafeVarargs public final Builder enhancedMonitoring(EnhancedMetrics... enhancedMonitoring) { enhancedMonitoring(Arrays.asList(enhancedMonitoring)); return this; } @Override @SafeVarargs public final Builder enhancedMonitoring(Consumer... enhancedMonitoring) { enhancedMonitoring(Stream.of(enhancedMonitoring).map(c -> EnhancedMetrics.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setEnhancedMonitoring(Collection enhancedMonitoring) { this.enhancedMonitoring = EnhancedMonitoringListCopier.copyFromBuilder(enhancedMonitoring); } public final String getEncryptionType() { return encryptionType; } @Override public final Builder encryptionType(String encryptionType) { this.encryptionType = encryptionType; return this; } @Override public final Builder encryptionType(EncryptionType encryptionType) { this.encryptionType(encryptionType.toString()); return this; } public final void setEncryptionType(String encryptionType) { this.encryptionType = encryptionType; } public final String getKeyId() { return keyId; } @Override public final Builder keyId(String keyId) { this.keyId = keyId; return this; } public final void setKeyId(String keyId) { this.keyId = keyId; } @Override public StreamDescription build() { return new StreamDescription(this); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy