/*
 * 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/stitcher/v1/sessions.proto

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

/**
 *
 *
 * <pre>
 * Metadata for a live session.
 * </pre>
 *
 * Protobuf type {@code google.cloud.video.stitcher.v1.LiveSession}
 */
public final class LiveSession extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.video.stitcher.v1.LiveSession)
    LiveSessionOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use LiveSession.newBuilder() to construct.
  private LiveSession(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private LiveSession() {
    name_ = "";
    playUri_ = "";
    sourceUri_ = "";
    defaultAdTagId_ = "";
    defaultSlateId_ = "";
    stitchingPolicy_ = 0;
    streamId_ = "";
  }

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

  @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.stitcher.v1.SessionsProto
        .internal_static_google_cloud_video_stitcher_v1_LiveSession_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(int number) {
    switch (number) {
      case 5:
        return internalGetAdTagMap();
      case 6:
        return internalGetAdTagMacros();
      default:
        throw new RuntimeException("Invalid map field number: " + number);
    }
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.video.stitcher.v1.SessionsProto
        .internal_static_google_cloud_video_stitcher_v1_LiveSession_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.video.stitcher.v1.LiveSession.class,
            com.google.cloud.video.stitcher.v1.LiveSession.Builder.class);
  }

  /**
   *
   *
   * <pre>
   * Defines the stitcher behavior in case an ad does not align exactly with
   * the ad break boundaries. If not specified, the default is COMPLETE_AD.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy}
   */
  public enum StitchingPolicy implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Stitching policy is not specified.
     * </pre>
     *
     * <code>STITCHING_POLICY_UNSPECIFIED = 0;</code>
     */
    STITCHING_POLICY_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * Finishes stitching the current ad before returning to content.
     * </pre>
     *
     * <code>COMPLETE_AD = 1;</code>
     */
    COMPLETE_AD(1),
    /**
     *
     *
     * <pre>
     * Cuts an ad short and returns to content in the middle of the ad.
     * </pre>
     *
     * <code>CUT_CURRENT = 3;</code>
     */
    CUT_CURRENT(3),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Stitching policy is not specified.
     * </pre>
     *
     * <code>STITCHING_POLICY_UNSPECIFIED = 0;</code>
     */
    public static final int STITCHING_POLICY_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * Finishes stitching the current ad before returning to content.
     * </pre>
     *
     * <code>COMPLETE_AD = 1;</code>
     */
    public static final int COMPLETE_AD_VALUE = 1;
    /**
     *
     *
     * <pre>
     * Cuts an ad short and returns to content in the middle of the ad.
     * </pre>
     *
     * <code>CUT_CURRENT = 3;</code>
     */
    public static final int CUT_CURRENT_VALUE = 3;

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

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

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static StitchingPolicy forNumber(int value) {
      switch (value) {
        case 0:
          return STITCHING_POLICY_UNSPECIFIED;
        case 1:
          return COMPLETE_AD;
        case 3:
          return CUT_CURRENT;
        default:
          return null;
      }
    }

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

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

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

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

    public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
      return com.google.cloud.video.stitcher.v1.LiveSession.getDescriptor().getEnumTypes().get(0);
    }

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

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

    private final int value;

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

    // @@protoc_insertion_point(enum_scope:google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy)
  }

  public static final int NAME_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object name_ = "";
  /**
   *
   *
   * <pre>
   * Output only. The name of the live session, in the form of
   * `projects/{project}/locations/{location}/liveSessions/{id}`.
   * </pre>
   *
   * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The name.
   */
  @java.lang.Override
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    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();
      name_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Output only. The name of the live session, in the form of
   * `projects/{project}/locations/{location}/liveSessions/{id}`.
   * </pre>
   *
   * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The bytes for name.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PLAY_URI_FIELD_NUMBER = 2;

  @SuppressWarnings("serial")
  private volatile java.lang.Object playUri_ = "";
  /**
   *
   *
   * <pre>
   * Output only. The URI to play the live session's ad-stitched stream.
   * </pre>
   *
   * <code>string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The playUri.
   */
  @java.lang.Override
  public java.lang.String getPlayUri() {
    java.lang.Object ref = playUri_;
    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();
      playUri_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Output only. The URI to play the live session's ad-stitched stream.
   * </pre>
   *
   * <code>string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The bytes for playUri.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getPlayUriBytes() {
    java.lang.Object ref = playUri_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      playUri_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SOURCE_URI_FIELD_NUMBER = 3;

  @SuppressWarnings("serial")
  private volatile java.lang.Object sourceUri_ = "";
  /**
   *
   *
   * <pre>
   * The URI of the live session's source stream.
   * </pre>
   *
   * <code>string source_uri = 3;</code>
   *
   * @return The sourceUri.
   */
  @java.lang.Override
  public java.lang.String getSourceUri() {
    java.lang.Object ref = sourceUri_;
    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();
      sourceUri_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The URI of the live session's source stream.
   * </pre>
   *
   * <code>string source_uri = 3;</code>
   *
   * @return The bytes for sourceUri.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getSourceUriBytes() {
    java.lang.Object ref = sourceUri_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      sourceUri_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DEFAULT_AD_TAG_ID_FIELD_NUMBER = 4;

  @SuppressWarnings("serial")
  private volatile java.lang.Object defaultAdTagId_ = "";
  /**
   *
   *
   * <pre>
   * The default ad tag to use when no ad tag ids are specified in an ad break's
   * SCTE-35 message.
   * default_ad_tag_id is necessary when `adTagMap` has more than one key. Its
   * value must be present in the `adTagMap`.
   * </pre>
   *
   * <code>string default_ad_tag_id = 4;</code>
   *
   * @return The defaultAdTagId.
   */
  @java.lang.Override
  public java.lang.String getDefaultAdTagId() {
    java.lang.Object ref = defaultAdTagId_;
    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();
      defaultAdTagId_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The default ad tag to use when no ad tag ids are specified in an ad break's
   * SCTE-35 message.
   * default_ad_tag_id is necessary when `adTagMap` has more than one key. Its
   * value must be present in the `adTagMap`.
   * </pre>
   *
   * <code>string default_ad_tag_id = 4;</code>
   *
   * @return The bytes for defaultAdTagId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getDefaultAdTagIdBytes() {
    java.lang.Object ref = defaultAdTagId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      defaultAdTagId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int AD_TAG_MAP_FIELD_NUMBER = 5;

  private static final class AdTagMapDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
            java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
        defaultEntry =
            com.google.protobuf.MapEntry
                .<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>newDefaultInstance(
                    com.google.cloud.video.stitcher.v1.SessionsProto
                        .internal_static_google_cloud_video_stitcher_v1_LiveSession_AdTagMapEntry_descriptor,
                    com.google.protobuf.WireFormat.FieldType.STRING,
                    "",
                    com.google.protobuf.WireFormat.FieldType.MESSAGE,
                    com.google.cloud.video.stitcher.v1.AdTag.getDefaultInstance());
  }

  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
      adTagMap_;

  private com.google.protobuf.MapField<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
      internalGetAdTagMap() {
    if (adTagMap_ == null) {
      return com.google.protobuf.MapField.emptyMapField(AdTagMapDefaultEntryHolder.defaultEntry);
    }
    return adTagMap_;
  }

  public int getAdTagMapCount() {
    return internalGetAdTagMap().getMap().size();
  }
  /**
   *
   *
   * <pre>
   * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
   * each with at least one audio track.
   * </pre>
   *
   * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
   */
  @java.lang.Override
  public boolean containsAdTagMap(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetAdTagMap().getMap().containsKey(key);
  }
  /** Use {@link #getAdTagMapMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag> getAdTagMap() {
    return getAdTagMapMap();
  }
  /**
   *
   *
   * <pre>
   * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
   * each with at least one audio track.
   * </pre>
   *
   * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
      getAdTagMapMap() {
    return internalGetAdTagMap().getMap();
  }
  /**
   *
   *
   * <pre>
   * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
   * each with at least one audio track.
   * </pre>
   *
   * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
   */
  @java.lang.Override
  public /* nullable */ com.google.cloud.video.stitcher.v1.AdTag getAdTagMapOrDefault(
      java.lang.String key,
      /* nullable */
      com.google.cloud.video.stitcher.v1.AdTag defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag> map =
        internalGetAdTagMap().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   * <pre>
   * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
   * each with at least one audio track.
   * </pre>
   *
   * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
   */
  @java.lang.Override
  public com.google.cloud.video.stitcher.v1.AdTag getAdTagMapOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag> map =
        internalGetAdTagMap().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int AD_TAG_MACROS_FIELD_NUMBER = 6;

  private static final class AdTagMacrosDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
        com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
            com.google.cloud.video.stitcher.v1.SessionsProto
                .internal_static_google_cloud_video_stitcher_v1_LiveSession_AdTagMacrosEntry_descriptor,
            com.google.protobuf.WireFormat.FieldType.STRING,
            "",
            com.google.protobuf.WireFormat.FieldType.STRING,
            "");
  }

  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<java.lang.String, java.lang.String> adTagMacros_;

  private com.google.protobuf.MapField<java.lang.String, java.lang.String>
      internalGetAdTagMacros() {
    if (adTagMacros_ == null) {
      return com.google.protobuf.MapField.emptyMapField(AdTagMacrosDefaultEntryHolder.defaultEntry);
    }
    return adTagMacros_;
  }

  public int getAdTagMacrosCount() {
    return internalGetAdTagMacros().getMap().size();
  }
  /**
   *
   *
   * <pre>
   * Key value pairs for ad tag macro replacement. If the
   * specified ad tag URI has macros, this field provides the mapping
   * to the value that will replace the macro in the ad tag URI.
   * Macros are designated by square brackets.
   * For example:
   *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
   *   Ad tag macros: `{"geoId": "123"}`
   *   Fully qualified ad tag:
   *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
   * </pre>
   *
   * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
   */
  @java.lang.Override
  public boolean containsAdTagMacros(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetAdTagMacros().getMap().containsKey(key);
  }
  /** Use {@link #getAdTagMacrosMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getAdTagMacros() {
    return getAdTagMacrosMap();
  }
  /**
   *
   *
   * <pre>
   * Key value pairs for ad tag macro replacement. If the
   * specified ad tag URI has macros, this field provides the mapping
   * to the value that will replace the macro in the ad tag URI.
   * Macros are designated by square brackets.
   * For example:
   *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
   *   Ad tag macros: `{"geoId": "123"}`
   *   Fully qualified ad tag:
   *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
   * </pre>
   *
   * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, java.lang.String> getAdTagMacrosMap() {
    return internalGetAdTagMacros().getMap();
  }
  /**
   *
   *
   * <pre>
   * Key value pairs for ad tag macro replacement. If the
   * specified ad tag URI has macros, this field provides the mapping
   * to the value that will replace the macro in the ad tag URI.
   * Macros are designated by square brackets.
   * For example:
   *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
   *   Ad tag macros: `{"geoId": "123"}`
   *   Fully qualified ad tag:
   *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
   * </pre>
   *
   * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
   */
  @java.lang.Override
  public /* nullable */ java.lang.String getAdTagMacrosOrDefault(
      java.lang.String key,
      /* nullable */
      java.lang.String defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetAdTagMacros().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   * <pre>
   * Key value pairs for ad tag macro replacement. If the
   * specified ad tag URI has macros, this field provides the mapping
   * to the value that will replace the macro in the ad tag URI.
   * Macros are designated by square brackets.
   * For example:
   *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
   *   Ad tag macros: `{"geoId": "123"}`
   *   Fully qualified ad tag:
   *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
   * </pre>
   *
   * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
   */
  @java.lang.Override
  public java.lang.String getAdTagMacrosOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetAdTagMacros().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int CLIENT_AD_TRACKING_FIELD_NUMBER = 7;
  private boolean clientAdTracking_ = false;
  /**
   *
   *
   * <pre>
   * Whether client side ad tracking is enabled. If enabled, the client player
   * is expected to trigger playback and activity events itself. Otherwise,
   * server side ad tracking is enabled and the Video Stitcher API will trigger
   * playback events on behalf of the client player.
   * </pre>
   *
   * <code>bool client_ad_tracking = 7;</code>
   *
   * @return The clientAdTracking.
   */
  @java.lang.Override
  public boolean getClientAdTracking() {
    return clientAdTracking_;
  }

  public static final int DEFAULT_SLATE_ID_FIELD_NUMBER = 8;

  @SuppressWarnings("serial")
  private volatile java.lang.Object defaultSlateId_ = "";
  /**
   *
   *
   * <pre>
   * The default slate to use when no slates are specified in an ad break's
   * SCTE-35 message. When specified, this value must match the ID for a slate
   * that has already been created via the
   * [CreateSlate](projects.locations.slates/create) method.
   * </pre>
   *
   * <code>string default_slate_id = 8;</code>
   *
   * @return The defaultSlateId.
   */
  @java.lang.Override
  public java.lang.String getDefaultSlateId() {
    java.lang.Object ref = defaultSlateId_;
    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();
      defaultSlateId_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The default slate to use when no slates are specified in an ad break's
   * SCTE-35 message. When specified, this value must match the ID for a slate
   * that has already been created via the
   * [CreateSlate](projects.locations.slates/create) method.
   * </pre>
   *
   * <code>string default_slate_id = 8;</code>
   *
   * @return The bytes for defaultSlateId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getDefaultSlateIdBytes() {
    java.lang.Object ref = defaultSlateId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      defaultSlateId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int STITCHING_POLICY_FIELD_NUMBER = 9;
  private int stitchingPolicy_ = 0;
  /**
   *
   *
   * <pre>
   * Defines the stitcher behavior in case an ad does not align exactly with
   * the ad break boundaries. If not specified, the default is `COMPLETE_AD`.
   * </pre>
   *
   * <code>.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy stitching_policy = 9;</code>
   *
   * @return The enum numeric value on the wire for stitchingPolicy.
   */
  @java.lang.Override
  public int getStitchingPolicyValue() {
    return stitchingPolicy_;
  }
  /**
   *
   *
   * <pre>
   * Defines the stitcher behavior in case an ad does not align exactly with
   * the ad break boundaries. If not specified, the default is `COMPLETE_AD`.
   * </pre>
   *
   * <code>.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy stitching_policy = 9;</code>
   *
   * @return The stitchingPolicy.
   */
  @java.lang.Override
  public com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy getStitchingPolicy() {
    com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy result =
        com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy.forNumber(stitchingPolicy_);
    return result == null
        ? com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy.UNRECOGNIZED
        : result;
  }

  public static final int MANIFEST_OPTIONS_FIELD_NUMBER = 10;
  private com.google.cloud.video.stitcher.v1.ManifestOptions manifestOptions_;
  /**
   *
   *
   * <pre>
   * Additional options that affect the output of the manifest.
   * </pre>
   *
   * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
   *
   * @return Whether the manifestOptions field is set.
   */
  @java.lang.Override
  public boolean hasManifestOptions() {
    return manifestOptions_ != null;
  }
  /**
   *
   *
   * <pre>
   * Additional options that affect the output of the manifest.
   * </pre>
   *
   * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
   *
   * @return The manifestOptions.
   */
  @java.lang.Override
  public com.google.cloud.video.stitcher.v1.ManifestOptions getManifestOptions() {
    return manifestOptions_ == null
        ? com.google.cloud.video.stitcher.v1.ManifestOptions.getDefaultInstance()
        : manifestOptions_;
  }
  /**
   *
   *
   * <pre>
   * Additional options that affect the output of the manifest.
   * </pre>
   *
   * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
   */
  @java.lang.Override
  public com.google.cloud.video.stitcher.v1.ManifestOptionsOrBuilder getManifestOptionsOrBuilder() {
    return manifestOptions_ == null
        ? com.google.cloud.video.stitcher.v1.ManifestOptions.getDefaultInstance()
        : manifestOptions_;
  }

  public static final int STREAM_ID_FIELD_NUMBER = 11;

  @SuppressWarnings("serial")
  private volatile java.lang.Object streamId_ = "";
  /**
   *
   *
   * <pre>
   * Output only. The generated ID of the LiveSession's source stream.
   * </pre>
   *
   * <code>string stream_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The streamId.
   */
  @java.lang.Override
  public java.lang.String getStreamId() {
    java.lang.Object ref = streamId_;
    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();
      streamId_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Output only. The generated ID of the LiveSession's source stream.
   * </pre>
   *
   * <code>string stream_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The bytes for streamId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getStreamIdBytes() {
    java.lang.Object ref = streamId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      streamId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(playUri_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, playUri_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceUri_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceUri_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultAdTagId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, defaultAdTagId_);
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetAdTagMap(), AdTagMapDefaultEntryHolder.defaultEntry, 5);
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetAdTagMacros(), AdTagMacrosDefaultEntryHolder.defaultEntry, 6);
    if (clientAdTracking_ != false) {
      output.writeBool(7, clientAdTracking_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultSlateId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, defaultSlateId_);
    }
    if (stitchingPolicy_
        != com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy
            .STITCHING_POLICY_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(9, stitchingPolicy_);
    }
    if (manifestOptions_ != null) {
      output.writeMessage(10, getManifestOptions());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(streamId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, streamId_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(playUri_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, playUri_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceUri_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceUri_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultAdTagId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, defaultAdTagId_);
    }
    for (java.util.Map.Entry<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag> entry :
        internalGetAdTagMap().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
          adTagMap__ =
              AdTagMapDefaultEntryHolder.defaultEntry
                  .newBuilderForType()
                  .setKey(entry.getKey())
                  .setValue(entry.getValue())
                  .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, adTagMap__);
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetAdTagMacros().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String> adTagMacros__ =
          AdTagMacrosDefaultEntryHolder.defaultEntry
              .newBuilderForType()
              .setKey(entry.getKey())
              .setValue(entry.getValue())
              .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, adTagMacros__);
    }
    if (clientAdTracking_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, clientAdTracking_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultSlateId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, defaultSlateId_);
    }
    if (stitchingPolicy_
        != com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy
            .STITCHING_POLICY_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, stitchingPolicy_);
    }
    if (manifestOptions_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getManifestOptions());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(streamId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, streamId_);
    }
    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.stitcher.v1.LiveSession)) {
      return super.equals(obj);
    }
    com.google.cloud.video.stitcher.v1.LiveSession other =
        (com.google.cloud.video.stitcher.v1.LiveSession) obj;

    if (!getName().equals(other.getName())) return false;
    if (!getPlayUri().equals(other.getPlayUri())) return false;
    if (!getSourceUri().equals(other.getSourceUri())) return false;
    if (!getDefaultAdTagId().equals(other.getDefaultAdTagId())) return false;
    if (!internalGetAdTagMap().equals(other.internalGetAdTagMap())) return false;
    if (!internalGetAdTagMacros().equals(other.internalGetAdTagMacros())) return false;
    if (getClientAdTracking() != other.getClientAdTracking()) return false;
    if (!getDefaultSlateId().equals(other.getDefaultSlateId())) return false;
    if (stitchingPolicy_ != other.stitchingPolicy_) return false;
    if (hasManifestOptions() != other.hasManifestOptions()) return false;
    if (hasManifestOptions()) {
      if (!getManifestOptions().equals(other.getManifestOptions())) return false;
    }
    if (!getStreamId().equals(other.getStreamId())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + PLAY_URI_FIELD_NUMBER;
    hash = (53 * hash) + getPlayUri().hashCode();
    hash = (37 * hash) + SOURCE_URI_FIELD_NUMBER;
    hash = (53 * hash) + getSourceUri().hashCode();
    hash = (37 * hash) + DEFAULT_AD_TAG_ID_FIELD_NUMBER;
    hash = (53 * hash) + getDefaultAdTagId().hashCode();
    if (!internalGetAdTagMap().getMap().isEmpty()) {
      hash = (37 * hash) + AD_TAG_MAP_FIELD_NUMBER;
      hash = (53 * hash) + internalGetAdTagMap().hashCode();
    }
    if (!internalGetAdTagMacros().getMap().isEmpty()) {
      hash = (37 * hash) + AD_TAG_MACROS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetAdTagMacros().hashCode();
    }
    hash = (37 * hash) + CLIENT_AD_TRACKING_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getClientAdTracking());
    hash = (37 * hash) + DEFAULT_SLATE_ID_FIELD_NUMBER;
    hash = (53 * hash) + getDefaultSlateId().hashCode();
    hash = (37 * hash) + STITCHING_POLICY_FIELD_NUMBER;
    hash = (53 * hash) + stitchingPolicy_;
    if (hasManifestOptions()) {
      hash = (37 * hash) + MANIFEST_OPTIONS_FIELD_NUMBER;
      hash = (53 * hash) + getManifestOptions().hashCode();
    }
    hash = (37 * hash) + STREAM_ID_FIELD_NUMBER;
    hash = (53 * hash) + getStreamId().hashCode();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public static com.google.cloud.video.stitcher.v1.LiveSession 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.stitcher.v1.LiveSession parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

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

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

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

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

  public static com.google.cloud.video.stitcher.v1.LiveSession 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.stitcher.v1.LiveSession 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>
   * Metadata for a live session.
   * </pre>
   *
   * Protobuf type {@code google.cloud.video.stitcher.v1.LiveSession}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.video.stitcher.v1.LiveSession)
      com.google.cloud.video.stitcher.v1.LiveSessionOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.video.stitcher.v1.SessionsProto
          .internal_static_google_cloud_video_stitcher_v1_LiveSession_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(int number) {
      switch (number) {
        case 5:
          return internalGetAdTagMap();
        case 6:
          return internalGetAdTagMacros();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
      switch (number) {
        case 5:
          return internalGetMutableAdTagMap();
        case 6:
          return internalGetMutableAdTagMacros();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.video.stitcher.v1.SessionsProto
          .internal_static_google_cloud_video_stitcher_v1_LiveSession_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.video.stitcher.v1.LiveSession.class,
              com.google.cloud.video.stitcher.v1.LiveSession.Builder.class);
    }

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

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      name_ = "";
      playUri_ = "";
      sourceUri_ = "";
      defaultAdTagId_ = "";
      internalGetMutableAdTagMap().clear();
      internalGetMutableAdTagMacros().clear();
      clientAdTracking_ = false;
      defaultSlateId_ = "";
      stitchingPolicy_ = 0;
      manifestOptions_ = null;
      if (manifestOptionsBuilder_ != null) {
        manifestOptionsBuilder_.dispose();
        manifestOptionsBuilder_ = null;
      }
      streamId_ = "";
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.video.stitcher.v1.SessionsProto
          .internal_static_google_cloud_video_stitcher_v1_LiveSession_descriptor;
    }

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

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

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

    private void buildPartial0(com.google.cloud.video.stitcher.v1.LiveSession result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.name_ = name_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.playUri_ = playUri_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.sourceUri_ = sourceUri_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.defaultAdTagId_ = defaultAdTagId_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.adTagMap_ = internalGetAdTagMap();
        result.adTagMap_.makeImmutable();
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.adTagMacros_ = internalGetAdTagMacros();
        result.adTagMacros_.makeImmutable();
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.clientAdTracking_ = clientAdTracking_;
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.defaultSlateId_ = defaultSlateId_;
      }
      if (((from_bitField0_ & 0x00000100) != 0)) {
        result.stitchingPolicy_ = stitchingPolicy_;
      }
      if (((from_bitField0_ & 0x00000200) != 0)) {
        result.manifestOptions_ =
            manifestOptionsBuilder_ == null ? manifestOptions_ : manifestOptionsBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000400) != 0)) {
        result.streamId_ = streamId_;
      }
    }

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

    public Builder mergeFrom(com.google.cloud.video.stitcher.v1.LiveSession other) {
      if (other == com.google.cloud.video.stitcher.v1.LiveSession.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (!other.getPlayUri().isEmpty()) {
        playUri_ = other.playUri_;
        bitField0_ |= 0x00000002;
        onChanged();
      }
      if (!other.getSourceUri().isEmpty()) {
        sourceUri_ = other.sourceUri_;
        bitField0_ |= 0x00000004;
        onChanged();
      }
      if (!other.getDefaultAdTagId().isEmpty()) {
        defaultAdTagId_ = other.defaultAdTagId_;
        bitField0_ |= 0x00000008;
        onChanged();
      }
      internalGetMutableAdTagMap().mergeFrom(other.internalGetAdTagMap());
      bitField0_ |= 0x00000010;
      internalGetMutableAdTagMacros().mergeFrom(other.internalGetAdTagMacros());
      bitField0_ |= 0x00000020;
      if (other.getClientAdTracking() != false) {
        setClientAdTracking(other.getClientAdTracking());
      }
      if (!other.getDefaultSlateId().isEmpty()) {
        defaultSlateId_ = other.defaultSlateId_;
        bitField0_ |= 0x00000080;
        onChanged();
      }
      if (other.stitchingPolicy_ != 0) {
        setStitchingPolicyValue(other.getStitchingPolicyValue());
      }
      if (other.hasManifestOptions()) {
        mergeManifestOptions(other.getManifestOptions());
      }
      if (!other.getStreamId().isEmpty()) {
        streamId_ = other.streamId_;
        bitField0_ |= 0x00000400;
        onChanged();
      }
      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:
              {
                name_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 10
            case 18:
              {
                playUri_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000002;
                break;
              } // case 18
            case 26:
              {
                sourceUri_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000004;
                break;
              } // case 26
            case 34:
              {
                defaultAdTagId_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000008;
                break;
              } // case 34
            case 42:
              {
                com.google.protobuf.MapEntry<
                        java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
                    adTagMap__ =
                        input.readMessage(
                            AdTagMapDefaultEntryHolder.defaultEntry.getParserForType(),
                            extensionRegistry);
                internalGetMutableAdTagMap()
                    .getMutableMap()
                    .put(adTagMap__.getKey(), adTagMap__.getValue());
                bitField0_ |= 0x00000010;
                break;
              } // case 42
            case 50:
              {
                com.google.protobuf.MapEntry<java.lang.String, java.lang.String> adTagMacros__ =
                    input.readMessage(
                        AdTagMacrosDefaultEntryHolder.defaultEntry.getParserForType(),
                        extensionRegistry);
                internalGetMutableAdTagMacros()
                    .getMutableMap()
                    .put(adTagMacros__.getKey(), adTagMacros__.getValue());
                bitField0_ |= 0x00000020;
                break;
              } // case 50
            case 56:
              {
                clientAdTracking_ = input.readBool();
                bitField0_ |= 0x00000040;
                break;
              } // case 56
            case 66:
              {
                defaultSlateId_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000080;
                break;
              } // case 66
            case 72:
              {
                stitchingPolicy_ = input.readEnum();
                bitField0_ |= 0x00000100;
                break;
              } // case 72
            case 82:
              {
                input.readMessage(getManifestOptionsFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000200;
                break;
              } // case 82
            case 90:
              {
                streamId_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000400;
                break;
              } // case 90
            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 java.lang.Object name_ = "";
    /**
     *
     *
     * <pre>
     * Output only. The name of the live session, in the form of
     * `projects/{project}/locations/{location}/liveSessions/{id}`.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The name.
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The name of the live session, in the form of
     * `projects/{project}/locations/{location}/liveSessions/{id}`.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The bytes for name.
     */
    public com.google.protobuf.ByteString getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The name of the live session, in the form of
     * `projects/{project}/locations/{location}/liveSessions/{id}`.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      name_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The name of the live session, in the form of
     * `projects/{project}/locations/{location}/liveSessions/{id}`.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {
      name_ = getDefaultInstance().getName();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The name of the live session, in the form of
     * `projects/{project}/locations/{location}/liveSessions/{id}`.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      name_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private java.lang.Object playUri_ = "";
    /**
     *
     *
     * <pre>
     * Output only. The URI to play the live session's ad-stitched stream.
     * </pre>
     *
     * <code>string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The playUri.
     */
    public java.lang.String getPlayUri() {
      java.lang.Object ref = playUri_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        playUri_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The URI to play the live session's ad-stitched stream.
     * </pre>
     *
     * <code>string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The bytes for playUri.
     */
    public com.google.protobuf.ByteString getPlayUriBytes() {
      java.lang.Object ref = playUri_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        playUri_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The URI to play the live session's ad-stitched stream.
     * </pre>
     *
     * <code>string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The playUri to set.
     * @return This builder for chaining.
     */
    public Builder setPlayUri(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      playUri_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The URI to play the live session's ad-stitched stream.
     * </pre>
     *
     * <code>string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearPlayUri() {
      playUri_ = getDefaultInstance().getPlayUri();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The URI to play the live session's ad-stitched stream.
     * </pre>
     *
     * <code>string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The bytes for playUri to set.
     * @return This builder for chaining.
     */
    public Builder setPlayUriBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      playUri_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }

    private java.lang.Object sourceUri_ = "";
    /**
     *
     *
     * <pre>
     * The URI of the live session's source stream.
     * </pre>
     *
     * <code>string source_uri = 3;</code>
     *
     * @return The sourceUri.
     */
    public java.lang.String getSourceUri() {
      java.lang.Object ref = sourceUri_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        sourceUri_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The URI of the live session's source stream.
     * </pre>
     *
     * <code>string source_uri = 3;</code>
     *
     * @return The bytes for sourceUri.
     */
    public com.google.protobuf.ByteString getSourceUriBytes() {
      java.lang.Object ref = sourceUri_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        sourceUri_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The URI of the live session's source stream.
     * </pre>
     *
     * <code>string source_uri = 3;</code>
     *
     * @param value The sourceUri to set.
     * @return This builder for chaining.
     */
    public Builder setSourceUri(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      sourceUri_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The URI of the live session's source stream.
     * </pre>
     *
     * <code>string source_uri = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearSourceUri() {
      sourceUri_ = getDefaultInstance().getSourceUri();
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The URI of the live session's source stream.
     * </pre>
     *
     * <code>string source_uri = 3;</code>
     *
     * @param value The bytes for sourceUri to set.
     * @return This builder for chaining.
     */
    public Builder setSourceUriBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      sourceUri_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    private java.lang.Object defaultAdTagId_ = "";
    /**
     *
     *
     * <pre>
     * The default ad tag to use when no ad tag ids are specified in an ad break's
     * SCTE-35 message.
     * default_ad_tag_id is necessary when `adTagMap` has more than one key. Its
     * value must be present in the `adTagMap`.
     * </pre>
     *
     * <code>string default_ad_tag_id = 4;</code>
     *
     * @return The defaultAdTagId.
     */
    public java.lang.String getDefaultAdTagId() {
      java.lang.Object ref = defaultAdTagId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        defaultAdTagId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The default ad tag to use when no ad tag ids are specified in an ad break's
     * SCTE-35 message.
     * default_ad_tag_id is necessary when `adTagMap` has more than one key. Its
     * value must be present in the `adTagMap`.
     * </pre>
     *
     * <code>string default_ad_tag_id = 4;</code>
     *
     * @return The bytes for defaultAdTagId.
     */
    public com.google.protobuf.ByteString getDefaultAdTagIdBytes() {
      java.lang.Object ref = defaultAdTagId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        defaultAdTagId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The default ad tag to use when no ad tag ids are specified in an ad break's
     * SCTE-35 message.
     * default_ad_tag_id is necessary when `adTagMap` has more than one key. Its
     * value must be present in the `adTagMap`.
     * </pre>
     *
     * <code>string default_ad_tag_id = 4;</code>
     *
     * @param value The defaultAdTagId to set.
     * @return This builder for chaining.
     */
    public Builder setDefaultAdTagId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      defaultAdTagId_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The default ad tag to use when no ad tag ids are specified in an ad break's
     * SCTE-35 message.
     * default_ad_tag_id is necessary when `adTagMap` has more than one key. Its
     * value must be present in the `adTagMap`.
     * </pre>
     *
     * <code>string default_ad_tag_id = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDefaultAdTagId() {
      defaultAdTagId_ = getDefaultInstance().getDefaultAdTagId();
      bitField0_ = (bitField0_ & ~0x00000008);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The default ad tag to use when no ad tag ids are specified in an ad break's
     * SCTE-35 message.
     * default_ad_tag_id is necessary when `adTagMap` has more than one key. Its
     * value must be present in the `adTagMap`.
     * </pre>
     *
     * <code>string default_ad_tag_id = 4;</code>
     *
     * @param value The bytes for defaultAdTagId to set.
     * @return This builder for chaining.
     */
    public Builder setDefaultAdTagIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      defaultAdTagId_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }

    private com.google.protobuf.MapField<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
        adTagMap_;

    private com.google.protobuf.MapField<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
        internalGetAdTagMap() {
      if (adTagMap_ == null) {
        return com.google.protobuf.MapField.emptyMapField(AdTagMapDefaultEntryHolder.defaultEntry);
      }
      return adTagMap_;
    }

    private com.google.protobuf.MapField<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
        internalGetMutableAdTagMap() {
      if (adTagMap_ == null) {
        adTagMap_ =
            com.google.protobuf.MapField.newMapField(AdTagMapDefaultEntryHolder.defaultEntry);
      }
      if (!adTagMap_.isMutable()) {
        adTagMap_ = adTagMap_.copy();
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return adTagMap_;
    }

    public int getAdTagMapCount() {
      return internalGetAdTagMap().getMap().size();
    }
    /**
     *
     *
     * <pre>
     * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
     * each with at least one audio track.
     * </pre>
     *
     * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
     */
    @java.lang.Override
    public boolean containsAdTagMap(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetAdTagMap().getMap().containsKey(key);
    }
    /** Use {@link #getAdTagMapMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag> getAdTagMap() {
      return getAdTagMapMap();
    }
    /**
     *
     *
     * <pre>
     * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
     * each with at least one audio track.
     * </pre>
     *
     * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
        getAdTagMapMap() {
      return internalGetAdTagMap().getMap();
    }
    /**
     *
     *
     * <pre>
     * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
     * each with at least one audio track.
     * </pre>
     *
     * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
     */
    @java.lang.Override
    public /* nullable */ com.google.cloud.video.stitcher.v1.AdTag getAdTagMapOrDefault(
        java.lang.String key,
        /* nullable */
        com.google.cloud.video.stitcher.v1.AdTag defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag> map =
          internalGetAdTagMap().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     * <pre>
     * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
     * each with at least one audio track.
     * </pre>
     *
     * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
     */
    @java.lang.Override
    public com.google.cloud.video.stitcher.v1.AdTag getAdTagMapOrThrow(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag> map =
          internalGetAdTagMap().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearAdTagMap() {
      bitField0_ = (bitField0_ & ~0x00000010);
      internalGetMutableAdTagMap().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
     * each with at least one audio track.
     * </pre>
     *
     * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
     */
    public Builder removeAdTagMap(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableAdTagMap().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
        getMutableAdTagMap() {
      bitField0_ |= 0x00000010;
      return internalGetMutableAdTagMap().getMutableMap();
    }
    /**
     *
     *
     * <pre>
     * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
     * each with at least one audio track.
     * </pre>
     *
     * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
     */
    public Builder putAdTagMap(
        java.lang.String key, com.google.cloud.video.stitcher.v1.AdTag value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }
      internalGetMutableAdTagMap().getMutableMap().put(key, value);
      bitField0_ |= 0x00000010;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
     * each with at least one audio track.
     * </pre>
     *
     * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
     */
    public Builder putAllAdTagMap(
        java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag> values) {
      internalGetMutableAdTagMap().getMutableMap().putAll(values);
      bitField0_ |= 0x00000010;
      return this;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> adTagMacros_;

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetAdTagMacros() {
      if (adTagMacros_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            AdTagMacrosDefaultEntryHolder.defaultEntry);
      }
      return adTagMacros_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetMutableAdTagMacros() {
      if (adTagMacros_ == null) {
        adTagMacros_ =
            com.google.protobuf.MapField.newMapField(AdTagMacrosDefaultEntryHolder.defaultEntry);
      }
      if (!adTagMacros_.isMutable()) {
        adTagMacros_ = adTagMacros_.copy();
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return adTagMacros_;
    }

    public int getAdTagMacrosCount() {
      return internalGetAdTagMacros().getMap().size();
    }
    /**
     *
     *
     * <pre>
     * Key value pairs for ad tag macro replacement. If the
     * specified ad tag URI has macros, this field provides the mapping
     * to the value that will replace the macro in the ad tag URI.
     * Macros are designated by square brackets.
     * For example:
     *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
     *   Ad tag macros: `{"geoId": "123"}`
     *   Fully qualified ad tag:
     *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
     * </pre>
     *
     * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
     */
    @java.lang.Override
    public boolean containsAdTagMacros(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetAdTagMacros().getMap().containsKey(key);
    }
    /** Use {@link #getAdTagMacrosMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getAdTagMacros() {
      return getAdTagMacrosMap();
    }
    /**
     *
     *
     * <pre>
     * Key value pairs for ad tag macro replacement. If the
     * specified ad tag URI has macros, this field provides the mapping
     * to the value that will replace the macro in the ad tag URI.
     * Macros are designated by square brackets.
     * For example:
     *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
     *   Ad tag macros: `{"geoId": "123"}`
     *   Fully qualified ad tag:
     *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
     * </pre>
     *
     * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, java.lang.String> getAdTagMacrosMap() {
      return internalGetAdTagMacros().getMap();
    }
    /**
     *
     *
     * <pre>
     * Key value pairs for ad tag macro replacement. If the
     * specified ad tag URI has macros, this field provides the mapping
     * to the value that will replace the macro in the ad tag URI.
     * Macros are designated by square brackets.
     * For example:
     *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
     *   Ad tag macros: `{"geoId": "123"}`
     *   Fully qualified ad tag:
     *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
     * </pre>
     *
     * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
     */
    @java.lang.Override
    public /* nullable */ java.lang.String getAdTagMacrosOrDefault(
        java.lang.String key,
        /* nullable */
        java.lang.String defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetAdTagMacros().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     * <pre>
     * Key value pairs for ad tag macro replacement. If the
     * specified ad tag URI has macros, this field provides the mapping
     * to the value that will replace the macro in the ad tag URI.
     * Macros are designated by square brackets.
     * For example:
     *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
     *   Ad tag macros: `{"geoId": "123"}`
     *   Fully qualified ad tag:
     *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
     * </pre>
     *
     * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
     */
    @java.lang.Override
    public java.lang.String getAdTagMacrosOrThrow(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetAdTagMacros().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearAdTagMacros() {
      bitField0_ = (bitField0_ & ~0x00000020);
      internalGetMutableAdTagMacros().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Key value pairs for ad tag macro replacement. If the
     * specified ad tag URI has macros, this field provides the mapping
     * to the value that will replace the macro in the ad tag URI.
     * Macros are designated by square brackets.
     * For example:
     *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
     *   Ad tag macros: `{"geoId": "123"}`
     *   Fully qualified ad tag:
     *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
     * </pre>
     *
     * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
     */
    public Builder removeAdTagMacros(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableAdTagMacros().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getMutableAdTagMacros() {
      bitField0_ |= 0x00000020;
      return internalGetMutableAdTagMacros().getMutableMap();
    }
    /**
     *
     *
     * <pre>
     * Key value pairs for ad tag macro replacement. If the
     * specified ad tag URI has macros, this field provides the mapping
     * to the value that will replace the macro in the ad tag URI.
     * Macros are designated by square brackets.
     * For example:
     *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
     *   Ad tag macros: `{"geoId": "123"}`
     *   Fully qualified ad tag:
     *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
     * </pre>
     *
     * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
     */
    public Builder putAdTagMacros(java.lang.String key, java.lang.String value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }
      internalGetMutableAdTagMacros().getMutableMap().put(key, value);
      bitField0_ |= 0x00000020;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Key value pairs for ad tag macro replacement. If the
     * specified ad tag URI has macros, this field provides the mapping
     * to the value that will replace the macro in the ad tag URI.
     * Macros are designated by square brackets.
     * For example:
     *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
     *   Ad tag macros: `{"geoId": "123"}`
     *   Fully qualified ad tag:
     *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
     * </pre>
     *
     * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
     */
    public Builder putAllAdTagMacros(java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutableAdTagMacros().getMutableMap().putAll(values);
      bitField0_ |= 0x00000020;
      return this;
    }

    private boolean clientAdTracking_;
    /**
     *
     *
     * <pre>
     * Whether client side ad tracking is enabled. If enabled, the client player
     * is expected to trigger playback and activity events itself. Otherwise,
     * server side ad tracking is enabled and the Video Stitcher API will trigger
     * playback events on behalf of the client player.
     * </pre>
     *
     * <code>bool client_ad_tracking = 7;</code>
     *
     * @return The clientAdTracking.
     */
    @java.lang.Override
    public boolean getClientAdTracking() {
      return clientAdTracking_;
    }
    /**
     *
     *
     * <pre>
     * Whether client side ad tracking is enabled. If enabled, the client player
     * is expected to trigger playback and activity events itself. Otherwise,
     * server side ad tracking is enabled and the Video Stitcher API will trigger
     * playback events on behalf of the client player.
     * </pre>
     *
     * <code>bool client_ad_tracking = 7;</code>
     *
     * @param value The clientAdTracking to set.
     * @return This builder for chaining.
     */
    public Builder setClientAdTracking(boolean value) {

      clientAdTracking_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Whether client side ad tracking is enabled. If enabled, the client player
     * is expected to trigger playback and activity events itself. Otherwise,
     * server side ad tracking is enabled and the Video Stitcher API will trigger
     * playback events on behalf of the client player.
     * </pre>
     *
     * <code>bool client_ad_tracking = 7;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearClientAdTracking() {
      bitField0_ = (bitField0_ & ~0x00000040);
      clientAdTracking_ = false;
      onChanged();
      return this;
    }

    private java.lang.Object defaultSlateId_ = "";
    /**
     *
     *
     * <pre>
     * The default slate to use when no slates are specified in an ad break's
     * SCTE-35 message. When specified, this value must match the ID for a slate
     * that has already been created via the
     * [CreateSlate](projects.locations.slates/create) method.
     * </pre>
     *
     * <code>string default_slate_id = 8;</code>
     *
     * @return The defaultSlateId.
     */
    public java.lang.String getDefaultSlateId() {
      java.lang.Object ref = defaultSlateId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        defaultSlateId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The default slate to use when no slates are specified in an ad break's
     * SCTE-35 message. When specified, this value must match the ID for a slate
     * that has already been created via the
     * [CreateSlate](projects.locations.slates/create) method.
     * </pre>
     *
     * <code>string default_slate_id = 8;</code>
     *
     * @return The bytes for defaultSlateId.
     */
    public com.google.protobuf.ByteString getDefaultSlateIdBytes() {
      java.lang.Object ref = defaultSlateId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        defaultSlateId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The default slate to use when no slates are specified in an ad break's
     * SCTE-35 message. When specified, this value must match the ID for a slate
     * that has already been created via the
     * [CreateSlate](projects.locations.slates/create) method.
     * </pre>
     *
     * <code>string default_slate_id = 8;</code>
     *
     * @param value The defaultSlateId to set.
     * @return This builder for chaining.
     */
    public Builder setDefaultSlateId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      defaultSlateId_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The default slate to use when no slates are specified in an ad break's
     * SCTE-35 message. When specified, this value must match the ID for a slate
     * that has already been created via the
     * [CreateSlate](projects.locations.slates/create) method.
     * </pre>
     *
     * <code>string default_slate_id = 8;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDefaultSlateId() {
      defaultSlateId_ = getDefaultInstance().getDefaultSlateId();
      bitField0_ = (bitField0_ & ~0x00000080);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The default slate to use when no slates are specified in an ad break's
     * SCTE-35 message. When specified, this value must match the ID for a slate
     * that has already been created via the
     * [CreateSlate](projects.locations.slates/create) method.
     * </pre>
     *
     * <code>string default_slate_id = 8;</code>
     *
     * @param value The bytes for defaultSlateId to set.
     * @return This builder for chaining.
     */
    public Builder setDefaultSlateIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      defaultSlateId_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }

    private int stitchingPolicy_ = 0;
    /**
     *
     *
     * <pre>
     * Defines the stitcher behavior in case an ad does not align exactly with
     * the ad break boundaries. If not specified, the default is `COMPLETE_AD`.
     * </pre>
     *
     * <code>.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy stitching_policy = 9;
     * </code>
     *
     * @return The enum numeric value on the wire for stitchingPolicy.
     */
    @java.lang.Override
    public int getStitchingPolicyValue() {
      return stitchingPolicy_;
    }
    /**
     *
     *
     * <pre>
     * Defines the stitcher behavior in case an ad does not align exactly with
     * the ad break boundaries. If not specified, the default is `COMPLETE_AD`.
     * </pre>
     *
     * <code>.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy stitching_policy = 9;
     * </code>
     *
     * @param value The enum numeric value on the wire for stitchingPolicy to set.
     * @return This builder for chaining.
     */
    public Builder setStitchingPolicyValue(int value) {
      stitchingPolicy_ = value;
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Defines the stitcher behavior in case an ad does not align exactly with
     * the ad break boundaries. If not specified, the default is `COMPLETE_AD`.
     * </pre>
     *
     * <code>.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy stitching_policy = 9;
     * </code>
     *
     * @return The stitchingPolicy.
     */
    @java.lang.Override
    public com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy getStitchingPolicy() {
      com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy result =
          com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy.forNumber(
              stitchingPolicy_);
      return result == null
          ? com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * Defines the stitcher behavior in case an ad does not align exactly with
     * the ad break boundaries. If not specified, the default is `COMPLETE_AD`.
     * </pre>
     *
     * <code>.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy stitching_policy = 9;
     * </code>
     *
     * @param value The stitchingPolicy to set.
     * @return This builder for chaining.
     */
    public Builder setStitchingPolicy(
        com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000100;
      stitchingPolicy_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Defines the stitcher behavior in case an ad does not align exactly with
     * the ad break boundaries. If not specified, the default is `COMPLETE_AD`.
     * </pre>
     *
     * <code>.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy stitching_policy = 9;
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearStitchingPolicy() {
      bitField0_ = (bitField0_ & ~0x00000100);
      stitchingPolicy_ = 0;
      onChanged();
      return this;
    }

    private com.google.cloud.video.stitcher.v1.ManifestOptions manifestOptions_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.video.stitcher.v1.ManifestOptions,
            com.google.cloud.video.stitcher.v1.ManifestOptions.Builder,
            com.google.cloud.video.stitcher.v1.ManifestOptionsOrBuilder>
        manifestOptionsBuilder_;
    /**
     *
     *
     * <pre>
     * Additional options that affect the output of the manifest.
     * </pre>
     *
     * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
     *
     * @return Whether the manifestOptions field is set.
     */
    public boolean hasManifestOptions() {
      return ((bitField0_ & 0x00000200) != 0);
    }
    /**
     *
     *
     * <pre>
     * Additional options that affect the output of the manifest.
     * </pre>
     *
     * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
     *
     * @return The manifestOptions.
     */
    public com.google.cloud.video.stitcher.v1.ManifestOptions getManifestOptions() {
      if (manifestOptionsBuilder_ == null) {
        return manifestOptions_ == null
            ? com.google.cloud.video.stitcher.v1.ManifestOptions.getDefaultInstance()
            : manifestOptions_;
      } else {
        return manifestOptionsBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Additional options that affect the output of the manifest.
     * </pre>
     *
     * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
     */
    public Builder setManifestOptions(com.google.cloud.video.stitcher.v1.ManifestOptions value) {
      if (manifestOptionsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        manifestOptions_ = value;
      } else {
        manifestOptionsBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Additional options that affect the output of the manifest.
     * </pre>
     *
     * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
     */
    public Builder setManifestOptions(
        com.google.cloud.video.stitcher.v1.ManifestOptions.Builder builderForValue) {
      if (manifestOptionsBuilder_ == null) {
        manifestOptions_ = builderForValue.build();
      } else {
        manifestOptionsBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Additional options that affect the output of the manifest.
     * </pre>
     *
     * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
     */
    public Builder mergeManifestOptions(com.google.cloud.video.stitcher.v1.ManifestOptions value) {
      if (manifestOptionsBuilder_ == null) {
        if (((bitField0_ & 0x00000200) != 0)
            && manifestOptions_ != null
            && manifestOptions_
                != com.google.cloud.video.stitcher.v1.ManifestOptions.getDefaultInstance()) {
          getManifestOptionsBuilder().mergeFrom(value);
        } else {
          manifestOptions_ = value;
        }
      } else {
        manifestOptionsBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Additional options that affect the output of the manifest.
     * </pre>
     *
     * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
     */
    public Builder clearManifestOptions() {
      bitField0_ = (bitField0_ & ~0x00000200);
      manifestOptions_ = null;
      if (manifestOptionsBuilder_ != null) {
        manifestOptionsBuilder_.dispose();
        manifestOptionsBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Additional options that affect the output of the manifest.
     * </pre>
     *
     * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
     */
    public com.google.cloud.video.stitcher.v1.ManifestOptions.Builder getManifestOptionsBuilder() {
      bitField0_ |= 0x00000200;
      onChanged();
      return getManifestOptionsFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Additional options that affect the output of the manifest.
     * </pre>
     *
     * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
     */
    public com.google.cloud.video.stitcher.v1.ManifestOptionsOrBuilder
        getManifestOptionsOrBuilder() {
      if (manifestOptionsBuilder_ != null) {
        return manifestOptionsBuilder_.getMessageOrBuilder();
      } else {
        return manifestOptions_ == null
            ? com.google.cloud.video.stitcher.v1.ManifestOptions.getDefaultInstance()
            : manifestOptions_;
      }
    }
    /**
     *
     *
     * <pre>
     * Additional options that affect the output of the manifest.
     * </pre>
     *
     * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.video.stitcher.v1.ManifestOptions,
            com.google.cloud.video.stitcher.v1.ManifestOptions.Builder,
            com.google.cloud.video.stitcher.v1.ManifestOptionsOrBuilder>
        getManifestOptionsFieldBuilder() {
      if (manifestOptionsBuilder_ == null) {
        manifestOptionsBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.video.stitcher.v1.ManifestOptions,
                com.google.cloud.video.stitcher.v1.ManifestOptions.Builder,
                com.google.cloud.video.stitcher.v1.ManifestOptionsOrBuilder>(
                getManifestOptions(), getParentForChildren(), isClean());
        manifestOptions_ = null;
      }
      return manifestOptionsBuilder_;
    }

    private java.lang.Object streamId_ = "";
    /**
     *
     *
     * <pre>
     * Output only. The generated ID of the LiveSession's source stream.
     * </pre>
     *
     * <code>string stream_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The streamId.
     */
    public java.lang.String getStreamId() {
      java.lang.Object ref = streamId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        streamId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The generated ID of the LiveSession's source stream.
     * </pre>
     *
     * <code>string stream_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The bytes for streamId.
     */
    public com.google.protobuf.ByteString getStreamIdBytes() {
      java.lang.Object ref = streamId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        streamId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The generated ID of the LiveSession's source stream.
     * </pre>
     *
     * <code>string stream_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The streamId to set.
     * @return This builder for chaining.
     */
    public Builder setStreamId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      streamId_ = value;
      bitField0_ |= 0x00000400;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The generated ID of the LiveSession's source stream.
     * </pre>
     *
     * <code>string stream_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearStreamId() {
      streamId_ = getDefaultInstance().getStreamId();
      bitField0_ = (bitField0_ & ~0x00000400);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The generated ID of the LiveSession's source stream.
     * </pre>
     *
     * <code>string stream_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The bytes for streamId to set.
     * @return This builder for chaining.
     */
    public Builder setStreamIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      streamId_ = value;
      bitField0_ |= 0x00000400;
      onChanged();
      return this;
    }

    @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.stitcher.v1.LiveSession)
  }

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

  static {
    DEFAULT_INSTANCE = new com.google.cloud.video.stitcher.v1.LiveSession();
  }

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

  private static final com.google.protobuf.Parser<LiveSession> PARSER =
      new com.google.protobuf.AbstractParser<LiveSession>() {
        @java.lang.Override
        public LiveSession 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<LiveSession> parser() {
    return PARSER;
  }

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

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