/*
 * 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/cloud/video/livestream/v1/resources.proto

package com.google.cloud.video.livestream.v1;

/**
 *
 *
 * <pre>
 * Properties of the input stream.
 * </pre>
 *
 * Protobuf type {@code google.cloud.video.livestream.v1.InputStreamProperty}
 */
public final class InputStreamProperty extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.video.livestream.v1.InputStreamProperty)
    InputStreamPropertyOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use InputStreamProperty.newBuilder() to construct.
  private InputStreamProperty(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private InputStreamProperty() {
    videoStreams_ = java.util.Collections.emptyList();
    audioStreams_ = java.util.Collections.emptyList();
  }

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

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

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.video.livestream.v1.ResourcesProto
        .internal_static_google_cloud_video_livestream_v1_InputStreamProperty_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.video.livestream.v1.ResourcesProto
        .internal_static_google_cloud_video_livestream_v1_InputStreamProperty_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.video.livestream.v1.InputStreamProperty.class,
            com.google.cloud.video.livestream.v1.InputStreamProperty.Builder.class);
  }

  public static final int LAST_ESTABLISH_TIME_FIELD_NUMBER = 1;
  private com.google.protobuf.Timestamp lastEstablishTime_;
  /**
   *
   *
   * <pre>
   * The time that the current input stream is accepted and the connection is
   * established.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp last_establish_time = 1;</code>
   *
   * @return Whether the lastEstablishTime field is set.
   */
  @java.lang.Override
  public boolean hasLastEstablishTime() {
    return lastEstablishTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * The time that the current input stream is accepted and the connection is
   * established.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp last_establish_time = 1;</code>
   *
   * @return The lastEstablishTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getLastEstablishTime() {
    return lastEstablishTime_ == null
        ? com.google.protobuf.Timestamp.getDefaultInstance()
        : lastEstablishTime_;
  }
  /**
   *
   *
   * <pre>
   * The time that the current input stream is accepted and the connection is
   * established.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp last_establish_time = 1;</code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getLastEstablishTimeOrBuilder() {
    return lastEstablishTime_ == null
        ? com.google.protobuf.Timestamp.getDefaultInstance()
        : lastEstablishTime_;
  }

  public static final int VIDEO_STREAMS_FIELD_NUMBER = 2;

  @SuppressWarnings("serial")
  private java.util.List<com.google.cloud.video.livestream.v1.VideoStreamProperty> videoStreams_;
  /**
   *
   *
   * <pre>
   * Properties of the video streams.
   * </pre>
   *
   * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.cloud.video.livestream.v1.VideoStreamProperty>
      getVideoStreamsList() {
    return videoStreams_;
  }
  /**
   *
   *
   * <pre>
   * Properties of the video streams.
   * </pre>
   *
   * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.cloud.video.livestream.v1.VideoStreamPropertyOrBuilder>
      getVideoStreamsOrBuilderList() {
    return videoStreams_;
  }
  /**
   *
   *
   * <pre>
   * Properties of the video streams.
   * </pre>
   *
   * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;</code>
   */
  @java.lang.Override
  public int getVideoStreamsCount() {
    return videoStreams_.size();
  }
  /**
   *
   *
   * <pre>
   * Properties of the video streams.
   * </pre>
   *
   * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;</code>
   */
  @java.lang.Override
  public com.google.cloud.video.livestream.v1.VideoStreamProperty getVideoStreams(int index) {
    return videoStreams_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Properties of the video streams.
   * </pre>
   *
   * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;</code>
   */
  @java.lang.Override
  public com.google.cloud.video.livestream.v1.VideoStreamPropertyOrBuilder getVideoStreamsOrBuilder(
      int index) {
    return videoStreams_.get(index);
  }

  public static final int AUDIO_STREAMS_FIELD_NUMBER = 3;

  @SuppressWarnings("serial")
  private java.util.List<com.google.cloud.video.livestream.v1.AudioStreamProperty> audioStreams_;
  /**
   *
   *
   * <pre>
   * Properties of the audio streams.
   * </pre>
   *
   * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.cloud.video.livestream.v1.AudioStreamProperty>
      getAudioStreamsList() {
    return audioStreams_;
  }
  /**
   *
   *
   * <pre>
   * Properties of the audio streams.
   * </pre>
   *
   * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.cloud.video.livestream.v1.AudioStreamPropertyOrBuilder>
      getAudioStreamsOrBuilderList() {
    return audioStreams_;
  }
  /**
   *
   *
   * <pre>
   * Properties of the audio streams.
   * </pre>
   *
   * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;</code>
   */
  @java.lang.Override
  public int getAudioStreamsCount() {
    return audioStreams_.size();
  }
  /**
   *
   *
   * <pre>
   * Properties of the audio streams.
   * </pre>
   *
   * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;</code>
   */
  @java.lang.Override
  public com.google.cloud.video.livestream.v1.AudioStreamProperty getAudioStreams(int index) {
    return audioStreams_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Properties of the audio streams.
   * </pre>
   *
   * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;</code>
   */
  @java.lang.Override
  public com.google.cloud.video.livestream.v1.AudioStreamPropertyOrBuilder getAudioStreamsOrBuilder(
      int index) {
    return audioStreams_.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 (lastEstablishTime_ != null) {
      output.writeMessage(1, getLastEstablishTime());
    }
    for (int i = 0; i < videoStreams_.size(); i++) {
      output.writeMessage(2, videoStreams_.get(i));
    }
    for (int i = 0; i < audioStreams_.size(); i++) {
      output.writeMessage(3, audioStreams_.get(i));
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (lastEstablishTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLastEstablishTime());
    }
    for (int i = 0; i < videoStreams_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, videoStreams_.get(i));
    }
    for (int i = 0; i < audioStreams_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, audioStreams_.get(i));
    }
    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.cloud.video.livestream.v1.InputStreamProperty)) {
      return super.equals(obj);
    }
    com.google.cloud.video.livestream.v1.InputStreamProperty other =
        (com.google.cloud.video.livestream.v1.InputStreamProperty) obj;

    if (hasLastEstablishTime() != other.hasLastEstablishTime()) return false;
    if (hasLastEstablishTime()) {
      if (!getLastEstablishTime().equals(other.getLastEstablishTime())) return false;
    }
    if (!getVideoStreamsList().equals(other.getVideoStreamsList())) return false;
    if (!getAudioStreamsList().equals(other.getAudioStreamsList())) 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();
    if (hasLastEstablishTime()) {
      hash = (37 * hash) + LAST_ESTABLISH_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getLastEstablishTime().hashCode();
    }
    if (getVideoStreamsCount() > 0) {
      hash = (37 * hash) + VIDEO_STREAMS_FIELD_NUMBER;
      hash = (53 * hash) + getVideoStreamsList().hashCode();
    }
    if (getAudioStreamsCount() > 0) {
      hash = (37 * hash) + AUDIO_STREAMS_FIELD_NUMBER;
      hash = (53 * hash) + getAudioStreamsList().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.video.livestream.v1.InputStreamProperty parseFrom(
      java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.video.livestream.v1.InputStreamProperty parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.video.livestream.v1.InputStreamProperty parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.video.livestream.v1.InputStreamProperty 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.cloud.video.livestream.v1.InputStreamProperty parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.video.livestream.v1.InputStreamProperty parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.video.livestream.v1.InputStreamProperty parseFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.video.livestream.v1.InputStreamProperty 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.cloud.video.livestream.v1.InputStreamProperty parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.video.livestream.v1.InputStreamProperty 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.cloud.video.livestream.v1.InputStreamProperty parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.video.livestream.v1.InputStreamProperty 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.cloud.video.livestream.v1.InputStreamProperty 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>
   * Properties of the input stream.
   * </pre>
   *
   * Protobuf type {@code google.cloud.video.livestream.v1.InputStreamProperty}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.video.livestream.v1.InputStreamProperty)
      com.google.cloud.video.livestream.v1.InputStreamPropertyOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.video.livestream.v1.ResourcesProto
          .internal_static_google_cloud_video_livestream_v1_InputStreamProperty_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.video.livestream.v1.ResourcesProto
          .internal_static_google_cloud_video_livestream_v1_InputStreamProperty_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.video.livestream.v1.InputStreamProperty.class,
              com.google.cloud.video.livestream.v1.InputStreamProperty.Builder.class);
    }

    // Construct using com.google.cloud.video.livestream.v1.InputStreamProperty.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      lastEstablishTime_ = null;
      if (lastEstablishTimeBuilder_ != null) {
        lastEstablishTimeBuilder_.dispose();
        lastEstablishTimeBuilder_ = null;
      }
      if (videoStreamsBuilder_ == null) {
        videoStreams_ = java.util.Collections.emptyList();
      } else {
        videoStreams_ = null;
        videoStreamsBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000002);
      if (audioStreamsBuilder_ == null) {
        audioStreams_ = java.util.Collections.emptyList();
      } else {
        audioStreams_ = null;
        audioStreamsBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000004);
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.video.livestream.v1.ResourcesProto
          .internal_static_google_cloud_video_livestream_v1_InputStreamProperty_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.video.livestream.v1.InputStreamProperty getDefaultInstanceForType() {
      return com.google.cloud.video.livestream.v1.InputStreamProperty.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.video.livestream.v1.InputStreamProperty build() {
      com.google.cloud.video.livestream.v1.InputStreamProperty result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.video.livestream.v1.InputStreamProperty buildPartial() {
      com.google.cloud.video.livestream.v1.InputStreamProperty result =
          new com.google.cloud.video.livestream.v1.InputStreamProperty(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(
        com.google.cloud.video.livestream.v1.InputStreamProperty result) {
      if (videoStreamsBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0)) {
          videoStreams_ = java.util.Collections.unmodifiableList(videoStreams_);
          bitField0_ = (bitField0_ & ~0x00000002);
        }
        result.videoStreams_ = videoStreams_;
      } else {
        result.videoStreams_ = videoStreamsBuilder_.build();
      }
      if (audioStreamsBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0)) {
          audioStreams_ = java.util.Collections.unmodifiableList(audioStreams_);
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.audioStreams_ = audioStreams_;
      } else {
        result.audioStreams_ = audioStreamsBuilder_.build();
      }
    }

    private void buildPartial0(com.google.cloud.video.livestream.v1.InputStreamProperty result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.lastEstablishTime_ =
            lastEstablishTimeBuilder_ == null
                ? lastEstablishTime_
                : lastEstablishTimeBuilder_.build();
      }
    }

    @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.cloud.video.livestream.v1.InputStreamProperty) {
        return mergeFrom((com.google.cloud.video.livestream.v1.InputStreamProperty) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.video.livestream.v1.InputStreamProperty other) {
      if (other == com.google.cloud.video.livestream.v1.InputStreamProperty.getDefaultInstance())
        return this;
      if (other.hasLastEstablishTime()) {
        mergeLastEstablishTime(other.getLastEstablishTime());
      }
      if (videoStreamsBuilder_ == null) {
        if (!other.videoStreams_.isEmpty()) {
          if (videoStreams_.isEmpty()) {
            videoStreams_ = other.videoStreams_;
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            ensureVideoStreamsIsMutable();
            videoStreams_.addAll(other.videoStreams_);
          }
          onChanged();
        }
      } else {
        if (!other.videoStreams_.isEmpty()) {
          if (videoStreamsBuilder_.isEmpty()) {
            videoStreamsBuilder_.dispose();
            videoStreamsBuilder_ = null;
            videoStreams_ = other.videoStreams_;
            bitField0_ = (bitField0_ & ~0x00000002);
            videoStreamsBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getVideoStreamsFieldBuilder()
                    : null;
          } else {
            videoStreamsBuilder_.addAllMessages(other.videoStreams_);
          }
        }
      }
      if (audioStreamsBuilder_ == null) {
        if (!other.audioStreams_.isEmpty()) {
          if (audioStreams_.isEmpty()) {
            audioStreams_ = other.audioStreams_;
            bitField0_ = (bitField0_ & ~0x00000004);
          } else {
            ensureAudioStreamsIsMutable();
            audioStreams_.addAll(other.audioStreams_);
          }
          onChanged();
        }
      } else {
        if (!other.audioStreams_.isEmpty()) {
          if (audioStreamsBuilder_.isEmpty()) {
            audioStreamsBuilder_.dispose();
            audioStreamsBuilder_ = null;
            audioStreams_ = other.audioStreams_;
            bitField0_ = (bitField0_ & ~0x00000004);
            audioStreamsBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getAudioStreamsFieldBuilder()
                    : null;
          } else {
            audioStreamsBuilder_.addAllMessages(other.audioStreams_);
          }
        }
      }
      this.mergeUnknownFields(other.getUnknownFields());
      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 {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                input.readMessage(
                    getLastEstablishTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000001;
                break;
              } // case 10
            case 18:
              {
                com.google.cloud.video.livestream.v1.VideoStreamProperty m =
                    input.readMessage(
                        com.google.cloud.video.livestream.v1.VideoStreamProperty.parser(),
                        extensionRegistry);
                if (videoStreamsBuilder_ == null) {
                  ensureVideoStreamsIsMutable();
                  videoStreams_.add(m);
                } else {
                  videoStreamsBuilder_.addMessage(m);
                }
                break;
              } // case 18
            case 26:
              {
                com.google.cloud.video.livestream.v1.AudioStreamProperty m =
                    input.readMessage(
                        com.google.cloud.video.livestream.v1.AudioStreamProperty.parser(),
                        extensionRegistry);
                if (audioStreamsBuilder_ == null) {
                  ensureAudioStreamsIsMutable();
                  audioStreams_.add(m);
                } else {
                  audioStreamsBuilder_.addMessage(m);
                }
                break;
              } // case 26
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private com.google.protobuf.Timestamp lastEstablishTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        lastEstablishTimeBuilder_;
    /**
     *
     *
     * <pre>
     * The time that the current input stream is accepted and the connection is
     * established.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp last_establish_time = 1;</code>
     *
     * @return Whether the lastEstablishTime field is set.
     */
    public boolean hasLastEstablishTime() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     *
     *
     * <pre>
     * The time that the current input stream is accepted and the connection is
     * established.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp last_establish_time = 1;</code>
     *
     * @return The lastEstablishTime.
     */
    public com.google.protobuf.Timestamp getLastEstablishTime() {
      if (lastEstablishTimeBuilder_ == null) {
        return lastEstablishTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : lastEstablishTime_;
      } else {
        return lastEstablishTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The time that the current input stream is accepted and the connection is
     * established.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp last_establish_time = 1;</code>
     */
    public Builder setLastEstablishTime(com.google.protobuf.Timestamp value) {
      if (lastEstablishTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        lastEstablishTime_ = value;
      } else {
        lastEstablishTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time that the current input stream is accepted and the connection is
     * established.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp last_establish_time = 1;</code>
     */
    public Builder setLastEstablishTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (lastEstablishTimeBuilder_ == null) {
        lastEstablishTime_ = builderForValue.build();
      } else {
        lastEstablishTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time that the current input stream is accepted and the connection is
     * established.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp last_establish_time = 1;</code>
     */
    public Builder mergeLastEstablishTime(com.google.protobuf.Timestamp value) {
      if (lastEstablishTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)
            && lastEstablishTime_ != null
            && lastEstablishTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getLastEstablishTimeBuilder().mergeFrom(value);
        } else {
          lastEstablishTime_ = value;
        }
      } else {
        lastEstablishTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time that the current input stream is accepted and the connection is
     * established.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp last_establish_time = 1;</code>
     */
    public Builder clearLastEstablishTime() {
      bitField0_ = (bitField0_ & ~0x00000001);
      lastEstablishTime_ = null;
      if (lastEstablishTimeBuilder_ != null) {
        lastEstablishTimeBuilder_.dispose();
        lastEstablishTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time that the current input stream is accepted and the connection is
     * established.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp last_establish_time = 1;</code>
     */
    public com.google.protobuf.Timestamp.Builder getLastEstablishTimeBuilder() {
      bitField0_ |= 0x00000001;
      onChanged();
      return getLastEstablishTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The time that the current input stream is accepted and the connection is
     * established.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp last_establish_time = 1;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getLastEstablishTimeOrBuilder() {
      if (lastEstablishTimeBuilder_ != null) {
        return lastEstablishTimeBuilder_.getMessageOrBuilder();
      } else {
        return lastEstablishTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : lastEstablishTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * The time that the current input stream is accepted and the connection is
     * established.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp last_establish_time = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getLastEstablishTimeFieldBuilder() {
      if (lastEstablishTimeBuilder_ == null) {
        lastEstablishTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getLastEstablishTime(), getParentForChildren(), isClean());
        lastEstablishTime_ = null;
      }
      return lastEstablishTimeBuilder_;
    }

    private java.util.List<com.google.cloud.video.livestream.v1.VideoStreamProperty> videoStreams_ =
        java.util.Collections.emptyList();

    private void ensureVideoStreamsIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        videoStreams_ =
            new java.util.ArrayList<com.google.cloud.video.livestream.v1.VideoStreamProperty>(
                videoStreams_);
        bitField0_ |= 0x00000002;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.video.livestream.v1.VideoStreamProperty,
            com.google.cloud.video.livestream.v1.VideoStreamProperty.Builder,
            com.google.cloud.video.livestream.v1.VideoStreamPropertyOrBuilder>
        videoStreamsBuilder_;

    /**
     *
     *
     * <pre>
     * Properties of the video streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;
     * </code>
     */
    public java.util.List<com.google.cloud.video.livestream.v1.VideoStreamProperty>
        getVideoStreamsList() {
      if (videoStreamsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(videoStreams_);
      } else {
        return videoStreamsBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Properties of the video streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;
     * </code>
     */
    public int getVideoStreamsCount() {
      if (videoStreamsBuilder_ == null) {
        return videoStreams_.size();
      } else {
        return videoStreamsBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Properties of the video streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;
     * </code>
     */
    public com.google.cloud.video.livestream.v1.VideoStreamProperty getVideoStreams(int index) {
      if (videoStreamsBuilder_ == null) {
        return videoStreams_.get(index);
      } else {
        return videoStreamsBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Properties of the video streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;
     * </code>
     */
    public Builder setVideoStreams(
        int index, com.google.cloud.video.livestream.v1.VideoStreamProperty value) {
      if (videoStreamsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureVideoStreamsIsMutable();
        videoStreams_.set(index, value);
        onChanged();
      } else {
        videoStreamsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Properties of the video streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;
     * </code>
     */
    public Builder setVideoStreams(
        int index,
        com.google.cloud.video.livestream.v1.VideoStreamProperty.Builder builderForValue) {
      if (videoStreamsBuilder_ == null) {
        ensureVideoStreamsIsMutable();
        videoStreams_.set(index, builderForValue.build());
        onChanged();
      } else {
        videoStreamsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Properties of the video streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;
     * </code>
     */
    public Builder addVideoStreams(com.google.cloud.video.livestream.v1.VideoStreamProperty value) {
      if (videoStreamsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureVideoStreamsIsMutable();
        videoStreams_.add(value);
        onChanged();
      } else {
        videoStreamsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Properties of the video streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;
     * </code>
     */
    public Builder addVideoStreams(
        int index, com.google.cloud.video.livestream.v1.VideoStreamProperty value) {
      if (videoStreamsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureVideoStreamsIsMutable();
        videoStreams_.add(index, value);
        onChanged();
      } else {
        videoStreamsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Properties of the video streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;
     * </code>
     */
    public Builder addVideoStreams(
        com.google.cloud.video.livestream.v1.VideoStreamProperty.Builder builderForValue) {
      if (videoStreamsBuilder_ == null) {
        ensureVideoStreamsIsMutable();
        videoStreams_.add(builderForValue.build());
        onChanged();
      } else {
        videoStreamsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Properties of the video streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;
     * </code>
     */
    public Builder addVideoStreams(
        int index,
        com.google.cloud.video.livestream.v1.VideoStreamProperty.Builder builderForValue) {
      if (videoStreamsBuilder_ == null) {
        ensureVideoStreamsIsMutable();
        videoStreams_.add(index, builderForValue.build());
        onChanged();
      } else {
        videoStreamsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Properties of the video streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;
     * </code>
     */
    public Builder addAllVideoStreams(
        java.lang.Iterable<? extends com.google.cloud.video.livestream.v1.VideoStreamProperty>
            values) {
      if (videoStreamsBuilder_ == null) {
        ensureVideoStreamsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, videoStreams_);
        onChanged();
      } else {
        videoStreamsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Properties of the video streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;
     * </code>
     */
    public Builder clearVideoStreams() {
      if (videoStreamsBuilder_ == null) {
        videoStreams_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
      } else {
        videoStreamsBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Properties of the video streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;
     * </code>
     */
    public Builder removeVideoStreams(int index) {
      if (videoStreamsBuilder_ == null) {
        ensureVideoStreamsIsMutable();
        videoStreams_.remove(index);
        onChanged();
      } else {
        videoStreamsBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Properties of the video streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;
     * </code>
     */
    public com.google.cloud.video.livestream.v1.VideoStreamProperty.Builder getVideoStreamsBuilder(
        int index) {
      return getVideoStreamsFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Properties of the video streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;
     * </code>
     */
    public com.google.cloud.video.livestream.v1.VideoStreamPropertyOrBuilder
        getVideoStreamsOrBuilder(int index) {
      if (videoStreamsBuilder_ == null) {
        return videoStreams_.get(index);
      } else {
        return videoStreamsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Properties of the video streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;
     * </code>
     */
    public java.util.List<
            ? extends com.google.cloud.video.livestream.v1.VideoStreamPropertyOrBuilder>
        getVideoStreamsOrBuilderList() {
      if (videoStreamsBuilder_ != null) {
        return videoStreamsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(videoStreams_);
      }
    }
    /**
     *
     *
     * <pre>
     * Properties of the video streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;
     * </code>
     */
    public com.google.cloud.video.livestream.v1.VideoStreamProperty.Builder
        addVideoStreamsBuilder() {
      return getVideoStreamsFieldBuilder()
          .addBuilder(
              com.google.cloud.video.livestream.v1.VideoStreamProperty.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Properties of the video streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;
     * </code>
     */
    public com.google.cloud.video.livestream.v1.VideoStreamProperty.Builder addVideoStreamsBuilder(
        int index) {
      return getVideoStreamsFieldBuilder()
          .addBuilder(
              index, com.google.cloud.video.livestream.v1.VideoStreamProperty.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Properties of the video streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2;
     * </code>
     */
    public java.util.List<com.google.cloud.video.livestream.v1.VideoStreamProperty.Builder>
        getVideoStreamsBuilderList() {
      return getVideoStreamsFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.video.livestream.v1.VideoStreamProperty,
            com.google.cloud.video.livestream.v1.VideoStreamProperty.Builder,
            com.google.cloud.video.livestream.v1.VideoStreamPropertyOrBuilder>
        getVideoStreamsFieldBuilder() {
      if (videoStreamsBuilder_ == null) {
        videoStreamsBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.video.livestream.v1.VideoStreamProperty,
                com.google.cloud.video.livestream.v1.VideoStreamProperty.Builder,
                com.google.cloud.video.livestream.v1.VideoStreamPropertyOrBuilder>(
                videoStreams_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
        videoStreams_ = null;
      }
      return videoStreamsBuilder_;
    }

    private java.util.List<com.google.cloud.video.livestream.v1.AudioStreamProperty> audioStreams_ =
        java.util.Collections.emptyList();

    private void ensureAudioStreamsIsMutable() {
      if (!((bitField0_ & 0x00000004) != 0)) {
        audioStreams_ =
            new java.util.ArrayList<com.google.cloud.video.livestream.v1.AudioStreamProperty>(
                audioStreams_);
        bitField0_ |= 0x00000004;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.video.livestream.v1.AudioStreamProperty,
            com.google.cloud.video.livestream.v1.AudioStreamProperty.Builder,
            com.google.cloud.video.livestream.v1.AudioStreamPropertyOrBuilder>
        audioStreamsBuilder_;

    /**
     *
     *
     * <pre>
     * Properties of the audio streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;
     * </code>
     */
    public java.util.List<com.google.cloud.video.livestream.v1.AudioStreamProperty>
        getAudioStreamsList() {
      if (audioStreamsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(audioStreams_);
      } else {
        return audioStreamsBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Properties of the audio streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;
     * </code>
     */
    public int getAudioStreamsCount() {
      if (audioStreamsBuilder_ == null) {
        return audioStreams_.size();
      } else {
        return audioStreamsBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Properties of the audio streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;
     * </code>
     */
    public com.google.cloud.video.livestream.v1.AudioStreamProperty getAudioStreams(int index) {
      if (audioStreamsBuilder_ == null) {
        return audioStreams_.get(index);
      } else {
        return audioStreamsBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Properties of the audio streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;
     * </code>
     */
    public Builder setAudioStreams(
        int index, com.google.cloud.video.livestream.v1.AudioStreamProperty value) {
      if (audioStreamsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAudioStreamsIsMutable();
        audioStreams_.set(index, value);
        onChanged();
      } else {
        audioStreamsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Properties of the audio streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;
     * </code>
     */
    public Builder setAudioStreams(
        int index,
        com.google.cloud.video.livestream.v1.AudioStreamProperty.Builder builderForValue) {
      if (audioStreamsBuilder_ == null) {
        ensureAudioStreamsIsMutable();
        audioStreams_.set(index, builderForValue.build());
        onChanged();
      } else {
        audioStreamsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Properties of the audio streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;
     * </code>
     */
    public Builder addAudioStreams(com.google.cloud.video.livestream.v1.AudioStreamProperty value) {
      if (audioStreamsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAudioStreamsIsMutable();
        audioStreams_.add(value);
        onChanged();
      } else {
        audioStreamsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Properties of the audio streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;
     * </code>
     */
    public Builder addAudioStreams(
        int index, com.google.cloud.video.livestream.v1.AudioStreamProperty value) {
      if (audioStreamsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAudioStreamsIsMutable();
        audioStreams_.add(index, value);
        onChanged();
      } else {
        audioStreamsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Properties of the audio streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;
     * </code>
     */
    public Builder addAudioStreams(
        com.google.cloud.video.livestream.v1.AudioStreamProperty.Builder builderForValue) {
      if (audioStreamsBuilder_ == null) {
        ensureAudioStreamsIsMutable();
        audioStreams_.add(builderForValue.build());
        onChanged();
      } else {
        audioStreamsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Properties of the audio streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;
     * </code>
     */
    public Builder addAudioStreams(
        int index,
        com.google.cloud.video.livestream.v1.AudioStreamProperty.Builder builderForValue) {
      if (audioStreamsBuilder_ == null) {
        ensureAudioStreamsIsMutable();
        audioStreams_.add(index, builderForValue.build());
        onChanged();
      } else {
        audioStreamsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Properties of the audio streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;
     * </code>
     */
    public Builder addAllAudioStreams(
        java.lang.Iterable<? extends com.google.cloud.video.livestream.v1.AudioStreamProperty>
            values) {
      if (audioStreamsBuilder_ == null) {
        ensureAudioStreamsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, audioStreams_);
        onChanged();
      } else {
        audioStreamsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Properties of the audio streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;
     * </code>
     */
    public Builder clearAudioStreams() {
      if (audioStreamsBuilder_ == null) {
        audioStreams_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
      } else {
        audioStreamsBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Properties of the audio streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;
     * </code>
     */
    public Builder removeAudioStreams(int index) {
      if (audioStreamsBuilder_ == null) {
        ensureAudioStreamsIsMutable();
        audioStreams_.remove(index);
        onChanged();
      } else {
        audioStreamsBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Properties of the audio streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;
     * </code>
     */
    public com.google.cloud.video.livestream.v1.AudioStreamProperty.Builder getAudioStreamsBuilder(
        int index) {
      return getAudioStreamsFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Properties of the audio streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;
     * </code>
     */
    public com.google.cloud.video.livestream.v1.AudioStreamPropertyOrBuilder
        getAudioStreamsOrBuilder(int index) {
      if (audioStreamsBuilder_ == null) {
        return audioStreams_.get(index);
      } else {
        return audioStreamsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Properties of the audio streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;
     * </code>
     */
    public java.util.List<
            ? extends com.google.cloud.video.livestream.v1.AudioStreamPropertyOrBuilder>
        getAudioStreamsOrBuilderList() {
      if (audioStreamsBuilder_ != null) {
        return audioStreamsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(audioStreams_);
      }
    }
    /**
     *
     *
     * <pre>
     * Properties of the audio streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;
     * </code>
     */
    public com.google.cloud.video.livestream.v1.AudioStreamProperty.Builder
        addAudioStreamsBuilder() {
      return getAudioStreamsFieldBuilder()
          .addBuilder(
              com.google.cloud.video.livestream.v1.AudioStreamProperty.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Properties of the audio streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;
     * </code>
     */
    public com.google.cloud.video.livestream.v1.AudioStreamProperty.Builder addAudioStreamsBuilder(
        int index) {
      return getAudioStreamsFieldBuilder()
          .addBuilder(
              index, com.google.cloud.video.livestream.v1.AudioStreamProperty.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Properties of the audio streams.
     * </pre>
     *
     * <code>repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3;
     * </code>
     */
    public java.util.List<com.google.cloud.video.livestream.v1.AudioStreamProperty.Builder>
        getAudioStreamsBuilderList() {
      return getAudioStreamsFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.video.livestream.v1.AudioStreamProperty,
            com.google.cloud.video.livestream.v1.AudioStreamProperty.Builder,
            com.google.cloud.video.livestream.v1.AudioStreamPropertyOrBuilder>
        getAudioStreamsFieldBuilder() {
      if (audioStreamsBuilder_ == null) {
        audioStreamsBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.video.livestream.v1.AudioStreamProperty,
                com.google.cloud.video.livestream.v1.AudioStreamProperty.Builder,
                com.google.cloud.video.livestream.v1.AudioStreamPropertyOrBuilder>(
                audioStreams_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean());
        audioStreams_ = null;
      }
      return audioStreamsBuilder_;
    }

    @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.cloud.video.livestream.v1.InputStreamProperty)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.video.livestream.v1.InputStreamProperty)
  private static final com.google.cloud.video.livestream.v1.InputStreamProperty DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.video.livestream.v1.InputStreamProperty();
  }

  public static com.google.cloud.video.livestream.v1.InputStreamProperty getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<InputStreamProperty> PARSER =
      new com.google.protobuf.AbstractParser<InputStreamProperty>() {
        @java.lang.Override
        public InputStreamProperty parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

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

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

  @java.lang.Override
  public com.google.cloud.video.livestream.v1.InputStreamProperty getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
