/*
 * Copyright 2020 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/dataflow/v1beta3/streaming.proto

package com.google.dataflow.v1beta3;

/**
 *
 *
 * <pre>
 * All configuration data for a particular Computation.
 * </pre>
 *
 * Protobuf type {@code google.dataflow.v1beta3.ComputationTopology}
 */
public final class ComputationTopology extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.dataflow.v1beta3.ComputationTopology)
    ComputationTopologyOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use ComputationTopology.newBuilder() to construct.
  private ComputationTopology(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private ComputationTopology() {
    systemStageName_ = "";
    computationId_ = "";
    keyRanges_ = java.util.Collections.emptyList();
    inputs_ = java.util.Collections.emptyList();
    outputs_ = java.util.Collections.emptyList();
    stateFamilies_ = java.util.Collections.emptyList();
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  private ComputationTopology(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10:
            {
              java.lang.String s = input.readStringRequireUtf8();

              systemStageName_ = s;
              break;
            }
          case 18:
            {
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                keyRanges_ =
                    new java.util.ArrayList<com.google.dataflow.v1beta3.KeyRangeLocation>();
                mutable_bitField0_ |= 0x00000001;
              }
              keyRanges_.add(
                  input.readMessage(
                      com.google.dataflow.v1beta3.KeyRangeLocation.parser(), extensionRegistry));
              break;
            }
          case 26:
            {
              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
                inputs_ = new java.util.ArrayList<com.google.dataflow.v1beta3.StreamLocation>();
                mutable_bitField0_ |= 0x00000002;
              }
              inputs_.add(
                  input.readMessage(
                      com.google.dataflow.v1beta3.StreamLocation.parser(), extensionRegistry));
              break;
            }
          case 34:
            {
              if (!((mutable_bitField0_ & 0x00000004) != 0)) {
                outputs_ = new java.util.ArrayList<com.google.dataflow.v1beta3.StreamLocation>();
                mutable_bitField0_ |= 0x00000004;
              }
              outputs_.add(
                  input.readMessage(
                      com.google.dataflow.v1beta3.StreamLocation.parser(), extensionRegistry));
              break;
            }
          case 42:
            {
              java.lang.String s = input.readStringRequireUtf8();

              computationId_ = s;
              break;
            }
          case 58:
            {
              if (!((mutable_bitField0_ & 0x00000008) != 0)) {
                stateFamilies_ =
                    new java.util.ArrayList<com.google.dataflow.v1beta3.StateFamilyConfig>();
                mutable_bitField0_ |= 0x00000008;
              }
              stateFamilies_.add(
                  input.readMessage(
                      com.google.dataflow.v1beta3.StateFamilyConfig.parser(), extensionRegistry));
              break;
            }
          default:
            {
              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (com.google.protobuf.UninitializedMessageException e) {
      throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000001) != 0)) {
        keyRanges_ = java.util.Collections.unmodifiableList(keyRanges_);
      }
      if (((mutable_bitField0_ & 0x00000002) != 0)) {
        inputs_ = java.util.Collections.unmodifiableList(inputs_);
      }
      if (((mutable_bitField0_ & 0x00000004) != 0)) {
        outputs_ = java.util.Collections.unmodifiableList(outputs_);
      }
      if (((mutable_bitField0_ & 0x00000008) != 0)) {
        stateFamilies_ = java.util.Collections.unmodifiableList(stateFamilies_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.dataflow.v1beta3.StreamingProto
        .internal_static_google_dataflow_v1beta3_ComputationTopology_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.dataflow.v1beta3.StreamingProto
        .internal_static_google_dataflow_v1beta3_ComputationTopology_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.dataflow.v1beta3.ComputationTopology.class,
            com.google.dataflow.v1beta3.ComputationTopology.Builder.class);
  }

  public static final int SYSTEM_STAGE_NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object systemStageName_;
  /**
   *
   *
   * <pre>
   * The system stage name.
   * </pre>
   *
   * <code>string system_stage_name = 1;</code>
   *
   * @return The systemStageName.
   */
  @java.lang.Override
  public java.lang.String getSystemStageName() {
    java.lang.Object ref = systemStageName_;
    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();
      systemStageName_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The system stage name.
   * </pre>
   *
   * <code>string system_stage_name = 1;</code>
   *
   * @return The bytes for systemStageName.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getSystemStageNameBytes() {
    java.lang.Object ref = systemStageName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      systemStageName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int COMPUTATION_ID_FIELD_NUMBER = 5;
  private volatile java.lang.Object computationId_;
  /**
   *
   *
   * <pre>
   * The ID of the computation.
   * </pre>
   *
   * <code>string computation_id = 5;</code>
   *
   * @return The computationId.
   */
  @java.lang.Override
  public java.lang.String getComputationId() {
    java.lang.Object ref = computationId_;
    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();
      computationId_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The ID of the computation.
   * </pre>
   *
   * <code>string computation_id = 5;</code>
   *
   * @return The bytes for computationId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getComputationIdBytes() {
    java.lang.Object ref = computationId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      computationId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int KEY_RANGES_FIELD_NUMBER = 2;
  private java.util.List<com.google.dataflow.v1beta3.KeyRangeLocation> keyRanges_;
  /**
   *
   *
   * <pre>
   * The key ranges processed by the computation.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.dataflow.v1beta3.KeyRangeLocation> getKeyRangesList() {
    return keyRanges_;
  }
  /**
   *
   *
   * <pre>
   * The key ranges processed by the computation.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.dataflow.v1beta3.KeyRangeLocationOrBuilder>
      getKeyRangesOrBuilderList() {
    return keyRanges_;
  }
  /**
   *
   *
   * <pre>
   * The key ranges processed by the computation.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
   */
  @java.lang.Override
  public int getKeyRangesCount() {
    return keyRanges_.size();
  }
  /**
   *
   *
   * <pre>
   * The key ranges processed by the computation.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.KeyRangeLocation getKeyRanges(int index) {
    return keyRanges_.get(index);
  }
  /**
   *
   *
   * <pre>
   * The key ranges processed by the computation.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.KeyRangeLocationOrBuilder getKeyRangesOrBuilder(int index) {
    return keyRanges_.get(index);
  }

  public static final int INPUTS_FIELD_NUMBER = 3;
  private java.util.List<com.google.dataflow.v1beta3.StreamLocation> inputs_;
  /**
   *
   *
   * <pre>
   * The inputs to the computation.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.dataflow.v1beta3.StreamLocation> getInputsList() {
    return inputs_;
  }
  /**
   *
   *
   * <pre>
   * The inputs to the computation.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.dataflow.v1beta3.StreamLocationOrBuilder>
      getInputsOrBuilderList() {
    return inputs_;
  }
  /**
   *
   *
   * <pre>
   * The inputs to the computation.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
   */
  @java.lang.Override
  public int getInputsCount() {
    return inputs_.size();
  }
  /**
   *
   *
   * <pre>
   * The inputs to the computation.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.StreamLocation getInputs(int index) {
    return inputs_.get(index);
  }
  /**
   *
   *
   * <pre>
   * The inputs to the computation.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.StreamLocationOrBuilder getInputsOrBuilder(int index) {
    return inputs_.get(index);
  }

  public static final int OUTPUTS_FIELD_NUMBER = 4;
  private java.util.List<com.google.dataflow.v1beta3.StreamLocation> outputs_;
  /**
   *
   *
   * <pre>
   * The outputs from the computation.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.dataflow.v1beta3.StreamLocation> getOutputsList() {
    return outputs_;
  }
  /**
   *
   *
   * <pre>
   * The outputs from the computation.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.dataflow.v1beta3.StreamLocationOrBuilder>
      getOutputsOrBuilderList() {
    return outputs_;
  }
  /**
   *
   *
   * <pre>
   * The outputs from the computation.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
   */
  @java.lang.Override
  public int getOutputsCount() {
    return outputs_.size();
  }
  /**
   *
   *
   * <pre>
   * The outputs from the computation.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.StreamLocation getOutputs(int index) {
    return outputs_.get(index);
  }
  /**
   *
   *
   * <pre>
   * The outputs from the computation.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.StreamLocationOrBuilder getOutputsOrBuilder(int index) {
    return outputs_.get(index);
  }

  public static final int STATE_FAMILIES_FIELD_NUMBER = 7;
  private java.util.List<com.google.dataflow.v1beta3.StateFamilyConfig> stateFamilies_;
  /**
   *
   *
   * <pre>
   * The state family values.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.dataflow.v1beta3.StateFamilyConfig> getStateFamiliesList() {
    return stateFamilies_;
  }
  /**
   *
   *
   * <pre>
   * The state family values.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.dataflow.v1beta3.StateFamilyConfigOrBuilder>
      getStateFamiliesOrBuilderList() {
    return stateFamilies_;
  }
  /**
   *
   *
   * <pre>
   * The state family values.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
   */
  @java.lang.Override
  public int getStateFamiliesCount() {
    return stateFamilies_.size();
  }
  /**
   *
   *
   * <pre>
   * The state family values.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.StateFamilyConfig getStateFamilies(int index) {
    return stateFamilies_.get(index);
  }
  /**
   *
   *
   * <pre>
   * The state family values.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.StateFamilyConfigOrBuilder getStateFamiliesOrBuilder(
      int index) {
    return stateFamilies_.get(index);
  }

  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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(systemStageName_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, systemStageName_);
    }
    for (int i = 0; i < keyRanges_.size(); i++) {
      output.writeMessage(2, keyRanges_.get(i));
    }
    for (int i = 0; i < inputs_.size(); i++) {
      output.writeMessage(3, inputs_.get(i));
    }
    for (int i = 0; i < outputs_.size(); i++) {
      output.writeMessage(4, outputs_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(computationId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, computationId_);
    }
    for (int i = 0; i < stateFamilies_.size(); i++) {
      output.writeMessage(7, stateFamilies_.get(i));
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(systemStageName_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, systemStageName_);
    }
    for (int i = 0; i < keyRanges_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, keyRanges_.get(i));
    }
    for (int i = 0; i < inputs_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, inputs_.get(i));
    }
    for (int i = 0; i < outputs_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, outputs_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(computationId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, computationId_);
    }
    for (int i = 0; i < stateFamilies_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, stateFamilies_.get(i));
    }
    size += unknownFields.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.dataflow.v1beta3.ComputationTopology)) {
      return super.equals(obj);
    }
    com.google.dataflow.v1beta3.ComputationTopology other =
        (com.google.dataflow.v1beta3.ComputationTopology) obj;

    if (!getSystemStageName().equals(other.getSystemStageName())) return false;
    if (!getComputationId().equals(other.getComputationId())) return false;
    if (!getKeyRangesList().equals(other.getKeyRangesList())) return false;
    if (!getInputsList().equals(other.getInputsList())) return false;
    if (!getOutputsList().equals(other.getOutputsList())) return false;
    if (!getStateFamiliesList().equals(other.getStateFamiliesList())) return false;
    if (!unknownFields.equals(other.unknownFields)) 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) + SYSTEM_STAGE_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getSystemStageName().hashCode();
    hash = (37 * hash) + COMPUTATION_ID_FIELD_NUMBER;
    hash = (53 * hash) + getComputationId().hashCode();
    if (getKeyRangesCount() > 0) {
      hash = (37 * hash) + KEY_RANGES_FIELD_NUMBER;
      hash = (53 * hash) + getKeyRangesList().hashCode();
    }
    if (getInputsCount() > 0) {
      hash = (37 * hash) + INPUTS_FIELD_NUMBER;
      hash = (53 * hash) + getInputsList().hashCode();
    }
    if (getOutputsCount() > 0) {
      hash = (37 * hash) + OUTPUTS_FIELD_NUMBER;
      hash = (53 * hash) + getOutputsList().hashCode();
    }
    if (getStateFamiliesCount() > 0) {
      hash = (37 * hash) + STATE_FAMILIES_FIELD_NUMBER;
      hash = (53 * hash) + getStateFamiliesList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.dataflow.v1beta3.ComputationTopology parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.dataflow.v1beta3.ComputationTopology parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.dataflow.v1beta3.ComputationTopology parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.dataflow.v1beta3.ComputationTopology 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.dataflow.v1beta3.ComputationTopology parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.dataflow.v1beta3.ComputationTopology parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.dataflow.v1beta3.ComputationTopology parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.dataflow.v1beta3.ComputationTopology 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.dataflow.v1beta3.ComputationTopology parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.dataflow.v1beta3.ComputationTopology 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.dataflow.v1beta3.ComputationTopology parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.dataflow.v1beta3.ComputationTopology 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.dataflow.v1beta3.ComputationTopology 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>
   * All configuration data for a particular Computation.
   * </pre>
   *
   * Protobuf type {@code google.dataflow.v1beta3.ComputationTopology}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.dataflow.v1beta3.ComputationTopology)
      com.google.dataflow.v1beta3.ComputationTopologyOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.dataflow.v1beta3.StreamingProto
          .internal_static_google_dataflow_v1beta3_ComputationTopology_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.dataflow.v1beta3.StreamingProto
          .internal_static_google_dataflow_v1beta3_ComputationTopology_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.dataflow.v1beta3.ComputationTopology.class,
              com.google.dataflow.v1beta3.ComputationTopology.Builder.class);
    }

    // Construct using com.google.dataflow.v1beta3.ComputationTopology.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }

    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
        getKeyRangesFieldBuilder();
        getInputsFieldBuilder();
        getOutputsFieldBuilder();
        getStateFamiliesFieldBuilder();
      }
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      systemStageName_ = "";

      computationId_ = "";

      if (keyRangesBuilder_ == null) {
        keyRanges_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
      } else {
        keyRangesBuilder_.clear();
      }
      if (inputsBuilder_ == null) {
        inputs_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
      } else {
        inputsBuilder_.clear();
      }
      if (outputsBuilder_ == null) {
        outputs_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
      } else {
        outputsBuilder_.clear();
      }
      if (stateFamiliesBuilder_ == null) {
        stateFamilies_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000008);
      } else {
        stateFamiliesBuilder_.clear();
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.dataflow.v1beta3.StreamingProto
          .internal_static_google_dataflow_v1beta3_ComputationTopology_descriptor;
    }

    @java.lang.Override
    public com.google.dataflow.v1beta3.ComputationTopology getDefaultInstanceForType() {
      return com.google.dataflow.v1beta3.ComputationTopology.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.dataflow.v1beta3.ComputationTopology build() {
      com.google.dataflow.v1beta3.ComputationTopology result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.dataflow.v1beta3.ComputationTopology buildPartial() {
      com.google.dataflow.v1beta3.ComputationTopology result =
          new com.google.dataflow.v1beta3.ComputationTopology(this);
      int from_bitField0_ = bitField0_;
      result.systemStageName_ = systemStageName_;
      result.computationId_ = computationId_;
      if (keyRangesBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          keyRanges_ = java.util.Collections.unmodifiableList(keyRanges_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.keyRanges_ = keyRanges_;
      } else {
        result.keyRanges_ = keyRangesBuilder_.build();
      }
      if (inputsBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0)) {
          inputs_ = java.util.Collections.unmodifiableList(inputs_);
          bitField0_ = (bitField0_ & ~0x00000002);
        }
        result.inputs_ = inputs_;
      } else {
        result.inputs_ = inputsBuilder_.build();
      }
      if (outputsBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0)) {
          outputs_ = java.util.Collections.unmodifiableList(outputs_);
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.outputs_ = outputs_;
      } else {
        result.outputs_ = outputsBuilder_.build();
      }
      if (stateFamiliesBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)) {
          stateFamilies_ = java.util.Collections.unmodifiableList(stateFamilies_);
          bitField0_ = (bitField0_ & ~0x00000008);
        }
        result.stateFamilies_ = stateFamilies_;
      } else {
        result.stateFamilies_ = stateFamiliesBuilder_.build();
      }
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.dataflow.v1beta3.ComputationTopology) {
        return mergeFrom((com.google.dataflow.v1beta3.ComputationTopology) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.dataflow.v1beta3.ComputationTopology other) {
      if (other == com.google.dataflow.v1beta3.ComputationTopology.getDefaultInstance())
        return this;
      if (!other.getSystemStageName().isEmpty()) {
        systemStageName_ = other.systemStageName_;
        onChanged();
      }
      if (!other.getComputationId().isEmpty()) {
        computationId_ = other.computationId_;
        onChanged();
      }
      if (keyRangesBuilder_ == null) {
        if (!other.keyRanges_.isEmpty()) {
          if (keyRanges_.isEmpty()) {
            keyRanges_ = other.keyRanges_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureKeyRangesIsMutable();
            keyRanges_.addAll(other.keyRanges_);
          }
          onChanged();
        }
      } else {
        if (!other.keyRanges_.isEmpty()) {
          if (keyRangesBuilder_.isEmpty()) {
            keyRangesBuilder_.dispose();
            keyRangesBuilder_ = null;
            keyRanges_ = other.keyRanges_;
            bitField0_ = (bitField0_ & ~0x00000001);
            keyRangesBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getKeyRangesFieldBuilder()
                    : null;
          } else {
            keyRangesBuilder_.addAllMessages(other.keyRanges_);
          }
        }
      }
      if (inputsBuilder_ == null) {
        if (!other.inputs_.isEmpty()) {
          if (inputs_.isEmpty()) {
            inputs_ = other.inputs_;
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            ensureInputsIsMutable();
            inputs_.addAll(other.inputs_);
          }
          onChanged();
        }
      } else {
        if (!other.inputs_.isEmpty()) {
          if (inputsBuilder_.isEmpty()) {
            inputsBuilder_.dispose();
            inputsBuilder_ = null;
            inputs_ = other.inputs_;
            bitField0_ = (bitField0_ & ~0x00000002);
            inputsBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getInputsFieldBuilder()
                    : null;
          } else {
            inputsBuilder_.addAllMessages(other.inputs_);
          }
        }
      }
      if (outputsBuilder_ == null) {
        if (!other.outputs_.isEmpty()) {
          if (outputs_.isEmpty()) {
            outputs_ = other.outputs_;
            bitField0_ = (bitField0_ & ~0x00000004);
          } else {
            ensureOutputsIsMutable();
            outputs_.addAll(other.outputs_);
          }
          onChanged();
        }
      } else {
        if (!other.outputs_.isEmpty()) {
          if (outputsBuilder_.isEmpty()) {
            outputsBuilder_.dispose();
            outputsBuilder_ = null;
            outputs_ = other.outputs_;
            bitField0_ = (bitField0_ & ~0x00000004);
            outputsBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getOutputsFieldBuilder()
                    : null;
          } else {
            outputsBuilder_.addAllMessages(other.outputs_);
          }
        }
      }
      if (stateFamiliesBuilder_ == null) {
        if (!other.stateFamilies_.isEmpty()) {
          if (stateFamilies_.isEmpty()) {
            stateFamilies_ = other.stateFamilies_;
            bitField0_ = (bitField0_ & ~0x00000008);
          } else {
            ensureStateFamiliesIsMutable();
            stateFamilies_.addAll(other.stateFamilies_);
          }
          onChanged();
        }
      } else {
        if (!other.stateFamilies_.isEmpty()) {
          if (stateFamiliesBuilder_.isEmpty()) {
            stateFamiliesBuilder_.dispose();
            stateFamiliesBuilder_ = null;
            stateFamilies_ = other.stateFamilies_;
            bitField0_ = (bitField0_ & ~0x00000008);
            stateFamiliesBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getStateFamiliesFieldBuilder()
                    : null;
          } else {
            stateFamiliesBuilder_.addAllMessages(other.stateFamilies_);
          }
        }
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.google.dataflow.v1beta3.ComputationTopology parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.dataflow.v1beta3.ComputationTopology) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int bitField0_;

    private java.lang.Object systemStageName_ = "";
    /**
     *
     *
     * <pre>
     * The system stage name.
     * </pre>
     *
     * <code>string system_stage_name = 1;</code>
     *
     * @return The systemStageName.
     */
    public java.lang.String getSystemStageName() {
      java.lang.Object ref = systemStageName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        systemStageName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The system stage name.
     * </pre>
     *
     * <code>string system_stage_name = 1;</code>
     *
     * @return The bytes for systemStageName.
     */
    public com.google.protobuf.ByteString getSystemStageNameBytes() {
      java.lang.Object ref = systemStageName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        systemStageName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The system stage name.
     * </pre>
     *
     * <code>string system_stage_name = 1;</code>
     *
     * @param value The systemStageName to set.
     * @return This builder for chaining.
     */
    public Builder setSystemStageName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      systemStageName_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The system stage name.
     * </pre>
     *
     * <code>string system_stage_name = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearSystemStageName() {

      systemStageName_ = getDefaultInstance().getSystemStageName();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The system stage name.
     * </pre>
     *
     * <code>string system_stage_name = 1;</code>
     *
     * @param value The bytes for systemStageName to set.
     * @return This builder for chaining.
     */
    public Builder setSystemStageNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      systemStageName_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object computationId_ = "";
    /**
     *
     *
     * <pre>
     * The ID of the computation.
     * </pre>
     *
     * <code>string computation_id = 5;</code>
     *
     * @return The computationId.
     */
    public java.lang.String getComputationId() {
      java.lang.Object ref = computationId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        computationId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The ID of the computation.
     * </pre>
     *
     * <code>string computation_id = 5;</code>
     *
     * @return The bytes for computationId.
     */
    public com.google.protobuf.ByteString getComputationIdBytes() {
      java.lang.Object ref = computationId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        computationId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The ID of the computation.
     * </pre>
     *
     * <code>string computation_id = 5;</code>
     *
     * @param value The computationId to set.
     * @return This builder for chaining.
     */
    public Builder setComputationId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      computationId_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The ID of the computation.
     * </pre>
     *
     * <code>string computation_id = 5;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearComputationId() {

      computationId_ = getDefaultInstance().getComputationId();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The ID of the computation.
     * </pre>
     *
     * <code>string computation_id = 5;</code>
     *
     * @param value The bytes for computationId to set.
     * @return This builder for chaining.
     */
    public Builder setComputationIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      computationId_ = value;
      onChanged();
      return this;
    }

    private java.util.List<com.google.dataflow.v1beta3.KeyRangeLocation> keyRanges_ =
        java.util.Collections.emptyList();

    private void ensureKeyRangesIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        keyRanges_ =
            new java.util.ArrayList<com.google.dataflow.v1beta3.KeyRangeLocation>(keyRanges_);
        bitField0_ |= 0x00000001;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.dataflow.v1beta3.KeyRangeLocation,
            com.google.dataflow.v1beta3.KeyRangeLocation.Builder,
            com.google.dataflow.v1beta3.KeyRangeLocationOrBuilder>
        keyRangesBuilder_;

    /**
     *
     *
     * <pre>
     * The key ranges processed by the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
     */
    public java.util.List<com.google.dataflow.v1beta3.KeyRangeLocation> getKeyRangesList() {
      if (keyRangesBuilder_ == null) {
        return java.util.Collections.unmodifiableList(keyRanges_);
      } else {
        return keyRangesBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * The key ranges processed by the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
     */
    public int getKeyRangesCount() {
      if (keyRangesBuilder_ == null) {
        return keyRanges_.size();
      } else {
        return keyRangesBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * The key ranges processed by the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
     */
    public com.google.dataflow.v1beta3.KeyRangeLocation getKeyRanges(int index) {
      if (keyRangesBuilder_ == null) {
        return keyRanges_.get(index);
      } else {
        return keyRangesBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * The key ranges processed by the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
     */
    public Builder setKeyRanges(int index, com.google.dataflow.v1beta3.KeyRangeLocation value) {
      if (keyRangesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureKeyRangesIsMutable();
        keyRanges_.set(index, value);
        onChanged();
      } else {
        keyRangesBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The key ranges processed by the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
     */
    public Builder setKeyRanges(
        int index, com.google.dataflow.v1beta3.KeyRangeLocation.Builder builderForValue) {
      if (keyRangesBuilder_ == null) {
        ensureKeyRangesIsMutable();
        keyRanges_.set(index, builderForValue.build());
        onChanged();
      } else {
        keyRangesBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The key ranges processed by the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
     */
    public Builder addKeyRanges(com.google.dataflow.v1beta3.KeyRangeLocation value) {
      if (keyRangesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureKeyRangesIsMutable();
        keyRanges_.add(value);
        onChanged();
      } else {
        keyRangesBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The key ranges processed by the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
     */
    public Builder addKeyRanges(int index, com.google.dataflow.v1beta3.KeyRangeLocation value) {
      if (keyRangesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureKeyRangesIsMutable();
        keyRanges_.add(index, value);
        onChanged();
      } else {
        keyRangesBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The key ranges processed by the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
     */
    public Builder addKeyRanges(
        com.google.dataflow.v1beta3.KeyRangeLocation.Builder builderForValue) {
      if (keyRangesBuilder_ == null) {
        ensureKeyRangesIsMutable();
        keyRanges_.add(builderForValue.build());
        onChanged();
      } else {
        keyRangesBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The key ranges processed by the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
     */
    public Builder addKeyRanges(
        int index, com.google.dataflow.v1beta3.KeyRangeLocation.Builder builderForValue) {
      if (keyRangesBuilder_ == null) {
        ensureKeyRangesIsMutable();
        keyRanges_.add(index, builderForValue.build());
        onChanged();
      } else {
        keyRangesBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The key ranges processed by the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
     */
    public Builder addAllKeyRanges(
        java.lang.Iterable<? extends com.google.dataflow.v1beta3.KeyRangeLocation> values) {
      if (keyRangesBuilder_ == null) {
        ensureKeyRangesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, keyRanges_);
        onChanged();
      } else {
        keyRangesBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The key ranges processed by the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
     */
    public Builder clearKeyRanges() {
      if (keyRangesBuilder_ == null) {
        keyRanges_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        keyRangesBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The key ranges processed by the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
     */
    public Builder removeKeyRanges(int index) {
      if (keyRangesBuilder_ == null) {
        ensureKeyRangesIsMutable();
        keyRanges_.remove(index);
        onChanged();
      } else {
        keyRangesBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The key ranges processed by the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
     */
    public com.google.dataflow.v1beta3.KeyRangeLocation.Builder getKeyRangesBuilder(int index) {
      return getKeyRangesFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * The key ranges processed by the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
     */
    public com.google.dataflow.v1beta3.KeyRangeLocationOrBuilder getKeyRangesOrBuilder(int index) {
      if (keyRangesBuilder_ == null) {
        return keyRanges_.get(index);
      } else {
        return keyRangesBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * The key ranges processed by the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
     */
    public java.util.List<? extends com.google.dataflow.v1beta3.KeyRangeLocationOrBuilder>
        getKeyRangesOrBuilderList() {
      if (keyRangesBuilder_ != null) {
        return keyRangesBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(keyRanges_);
      }
    }
    /**
     *
     *
     * <pre>
     * The key ranges processed by the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
     */
    public com.google.dataflow.v1beta3.KeyRangeLocation.Builder addKeyRangesBuilder() {
      return getKeyRangesFieldBuilder()
          .addBuilder(com.google.dataflow.v1beta3.KeyRangeLocation.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * The key ranges processed by the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
     */
    public com.google.dataflow.v1beta3.KeyRangeLocation.Builder addKeyRangesBuilder(int index) {
      return getKeyRangesFieldBuilder()
          .addBuilder(index, com.google.dataflow.v1beta3.KeyRangeLocation.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * The key ranges processed by the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.KeyRangeLocation key_ranges = 2;</code>
     */
    public java.util.List<com.google.dataflow.v1beta3.KeyRangeLocation.Builder>
        getKeyRangesBuilderList() {
      return getKeyRangesFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.dataflow.v1beta3.KeyRangeLocation,
            com.google.dataflow.v1beta3.KeyRangeLocation.Builder,
            com.google.dataflow.v1beta3.KeyRangeLocationOrBuilder>
        getKeyRangesFieldBuilder() {
      if (keyRangesBuilder_ == null) {
        keyRangesBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.dataflow.v1beta3.KeyRangeLocation,
                com.google.dataflow.v1beta3.KeyRangeLocation.Builder,
                com.google.dataflow.v1beta3.KeyRangeLocationOrBuilder>(
                keyRanges_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
        keyRanges_ = null;
      }
      return keyRangesBuilder_;
    }

    private java.util.List<com.google.dataflow.v1beta3.StreamLocation> inputs_ =
        java.util.Collections.emptyList();

    private void ensureInputsIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        inputs_ = new java.util.ArrayList<com.google.dataflow.v1beta3.StreamLocation>(inputs_);
        bitField0_ |= 0x00000002;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.dataflow.v1beta3.StreamLocation,
            com.google.dataflow.v1beta3.StreamLocation.Builder,
            com.google.dataflow.v1beta3.StreamLocationOrBuilder>
        inputsBuilder_;

    /**
     *
     *
     * <pre>
     * The inputs to the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
     */
    public java.util.List<com.google.dataflow.v1beta3.StreamLocation> getInputsList() {
      if (inputsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(inputs_);
      } else {
        return inputsBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * The inputs to the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
     */
    public int getInputsCount() {
      if (inputsBuilder_ == null) {
        return inputs_.size();
      } else {
        return inputsBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * The inputs to the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
     */
    public com.google.dataflow.v1beta3.StreamLocation getInputs(int index) {
      if (inputsBuilder_ == null) {
        return inputs_.get(index);
      } else {
        return inputsBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * The inputs to the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
     */
    public Builder setInputs(int index, com.google.dataflow.v1beta3.StreamLocation value) {
      if (inputsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureInputsIsMutable();
        inputs_.set(index, value);
        onChanged();
      } else {
        inputsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The inputs to the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
     */
    public Builder setInputs(
        int index, com.google.dataflow.v1beta3.StreamLocation.Builder builderForValue) {
      if (inputsBuilder_ == null) {
        ensureInputsIsMutable();
        inputs_.set(index, builderForValue.build());
        onChanged();
      } else {
        inputsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The inputs to the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
     */
    public Builder addInputs(com.google.dataflow.v1beta3.StreamLocation value) {
      if (inputsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureInputsIsMutable();
        inputs_.add(value);
        onChanged();
      } else {
        inputsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The inputs to the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
     */
    public Builder addInputs(int index, com.google.dataflow.v1beta3.StreamLocation value) {
      if (inputsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureInputsIsMutable();
        inputs_.add(index, value);
        onChanged();
      } else {
        inputsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The inputs to the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
     */
    public Builder addInputs(com.google.dataflow.v1beta3.StreamLocation.Builder builderForValue) {
      if (inputsBuilder_ == null) {
        ensureInputsIsMutable();
        inputs_.add(builderForValue.build());
        onChanged();
      } else {
        inputsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The inputs to the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
     */
    public Builder addInputs(
        int index, com.google.dataflow.v1beta3.StreamLocation.Builder builderForValue) {
      if (inputsBuilder_ == null) {
        ensureInputsIsMutable();
        inputs_.add(index, builderForValue.build());
        onChanged();
      } else {
        inputsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The inputs to the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
     */
    public Builder addAllInputs(
        java.lang.Iterable<? extends com.google.dataflow.v1beta3.StreamLocation> values) {
      if (inputsBuilder_ == null) {
        ensureInputsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputs_);
        onChanged();
      } else {
        inputsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The inputs to the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
     */
    public Builder clearInputs() {
      if (inputsBuilder_ == null) {
        inputs_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
      } else {
        inputsBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The inputs to the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
     */
    public Builder removeInputs(int index) {
      if (inputsBuilder_ == null) {
        ensureInputsIsMutable();
        inputs_.remove(index);
        onChanged();
      } else {
        inputsBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The inputs to the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
     */
    public com.google.dataflow.v1beta3.StreamLocation.Builder getInputsBuilder(int index) {
      return getInputsFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * The inputs to the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
     */
    public com.google.dataflow.v1beta3.StreamLocationOrBuilder getInputsOrBuilder(int index) {
      if (inputsBuilder_ == null) {
        return inputs_.get(index);
      } else {
        return inputsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * The inputs to the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
     */
    public java.util.List<? extends com.google.dataflow.v1beta3.StreamLocationOrBuilder>
        getInputsOrBuilderList() {
      if (inputsBuilder_ != null) {
        return inputsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(inputs_);
      }
    }
    /**
     *
     *
     * <pre>
     * The inputs to the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
     */
    public com.google.dataflow.v1beta3.StreamLocation.Builder addInputsBuilder() {
      return getInputsFieldBuilder()
          .addBuilder(com.google.dataflow.v1beta3.StreamLocation.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * The inputs to the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
     */
    public com.google.dataflow.v1beta3.StreamLocation.Builder addInputsBuilder(int index) {
      return getInputsFieldBuilder()
          .addBuilder(index, com.google.dataflow.v1beta3.StreamLocation.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * The inputs to the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation inputs = 3;</code>
     */
    public java.util.List<com.google.dataflow.v1beta3.StreamLocation.Builder>
        getInputsBuilderList() {
      return getInputsFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.dataflow.v1beta3.StreamLocation,
            com.google.dataflow.v1beta3.StreamLocation.Builder,
            com.google.dataflow.v1beta3.StreamLocationOrBuilder>
        getInputsFieldBuilder() {
      if (inputsBuilder_ == null) {
        inputsBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.dataflow.v1beta3.StreamLocation,
                com.google.dataflow.v1beta3.StreamLocation.Builder,
                com.google.dataflow.v1beta3.StreamLocationOrBuilder>(
                inputs_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
        inputs_ = null;
      }
      return inputsBuilder_;
    }

    private java.util.List<com.google.dataflow.v1beta3.StreamLocation> outputs_ =
        java.util.Collections.emptyList();

    private void ensureOutputsIsMutable() {
      if (!((bitField0_ & 0x00000004) != 0)) {
        outputs_ = new java.util.ArrayList<com.google.dataflow.v1beta3.StreamLocation>(outputs_);
        bitField0_ |= 0x00000004;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.dataflow.v1beta3.StreamLocation,
            com.google.dataflow.v1beta3.StreamLocation.Builder,
            com.google.dataflow.v1beta3.StreamLocationOrBuilder>
        outputsBuilder_;

    /**
     *
     *
     * <pre>
     * The outputs from the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
     */
    public java.util.List<com.google.dataflow.v1beta3.StreamLocation> getOutputsList() {
      if (outputsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(outputs_);
      } else {
        return outputsBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * The outputs from the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
     */
    public int getOutputsCount() {
      if (outputsBuilder_ == null) {
        return outputs_.size();
      } else {
        return outputsBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * The outputs from the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
     */
    public com.google.dataflow.v1beta3.StreamLocation getOutputs(int index) {
      if (outputsBuilder_ == null) {
        return outputs_.get(index);
      } else {
        return outputsBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * The outputs from the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
     */
    public Builder setOutputs(int index, com.google.dataflow.v1beta3.StreamLocation value) {
      if (outputsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureOutputsIsMutable();
        outputs_.set(index, value);
        onChanged();
      } else {
        outputsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The outputs from the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
     */
    public Builder setOutputs(
        int index, com.google.dataflow.v1beta3.StreamLocation.Builder builderForValue) {
      if (outputsBuilder_ == null) {
        ensureOutputsIsMutable();
        outputs_.set(index, builderForValue.build());
        onChanged();
      } else {
        outputsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The outputs from the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
     */
    public Builder addOutputs(com.google.dataflow.v1beta3.StreamLocation value) {
      if (outputsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureOutputsIsMutable();
        outputs_.add(value);
        onChanged();
      } else {
        outputsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The outputs from the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
     */
    public Builder addOutputs(int index, com.google.dataflow.v1beta3.StreamLocation value) {
      if (outputsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureOutputsIsMutable();
        outputs_.add(index, value);
        onChanged();
      } else {
        outputsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The outputs from the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
     */
    public Builder addOutputs(com.google.dataflow.v1beta3.StreamLocation.Builder builderForValue) {
      if (outputsBuilder_ == null) {
        ensureOutputsIsMutable();
        outputs_.add(builderForValue.build());
        onChanged();
      } else {
        outputsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The outputs from the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
     */
    public Builder addOutputs(
        int index, com.google.dataflow.v1beta3.StreamLocation.Builder builderForValue) {
      if (outputsBuilder_ == null) {
        ensureOutputsIsMutable();
        outputs_.add(index, builderForValue.build());
        onChanged();
      } else {
        outputsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The outputs from the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
     */
    public Builder addAllOutputs(
        java.lang.Iterable<? extends com.google.dataflow.v1beta3.StreamLocation> values) {
      if (outputsBuilder_ == null) {
        ensureOutputsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outputs_);
        onChanged();
      } else {
        outputsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The outputs from the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
     */
    public Builder clearOutputs() {
      if (outputsBuilder_ == null) {
        outputs_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
      } else {
        outputsBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The outputs from the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
     */
    public Builder removeOutputs(int index) {
      if (outputsBuilder_ == null) {
        ensureOutputsIsMutable();
        outputs_.remove(index);
        onChanged();
      } else {
        outputsBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The outputs from the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
     */
    public com.google.dataflow.v1beta3.StreamLocation.Builder getOutputsBuilder(int index) {
      return getOutputsFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * The outputs from the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
     */
    public com.google.dataflow.v1beta3.StreamLocationOrBuilder getOutputsOrBuilder(int index) {
      if (outputsBuilder_ == null) {
        return outputs_.get(index);
      } else {
        return outputsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * The outputs from the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
     */
    public java.util.List<? extends com.google.dataflow.v1beta3.StreamLocationOrBuilder>
        getOutputsOrBuilderList() {
      if (outputsBuilder_ != null) {
        return outputsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(outputs_);
      }
    }
    /**
     *
     *
     * <pre>
     * The outputs from the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
     */
    public com.google.dataflow.v1beta3.StreamLocation.Builder addOutputsBuilder() {
      return getOutputsFieldBuilder()
          .addBuilder(com.google.dataflow.v1beta3.StreamLocation.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * The outputs from the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
     */
    public com.google.dataflow.v1beta3.StreamLocation.Builder addOutputsBuilder(int index) {
      return getOutputsFieldBuilder()
          .addBuilder(index, com.google.dataflow.v1beta3.StreamLocation.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * The outputs from the computation.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StreamLocation outputs = 4;</code>
     */
    public java.util.List<com.google.dataflow.v1beta3.StreamLocation.Builder>
        getOutputsBuilderList() {
      return getOutputsFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.dataflow.v1beta3.StreamLocation,
            com.google.dataflow.v1beta3.StreamLocation.Builder,
            com.google.dataflow.v1beta3.StreamLocationOrBuilder>
        getOutputsFieldBuilder() {
      if (outputsBuilder_ == null) {
        outputsBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.dataflow.v1beta3.StreamLocation,
                com.google.dataflow.v1beta3.StreamLocation.Builder,
                com.google.dataflow.v1beta3.StreamLocationOrBuilder>(
                outputs_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean());
        outputs_ = null;
      }
      return outputsBuilder_;
    }

    private java.util.List<com.google.dataflow.v1beta3.StateFamilyConfig> stateFamilies_ =
        java.util.Collections.emptyList();

    private void ensureStateFamiliesIsMutable() {
      if (!((bitField0_ & 0x00000008) != 0)) {
        stateFamilies_ =
            new java.util.ArrayList<com.google.dataflow.v1beta3.StateFamilyConfig>(stateFamilies_);
        bitField0_ |= 0x00000008;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.dataflow.v1beta3.StateFamilyConfig,
            com.google.dataflow.v1beta3.StateFamilyConfig.Builder,
            com.google.dataflow.v1beta3.StateFamilyConfigOrBuilder>
        stateFamiliesBuilder_;

    /**
     *
     *
     * <pre>
     * The state family values.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
     */
    public java.util.List<com.google.dataflow.v1beta3.StateFamilyConfig> getStateFamiliesList() {
      if (stateFamiliesBuilder_ == null) {
        return java.util.Collections.unmodifiableList(stateFamilies_);
      } else {
        return stateFamiliesBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * The state family values.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
     */
    public int getStateFamiliesCount() {
      if (stateFamiliesBuilder_ == null) {
        return stateFamilies_.size();
      } else {
        return stateFamiliesBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * The state family values.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
     */
    public com.google.dataflow.v1beta3.StateFamilyConfig getStateFamilies(int index) {
      if (stateFamiliesBuilder_ == null) {
        return stateFamilies_.get(index);
      } else {
        return stateFamiliesBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * The state family values.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
     */
    public Builder setStateFamilies(
        int index, com.google.dataflow.v1beta3.StateFamilyConfig value) {
      if (stateFamiliesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureStateFamiliesIsMutable();
        stateFamilies_.set(index, value);
        onChanged();
      } else {
        stateFamiliesBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The state family values.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
     */
    public Builder setStateFamilies(
        int index, com.google.dataflow.v1beta3.StateFamilyConfig.Builder builderForValue) {
      if (stateFamiliesBuilder_ == null) {
        ensureStateFamiliesIsMutable();
        stateFamilies_.set(index, builderForValue.build());
        onChanged();
      } else {
        stateFamiliesBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The state family values.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
     */
    public Builder addStateFamilies(com.google.dataflow.v1beta3.StateFamilyConfig value) {
      if (stateFamiliesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureStateFamiliesIsMutable();
        stateFamilies_.add(value);
        onChanged();
      } else {
        stateFamiliesBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The state family values.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
     */
    public Builder addStateFamilies(
        int index, com.google.dataflow.v1beta3.StateFamilyConfig value) {
      if (stateFamiliesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureStateFamiliesIsMutable();
        stateFamilies_.add(index, value);
        onChanged();
      } else {
        stateFamiliesBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The state family values.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
     */
    public Builder addStateFamilies(
        com.google.dataflow.v1beta3.StateFamilyConfig.Builder builderForValue) {
      if (stateFamiliesBuilder_ == null) {
        ensureStateFamiliesIsMutable();
        stateFamilies_.add(builderForValue.build());
        onChanged();
      } else {
        stateFamiliesBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The state family values.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
     */
    public Builder addStateFamilies(
        int index, com.google.dataflow.v1beta3.StateFamilyConfig.Builder builderForValue) {
      if (stateFamiliesBuilder_ == null) {
        ensureStateFamiliesIsMutable();
        stateFamilies_.add(index, builderForValue.build());
        onChanged();
      } else {
        stateFamiliesBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The state family values.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
     */
    public Builder addAllStateFamilies(
        java.lang.Iterable<? extends com.google.dataflow.v1beta3.StateFamilyConfig> values) {
      if (stateFamiliesBuilder_ == null) {
        ensureStateFamiliesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, stateFamilies_);
        onChanged();
      } else {
        stateFamiliesBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The state family values.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
     */
    public Builder clearStateFamilies() {
      if (stateFamiliesBuilder_ == null) {
        stateFamilies_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000008);
        onChanged();
      } else {
        stateFamiliesBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The state family values.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
     */
    public Builder removeStateFamilies(int index) {
      if (stateFamiliesBuilder_ == null) {
        ensureStateFamiliesIsMutable();
        stateFamilies_.remove(index);
        onChanged();
      } else {
        stateFamiliesBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The state family values.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
     */
    public com.google.dataflow.v1beta3.StateFamilyConfig.Builder getStateFamiliesBuilder(
        int index) {
      return getStateFamiliesFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * The state family values.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
     */
    public com.google.dataflow.v1beta3.StateFamilyConfigOrBuilder getStateFamiliesOrBuilder(
        int index) {
      if (stateFamiliesBuilder_ == null) {
        return stateFamilies_.get(index);
      } else {
        return stateFamiliesBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * The state family values.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
     */
    public java.util.List<? extends com.google.dataflow.v1beta3.StateFamilyConfigOrBuilder>
        getStateFamiliesOrBuilderList() {
      if (stateFamiliesBuilder_ != null) {
        return stateFamiliesBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(stateFamilies_);
      }
    }
    /**
     *
     *
     * <pre>
     * The state family values.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
     */
    public com.google.dataflow.v1beta3.StateFamilyConfig.Builder addStateFamiliesBuilder() {
      return getStateFamiliesFieldBuilder()
          .addBuilder(com.google.dataflow.v1beta3.StateFamilyConfig.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * The state family values.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
     */
    public com.google.dataflow.v1beta3.StateFamilyConfig.Builder addStateFamiliesBuilder(
        int index) {
      return getStateFamiliesFieldBuilder()
          .addBuilder(index, com.google.dataflow.v1beta3.StateFamilyConfig.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * The state family values.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.StateFamilyConfig state_families = 7;</code>
     */
    public java.util.List<com.google.dataflow.v1beta3.StateFamilyConfig.Builder>
        getStateFamiliesBuilderList() {
      return getStateFamiliesFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.dataflow.v1beta3.StateFamilyConfig,
            com.google.dataflow.v1beta3.StateFamilyConfig.Builder,
            com.google.dataflow.v1beta3.StateFamilyConfigOrBuilder>
        getStateFamiliesFieldBuilder() {
      if (stateFamiliesBuilder_ == null) {
        stateFamiliesBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.dataflow.v1beta3.StateFamilyConfig,
                com.google.dataflow.v1beta3.StateFamilyConfig.Builder,
                com.google.dataflow.v1beta3.StateFamilyConfigOrBuilder>(
                stateFamilies_,
                ((bitField0_ & 0x00000008) != 0),
                getParentForChildren(),
                isClean());
        stateFamilies_ = null;
      }
      return stateFamiliesBuilder_;
    }

    @java.lang.Override
    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }

    // @@protoc_insertion_point(builder_scope:google.dataflow.v1beta3.ComputationTopology)
  }

  // @@protoc_insertion_point(class_scope:google.dataflow.v1beta3.ComputationTopology)
  private static final com.google.dataflow.v1beta3.ComputationTopology DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.dataflow.v1beta3.ComputationTopology();
  }

  public static com.google.dataflow.v1beta3.ComputationTopology getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<ComputationTopology> PARSER =
      new com.google.protobuf.AbstractParser<ComputationTopology>() {
        @java.lang.Override
        public ComputationTopology parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return new ComputationTopology(input, extensionRegistry);
        }
      };

  public static com.google.protobuf.Parser<ComputationTopology> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<ComputationTopology> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.dataflow.v1beta3.ComputationTopology getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
