/*
 * Copyright 2025 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License 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.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/pubsub/v1/pubsub.proto

// Protobuf Java Version: 3.25.8
package com.google.pubsub.v1;

/**
 *
 *
 * <pre>
 * Settings for an ingestion data source on a topic.
 * </pre>
 *
 * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings}
 */
public final class IngestionDataSourceSettings extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionDataSourceSettings)
    IngestionDataSourceSettingsOrBuilder {
  private static final long serialVersionUID = 0L;

  // Use IngestionDataSourceSettings.newBuilder() to construct.
  private IngestionDataSourceSettings(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private IngestionDataSourceSettings() {}

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new IngestionDataSourceSettings();
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.pubsub.v1.PubsubProto
        .internal_static_google_pubsub_v1_IngestionDataSourceSettings_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.pubsub.v1.PubsubProto
        .internal_static_google_pubsub_v1_IngestionDataSourceSettings_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.pubsub.v1.IngestionDataSourceSettings.class,
            com.google.pubsub.v1.IngestionDataSourceSettings.Builder.class);
  }

  public interface AwsKinesisOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Output only. An output-only field that indicates the state of the Kinesis
     * ingestion source.
     * </pre>
     *
     * <code>
     * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The enum numeric value on the wire for state.
     */
    int getStateValue();

    /**
     *
     *
     * <pre>
     * Output only. An output-only field that indicates the state of the Kinesis
     * ingestion source.
     * </pre>
     *
     * <code>
     * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The state.
     */
    com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State getState();

    /**
     *
     *
     * <pre>
     * Required. The Kinesis stream ARN to ingest data from.
     * </pre>
     *
     * <code>string stream_arn = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The streamArn.
     */
    java.lang.String getStreamArn();

    /**
     *
     *
     * <pre>
     * Required. The Kinesis stream ARN to ingest data from.
     * </pre>
     *
     * <code>string stream_arn = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for streamArn.
     */
    com.google.protobuf.ByteString getStreamArnBytes();

    /**
     *
     *
     * <pre>
     * Required. The Kinesis consumer ARN to used for ingestion in Enhanced
     * Fan-Out mode. The consumer must be already created and ready to be used.
     * </pre>
     *
     * <code>string consumer_arn = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The consumerArn.
     */
    java.lang.String getConsumerArn();

    /**
     *
     *
     * <pre>
     * Required. The Kinesis consumer ARN to used for ingestion in Enhanced
     * Fan-Out mode. The consumer must be already created and ready to be used.
     * </pre>
     *
     * <code>string consumer_arn = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for consumerArn.
     */
    com.google.protobuf.ByteString getConsumerArnBytes();

    /**
     *
     *
     * <pre>
     * Required. AWS role ARN to be used for Federated Identity authentication
     * with Kinesis. Check the Pub/Sub docs for how to set up this role and the
     * required permissions that need to be attached to it.
     * </pre>
     *
     * <code>string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The awsRoleArn.
     */
    java.lang.String getAwsRoleArn();

    /**
     *
     *
     * <pre>
     * Required. AWS role ARN to be used for Federated Identity authentication
     * with Kinesis. Check the Pub/Sub docs for how to set up this role and the
     * required permissions that need to be attached to it.
     * </pre>
     *
     * <code>string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for awsRoleArn.
     */
    com.google.protobuf.ByteString getAwsRoleArnBytes();

    /**
     *
     *
     * <pre>
     * Required. The GCP service account to be used for Federated Identity
     * authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
     * the provided role). The `aws_role_arn` must be set up with
     * `accounts.google.com:sub` equals to this service account number.
     * </pre>
     *
     * <code>string gcp_service_account = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The gcpServiceAccount.
     */
    java.lang.String getGcpServiceAccount();

    /**
     *
     *
     * <pre>
     * Required. The GCP service account to be used for Federated Identity
     * authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
     * the provided role). The `aws_role_arn` must be set up with
     * `accounts.google.com:sub` equals to this service account number.
     * </pre>
     *
     * <code>string gcp_service_account = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for gcpServiceAccount.
     */
    com.google.protobuf.ByteString getGcpServiceAccountBytes();
  }

  /**
   *
   *
   * <pre>
   * Ingestion settings for Amazon Kinesis Data Streams.
   * </pre>
   *
   * Protobuf type {@code google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis}
   */
  public static final class AwsKinesis extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis)
      AwsKinesisOrBuilder {
    private static final long serialVersionUID = 0L;

    // Use AwsKinesis.newBuilder() to construct.
    private AwsKinesis(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private AwsKinesis() {
      state_ = 0;
      streamArn_ = "";
      consumerArn_ = "";
      awsRoleArn_ = "";
      gcpServiceAccount_ = "";
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
      return new AwsKinesis();
    }

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.pubsub.v1.PubsubProto
          .internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsKinesis_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.pubsub.v1.PubsubProto
          .internal_static_google_pubsub_v1_IngestionDataSourceSettings_AwsKinesis_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.class,
              com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.Builder.class);
    }

    /**
     *
     *
     * <pre>
     * Possible states for ingestion from Amazon Kinesis Data Streams.
     * </pre>
     *
     * Protobuf enum {@code google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State}
     */
    public enum State implements com.google.protobuf.ProtocolMessageEnum {
      /**
       *
       *
       * <pre>
       * Default value. This value is unused.
       * </pre>
       *
       * <code>STATE_UNSPECIFIED = 0;</code>
       */
      STATE_UNSPECIFIED(0),
      /**
       *
       *
       * <pre>
       * Ingestion is active.
       * </pre>
       *
       * <code>ACTIVE = 1;</code>
       */
      ACTIVE(1),
      /**
       *
       *
       * <pre>
       * Permission denied encountered while consuming data from Kinesis.
       * This can happen if:
       *   - The provided `aws_role_arn` does not exist or does not have the
       *     appropriate permissions attached.
       *   - The provided `aws_role_arn` is not set up properly for Identity
       *     Federation using `gcp_service_account`.
       *   - The Pub/Sub SA is not granted the
       *     `iam.serviceAccounts.getOpenIdToken` permission on
       *     `gcp_service_account`.
       * </pre>
       *
       * <code>KINESIS_PERMISSION_DENIED = 2;</code>
       */
      KINESIS_PERMISSION_DENIED(2),
      /**
       *
       *
       * <pre>
       * Permission denied encountered while publishing to the topic. This can
       * happen if the Pub/Sub SA has not been granted the [appropriate publish
       * permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)
       * </pre>
       *
       * <code>PUBLISH_PERMISSION_DENIED = 3;</code>
       */
      PUBLISH_PERMISSION_DENIED(3),
      /**
       *
       *
       * <pre>
       * The Kinesis stream does not exist.
       * </pre>
       *
       * <code>STREAM_NOT_FOUND = 4;</code>
       */
      STREAM_NOT_FOUND(4),
      /**
       *
       *
       * <pre>
       * The Kinesis consumer does not exist.
       * </pre>
       *
       * <code>CONSUMER_NOT_FOUND = 5;</code>
       */
      CONSUMER_NOT_FOUND(5),
      UNRECOGNIZED(-1),
      ;

      /**
       *
       *
       * <pre>
       * Default value. This value is unused.
       * </pre>
       *
       * <code>STATE_UNSPECIFIED = 0;</code>
       */
      public static final int STATE_UNSPECIFIED_VALUE = 0;

      /**
       *
       *
       * <pre>
       * Ingestion is active.
       * </pre>
       *
       * <code>ACTIVE = 1;</code>
       */
      public static final int ACTIVE_VALUE = 1;

      /**
       *
       *
       * <pre>
       * Permission denied encountered while consuming data from Kinesis.
       * This can happen if:
       *   - The provided `aws_role_arn` does not exist or does not have the
       *     appropriate permissions attached.
       *   - The provided `aws_role_arn` is not set up properly for Identity
       *     Federation using `gcp_service_account`.
       *   - The Pub/Sub SA is not granted the
       *     `iam.serviceAccounts.getOpenIdToken` permission on
       *     `gcp_service_account`.
       * </pre>
       *
       * <code>KINESIS_PERMISSION_DENIED = 2;</code>
       */
      public static final int KINESIS_PERMISSION_DENIED_VALUE = 2;

      /**
       *
       *
       * <pre>
       * Permission denied encountered while publishing to the topic. This can
       * happen if the Pub/Sub SA has not been granted the [appropriate publish
       * permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)
       * </pre>
       *
       * <code>PUBLISH_PERMISSION_DENIED = 3;</code>
       */
      public static final int PUBLISH_PERMISSION_DENIED_VALUE = 3;

      /**
       *
       *
       * <pre>
       * The Kinesis stream does not exist.
       * </pre>
       *
       * <code>STREAM_NOT_FOUND = 4;</code>
       */
      public static final int STREAM_NOT_FOUND_VALUE = 4;

      /**
       *
       *
       * <pre>
       * The Kinesis consumer does not exist.
       * </pre>
       *
       * <code>CONSUMER_NOT_FOUND = 5;</code>
       */
      public static final int CONSUMER_NOT_FOUND_VALUE = 5;

      public final int getNumber() {
        if (this == UNRECOGNIZED) {
          throw new java.lang.IllegalArgumentException(
              "Can't get the number of an unknown enum value.");
        }
        return value;
      }

      /**
       * @param value The numeric wire value of the corresponding enum entry.
       * @return The enum associated with the given numeric wire value.
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static State valueOf(int value) {
        return forNumber(value);
      }

      /**
       * @param value The numeric wire value of the corresponding enum entry.
       * @return The enum associated with the given numeric wire value.
       */
      public static State forNumber(int value) {
        switch (value) {
          case 0:
            return STATE_UNSPECIFIED;
          case 1:
            return ACTIVE;
          case 2:
            return KINESIS_PERMISSION_DENIED;
          case 3:
            return PUBLISH_PERMISSION_DENIED;
          case 4:
            return STREAM_NOT_FOUND;
          case 5:
            return CONSUMER_NOT_FOUND;
          default:
            return null;
        }
      }

      public static com.google.protobuf.Internal.EnumLiteMap<State> internalGetValueMap() {
        return internalValueMap;
      }

      private static final com.google.protobuf.Internal.EnumLiteMap<State> internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap<State>() {
            public State findValueByNumber(int number) {
              return State.forNumber(number);
            }
          };

      public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
        if (this == UNRECOGNIZED) {
          throw new java.lang.IllegalStateException(
              "Can't get the descriptor of an unrecognized enum value.");
        }
        return getDescriptor().getValues().get(ordinal());
      }

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
        return getDescriptor();
      }

      public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
        return com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.getDescriptor()
            .getEnumTypes()
            .get(0);
      }

      private static final State[] VALUES = values();

      public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
        if (desc.getType() != getDescriptor()) {
          throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
        }
        if (desc.getIndex() == -1) {
          return UNRECOGNIZED;
        }
        return VALUES[desc.getIndex()];
      }

      private final int value;

      private State(int value) {
        this.value = value;
      }

      // @@protoc_insertion_point(enum_scope:google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State)
    }

    public static final int STATE_FIELD_NUMBER = 1;
    private int state_ = 0;

    /**
     *
     *
     * <pre>
     * Output only. An output-only field that indicates the state of the Kinesis
     * ingestion source.
     * </pre>
     *
     * <code>
     * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The enum numeric value on the wire for state.
     */
    @java.lang.Override
    public int getStateValue() {
      return state_;
    }

    /**
     *
     *
     * <pre>
     * Output only. An output-only field that indicates the state of the Kinesis
     * ingestion source.
     * </pre>
     *
     * <code>
     * .google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The state.
     */
    @java.lang.Override
    public com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State getState() {
      com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State result =
          com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State.forNumber(state_);
      return result == null
          ? com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State.UNRECOGNIZED
          : result;
    }

    public static final int STREAM_ARN_FIELD_NUMBER = 2;

    @SuppressWarnings("serial")
    private volatile java.lang.Object streamArn_ = "";

    /**
     *
     *
     * <pre>
     * Required. The Kinesis stream ARN to ingest data from.
     * </pre>
     *
     * <code>string stream_arn = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The streamArn.
     */
    @java.lang.Override
    public java.lang.String getStreamArn() {
      java.lang.Object ref = streamArn_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        streamArn_ = s;
        return s;
      }
    }

    /**
     *
     *
     * <pre>
     * Required. The Kinesis stream ARN to ingest data from.
     * </pre>
     *
     * <code>string stream_arn = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for streamArn.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getStreamArnBytes() {
      java.lang.Object ref = streamArn_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        streamArn_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int CONSUMER_ARN_FIELD_NUMBER = 3;

    @SuppressWarnings("serial")
    private volatile java.lang.Object consumerArn_ = "";

    /**
     *
     *
     * <pre>
     * Required. The Kinesis consumer ARN to used for ingestion in Enhanced
     * Fan-Out mode. The consumer must be already created and ready to be used.
     * </pre>
     *
     * <code>string consumer_arn = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The consumerArn.
     */
    @java.lang.Override
    public java.lang.String getConsumerArn() {
      java.lang.Object ref = consumerArn_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        consumerArn_ = s;
        return s;
      }
    }

    /**
     *
     *
     * <pre>
     * Required. The Kinesis consumer ARN to used for ingestion in Enhanced
     * Fan-Out mode. The consumer must be already created and ready to be used.
     * </pre>
     *
     * <code>string consumer_arn = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for consumerArn.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getConsumerArnBytes() {
      java.lang.Object ref = consumerArn_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        consumerArn_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int AWS_ROLE_ARN_FIELD_NUMBER = 4;

    @SuppressWarnings("serial")
    private volatile java.lang.Object awsRoleArn_ = "";

    /**
     *
     *
     * <pre>
     * Required. AWS role ARN to be used for Federated Identity authentication
     * with Kinesis. Check the Pub/Sub docs for how to set up this role and the
     * required permissions that need to be attached to it.
     * </pre>
     *
     * <code>string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The awsRoleArn.
     */
    @java.lang.Override
    public java.lang.String getAwsRoleArn() {
      java.lang.Object ref = awsRoleArn_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        awsRoleArn_ = s;
        return s;
      }
    }

    /**
     *
     *
     * <pre>
     * Required. AWS role ARN to be used for Federated Identity authentication
     * with Kinesis. Check the Pub/Sub docs for how to set up this role and the
     * required permissions that need to be attached to it.
     * </pre>
     *
     * <code>string aws_role_arn = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for awsRoleArn.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getAwsRoleArnBytes() {
      java.lang.Object ref = awsRoleArn_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        awsRoleArn_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int GCP_SERVICE_ACCOUNT_FIELD_NUMBER = 5;

    @SuppressWarnings("serial")
    private volatile java.lang.Object gcpServiceAccount_ = "";

    /**
     *
     *
     * <pre>
     * Required. The GCP service account to be used for Federated Identity
     * authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
     * the provided role). The `aws_role_arn` must be set up with
     * `accounts.google.com:sub` equals to this service account number.
     * </pre>
     *
     * <code>string gcp_service_account = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The gcpServiceAccount.
     */
    @java.lang.Override
    public java.lang.String getGcpServiceAccount() {
      java.lang.Object ref = gcpServiceAccount_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        gcpServiceAccount_ = s;
        return s;
      }
    }

    /**
     *
     *
     * <pre>
     * Required. The GCP service account to be used for Federated Identity
     * authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for
     * the provided role). The `aws_role_arn` must be set up with
     * `accounts.google.com:sub` equals to this service account number.
     * </pre>
     *
     * <code>string gcp_service_account = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for gcpServiceAccount.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getGcpServiceAccountBytes() {
      java.lang.Object ref = gcpServiceAccount_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        gcpServiceAccount_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    private byte memoizedIsInitialized = -1;

    @java.lang.Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
      if (state_
          != com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State.STATE_UNSPECIFIED
              .getNumber()) {
        output.writeEnum(1, state_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(streamArn_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, streamArn_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(consumerArn_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, consumerArn_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(awsRoleArn_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, awsRoleArn_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcpServiceAccount_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 5, gcpServiceAccount_);
      }
      getUnknownFields().writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (state_
          != com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State.STATE_UNSPECIFIED
              .getNumber()) {
        size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(streamArn_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, streamArn_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(consumerArn_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, consumerArn_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(awsRoleArn_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, awsRoleArn_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcpServiceAccount_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, gcpServiceAccount_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
        return true;
      }
      if (!(obj instanceof com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis)) {
        return super.equals(obj);
      }
      com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis other =
          (com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) obj;

      if (state_ != other.state_) return false;
      if (!getStreamArn().equals(other.getStreamArn())) return false;
      if (!getConsumerArn().equals(other.getConsumerArn())) return false;
      if (!getAwsRoleArn().equals(other.getAwsRoleArn())) return false;
      if (!getGcpServiceAccount().equals(other.getGcpServiceAccount())) return false;
      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + STATE_FIELD_NUMBER;
      hash = (53 * hash) + state_;
      hash = (37 * hash) + STREAM_ARN_FIELD_NUMBER;
      hash = (53 * hash) + getStreamArn().hashCode();
      hash = (37 * hash) + CONSUMER_ARN_FIELD_NUMBER;
      hash = (53 * hash) + getConsumerArn().hashCode();
      hash = (37 * hash) + AWS_ROLE_ARN_FIELD_NUMBER;
      hash = (53 * hash) + getAwsRoleArn().hashCode();
      hash = (37 * hash) + GCP_SERVICE_ACCOUNT_FIELD_NUMBER;
      hash = (53 * hash) + getGcpServiceAccount().hashCode();
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseFrom(
        java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseFrom(
        java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
          PARSER, input, extensionRegistry);
    }

    public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseDelimitedFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseDelimitedFrom(
        java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
          PARSER, input, extensionRegistry);
    }

    public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
          PARSER, input, extensionRegistry);
    }

    @java.lang.Override
    public Builder newBuilderForType() {
      return newBuilder();
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }

    public static Builder newBuilder(
        com.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }

    /**
     *
     *
     * <pre>
     * Ingestion settings for Amazon Kinesis Data Streams.
     * </pre>
     *
