• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/cloud/video/stitcher/v1/sessions.proto
18 
19 package com.google.cloud.video.stitcher.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Metadata for a live session.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.video.stitcher.v1.LiveSession}
29  */
30 public final class LiveSession extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.video.stitcher.v1.LiveSession)
33     LiveSessionOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use LiveSession.newBuilder() to construct.
LiveSession(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private LiveSession(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
LiveSession()40   private LiveSession() {
41     name_ = "";
42     playUri_ = "";
43     sourceUri_ = "";
44     defaultAdTagId_ = "";
45     defaultSlateId_ = "";
46     stitchingPolicy_ = 0;
47     streamId_ = "";
48   }
49 
50   @java.lang.Override
51   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)52   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
53     return new LiveSession();
54   }
55 
56   @java.lang.Override
getUnknownFields()57   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
58     return this.unknownFields;
59   }
60 
getDescriptor()61   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
62     return com.google.cloud.video.stitcher.v1.SessionsProto
63         .internal_static_google_cloud_video_stitcher_v1_LiveSession_descriptor;
64   }
65 
66   @SuppressWarnings({"rawtypes"})
67   @java.lang.Override
internalGetMapField(int number)68   protected com.google.protobuf.MapField internalGetMapField(int number) {
69     switch (number) {
70       case 5:
71         return internalGetAdTagMap();
72       case 6:
73         return internalGetAdTagMacros();
74       default:
75         throw new RuntimeException("Invalid map field number: " + number);
76     }
77   }
78 
79   @java.lang.Override
80   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()81       internalGetFieldAccessorTable() {
82     return com.google.cloud.video.stitcher.v1.SessionsProto
83         .internal_static_google_cloud_video_stitcher_v1_LiveSession_fieldAccessorTable
84         .ensureFieldAccessorsInitialized(
85             com.google.cloud.video.stitcher.v1.LiveSession.class,
86             com.google.cloud.video.stitcher.v1.LiveSession.Builder.class);
87   }
88 
89   /**
90    *
91    *
92    * <pre>
93    * Defines the stitcher behavior in case an ad does not align exactly with
94    * the ad break boundaries. If not specified, the default is COMPLETE_AD.
95    * </pre>
96    *
97    * Protobuf enum {@code google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy}
98    */
99   public enum StitchingPolicy implements com.google.protobuf.ProtocolMessageEnum {
100     /**
101      *
102      *
103      * <pre>
104      * Stitching policy is not specified.
105      * </pre>
106      *
107      * <code>STITCHING_POLICY_UNSPECIFIED = 0;</code>
108      */
109     STITCHING_POLICY_UNSPECIFIED(0),
110     /**
111      *
112      *
113      * <pre>
114      * Finishes stitching the current ad before returning to content.
115      * </pre>
116      *
117      * <code>COMPLETE_AD = 1;</code>
118      */
119     COMPLETE_AD(1),
120     /**
121      *
122      *
123      * <pre>
124      * Cuts an ad short and returns to content in the middle of the ad.
125      * </pre>
126      *
127      * <code>CUT_CURRENT = 3;</code>
128      */
129     CUT_CURRENT(3),
130     UNRECOGNIZED(-1),
131     ;
132 
133     /**
134      *
135      *
136      * <pre>
137      * Stitching policy is not specified.
138      * </pre>
139      *
140      * <code>STITCHING_POLICY_UNSPECIFIED = 0;</code>
141      */
142     public static final int STITCHING_POLICY_UNSPECIFIED_VALUE = 0;
143     /**
144      *
145      *
146      * <pre>
147      * Finishes stitching the current ad before returning to content.
148      * </pre>
149      *
150      * <code>COMPLETE_AD = 1;</code>
151      */
152     public static final int COMPLETE_AD_VALUE = 1;
153     /**
154      *
155      *
156      * <pre>
157      * Cuts an ad short and returns to content in the middle of the ad.
158      * </pre>
159      *
160      * <code>CUT_CURRENT = 3;</code>
161      */
162     public static final int CUT_CURRENT_VALUE = 3;
163 
getNumber()164     public final int getNumber() {
165       if (this == UNRECOGNIZED) {
166         throw new java.lang.IllegalArgumentException(
167             "Can't get the number of an unknown enum value.");
168       }
169       return value;
170     }
171 
172     /**
173      * @param value The numeric wire value of the corresponding enum entry.
174      * @return The enum associated with the given numeric wire value.
175      * @deprecated Use {@link #forNumber(int)} instead.
176      */
177     @java.lang.Deprecated
valueOf(int value)178     public static StitchingPolicy valueOf(int value) {
179       return forNumber(value);
180     }
181 
182     /**
183      * @param value The numeric wire value of the corresponding enum entry.
184      * @return The enum associated with the given numeric wire value.
185      */
forNumber(int value)186     public static StitchingPolicy forNumber(int value) {
187       switch (value) {
188         case 0:
189           return STITCHING_POLICY_UNSPECIFIED;
190         case 1:
191           return COMPLETE_AD;
192         case 3:
193           return CUT_CURRENT;
194         default:
195           return null;
196       }
197     }
198 
internalGetValueMap()199     public static com.google.protobuf.Internal.EnumLiteMap<StitchingPolicy> internalGetValueMap() {
200       return internalValueMap;
201     }
202 
203     private static final com.google.protobuf.Internal.EnumLiteMap<StitchingPolicy>
204         internalValueMap =
205             new com.google.protobuf.Internal.EnumLiteMap<StitchingPolicy>() {
206               public StitchingPolicy findValueByNumber(int number) {
207                 return StitchingPolicy.forNumber(number);
208               }
209             };
210 
getValueDescriptor()211     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
212       if (this == UNRECOGNIZED) {
213         throw new java.lang.IllegalStateException(
214             "Can't get the descriptor of an unrecognized enum value.");
215       }
216       return getDescriptor().getValues().get(ordinal());
217     }
218 
getDescriptorForType()219     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
220       return getDescriptor();
221     }
222 
getDescriptor()223     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
224       return com.google.cloud.video.stitcher.v1.LiveSession.getDescriptor().getEnumTypes().get(0);
225     }
226 
227     private static final StitchingPolicy[] VALUES = values();
228 
valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)229     public static StitchingPolicy valueOf(
230         com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
231       if (desc.getType() != getDescriptor()) {
232         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
233       }
234       if (desc.getIndex() == -1) {
235         return UNRECOGNIZED;
236       }
237       return VALUES[desc.getIndex()];
238     }
239 
240     private final int value;
241 
StitchingPolicy(int value)242     private StitchingPolicy(int value) {
243       this.value = value;
244     }
245 
246     // @@protoc_insertion_point(enum_scope:google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy)
247   }
248 
249   public static final int NAME_FIELD_NUMBER = 1;
250 
251   @SuppressWarnings("serial")
252   private volatile java.lang.Object name_ = "";
253   /**
254    *
255    *
256    * <pre>
257    * Output only. The name of the live session, in the form of
258    * `projects/{project}/locations/{location}/liveSessions/{id}`.
259    * </pre>
260    *
261    * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
262    *
263    * @return The name.
264    */
265   @java.lang.Override
getName()266   public java.lang.String getName() {
267     java.lang.Object ref = name_;
268     if (ref instanceof java.lang.String) {
269       return (java.lang.String) ref;
270     } else {
271       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
272       java.lang.String s = bs.toStringUtf8();
273       name_ = s;
274       return s;
275     }
276   }
277   /**
278    *
279    *
280    * <pre>
281    * Output only. The name of the live session, in the form of
282    * `projects/{project}/locations/{location}/liveSessions/{id}`.
283    * </pre>
284    *
285    * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
286    *
287    * @return The bytes for name.
288    */
289   @java.lang.Override
getNameBytes()290   public com.google.protobuf.ByteString getNameBytes() {
291     java.lang.Object ref = name_;
292     if (ref instanceof java.lang.String) {
293       com.google.protobuf.ByteString b =
294           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
295       name_ = b;
296       return b;
297     } else {
298       return (com.google.protobuf.ByteString) ref;
299     }
300   }
301 
302   public static final int PLAY_URI_FIELD_NUMBER = 2;
303 
304   @SuppressWarnings("serial")
305   private volatile java.lang.Object playUri_ = "";
306   /**
307    *
308    *
309    * <pre>
310    * Output only. The URI to play the live session's ad-stitched stream.
311    * </pre>
312    *
313    * <code>string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
314    *
315    * @return The playUri.
316    */
317   @java.lang.Override
getPlayUri()318   public java.lang.String getPlayUri() {
319     java.lang.Object ref = playUri_;
320     if (ref instanceof java.lang.String) {
321       return (java.lang.String) ref;
322     } else {
323       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
324       java.lang.String s = bs.toStringUtf8();
325       playUri_ = s;
326       return s;
327     }
328   }
329   /**
330    *
331    *
332    * <pre>
333    * Output only. The URI to play the live session's ad-stitched stream.
334    * </pre>
335    *
336    * <code>string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
337    *
338    * @return The bytes for playUri.
339    */
340   @java.lang.Override
getPlayUriBytes()341   public com.google.protobuf.ByteString getPlayUriBytes() {
342     java.lang.Object ref = playUri_;
343     if (ref instanceof java.lang.String) {
344       com.google.protobuf.ByteString b =
345           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
346       playUri_ = b;
347       return b;
348     } else {
349       return (com.google.protobuf.ByteString) ref;
350     }
351   }
352 
353   public static final int SOURCE_URI_FIELD_NUMBER = 3;
354 
355   @SuppressWarnings("serial")
356   private volatile java.lang.Object sourceUri_ = "";
357   /**
358    *
359    *
360    * <pre>
361    * The URI of the live session's source stream.
362    * </pre>
363    *
364    * <code>string source_uri = 3;</code>
365    *
366    * @return The sourceUri.
367    */
368   @java.lang.Override
getSourceUri()369   public java.lang.String getSourceUri() {
370     java.lang.Object ref = sourceUri_;
371     if (ref instanceof java.lang.String) {
372       return (java.lang.String) ref;
373     } else {
374       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
375       java.lang.String s = bs.toStringUtf8();
376       sourceUri_ = s;
377       return s;
378     }
379   }
380   /**
381    *
382    *
383    * <pre>
384    * The URI of the live session's source stream.
385    * </pre>
386    *
387    * <code>string source_uri = 3;</code>
388    *
389    * @return The bytes for sourceUri.
390    */
391   @java.lang.Override
getSourceUriBytes()392   public com.google.protobuf.ByteString getSourceUriBytes() {
393     java.lang.Object ref = sourceUri_;
394     if (ref instanceof java.lang.String) {
395       com.google.protobuf.ByteString b =
396           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
397       sourceUri_ = b;
398       return b;
399     } else {
400       return (com.google.protobuf.ByteString) ref;
401     }
402   }
403 
404   public static final int DEFAULT_AD_TAG_ID_FIELD_NUMBER = 4;
405 
406   @SuppressWarnings("serial")
407   private volatile java.lang.Object defaultAdTagId_ = "";
408   /**
409    *
410    *
411    * <pre>
412    * The default ad tag to use when no ad tag ids are specified in an ad break's
413    * SCTE-35 message.
414    * default_ad_tag_id is necessary when `adTagMap` has more than one key. Its
415    * value must be present in the `adTagMap`.
416    * </pre>
417    *
418    * <code>string default_ad_tag_id = 4;</code>
419    *
420    * @return The defaultAdTagId.
421    */
422   @java.lang.Override
getDefaultAdTagId()423   public java.lang.String getDefaultAdTagId() {
424     java.lang.Object ref = defaultAdTagId_;
425     if (ref instanceof java.lang.String) {
426       return (java.lang.String) ref;
427     } else {
428       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
429       java.lang.String s = bs.toStringUtf8();
430       defaultAdTagId_ = s;
431       return s;
432     }
433   }
434   /**
435    *
436    *
437    * <pre>
438    * The default ad tag to use when no ad tag ids are specified in an ad break's
439    * SCTE-35 message.
440    * default_ad_tag_id is necessary when `adTagMap` has more than one key. Its
441    * value must be present in the `adTagMap`.
442    * </pre>
443    *
444    * <code>string default_ad_tag_id = 4;</code>
445    *
446    * @return The bytes for defaultAdTagId.
447    */
448   @java.lang.Override
getDefaultAdTagIdBytes()449   public com.google.protobuf.ByteString getDefaultAdTagIdBytes() {
450     java.lang.Object ref = defaultAdTagId_;
451     if (ref instanceof java.lang.String) {
452       com.google.protobuf.ByteString b =
453           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
454       defaultAdTagId_ = b;
455       return b;
456     } else {
457       return (com.google.protobuf.ByteString) ref;
458     }
459   }
460 
461   public static final int AD_TAG_MAP_FIELD_NUMBER = 5;
462 
463   private static final class AdTagMapDefaultEntryHolder {
464     static final com.google.protobuf.MapEntry<
465             java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
466         defaultEntry =
467             com.google.protobuf.MapEntry
468                 .<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>newDefaultInstance(
469                     com.google.cloud.video.stitcher.v1.SessionsProto
470                         .internal_static_google_cloud_video_stitcher_v1_LiveSession_AdTagMapEntry_descriptor,
471                     com.google.protobuf.WireFormat.FieldType.STRING,
472                     "",
473                     com.google.protobuf.WireFormat.FieldType.MESSAGE,
474                     com.google.cloud.video.stitcher.v1.AdTag.getDefaultInstance());
475   }
476 
477   @SuppressWarnings("serial")
478   private com.google.protobuf.MapField<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
479       adTagMap_;
480 
481   private com.google.protobuf.MapField<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
internalGetAdTagMap()482       internalGetAdTagMap() {
483     if (adTagMap_ == null) {
484       return com.google.protobuf.MapField.emptyMapField(AdTagMapDefaultEntryHolder.defaultEntry);
485     }
486     return adTagMap_;
487   }
488 
getAdTagMapCount()489   public int getAdTagMapCount() {
490     return internalGetAdTagMap().getMap().size();
491   }
492   /**
493    *
494    *
495    * <pre>
496    * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
497    * each with at least one audio track.
498    * </pre>
499    *
500    * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
501    */
502   @java.lang.Override
containsAdTagMap(java.lang.String key)503   public boolean containsAdTagMap(java.lang.String key) {
504     if (key == null) {
505       throw new NullPointerException("map key");
506     }
507     return internalGetAdTagMap().getMap().containsKey(key);
508   }
509   /** Use {@link #getAdTagMapMap()} instead. */
510   @java.lang.Override
511   @java.lang.Deprecated
getAdTagMap()512   public java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag> getAdTagMap() {
513     return getAdTagMapMap();
514   }
515   /**
516    *
517    *
518    * <pre>
519    * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
520    * each with at least one audio track.
521    * </pre>
522    *
523    * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
524    */
525   @java.lang.Override
526   public java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
getAdTagMapMap()527       getAdTagMapMap() {
528     return internalGetAdTagMap().getMap();
529   }
530   /**
531    *
532    *
533    * <pre>
534    * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
535    * each with at least one audio track.
536    * </pre>
537    *
538    * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
539    */
540   @java.lang.Override
getAdTagMapOrDefault( java.lang.String key, com.google.cloud.video.stitcher.v1.AdTag defaultValue)541   public /* nullable */ com.google.cloud.video.stitcher.v1.AdTag getAdTagMapOrDefault(
542       java.lang.String key,
543       /* nullable */
544       com.google.cloud.video.stitcher.v1.AdTag defaultValue) {
545     if (key == null) {
546       throw new NullPointerException("map key");
547     }
548     java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag> map =
549         internalGetAdTagMap().getMap();
550     return map.containsKey(key) ? map.get(key) : defaultValue;
551   }
552   /**
553    *
554    *
555    * <pre>
556    * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
557    * each with at least one audio track.
558    * </pre>
559    *
560    * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
561    */
562   @java.lang.Override
getAdTagMapOrThrow(java.lang.String key)563   public com.google.cloud.video.stitcher.v1.AdTag getAdTagMapOrThrow(java.lang.String key) {
564     if (key == null) {
565       throw new NullPointerException("map key");
566     }
567     java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag> map =
568         internalGetAdTagMap().getMap();
569     if (!map.containsKey(key)) {
570       throw new java.lang.IllegalArgumentException();
571     }
572     return map.get(key);
573   }
574 
575   public static final int AD_TAG_MACROS_FIELD_NUMBER = 6;
576 
577   private static final class AdTagMacrosDefaultEntryHolder {
578     static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
579         com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
580             com.google.cloud.video.stitcher.v1.SessionsProto
581                 .internal_static_google_cloud_video_stitcher_v1_LiveSession_AdTagMacrosEntry_descriptor,
582             com.google.protobuf.WireFormat.FieldType.STRING,
583             "",
584             com.google.protobuf.WireFormat.FieldType.STRING,
585             "");
586   }
587 
588   @SuppressWarnings("serial")
589   private com.google.protobuf.MapField<java.lang.String, java.lang.String> adTagMacros_;
590 
591   private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetAdTagMacros()592       internalGetAdTagMacros() {
593     if (adTagMacros_ == null) {
594       return com.google.protobuf.MapField.emptyMapField(AdTagMacrosDefaultEntryHolder.defaultEntry);
595     }
596     return adTagMacros_;
597   }
598 
getAdTagMacrosCount()599   public int getAdTagMacrosCount() {
600     return internalGetAdTagMacros().getMap().size();
601   }
602   /**
603    *
604    *
605    * <pre>
606    * Key value pairs for ad tag macro replacement. If the
607    * specified ad tag URI has macros, this field provides the mapping
608    * to the value that will replace the macro in the ad tag URI.
609    * Macros are designated by square brackets.
610    * For example:
611    *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
612    *   Ad tag macros: `{"geoId": "123"}`
613    *   Fully qualified ad tag:
614    *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
615    * </pre>
616    *
617    * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
618    */
619   @java.lang.Override
containsAdTagMacros(java.lang.String key)620   public boolean containsAdTagMacros(java.lang.String key) {
621     if (key == null) {
622       throw new NullPointerException("map key");
623     }
624     return internalGetAdTagMacros().getMap().containsKey(key);
625   }
626   /** Use {@link #getAdTagMacrosMap()} instead. */
627   @java.lang.Override
628   @java.lang.Deprecated
getAdTagMacros()629   public java.util.Map<java.lang.String, java.lang.String> getAdTagMacros() {
630     return getAdTagMacrosMap();
631   }
632   /**
633    *
634    *
635    * <pre>
636    * Key value pairs for ad tag macro replacement. If the
637    * specified ad tag URI has macros, this field provides the mapping
638    * to the value that will replace the macro in the ad tag URI.
639    * Macros are designated by square brackets.
640    * For example:
641    *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
642    *   Ad tag macros: `{"geoId": "123"}`
643    *   Fully qualified ad tag:
644    *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
645    * </pre>
646    *
647    * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
648    */
649   @java.lang.Override
getAdTagMacrosMap()650   public java.util.Map<java.lang.String, java.lang.String> getAdTagMacrosMap() {
651     return internalGetAdTagMacros().getMap();
652   }
653   /**
654    *
655    *
656    * <pre>
657    * Key value pairs for ad tag macro replacement. If the
658    * specified ad tag URI has macros, this field provides the mapping
659    * to the value that will replace the macro in the ad tag URI.
660    * Macros are designated by square brackets.
661    * For example:
662    *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
663    *   Ad tag macros: `{"geoId": "123"}`
664    *   Fully qualified ad tag:
665    *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
666    * </pre>
667    *
668    * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
669    */
670   @java.lang.Override
getAdTagMacrosOrDefault( java.lang.String key, java.lang.String defaultValue)671   public /* nullable */ java.lang.String getAdTagMacrosOrDefault(
672       java.lang.String key,
673       /* nullable */
674       java.lang.String defaultValue) {
675     if (key == null) {
676       throw new NullPointerException("map key");
677     }
678     java.util.Map<java.lang.String, java.lang.String> map = internalGetAdTagMacros().getMap();
679     return map.containsKey(key) ? map.get(key) : defaultValue;
680   }
681   /**
682    *
683    *
684    * <pre>
685    * Key value pairs for ad tag macro replacement. If the
686    * specified ad tag URI has macros, this field provides the mapping
687    * to the value that will replace the macro in the ad tag URI.
688    * Macros are designated by square brackets.
689    * For example:
690    *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
691    *   Ad tag macros: `{"geoId": "123"}`
692    *   Fully qualified ad tag:
693    *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
694    * </pre>
695    *
696    * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
697    */
698   @java.lang.Override
getAdTagMacrosOrThrow(java.lang.String key)699   public java.lang.String getAdTagMacrosOrThrow(java.lang.String key) {
700     if (key == null) {
701       throw new NullPointerException("map key");
702     }
703     java.util.Map<java.lang.String, java.lang.String> map = internalGetAdTagMacros().getMap();
704     if (!map.containsKey(key)) {
705       throw new java.lang.IllegalArgumentException();
706     }
707     return map.get(key);
708   }
709 
710   public static final int CLIENT_AD_TRACKING_FIELD_NUMBER = 7;
711   private boolean clientAdTracking_ = false;
712   /**
713    *
714    *
715    * <pre>
716    * Whether client side ad tracking is enabled. If enabled, the client player
717    * is expected to trigger playback and activity events itself. Otherwise,
718    * server side ad tracking is enabled and the Video Stitcher API will trigger
719    * playback events on behalf of the client player.
720    * </pre>
721    *
722    * <code>bool client_ad_tracking = 7;</code>
723    *
724    * @return The clientAdTracking.
725    */
726   @java.lang.Override
getClientAdTracking()727   public boolean getClientAdTracking() {
728     return clientAdTracking_;
729   }
730 
731   public static final int DEFAULT_SLATE_ID_FIELD_NUMBER = 8;
732 
733   @SuppressWarnings("serial")
734   private volatile java.lang.Object defaultSlateId_ = "";
735   /**
736    *
737    *
738    * <pre>
739    * The default slate to use when no slates are specified in an ad break's
740    * SCTE-35 message. When specified, this value must match the ID for a slate
741    * that has already been created via the
742    * [CreateSlate](projects.locations.slates/create) method.
743    * </pre>
744    *
745    * <code>string default_slate_id = 8;</code>
746    *
747    * @return The defaultSlateId.
748    */
749   @java.lang.Override
getDefaultSlateId()750   public java.lang.String getDefaultSlateId() {
751     java.lang.Object ref = defaultSlateId_;
752     if (ref instanceof java.lang.String) {
753       return (java.lang.String) ref;
754     } else {
755       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
756       java.lang.String s = bs.toStringUtf8();
757       defaultSlateId_ = s;
758       return s;
759     }
760   }
761   /**
762    *
763    *
764    * <pre>
765    * The default slate to use when no slates are specified in an ad break's
766    * SCTE-35 message. When specified, this value must match the ID for a slate
767    * that has already been created via the
768    * [CreateSlate](projects.locations.slates/create) method.
769    * </pre>
770    *
771    * <code>string default_slate_id = 8;</code>
772    *
773    * @return The bytes for defaultSlateId.
774    */
775   @java.lang.Override
getDefaultSlateIdBytes()776   public com.google.protobuf.ByteString getDefaultSlateIdBytes() {
777     java.lang.Object ref = defaultSlateId_;
778     if (ref instanceof java.lang.String) {
779       com.google.protobuf.ByteString b =
780           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
781       defaultSlateId_ = b;
782       return b;
783     } else {
784       return (com.google.protobuf.ByteString) ref;
785     }
786   }
787 
788   public static final int STITCHING_POLICY_FIELD_NUMBER = 9;
789   private int stitchingPolicy_ = 0;
790   /**
791    *
792    *
793    * <pre>
794    * Defines the stitcher behavior in case an ad does not align exactly with
795    * the ad break boundaries. If not specified, the default is `COMPLETE_AD`.
796    * </pre>
797    *
798    * <code>.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy stitching_policy = 9;</code>
799    *
800    * @return The enum numeric value on the wire for stitchingPolicy.
801    */
802   @java.lang.Override
getStitchingPolicyValue()803   public int getStitchingPolicyValue() {
804     return stitchingPolicy_;
805   }
806   /**
807    *
808    *
809    * <pre>
810    * Defines the stitcher behavior in case an ad does not align exactly with
811    * the ad break boundaries. If not specified, the default is `COMPLETE_AD`.
812    * </pre>
813    *
814    * <code>.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy stitching_policy = 9;</code>
815    *
816    * @return The stitchingPolicy.
817    */
818   @java.lang.Override
getStitchingPolicy()819   public com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy getStitchingPolicy() {
820     com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy result =
821         com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy.forNumber(stitchingPolicy_);
822     return result == null
823         ? com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy.UNRECOGNIZED
824         : result;
825   }
826 
827   public static final int MANIFEST_OPTIONS_FIELD_NUMBER = 10;
828   private com.google.cloud.video.stitcher.v1.ManifestOptions manifestOptions_;
829   /**
830    *
831    *
832    * <pre>
833    * Additional options that affect the output of the manifest.
834    * </pre>
835    *
836    * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
837    *
838    * @return Whether the manifestOptions field is set.
839    */
840   @java.lang.Override
hasManifestOptions()841   public boolean hasManifestOptions() {
842     return manifestOptions_ != null;
843   }
844   /**
845    *
846    *
847    * <pre>
848    * Additional options that affect the output of the manifest.
849    * </pre>
850    *
851    * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
852    *
853    * @return The manifestOptions.
854    */
855   @java.lang.Override
getManifestOptions()856   public com.google.cloud.video.stitcher.v1.ManifestOptions getManifestOptions() {
857     return manifestOptions_ == null
858         ? com.google.cloud.video.stitcher.v1.ManifestOptions.getDefaultInstance()
859         : manifestOptions_;
860   }
861   /**
862    *
863    *
864    * <pre>
865    * Additional options that affect the output of the manifest.
866    * </pre>
867    *
868    * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
869    */
870   @java.lang.Override
getManifestOptionsOrBuilder()871   public com.google.cloud.video.stitcher.v1.ManifestOptionsOrBuilder getManifestOptionsOrBuilder() {
872     return manifestOptions_ == null
873         ? com.google.cloud.video.stitcher.v1.ManifestOptions.getDefaultInstance()
874         : manifestOptions_;
875   }
876 
877   public static final int STREAM_ID_FIELD_NUMBER = 11;
878 
879   @SuppressWarnings("serial")
880   private volatile java.lang.Object streamId_ = "";
881   /**
882    *
883    *
884    * <pre>
885    * Output only. The generated ID of the LiveSession's source stream.
886    * </pre>
887    *
888    * <code>string stream_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
889    *
890    * @return The streamId.
891    */
892   @java.lang.Override
getStreamId()893   public java.lang.String getStreamId() {
894     java.lang.Object ref = streamId_;
895     if (ref instanceof java.lang.String) {
896       return (java.lang.String) ref;
897     } else {
898       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
899       java.lang.String s = bs.toStringUtf8();
900       streamId_ = s;
901       return s;
902     }
903   }
904   /**
905    *
906    *
907    * <pre>
908    * Output only. The generated ID of the LiveSession's source stream.
909    * </pre>
910    *
911    * <code>string stream_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
912    *
913    * @return The bytes for streamId.
914    */
915   @java.lang.Override
getStreamIdBytes()916   public com.google.protobuf.ByteString getStreamIdBytes() {
917     java.lang.Object ref = streamId_;
918     if (ref instanceof java.lang.String) {
919       com.google.protobuf.ByteString b =
920           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
921       streamId_ = b;
922       return b;
923     } else {
924       return (com.google.protobuf.ByteString) ref;
925     }
926   }
927 
928   private byte memoizedIsInitialized = -1;
929 
930   @java.lang.Override
isInitialized()931   public final boolean isInitialized() {
932     byte isInitialized = memoizedIsInitialized;
933     if (isInitialized == 1) return true;
934     if (isInitialized == 0) return false;
935 
936     memoizedIsInitialized = 1;
937     return true;
938   }
939 
940   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)941   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
942     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
943       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
944     }
945     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(playUri_)) {
946       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, playUri_);
947     }
948     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceUri_)) {
949       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceUri_);
950     }
951     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultAdTagId_)) {
952       com.google.protobuf.GeneratedMessageV3.writeString(output, 4, defaultAdTagId_);
953     }
954     com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
955         output, internalGetAdTagMap(), AdTagMapDefaultEntryHolder.defaultEntry, 5);
956     com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
957         output, internalGetAdTagMacros(), AdTagMacrosDefaultEntryHolder.defaultEntry, 6);
958     if (clientAdTracking_ != false) {
959       output.writeBool(7, clientAdTracking_);
960     }
961     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultSlateId_)) {
962       com.google.protobuf.GeneratedMessageV3.writeString(output, 8, defaultSlateId_);
963     }
964     if (stitchingPolicy_
965         != com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy
966             .STITCHING_POLICY_UNSPECIFIED
967             .getNumber()) {
968       output.writeEnum(9, stitchingPolicy_);
969     }
970     if (manifestOptions_ != null) {
971       output.writeMessage(10, getManifestOptions());
972     }
973     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(streamId_)) {
974       com.google.protobuf.GeneratedMessageV3.writeString(output, 11, streamId_);
975     }
976     getUnknownFields().writeTo(output);
977   }
978 
979   @java.lang.Override
getSerializedSize()980   public int getSerializedSize() {
981     int size = memoizedSize;
982     if (size != -1) return size;
983 
984     size = 0;
985     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
986       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
987     }
988     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(playUri_)) {
989       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, playUri_);
990     }
991     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceUri_)) {
992       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceUri_);
993     }
994     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultAdTagId_)) {
995       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, defaultAdTagId_);
996     }
997     for (java.util.Map.Entry<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag> entry :
998         internalGetAdTagMap().getMap().entrySet()) {
999       com.google.protobuf.MapEntry<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
1000           adTagMap__ =
1001               AdTagMapDefaultEntryHolder.defaultEntry
1002                   .newBuilderForType()
1003                   .setKey(entry.getKey())
1004                   .setValue(entry.getValue())
1005                   .build();
1006       size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, adTagMap__);
1007     }
1008     for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
1009         internalGetAdTagMacros().getMap().entrySet()) {
1010       com.google.protobuf.MapEntry<java.lang.String, java.lang.String> adTagMacros__ =
1011           AdTagMacrosDefaultEntryHolder.defaultEntry
1012               .newBuilderForType()
1013               .setKey(entry.getKey())
1014               .setValue(entry.getValue())
1015               .build();
1016       size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, adTagMacros__);
1017     }
1018     if (clientAdTracking_ != false) {
1019       size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, clientAdTracking_);
1020     }
1021     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultSlateId_)) {
1022       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, defaultSlateId_);
1023     }
1024     if (stitchingPolicy_
1025         != com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy
1026             .STITCHING_POLICY_UNSPECIFIED
1027             .getNumber()) {
1028       size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, stitchingPolicy_);
1029     }
1030     if (manifestOptions_ != null) {
1031       size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getManifestOptions());
1032     }
1033     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(streamId_)) {
1034       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, streamId_);
1035     }
1036     size += getUnknownFields().getSerializedSize();
1037     memoizedSize = size;
1038     return size;
1039   }
1040 
1041   @java.lang.Override
equals(final java.lang.Object obj)1042   public boolean equals(final java.lang.Object obj) {
1043     if (obj == this) {
1044       return true;
1045     }
1046     if (!(obj instanceof com.google.cloud.video.stitcher.v1.LiveSession)) {
1047       return super.equals(obj);
1048     }
1049     com.google.cloud.video.stitcher.v1.LiveSession other =
1050         (com.google.cloud.video.stitcher.v1.LiveSession) obj;
1051 
1052     if (!getName().equals(other.getName())) return false;
1053     if (!getPlayUri().equals(other.getPlayUri())) return false;
1054     if (!getSourceUri().equals(other.getSourceUri())) return false;
1055     if (!getDefaultAdTagId().equals(other.getDefaultAdTagId())) return false;
1056     if (!internalGetAdTagMap().equals(other.internalGetAdTagMap())) return false;
1057     if (!internalGetAdTagMacros().equals(other.internalGetAdTagMacros())) return false;
1058     if (getClientAdTracking() != other.getClientAdTracking()) return false;
1059     if (!getDefaultSlateId().equals(other.getDefaultSlateId())) return false;
1060     if (stitchingPolicy_ != other.stitchingPolicy_) return false;
1061     if (hasManifestOptions() != other.hasManifestOptions()) return false;
1062     if (hasManifestOptions()) {
1063       if (!getManifestOptions().equals(other.getManifestOptions())) return false;
1064     }
1065     if (!getStreamId().equals(other.getStreamId())) return false;
1066     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1067     return true;
1068   }
1069 
1070   @java.lang.Override
hashCode()1071   public int hashCode() {
1072     if (memoizedHashCode != 0) {
1073       return memoizedHashCode;
1074     }
1075     int hash = 41;
1076     hash = (19 * hash) + getDescriptor().hashCode();
1077     hash = (37 * hash) + NAME_FIELD_NUMBER;
1078     hash = (53 * hash) + getName().hashCode();
1079     hash = (37 * hash) + PLAY_URI_FIELD_NUMBER;
1080     hash = (53 * hash) + getPlayUri().hashCode();
1081     hash = (37 * hash) + SOURCE_URI_FIELD_NUMBER;
1082     hash = (53 * hash) + getSourceUri().hashCode();
1083     hash = (37 * hash) + DEFAULT_AD_TAG_ID_FIELD_NUMBER;
1084     hash = (53 * hash) + getDefaultAdTagId().hashCode();
1085     if (!internalGetAdTagMap().getMap().isEmpty()) {
1086       hash = (37 * hash) + AD_TAG_MAP_FIELD_NUMBER;
1087       hash = (53 * hash) + internalGetAdTagMap().hashCode();
1088     }
1089     if (!internalGetAdTagMacros().getMap().isEmpty()) {
1090       hash = (37 * hash) + AD_TAG_MACROS_FIELD_NUMBER;
1091       hash = (53 * hash) + internalGetAdTagMacros().hashCode();
1092     }
1093     hash = (37 * hash) + CLIENT_AD_TRACKING_FIELD_NUMBER;
1094     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getClientAdTracking());
1095     hash = (37 * hash) + DEFAULT_SLATE_ID_FIELD_NUMBER;
1096     hash = (53 * hash) + getDefaultSlateId().hashCode();
1097     hash = (37 * hash) + STITCHING_POLICY_FIELD_NUMBER;
1098     hash = (53 * hash) + stitchingPolicy_;
1099     if (hasManifestOptions()) {
1100       hash = (37 * hash) + MANIFEST_OPTIONS_FIELD_NUMBER;
1101       hash = (53 * hash) + getManifestOptions().hashCode();
1102     }
1103     hash = (37 * hash) + STREAM_ID_FIELD_NUMBER;
1104     hash = (53 * hash) + getStreamId().hashCode();
1105     hash = (29 * hash) + getUnknownFields().hashCode();
1106     memoizedHashCode = hash;
1107     return hash;
1108   }
1109 
parseFrom(java.nio.ByteBuffer data)1110   public static com.google.cloud.video.stitcher.v1.LiveSession parseFrom(java.nio.ByteBuffer data)
1111       throws com.google.protobuf.InvalidProtocolBufferException {
1112     return PARSER.parseFrom(data);
1113   }
1114 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1115   public static com.google.cloud.video.stitcher.v1.LiveSession parseFrom(
1116       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1117       throws com.google.protobuf.InvalidProtocolBufferException {
1118     return PARSER.parseFrom(data, extensionRegistry);
1119   }
1120 
parseFrom( com.google.protobuf.ByteString data)1121   public static com.google.cloud.video.stitcher.v1.LiveSession parseFrom(
1122       com.google.protobuf.ByteString data)
1123       throws com.google.protobuf.InvalidProtocolBufferException {
1124     return PARSER.parseFrom(data);
1125   }
1126 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1127   public static com.google.cloud.video.stitcher.v1.LiveSession parseFrom(
1128       com.google.protobuf.ByteString data,
1129       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1130       throws com.google.protobuf.InvalidProtocolBufferException {
1131     return PARSER.parseFrom(data, extensionRegistry);
1132   }
1133 
parseFrom(byte[] data)1134   public static com.google.cloud.video.stitcher.v1.LiveSession parseFrom(byte[] data)
1135       throws com.google.protobuf.InvalidProtocolBufferException {
1136     return PARSER.parseFrom(data);
1137   }
1138 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1139   public static com.google.cloud.video.stitcher.v1.LiveSession parseFrom(
1140       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1141       throws com.google.protobuf.InvalidProtocolBufferException {
1142     return PARSER.parseFrom(data, extensionRegistry);
1143   }
1144 
parseFrom(java.io.InputStream input)1145   public static com.google.cloud.video.stitcher.v1.LiveSession parseFrom(java.io.InputStream input)
1146       throws java.io.IOException {
1147     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1148   }
1149 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1150   public static com.google.cloud.video.stitcher.v1.LiveSession parseFrom(
1151       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1152       throws java.io.IOException {
1153     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1154         PARSER, input, extensionRegistry);
1155   }
1156 
parseDelimitedFrom( java.io.InputStream input)1157   public static com.google.cloud.video.stitcher.v1.LiveSession parseDelimitedFrom(
1158       java.io.InputStream input) throws java.io.IOException {
1159     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1160   }
1161 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1162   public static com.google.cloud.video.stitcher.v1.LiveSession parseDelimitedFrom(
1163       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1164       throws java.io.IOException {
1165     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1166         PARSER, input, extensionRegistry);
1167   }
1168 
parseFrom( com.google.protobuf.CodedInputStream input)1169   public static com.google.cloud.video.stitcher.v1.LiveSession parseFrom(
1170       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
1171     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1172   }
1173 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1174   public static com.google.cloud.video.stitcher.v1.LiveSession parseFrom(
1175       com.google.protobuf.CodedInputStream input,
1176       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1177       throws java.io.IOException {
1178     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1179         PARSER, input, extensionRegistry);
1180   }
1181 
1182   @java.lang.Override
newBuilderForType()1183   public Builder newBuilderForType() {
1184     return newBuilder();
1185   }
1186 
newBuilder()1187   public static Builder newBuilder() {
1188     return DEFAULT_INSTANCE.toBuilder();
1189   }
1190 
newBuilder(com.google.cloud.video.stitcher.v1.LiveSession prototype)1191   public static Builder newBuilder(com.google.cloud.video.stitcher.v1.LiveSession prototype) {
1192     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1193   }
1194 
1195   @java.lang.Override
toBuilder()1196   public Builder toBuilder() {
1197     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1198   }
1199 
1200   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1201   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1202     Builder builder = new Builder(parent);
1203     return builder;
1204   }
1205   /**
1206    *
1207    *
1208    * <pre>
1209    * Metadata for a live session.
1210    * </pre>
1211    *
1212    * Protobuf type {@code google.cloud.video.stitcher.v1.LiveSession}
1213    */
1214   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1215       implements
1216       // @@protoc_insertion_point(builder_implements:google.cloud.video.stitcher.v1.LiveSession)
1217       com.google.cloud.video.stitcher.v1.LiveSessionOrBuilder {
getDescriptor()1218     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1219       return com.google.cloud.video.stitcher.v1.SessionsProto
1220           .internal_static_google_cloud_video_stitcher_v1_LiveSession_descriptor;
1221     }
1222 
1223     @SuppressWarnings({"rawtypes"})
internalGetMapField(int number)1224     protected com.google.protobuf.MapField internalGetMapField(int number) {
1225       switch (number) {
1226         case 5:
1227           return internalGetAdTagMap();
1228         case 6:
1229           return internalGetAdTagMacros();
1230         default:
1231           throw new RuntimeException("Invalid map field number: " + number);
1232       }
1233     }
1234 
1235     @SuppressWarnings({"rawtypes"})
internalGetMutableMapField(int number)1236     protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
1237       switch (number) {
1238         case 5:
1239           return internalGetMutableAdTagMap();
1240         case 6:
1241           return internalGetMutableAdTagMacros();
1242         default:
1243           throw new RuntimeException("Invalid map field number: " + number);
1244       }
1245     }
1246 
1247     @java.lang.Override
1248     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1249         internalGetFieldAccessorTable() {
1250       return com.google.cloud.video.stitcher.v1.SessionsProto
1251           .internal_static_google_cloud_video_stitcher_v1_LiveSession_fieldAccessorTable
1252           .ensureFieldAccessorsInitialized(
1253               com.google.cloud.video.stitcher.v1.LiveSession.class,
1254               com.google.cloud.video.stitcher.v1.LiveSession.Builder.class);
1255     }
1256 
1257     // Construct using com.google.cloud.video.stitcher.v1.LiveSession.newBuilder()
Builder()1258     private Builder() {}
1259 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1260     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1261       super(parent);
1262     }
1263 
1264     @java.lang.Override
clear()1265     public Builder clear() {
1266       super.clear();
1267       bitField0_ = 0;
1268       name_ = "";
1269       playUri_ = "";
1270       sourceUri_ = "";
1271       defaultAdTagId_ = "";
1272       internalGetMutableAdTagMap().clear();
1273       internalGetMutableAdTagMacros().clear();
1274       clientAdTracking_ = false;
1275       defaultSlateId_ = "";
1276       stitchingPolicy_ = 0;
1277       manifestOptions_ = null;
1278       if (manifestOptionsBuilder_ != null) {
1279         manifestOptionsBuilder_.dispose();
1280         manifestOptionsBuilder_ = null;
1281       }
1282       streamId_ = "";
1283       return this;
1284     }
1285 
1286     @java.lang.Override
getDescriptorForType()1287     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1288       return com.google.cloud.video.stitcher.v1.SessionsProto
1289           .internal_static_google_cloud_video_stitcher_v1_LiveSession_descriptor;
1290     }
1291 
1292     @java.lang.Override
getDefaultInstanceForType()1293     public com.google.cloud.video.stitcher.v1.LiveSession getDefaultInstanceForType() {
1294       return com.google.cloud.video.stitcher.v1.LiveSession.getDefaultInstance();
1295     }
1296 
1297     @java.lang.Override
build()1298     public com.google.cloud.video.stitcher.v1.LiveSession build() {
1299       com.google.cloud.video.stitcher.v1.LiveSession result = buildPartial();
1300       if (!result.isInitialized()) {
1301         throw newUninitializedMessageException(result);
1302       }
1303       return result;
1304     }
1305 
1306     @java.lang.Override
buildPartial()1307     public com.google.cloud.video.stitcher.v1.LiveSession buildPartial() {
1308       com.google.cloud.video.stitcher.v1.LiveSession result =
1309           new com.google.cloud.video.stitcher.v1.LiveSession(this);
1310       if (bitField0_ != 0) {
1311         buildPartial0(result);
1312       }
1313       onBuilt();
1314       return result;
1315     }
1316 
buildPartial0(com.google.cloud.video.stitcher.v1.LiveSession result)1317     private void buildPartial0(com.google.cloud.video.stitcher.v1.LiveSession result) {
1318       int from_bitField0_ = bitField0_;
1319       if (((from_bitField0_ & 0x00000001) != 0)) {
1320         result.name_ = name_;
1321       }
1322       if (((from_bitField0_ & 0x00000002) != 0)) {
1323         result.playUri_ = playUri_;
1324       }
1325       if (((from_bitField0_ & 0x00000004) != 0)) {
1326         result.sourceUri_ = sourceUri_;
1327       }
1328       if (((from_bitField0_ & 0x00000008) != 0)) {
1329         result.defaultAdTagId_ = defaultAdTagId_;
1330       }
1331       if (((from_bitField0_ & 0x00000010) != 0)) {
1332         result.adTagMap_ = internalGetAdTagMap();
1333         result.adTagMap_.makeImmutable();
1334       }
1335       if (((from_bitField0_ & 0x00000020) != 0)) {
1336         result.adTagMacros_ = internalGetAdTagMacros();
1337         result.adTagMacros_.makeImmutable();
1338       }
1339       if (((from_bitField0_ & 0x00000040) != 0)) {
1340         result.clientAdTracking_ = clientAdTracking_;
1341       }
1342       if (((from_bitField0_ & 0x00000080) != 0)) {
1343         result.defaultSlateId_ = defaultSlateId_;
1344       }
1345       if (((from_bitField0_ & 0x00000100) != 0)) {
1346         result.stitchingPolicy_ = stitchingPolicy_;
1347       }
1348       if (((from_bitField0_ & 0x00000200) != 0)) {
1349         result.manifestOptions_ =
1350             manifestOptionsBuilder_ == null ? manifestOptions_ : manifestOptionsBuilder_.build();
1351       }
1352       if (((from_bitField0_ & 0x00000400) != 0)) {
1353         result.streamId_ = streamId_;
1354       }
1355     }
1356 
1357     @java.lang.Override
clone()1358     public Builder clone() {
1359       return super.clone();
1360     }
1361 
1362     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1363     public Builder setField(
1364         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1365       return super.setField(field, value);
1366     }
1367 
1368     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1369     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1370       return super.clearField(field);
1371     }
1372 
1373     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1374     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1375       return super.clearOneof(oneof);
1376     }
1377 
1378     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1379     public Builder setRepeatedField(
1380         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1381       return super.setRepeatedField(field, index, value);
1382     }
1383 
1384     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1385     public Builder addRepeatedField(
1386         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1387       return super.addRepeatedField(field, value);
1388     }
1389 
1390     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1391     public Builder mergeFrom(com.google.protobuf.Message other) {
1392       if (other instanceof com.google.cloud.video.stitcher.v1.LiveSession) {
1393         return mergeFrom((com.google.cloud.video.stitcher.v1.LiveSession) other);
1394       } else {
1395         super.mergeFrom(other);
1396         return this;
1397       }
1398     }
1399 
mergeFrom(com.google.cloud.video.stitcher.v1.LiveSession other)1400     public Builder mergeFrom(com.google.cloud.video.stitcher.v1.LiveSession other) {
1401       if (other == com.google.cloud.video.stitcher.v1.LiveSession.getDefaultInstance()) return this;
1402       if (!other.getName().isEmpty()) {
1403         name_ = other.name_;
1404         bitField0_ |= 0x00000001;
1405         onChanged();
1406       }
1407       if (!other.getPlayUri().isEmpty()) {
1408         playUri_ = other.playUri_;
1409         bitField0_ |= 0x00000002;
1410         onChanged();
1411       }
1412       if (!other.getSourceUri().isEmpty()) {
1413         sourceUri_ = other.sourceUri_;
1414         bitField0_ |= 0x00000004;
1415         onChanged();
1416       }
1417       if (!other.getDefaultAdTagId().isEmpty()) {
1418         defaultAdTagId_ = other.defaultAdTagId_;
1419         bitField0_ |= 0x00000008;
1420         onChanged();
1421       }
1422       internalGetMutableAdTagMap().mergeFrom(other.internalGetAdTagMap());
1423       bitField0_ |= 0x00000010;
1424       internalGetMutableAdTagMacros().mergeFrom(other.internalGetAdTagMacros());
1425       bitField0_ |= 0x00000020;
1426       if (other.getClientAdTracking() != false) {
1427         setClientAdTracking(other.getClientAdTracking());
1428       }
1429       if (!other.getDefaultSlateId().isEmpty()) {
1430         defaultSlateId_ = other.defaultSlateId_;
1431         bitField0_ |= 0x00000080;
1432         onChanged();
1433       }
1434       if (other.stitchingPolicy_ != 0) {
1435         setStitchingPolicyValue(other.getStitchingPolicyValue());
1436       }
1437       if (other.hasManifestOptions()) {
1438         mergeManifestOptions(other.getManifestOptions());
1439       }
1440       if (!other.getStreamId().isEmpty()) {
1441         streamId_ = other.streamId_;
1442         bitField0_ |= 0x00000400;
1443         onChanged();
1444       }
1445       this.mergeUnknownFields(other.getUnknownFields());
1446       onChanged();
1447       return this;
1448     }
1449 
1450     @java.lang.Override
isInitialized()1451     public final boolean isInitialized() {
1452       return true;
1453     }
1454 
1455     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1456     public Builder mergeFrom(
1457         com.google.protobuf.CodedInputStream input,
1458         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1459         throws java.io.IOException {
1460       if (extensionRegistry == null) {
1461         throw new java.lang.NullPointerException();
1462       }
1463       try {
1464         boolean done = false;
1465         while (!done) {
1466           int tag = input.readTag();
1467           switch (tag) {
1468             case 0:
1469               done = true;
1470               break;
1471             case 10:
1472               {
1473                 name_ = input.readStringRequireUtf8();
1474                 bitField0_ |= 0x00000001;
1475                 break;
1476               } // case 10
1477             case 18:
1478               {
1479                 playUri_ = input.readStringRequireUtf8();
1480                 bitField0_ |= 0x00000002;
1481                 break;
1482               } // case 18
1483             case 26:
1484               {
1485                 sourceUri_ = input.readStringRequireUtf8();
1486                 bitField0_ |= 0x00000004;
1487                 break;
1488               } // case 26
1489             case 34:
1490               {
1491                 defaultAdTagId_ = input.readStringRequireUtf8();
1492                 bitField0_ |= 0x00000008;
1493                 break;
1494               } // case 34
1495             case 42:
1496               {
1497                 com.google.protobuf.MapEntry<
1498                         java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
1499                     adTagMap__ =
1500                         input.readMessage(
1501                             AdTagMapDefaultEntryHolder.defaultEntry.getParserForType(),
1502                             extensionRegistry);
1503                 internalGetMutableAdTagMap()
1504                     .getMutableMap()
1505                     .put(adTagMap__.getKey(), adTagMap__.getValue());
1506                 bitField0_ |= 0x00000010;
1507                 break;
1508               } // case 42
1509             case 50:
1510               {
1511                 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> adTagMacros__ =
1512                     input.readMessage(
1513                         AdTagMacrosDefaultEntryHolder.defaultEntry.getParserForType(),
1514                         extensionRegistry);
1515                 internalGetMutableAdTagMacros()
1516                     .getMutableMap()
1517                     .put(adTagMacros__.getKey(), adTagMacros__.getValue());
1518                 bitField0_ |= 0x00000020;
1519                 break;
1520               } // case 50
1521             case 56:
1522               {
1523                 clientAdTracking_ = input.readBool();
1524                 bitField0_ |= 0x00000040;
1525                 break;
1526               } // case 56
1527             case 66:
1528               {
1529                 defaultSlateId_ = input.readStringRequireUtf8();
1530                 bitField0_ |= 0x00000080;
1531                 break;
1532               } // case 66
1533             case 72:
1534               {
1535                 stitchingPolicy_ = input.readEnum();
1536                 bitField0_ |= 0x00000100;
1537                 break;
1538               } // case 72
1539             case 82:
1540               {
1541                 input.readMessage(getManifestOptionsFieldBuilder().getBuilder(), extensionRegistry);
1542                 bitField0_ |= 0x00000200;
1543                 break;
1544               } // case 82
1545             case 90:
1546               {
1547                 streamId_ = input.readStringRequireUtf8();
1548                 bitField0_ |= 0x00000400;
1549                 break;
1550               } // case 90
1551             default:
1552               {
1553                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1554                   done = true; // was an endgroup tag
1555                 }
1556                 break;
1557               } // default:
1558           } // switch (tag)
1559         } // while (!done)
1560       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1561         throw e.unwrapIOException();
1562       } finally {
1563         onChanged();
1564       } // finally
1565       return this;
1566     }
1567 
1568     private int bitField0_;
1569 
1570     private java.lang.Object name_ = "";
1571     /**
1572      *
1573      *
1574      * <pre>
1575      * Output only. The name of the live session, in the form of
1576      * `projects/{project}/locations/{location}/liveSessions/{id}`.
1577      * </pre>
1578      *
1579      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1580      *
1581      * @return The name.
1582      */
getName()1583     public java.lang.String getName() {
1584       java.lang.Object ref = name_;
1585       if (!(ref instanceof java.lang.String)) {
1586         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1587         java.lang.String s = bs.toStringUtf8();
1588         name_ = s;
1589         return s;
1590       } else {
1591         return (java.lang.String) ref;
1592       }
1593     }
1594     /**
1595      *
1596      *
1597      * <pre>
1598      * Output only. The name of the live session, in the form of
1599      * `projects/{project}/locations/{location}/liveSessions/{id}`.
1600      * </pre>
1601      *
1602      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1603      *
1604      * @return The bytes for name.
1605      */
getNameBytes()1606     public com.google.protobuf.ByteString getNameBytes() {
1607       java.lang.Object ref = name_;
1608       if (ref instanceof String) {
1609         com.google.protobuf.ByteString b =
1610             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1611         name_ = b;
1612         return b;
1613       } else {
1614         return (com.google.protobuf.ByteString) ref;
1615       }
1616     }
1617     /**
1618      *
1619      *
1620      * <pre>
1621      * Output only. The name of the live session, in the form of
1622      * `projects/{project}/locations/{location}/liveSessions/{id}`.
1623      * </pre>
1624      *
1625      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1626      *
1627      * @param value The name to set.
1628      * @return This builder for chaining.
1629      */
setName(java.lang.String value)1630     public Builder setName(java.lang.String value) {
1631       if (value == null) {
1632         throw new NullPointerException();
1633       }
1634       name_ = value;
1635       bitField0_ |= 0x00000001;
1636       onChanged();
1637       return this;
1638     }
1639     /**
1640      *
1641      *
1642      * <pre>
1643      * Output only. The name of the live session, in the form of
1644      * `projects/{project}/locations/{location}/liveSessions/{id}`.
1645      * </pre>
1646      *
1647      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1648      *
1649      * @return This builder for chaining.
1650      */
clearName()1651     public Builder clearName() {
1652       name_ = getDefaultInstance().getName();
1653       bitField0_ = (bitField0_ & ~0x00000001);
1654       onChanged();
1655       return this;
1656     }
1657     /**
1658      *
1659      *
1660      * <pre>
1661      * Output only. The name of the live session, in the form of
1662      * `projects/{project}/locations/{location}/liveSessions/{id}`.
1663      * </pre>
1664      *
1665      * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1666      *
1667      * @param value The bytes for name to set.
1668      * @return This builder for chaining.
1669      */
setNameBytes(com.google.protobuf.ByteString value)1670     public Builder setNameBytes(com.google.protobuf.ByteString value) {
1671       if (value == null) {
1672         throw new NullPointerException();
1673       }
1674       checkByteStringIsUtf8(value);
1675       name_ = value;
1676       bitField0_ |= 0x00000001;
1677       onChanged();
1678       return this;
1679     }
1680 
1681     private java.lang.Object playUri_ = "";
1682     /**
1683      *
1684      *
1685      * <pre>
1686      * Output only. The URI to play the live session's ad-stitched stream.
1687      * </pre>
1688      *
1689      * <code>string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1690      *
1691      * @return The playUri.
1692      */
getPlayUri()1693     public java.lang.String getPlayUri() {
1694       java.lang.Object ref = playUri_;
1695       if (!(ref instanceof java.lang.String)) {
1696         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1697         java.lang.String s = bs.toStringUtf8();
1698         playUri_ = s;
1699         return s;
1700       } else {
1701         return (java.lang.String) ref;
1702       }
1703     }
1704     /**
1705      *
1706      *
1707      * <pre>
1708      * Output only. The URI to play the live session's ad-stitched stream.
1709      * </pre>
1710      *
1711      * <code>string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1712      *
1713      * @return The bytes for playUri.
1714      */
getPlayUriBytes()1715     public com.google.protobuf.ByteString getPlayUriBytes() {
1716       java.lang.Object ref = playUri_;
1717       if (ref instanceof String) {
1718         com.google.protobuf.ByteString b =
1719             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1720         playUri_ = b;
1721         return b;
1722       } else {
1723         return (com.google.protobuf.ByteString) ref;
1724       }
1725     }
1726     /**
1727      *
1728      *
1729      * <pre>
1730      * Output only. The URI to play the live session's ad-stitched stream.
1731      * </pre>
1732      *
1733      * <code>string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1734      *
1735      * @param value The playUri to set.
1736      * @return This builder for chaining.
1737      */
setPlayUri(java.lang.String value)1738     public Builder setPlayUri(java.lang.String value) {
1739       if (value == null) {
1740         throw new NullPointerException();
1741       }
1742       playUri_ = value;
1743       bitField0_ |= 0x00000002;
1744       onChanged();
1745       return this;
1746     }
1747     /**
1748      *
1749      *
1750      * <pre>
1751      * Output only. The URI to play the live session's ad-stitched stream.
1752      * </pre>
1753      *
1754      * <code>string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1755      *
1756      * @return This builder for chaining.
1757      */
clearPlayUri()1758     public Builder clearPlayUri() {
1759       playUri_ = getDefaultInstance().getPlayUri();
1760       bitField0_ = (bitField0_ & ~0x00000002);
1761       onChanged();
1762       return this;
1763     }
1764     /**
1765      *
1766      *
1767      * <pre>
1768      * Output only. The URI to play the live session's ad-stitched stream.
1769      * </pre>
1770      *
1771      * <code>string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
1772      *
1773      * @param value The bytes for playUri to set.
1774      * @return This builder for chaining.
1775      */
setPlayUriBytes(com.google.protobuf.ByteString value)1776     public Builder setPlayUriBytes(com.google.protobuf.ByteString value) {
1777       if (value == null) {
1778         throw new NullPointerException();
1779       }
1780       checkByteStringIsUtf8(value);
1781       playUri_ = value;
1782       bitField0_ |= 0x00000002;
1783       onChanged();
1784       return this;
1785     }
1786 
1787     private java.lang.Object sourceUri_ = "";
1788     /**
1789      *
1790      *
1791      * <pre>
1792      * The URI of the live session's source stream.
1793      * </pre>
1794      *
1795      * <code>string source_uri = 3;</code>
1796      *
1797      * @return The sourceUri.
1798      */
getSourceUri()1799     public java.lang.String getSourceUri() {
1800       java.lang.Object ref = sourceUri_;
1801       if (!(ref instanceof java.lang.String)) {
1802         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1803         java.lang.String s = bs.toStringUtf8();
1804         sourceUri_ = s;
1805         return s;
1806       } else {
1807         return (java.lang.String) ref;
1808       }
1809     }
1810     /**
1811      *
1812      *
1813      * <pre>
1814      * The URI of the live session's source stream.
1815      * </pre>
1816      *
1817      * <code>string source_uri = 3;</code>
1818      *
1819      * @return The bytes for sourceUri.
1820      */
getSourceUriBytes()1821     public com.google.protobuf.ByteString getSourceUriBytes() {
1822       java.lang.Object ref = sourceUri_;
1823       if (ref instanceof String) {
1824         com.google.protobuf.ByteString b =
1825             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1826         sourceUri_ = b;
1827         return b;
1828       } else {
1829         return (com.google.protobuf.ByteString) ref;
1830       }
1831     }
1832     /**
1833      *
1834      *
1835      * <pre>
1836      * The URI of the live session's source stream.
1837      * </pre>
1838      *
1839      * <code>string source_uri = 3;</code>
1840      *
1841      * @param value The sourceUri to set.
1842      * @return This builder for chaining.
1843      */
setSourceUri(java.lang.String value)1844     public Builder setSourceUri(java.lang.String value) {
1845       if (value == null) {
1846         throw new NullPointerException();
1847       }
1848       sourceUri_ = value;
1849       bitField0_ |= 0x00000004;
1850       onChanged();
1851       return this;
1852     }
1853     /**
1854      *
1855      *
1856      * <pre>
1857      * The URI of the live session's source stream.
1858      * </pre>
1859      *
1860      * <code>string source_uri = 3;</code>
1861      *
1862      * @return This builder for chaining.
1863      */
clearSourceUri()1864     public Builder clearSourceUri() {
1865       sourceUri_ = getDefaultInstance().getSourceUri();
1866       bitField0_ = (bitField0_ & ~0x00000004);
1867       onChanged();
1868       return this;
1869     }
1870     /**
1871      *
1872      *
1873      * <pre>
1874      * The URI of the live session's source stream.
1875      * </pre>
1876      *
1877      * <code>string source_uri = 3;</code>
1878      *
1879      * @param value The bytes for sourceUri to set.
1880      * @return This builder for chaining.
1881      */
setSourceUriBytes(com.google.protobuf.ByteString value)1882     public Builder setSourceUriBytes(com.google.protobuf.ByteString value) {
1883       if (value == null) {
1884         throw new NullPointerException();
1885       }
1886       checkByteStringIsUtf8(value);
1887       sourceUri_ = value;
1888       bitField0_ |= 0x00000004;
1889       onChanged();
1890       return this;
1891     }
1892 
1893     private java.lang.Object defaultAdTagId_ = "";
1894     /**
1895      *
1896      *
1897      * <pre>
1898      * The default ad tag to use when no ad tag ids are specified in an ad break's
1899      * SCTE-35 message.
1900      * default_ad_tag_id is necessary when `adTagMap` has more than one key. Its
1901      * value must be present in the `adTagMap`.
1902      * </pre>
1903      *
1904      * <code>string default_ad_tag_id = 4;</code>
1905      *
1906      * @return The defaultAdTagId.
1907      */
getDefaultAdTagId()1908     public java.lang.String getDefaultAdTagId() {
1909       java.lang.Object ref = defaultAdTagId_;
1910       if (!(ref instanceof java.lang.String)) {
1911         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1912         java.lang.String s = bs.toStringUtf8();
1913         defaultAdTagId_ = s;
1914         return s;
1915       } else {
1916         return (java.lang.String) ref;
1917       }
1918     }
1919     /**
1920      *
1921      *
1922      * <pre>
1923      * The default ad tag to use when no ad tag ids are specified in an ad break's
1924      * SCTE-35 message.
1925      * default_ad_tag_id is necessary when `adTagMap` has more than one key. Its
1926      * value must be present in the `adTagMap`.
1927      * </pre>
1928      *
1929      * <code>string default_ad_tag_id = 4;</code>
1930      *
1931      * @return The bytes for defaultAdTagId.
1932      */
getDefaultAdTagIdBytes()1933     public com.google.protobuf.ByteString getDefaultAdTagIdBytes() {
1934       java.lang.Object ref = defaultAdTagId_;
1935       if (ref instanceof String) {
1936         com.google.protobuf.ByteString b =
1937             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1938         defaultAdTagId_ = b;
1939         return b;
1940       } else {
1941         return (com.google.protobuf.ByteString) ref;
1942       }
1943     }
1944     /**
1945      *
1946      *
1947      * <pre>
1948      * The default ad tag to use when no ad tag ids are specified in an ad break's
1949      * SCTE-35 message.
1950      * default_ad_tag_id is necessary when `adTagMap` has more than one key. Its
1951      * value must be present in the `adTagMap`.
1952      * </pre>
1953      *
1954      * <code>string default_ad_tag_id = 4;</code>
1955      *
1956      * @param value The defaultAdTagId to set.
1957      * @return This builder for chaining.
1958      */
setDefaultAdTagId(java.lang.String value)1959     public Builder setDefaultAdTagId(java.lang.String value) {
1960       if (value == null) {
1961         throw new NullPointerException();
1962       }
1963       defaultAdTagId_ = value;
1964       bitField0_ |= 0x00000008;
1965       onChanged();
1966       return this;
1967     }
1968     /**
1969      *
1970      *
1971      * <pre>
1972      * The default ad tag to use when no ad tag ids are specified in an ad break's
1973      * SCTE-35 message.
1974      * default_ad_tag_id is necessary when `adTagMap` has more than one key. Its
1975      * value must be present in the `adTagMap`.
1976      * </pre>
1977      *
1978      * <code>string default_ad_tag_id = 4;</code>
1979      *
1980      * @return This builder for chaining.
1981      */
clearDefaultAdTagId()1982     public Builder clearDefaultAdTagId() {
1983       defaultAdTagId_ = getDefaultInstance().getDefaultAdTagId();
1984       bitField0_ = (bitField0_ & ~0x00000008);
1985       onChanged();
1986       return this;
1987     }
1988     /**
1989      *
1990      *
1991      * <pre>
1992      * The default ad tag to use when no ad tag ids are specified in an ad break's
1993      * SCTE-35 message.
1994      * default_ad_tag_id is necessary when `adTagMap` has more than one key. Its
1995      * value must be present in the `adTagMap`.
1996      * </pre>
1997      *
1998      * <code>string default_ad_tag_id = 4;</code>
1999      *
2000      * @param value The bytes for defaultAdTagId to set.
2001      * @return This builder for chaining.
2002      */
setDefaultAdTagIdBytes(com.google.protobuf.ByteString value)2003     public Builder setDefaultAdTagIdBytes(com.google.protobuf.ByteString value) {
2004       if (value == null) {
2005         throw new NullPointerException();
2006       }
2007       checkByteStringIsUtf8(value);
2008       defaultAdTagId_ = value;
2009       bitField0_ |= 0x00000008;
2010       onChanged();
2011       return this;
2012     }
2013 
2014     private com.google.protobuf.MapField<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
2015         adTagMap_;
2016 
2017     private com.google.protobuf.MapField<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
internalGetAdTagMap()2018         internalGetAdTagMap() {
2019       if (adTagMap_ == null) {
2020         return com.google.protobuf.MapField.emptyMapField(AdTagMapDefaultEntryHolder.defaultEntry);
2021       }
2022       return adTagMap_;
2023     }
2024 
2025     private com.google.protobuf.MapField<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
internalGetMutableAdTagMap()2026         internalGetMutableAdTagMap() {
2027       if (adTagMap_ == null) {
2028         adTagMap_ =
2029             com.google.protobuf.MapField.newMapField(AdTagMapDefaultEntryHolder.defaultEntry);
2030       }
2031       if (!adTagMap_.isMutable()) {
2032         adTagMap_ = adTagMap_.copy();
2033       }
2034       bitField0_ |= 0x00000010;
2035       onChanged();
2036       return adTagMap_;
2037     }
2038 
getAdTagMapCount()2039     public int getAdTagMapCount() {
2040       return internalGetAdTagMap().getMap().size();
2041     }
2042     /**
2043      *
2044      *
2045      * <pre>
2046      * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
2047      * each with at least one audio track.
2048      * </pre>
2049      *
2050      * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
2051      */
2052     @java.lang.Override
containsAdTagMap(java.lang.String key)2053     public boolean containsAdTagMap(java.lang.String key) {
2054       if (key == null) {
2055         throw new NullPointerException("map key");
2056       }
2057       return internalGetAdTagMap().getMap().containsKey(key);
2058     }
2059     /** Use {@link #getAdTagMapMap()} instead. */
2060     @java.lang.Override
2061     @java.lang.Deprecated
getAdTagMap()2062     public java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag> getAdTagMap() {
2063       return getAdTagMapMap();
2064     }
2065     /**
2066      *
2067      *
2068      * <pre>
2069      * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
2070      * each with at least one audio track.
2071      * </pre>
2072      *
2073      * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
2074      */
2075     @java.lang.Override
2076     public java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
getAdTagMapMap()2077         getAdTagMapMap() {
2078       return internalGetAdTagMap().getMap();
2079     }
2080     /**
2081      *
2082      *
2083      * <pre>
2084      * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
2085      * each with at least one audio track.
2086      * </pre>
2087      *
2088      * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
2089      */
2090     @java.lang.Override
getAdTagMapOrDefault( java.lang.String key, com.google.cloud.video.stitcher.v1.AdTag defaultValue)2091     public /* nullable */ com.google.cloud.video.stitcher.v1.AdTag getAdTagMapOrDefault(
2092         java.lang.String key,
2093         /* nullable */
2094         com.google.cloud.video.stitcher.v1.AdTag defaultValue) {
2095       if (key == null) {
2096         throw new NullPointerException("map key");
2097       }
2098       java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag> map =
2099           internalGetAdTagMap().getMap();
2100       return map.containsKey(key) ? map.get(key) : defaultValue;
2101     }
2102     /**
2103      *
2104      *
2105      * <pre>
2106      * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
2107      * each with at least one audio track.
2108      * </pre>
2109      *
2110      * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
2111      */
2112     @java.lang.Override
getAdTagMapOrThrow(java.lang.String key)2113     public com.google.cloud.video.stitcher.v1.AdTag getAdTagMapOrThrow(java.lang.String key) {
2114       if (key == null) {
2115         throw new NullPointerException("map key");
2116       }
2117       java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag> map =
2118           internalGetAdTagMap().getMap();
2119       if (!map.containsKey(key)) {
2120         throw new java.lang.IllegalArgumentException();
2121       }
2122       return map.get(key);
2123     }
2124 
clearAdTagMap()2125     public Builder clearAdTagMap() {
2126       bitField0_ = (bitField0_ & ~0x00000010);
2127       internalGetMutableAdTagMap().getMutableMap().clear();
2128       return this;
2129     }
2130     /**
2131      *
2132      *
2133      * <pre>
2134      * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
2135      * each with at least one audio track.
2136      * </pre>
2137      *
2138      * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
2139      */
removeAdTagMap(java.lang.String key)2140     public Builder removeAdTagMap(java.lang.String key) {
2141       if (key == null) {
2142         throw new NullPointerException("map key");
2143       }
2144       internalGetMutableAdTagMap().getMutableMap().remove(key);
2145       return this;
2146     }
2147     /** Use alternate mutation accessors instead. */
2148     @java.lang.Deprecated
2149     public java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag>
getMutableAdTagMap()2150         getMutableAdTagMap() {
2151       bitField0_ |= 0x00000010;
2152       return internalGetMutableAdTagMap().getMutableMap();
2153     }
2154     /**
2155      *
2156      *
2157      * <pre>
2158      * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
2159      * each with at least one audio track.
2160      * </pre>
2161      *
2162      * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
2163      */
putAdTagMap( java.lang.String key, com.google.cloud.video.stitcher.v1.AdTag value)2164     public Builder putAdTagMap(
2165         java.lang.String key, com.google.cloud.video.stitcher.v1.AdTag value) {
2166       if (key == null) {
2167         throw new NullPointerException("map key");
2168       }
2169       if (value == null) {
2170         throw new NullPointerException("map value");
2171       }
2172       internalGetMutableAdTagMap().getMutableMap().put(key, value);
2173       bitField0_ |= 0x00000010;
2174       return this;
2175     }
2176     /**
2177      *
2178      *
2179      * <pre>
2180      * Key value pairs for ad tags. Ads parsed from ad tags must be MP4 videos
2181      * each with at least one audio track.
2182      * </pre>
2183      *
2184      * <code>map&lt;string, .google.cloud.video.stitcher.v1.AdTag&gt; ad_tag_map = 5;</code>
2185      */
putAllAdTagMap( java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag> values)2186     public Builder putAllAdTagMap(
2187         java.util.Map<java.lang.String, com.google.cloud.video.stitcher.v1.AdTag> values) {
2188       internalGetMutableAdTagMap().getMutableMap().putAll(values);
2189       bitField0_ |= 0x00000010;
2190       return this;
2191     }
2192 
2193     private com.google.protobuf.MapField<java.lang.String, java.lang.String> adTagMacros_;
2194 
2195     private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetAdTagMacros()2196         internalGetAdTagMacros() {
2197       if (adTagMacros_ == null) {
2198         return com.google.protobuf.MapField.emptyMapField(
2199             AdTagMacrosDefaultEntryHolder.defaultEntry);
2200       }
2201       return adTagMacros_;
2202     }
2203 
2204     private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableAdTagMacros()2205         internalGetMutableAdTagMacros() {
2206       if (adTagMacros_ == null) {
2207         adTagMacros_ =
2208             com.google.protobuf.MapField.newMapField(AdTagMacrosDefaultEntryHolder.defaultEntry);
2209       }
2210       if (!adTagMacros_.isMutable()) {
2211         adTagMacros_ = adTagMacros_.copy();
2212       }
2213       bitField0_ |= 0x00000020;
2214       onChanged();
2215       return adTagMacros_;
2216     }
2217 
getAdTagMacrosCount()2218     public int getAdTagMacrosCount() {
2219       return internalGetAdTagMacros().getMap().size();
2220     }
2221     /**
2222      *
2223      *
2224      * <pre>
2225      * Key value pairs for ad tag macro replacement. If the
2226      * specified ad tag URI has macros, this field provides the mapping
2227      * to the value that will replace the macro in the ad tag URI.
2228      * Macros are designated by square brackets.
2229      * For example:
2230      *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
2231      *   Ad tag macros: `{"geoId": "123"}`
2232      *   Fully qualified ad tag:
2233      *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
2234      * </pre>
2235      *
2236      * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
2237      */
2238     @java.lang.Override
containsAdTagMacros(java.lang.String key)2239     public boolean containsAdTagMacros(java.lang.String key) {
2240       if (key == null) {
2241         throw new NullPointerException("map key");
2242       }
2243       return internalGetAdTagMacros().getMap().containsKey(key);
2244     }
2245     /** Use {@link #getAdTagMacrosMap()} instead. */
2246     @java.lang.Override
2247     @java.lang.Deprecated
getAdTagMacros()2248     public java.util.Map<java.lang.String, java.lang.String> getAdTagMacros() {
2249       return getAdTagMacrosMap();
2250     }
2251     /**
2252      *
2253      *
2254      * <pre>
2255      * Key value pairs for ad tag macro replacement. If the
2256      * specified ad tag URI has macros, this field provides the mapping
2257      * to the value that will replace the macro in the ad tag URI.
2258      * Macros are designated by square brackets.
2259      * For example:
2260      *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
2261      *   Ad tag macros: `{"geoId": "123"}`
2262      *   Fully qualified ad tag:
2263      *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
2264      * </pre>
2265      *
2266      * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
2267      */
2268     @java.lang.Override
getAdTagMacrosMap()2269     public java.util.Map<java.lang.String, java.lang.String> getAdTagMacrosMap() {
2270       return internalGetAdTagMacros().getMap();
2271     }
2272     /**
2273      *
2274      *
2275      * <pre>
2276      * Key value pairs for ad tag macro replacement. If the
2277      * specified ad tag URI has macros, this field provides the mapping
2278      * to the value that will replace the macro in the ad tag URI.
2279      * Macros are designated by square brackets.
2280      * For example:
2281      *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
2282      *   Ad tag macros: `{"geoId": "123"}`
2283      *   Fully qualified ad tag:
2284      *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
2285      * </pre>
2286      *
2287      * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
2288      */
2289     @java.lang.Override
getAdTagMacrosOrDefault( java.lang.String key, java.lang.String defaultValue)2290     public /* nullable */ java.lang.String getAdTagMacrosOrDefault(
2291         java.lang.String key,
2292         /* nullable */
2293         java.lang.String defaultValue) {
2294       if (key == null) {
2295         throw new NullPointerException("map key");
2296       }
2297       java.util.Map<java.lang.String, java.lang.String> map = internalGetAdTagMacros().getMap();
2298       return map.containsKey(key) ? map.get(key) : defaultValue;
2299     }
2300     /**
2301      *
2302      *
2303      * <pre>
2304      * Key value pairs for ad tag macro replacement. If the
2305      * specified ad tag URI has macros, this field provides the mapping
2306      * to the value that will replace the macro in the ad tag URI.
2307      * Macros are designated by square brackets.
2308      * For example:
2309      *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
2310      *   Ad tag macros: `{"geoId": "123"}`
2311      *   Fully qualified ad tag:
2312      *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
2313      * </pre>
2314      *
2315      * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
2316      */
2317     @java.lang.Override
getAdTagMacrosOrThrow(java.lang.String key)2318     public java.lang.String getAdTagMacrosOrThrow(java.lang.String key) {
2319       if (key == null) {
2320         throw new NullPointerException("map key");
2321       }
2322       java.util.Map<java.lang.String, java.lang.String> map = internalGetAdTagMacros().getMap();
2323       if (!map.containsKey(key)) {
2324         throw new java.lang.IllegalArgumentException();
2325       }
2326       return map.get(key);
2327     }
2328 
clearAdTagMacros()2329     public Builder clearAdTagMacros() {
2330       bitField0_ = (bitField0_ & ~0x00000020);
2331       internalGetMutableAdTagMacros().getMutableMap().clear();
2332       return this;
2333     }
2334     /**
2335      *
2336      *
2337      * <pre>
2338      * Key value pairs for ad tag macro replacement. If the
2339      * specified ad tag URI has macros, this field provides the mapping
2340      * to the value that will replace the macro in the ad tag URI.
2341      * Macros are designated by square brackets.
2342      * For example:
2343      *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
2344      *   Ad tag macros: `{"geoId": "123"}`
2345      *   Fully qualified ad tag:
2346      *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
2347      * </pre>
2348      *
2349      * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
2350      */
removeAdTagMacros(java.lang.String key)2351     public Builder removeAdTagMacros(java.lang.String key) {
2352       if (key == null) {
2353         throw new NullPointerException("map key");
2354       }
2355       internalGetMutableAdTagMacros().getMutableMap().remove(key);
2356       return this;
2357     }
2358     /** Use alternate mutation accessors instead. */
2359     @java.lang.Deprecated
getMutableAdTagMacros()2360     public java.util.Map<java.lang.String, java.lang.String> getMutableAdTagMacros() {
2361       bitField0_ |= 0x00000020;
2362       return internalGetMutableAdTagMacros().getMutableMap();
2363     }
2364     /**
2365      *
2366      *
2367      * <pre>
2368      * Key value pairs for ad tag macro replacement. If the
2369      * specified ad tag URI has macros, this field provides the mapping
2370      * to the value that will replace the macro in the ad tag URI.
2371      * Macros are designated by square brackets.
2372      * For example:
2373      *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
2374      *   Ad tag macros: `{"geoId": "123"}`
2375      *   Fully qualified ad tag:
2376      *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
2377      * </pre>
2378      *
2379      * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
2380      */
putAdTagMacros(java.lang.String key, java.lang.String value)2381     public Builder putAdTagMacros(java.lang.String key, java.lang.String value) {
2382       if (key == null) {
2383         throw new NullPointerException("map key");
2384       }
2385       if (value == null) {
2386         throw new NullPointerException("map value");
2387       }
2388       internalGetMutableAdTagMacros().getMutableMap().put(key, value);
2389       bitField0_ |= 0x00000020;
2390       return this;
2391     }
2392     /**
2393      *
2394      *
2395      * <pre>
2396      * Key value pairs for ad tag macro replacement. If the
2397      * specified ad tag URI has macros, this field provides the mapping
2398      * to the value that will replace the macro in the ad tag URI.
2399      * Macros are designated by square brackets.
2400      * For example:
2401      *   Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]"
2402      *   Ad tag macros: `{"geoId": "123"}`
2403      *   Fully qualified ad tag:
2404      *   `"https://doubleclick.google.com/ad/1?geo_id=123"`
2405      * </pre>
2406      *
2407      * <code>map&lt;string, string&gt; ad_tag_macros = 6;</code>
2408      */
putAllAdTagMacros(java.util.Map<java.lang.String, java.lang.String> values)2409     public Builder putAllAdTagMacros(java.util.Map<java.lang.String, java.lang.String> values) {
2410       internalGetMutableAdTagMacros().getMutableMap().putAll(values);
2411       bitField0_ |= 0x00000020;
2412       return this;
2413     }
2414 
2415     private boolean clientAdTracking_;
2416     /**
2417      *
2418      *
2419      * <pre>
2420      * Whether client side ad tracking is enabled. If enabled, the client player
2421      * is expected to trigger playback and activity events itself. Otherwise,
2422      * server side ad tracking is enabled and the Video Stitcher API will trigger
2423      * playback events on behalf of the client player.
2424      * </pre>
2425      *
2426      * <code>bool client_ad_tracking = 7;</code>
2427      *
2428      * @return The clientAdTracking.
2429      */
2430     @java.lang.Override
getClientAdTracking()2431     public boolean getClientAdTracking() {
2432       return clientAdTracking_;
2433     }
2434     /**
2435      *
2436      *
2437      * <pre>
2438      * Whether client side ad tracking is enabled. If enabled, the client player
2439      * is expected to trigger playback and activity events itself. Otherwise,
2440      * server side ad tracking is enabled and the Video Stitcher API will trigger
2441      * playback events on behalf of the client player.
2442      * </pre>
2443      *
2444      * <code>bool client_ad_tracking = 7;</code>
2445      *
2446      * @param value The clientAdTracking to set.
2447      * @return This builder for chaining.
2448      */
setClientAdTracking(boolean value)2449     public Builder setClientAdTracking(boolean value) {
2450 
2451       clientAdTracking_ = value;
2452       bitField0_ |= 0x00000040;
2453       onChanged();
2454       return this;
2455     }
2456     /**
2457      *
2458      *
2459      * <pre>
2460      * Whether client side ad tracking is enabled. If enabled, the client player
2461      * is expected to trigger playback and activity events itself. Otherwise,
2462      * server side ad tracking is enabled and the Video Stitcher API will trigger
2463      * playback events on behalf of the client player.
2464      * </pre>
2465      *
2466      * <code>bool client_ad_tracking = 7;</code>
2467      *
2468      * @return This builder for chaining.
2469      */
clearClientAdTracking()2470     public Builder clearClientAdTracking() {
2471       bitField0_ = (bitField0_ & ~0x00000040);
2472       clientAdTracking_ = false;
2473       onChanged();
2474       return this;
2475     }
2476 
2477     private java.lang.Object defaultSlateId_ = "";
2478     /**
2479      *
2480      *
2481      * <pre>
2482      * The default slate to use when no slates are specified in an ad break's
2483      * SCTE-35 message. When specified, this value must match the ID for a slate
2484      * that has already been created via the
2485      * [CreateSlate](projects.locations.slates/create) method.
2486      * </pre>
2487      *
2488      * <code>string default_slate_id = 8;</code>
2489      *
2490      * @return The defaultSlateId.
2491      */
getDefaultSlateId()2492     public java.lang.String getDefaultSlateId() {
2493       java.lang.Object ref = defaultSlateId_;
2494       if (!(ref instanceof java.lang.String)) {
2495         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2496         java.lang.String s = bs.toStringUtf8();
2497         defaultSlateId_ = s;
2498         return s;
2499       } else {
2500         return (java.lang.String) ref;
2501       }
2502     }
2503     /**
2504      *
2505      *
2506      * <pre>
2507      * The default slate to use when no slates are specified in an ad break's
2508      * SCTE-35 message. When specified, this value must match the ID for a slate
2509      * that has already been created via the
2510      * [CreateSlate](projects.locations.slates/create) method.
2511      * </pre>
2512      *
2513      * <code>string default_slate_id = 8;</code>
2514      *
2515      * @return The bytes for defaultSlateId.
2516      */
getDefaultSlateIdBytes()2517     public com.google.protobuf.ByteString getDefaultSlateIdBytes() {
2518       java.lang.Object ref = defaultSlateId_;
2519       if (ref instanceof String) {
2520         com.google.protobuf.ByteString b =
2521             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2522         defaultSlateId_ = b;
2523         return b;
2524       } else {
2525         return (com.google.protobuf.ByteString) ref;
2526       }
2527     }
2528     /**
2529      *
2530      *
2531      * <pre>
2532      * The default slate to use when no slates are specified in an ad break's
2533      * SCTE-35 message. When specified, this value must match the ID for a slate
2534      * that has already been created via the
2535      * [CreateSlate](projects.locations.slates/create) method.
2536      * </pre>
2537      *
2538      * <code>string default_slate_id = 8;</code>
2539      *
2540      * @param value The defaultSlateId to set.
2541      * @return This builder for chaining.
2542      */
setDefaultSlateId(java.lang.String value)2543     public Builder setDefaultSlateId(java.lang.String value) {
2544       if (value == null) {
2545         throw new NullPointerException();
2546       }
2547       defaultSlateId_ = value;
2548       bitField0_ |= 0x00000080;
2549       onChanged();
2550       return this;
2551     }
2552     /**
2553      *
2554      *
2555      * <pre>
2556      * The default slate to use when no slates are specified in an ad break's
2557      * SCTE-35 message. When specified, this value must match the ID for a slate
2558      * that has already been created via the
2559      * [CreateSlate](projects.locations.slates/create) method.
2560      * </pre>
2561      *
2562      * <code>string default_slate_id = 8;</code>
2563      *
2564      * @return This builder for chaining.
2565      */
clearDefaultSlateId()2566     public Builder clearDefaultSlateId() {
2567       defaultSlateId_ = getDefaultInstance().getDefaultSlateId();
2568       bitField0_ = (bitField0_ & ~0x00000080);
2569       onChanged();
2570       return this;
2571     }
2572     /**
2573      *
2574      *
2575      * <pre>
2576      * The default slate to use when no slates are specified in an ad break's
2577      * SCTE-35 message. When specified, this value must match the ID for a slate
2578      * that has already been created via the
2579      * [CreateSlate](projects.locations.slates/create) method.
2580      * </pre>
2581      *
2582      * <code>string default_slate_id = 8;</code>
2583      *
2584      * @param value The bytes for defaultSlateId to set.
2585      * @return This builder for chaining.
2586      */
setDefaultSlateIdBytes(com.google.protobuf.ByteString value)2587     public Builder setDefaultSlateIdBytes(com.google.protobuf.ByteString value) {
2588       if (value == null) {
2589         throw new NullPointerException();
2590       }
2591       checkByteStringIsUtf8(value);
2592       defaultSlateId_ = value;
2593       bitField0_ |= 0x00000080;
2594       onChanged();
2595       return this;
2596     }
2597 
2598     private int stitchingPolicy_ = 0;
2599     /**
2600      *
2601      *
2602      * <pre>
2603      * Defines the stitcher behavior in case an ad does not align exactly with
2604      * the ad break boundaries. If not specified, the default is `COMPLETE_AD`.
2605      * </pre>
2606      *
2607      * <code>.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy stitching_policy = 9;
2608      * </code>
2609      *
2610      * @return The enum numeric value on the wire for stitchingPolicy.
2611      */
2612     @java.lang.Override
getStitchingPolicyValue()2613     public int getStitchingPolicyValue() {
2614       return stitchingPolicy_;
2615     }
2616     /**
2617      *
2618      *
2619      * <pre>
2620      * Defines the stitcher behavior in case an ad does not align exactly with
2621      * the ad break boundaries. If not specified, the default is `COMPLETE_AD`.
2622      * </pre>
2623      *
2624      * <code>.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy stitching_policy = 9;
2625      * </code>
2626      *
2627      * @param value The enum numeric value on the wire for stitchingPolicy to set.
2628      * @return This builder for chaining.
2629      */
setStitchingPolicyValue(int value)2630     public Builder setStitchingPolicyValue(int value) {
2631       stitchingPolicy_ = value;
2632       bitField0_ |= 0x00000100;
2633       onChanged();
2634       return this;
2635     }
2636     /**
2637      *
2638      *
2639      * <pre>
2640      * Defines the stitcher behavior in case an ad does not align exactly with
2641      * the ad break boundaries. If not specified, the default is `COMPLETE_AD`.
2642      * </pre>
2643      *
2644      * <code>.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy stitching_policy = 9;
2645      * </code>
2646      *
2647      * @return The stitchingPolicy.
2648      */
2649     @java.lang.Override
getStitchingPolicy()2650     public com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy getStitchingPolicy() {
2651       com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy result =
2652           com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy.forNumber(
2653               stitchingPolicy_);
2654       return result == null
2655           ? com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy.UNRECOGNIZED
2656           : result;
2657     }
2658     /**
2659      *
2660      *
2661      * <pre>
2662      * Defines the stitcher behavior in case an ad does not align exactly with
2663      * the ad break boundaries. If not specified, the default is `COMPLETE_AD`.
2664      * </pre>
2665      *
2666      * <code>.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy stitching_policy = 9;
2667      * </code>
2668      *
2669      * @param value The stitchingPolicy to set.
2670      * @return This builder for chaining.
2671      */
setStitchingPolicy( com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy value)2672     public Builder setStitchingPolicy(
2673         com.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy value) {
2674       if (value == null) {
2675         throw new NullPointerException();
2676       }
2677       bitField0_ |= 0x00000100;
2678       stitchingPolicy_ = value.getNumber();
2679       onChanged();
2680       return this;
2681     }
2682     /**
2683      *
2684      *
2685      * <pre>
2686      * Defines the stitcher behavior in case an ad does not align exactly with
2687      * the ad break boundaries. If not specified, the default is `COMPLETE_AD`.
2688      * </pre>
2689      *
2690      * <code>.google.cloud.video.stitcher.v1.LiveSession.StitchingPolicy stitching_policy = 9;
2691      * </code>
2692      *
2693      * @return This builder for chaining.
2694      */
clearStitchingPolicy()2695     public Builder clearStitchingPolicy() {
2696       bitField0_ = (bitField0_ & ~0x00000100);
2697       stitchingPolicy_ = 0;
2698       onChanged();
2699       return this;
2700     }
2701 
2702     private com.google.cloud.video.stitcher.v1.ManifestOptions manifestOptions_;
2703     private com.google.protobuf.SingleFieldBuilderV3<
2704             com.google.cloud.video.stitcher.v1.ManifestOptions,
2705             com.google.cloud.video.stitcher.v1.ManifestOptions.Builder,
2706             com.google.cloud.video.stitcher.v1.ManifestOptionsOrBuilder>
2707         manifestOptionsBuilder_;
2708     /**
2709      *
2710      *
2711      * <pre>
2712      * Additional options that affect the output of the manifest.
2713      * </pre>
2714      *
2715      * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
2716      *
2717      * @return Whether the manifestOptions field is set.
2718      */
hasManifestOptions()2719     public boolean hasManifestOptions() {
2720       return ((bitField0_ & 0x00000200) != 0);
2721     }
2722     /**
2723      *
2724      *
2725      * <pre>
2726      * Additional options that affect the output of the manifest.
2727      * </pre>
2728      *
2729      * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
2730      *
2731      * @return The manifestOptions.
2732      */
getManifestOptions()2733     public com.google.cloud.video.stitcher.v1.ManifestOptions getManifestOptions() {
2734       if (manifestOptionsBuilder_ == null) {
2735         return manifestOptions_ == null
2736             ? com.google.cloud.video.stitcher.v1.ManifestOptions.getDefaultInstance()
2737             : manifestOptions_;
2738       } else {
2739         return manifestOptionsBuilder_.getMessage();
2740       }
2741     }
2742     /**
2743      *
2744      *
2745      * <pre>
2746      * Additional options that affect the output of the manifest.
2747      * </pre>
2748      *
2749      * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
2750      */
setManifestOptions(com.google.cloud.video.stitcher.v1.ManifestOptions value)2751     public Builder setManifestOptions(com.google.cloud.video.stitcher.v1.ManifestOptions value) {
2752       if (manifestOptionsBuilder_ == null) {
2753         if (value == null) {
2754           throw new NullPointerException();
2755         }
2756         manifestOptions_ = value;
2757       } else {
2758         manifestOptionsBuilder_.setMessage(value);
2759       }
2760       bitField0_ |= 0x00000200;
2761       onChanged();
2762       return this;
2763     }
2764     /**
2765      *
2766      *
2767      * <pre>
2768      * Additional options that affect the output of the manifest.
2769      * </pre>
2770      *
2771      * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
2772      */
setManifestOptions( com.google.cloud.video.stitcher.v1.ManifestOptions.Builder builderForValue)2773     public Builder setManifestOptions(
2774         com.google.cloud.video.stitcher.v1.ManifestOptions.Builder builderForValue) {
2775       if (manifestOptionsBuilder_ == null) {
2776         manifestOptions_ = builderForValue.build();
2777       } else {
2778         manifestOptionsBuilder_.setMessage(builderForValue.build());
2779       }
2780       bitField0_ |= 0x00000200;
2781       onChanged();
2782       return this;
2783     }
2784     /**
2785      *
2786      *
2787      * <pre>
2788      * Additional options that affect the output of the manifest.
2789      * </pre>
2790      *
2791      * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
2792      */
mergeManifestOptions(com.google.cloud.video.stitcher.v1.ManifestOptions value)2793     public Builder mergeManifestOptions(com.google.cloud.video.stitcher.v1.ManifestOptions value) {
2794       if (manifestOptionsBuilder_ == null) {
2795         if (((bitField0_ & 0x00000200) != 0)
2796             && manifestOptions_ != null
2797             && manifestOptions_
2798                 != com.google.cloud.video.stitcher.v1.ManifestOptions.getDefaultInstance()) {
2799           getManifestOptionsBuilder().mergeFrom(value);
2800         } else {
2801           manifestOptions_ = value;
2802         }
2803       } else {
2804         manifestOptionsBuilder_.mergeFrom(value);
2805       }
2806       bitField0_ |= 0x00000200;
2807       onChanged();
2808       return this;
2809     }
2810     /**
2811      *
2812      *
2813      * <pre>
2814      * Additional options that affect the output of the manifest.
2815      * </pre>
2816      *
2817      * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
2818      */
clearManifestOptions()2819     public Builder clearManifestOptions() {
2820       bitField0_ = (bitField0_ & ~0x00000200);
2821       manifestOptions_ = null;
2822       if (manifestOptionsBuilder_ != null) {
2823         manifestOptionsBuilder_.dispose();
2824         manifestOptionsBuilder_ = null;
2825       }
2826       onChanged();
2827       return this;
2828     }
2829     /**
2830      *
2831      *
2832      * <pre>
2833      * Additional options that affect the output of the manifest.
2834      * </pre>
2835      *
2836      * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
2837      */
getManifestOptionsBuilder()2838     public com.google.cloud.video.stitcher.v1.ManifestOptions.Builder getManifestOptionsBuilder() {
2839       bitField0_ |= 0x00000200;
2840       onChanged();
2841       return getManifestOptionsFieldBuilder().getBuilder();
2842     }
2843     /**
2844      *
2845      *
2846      * <pre>
2847      * Additional options that affect the output of the manifest.
2848      * </pre>
2849      *
2850      * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
2851      */
2852     public com.google.cloud.video.stitcher.v1.ManifestOptionsOrBuilder
getManifestOptionsOrBuilder()2853         getManifestOptionsOrBuilder() {
2854       if (manifestOptionsBuilder_ != null) {
2855         return manifestOptionsBuilder_.getMessageOrBuilder();
2856       } else {
2857         return manifestOptions_ == null
2858             ? com.google.cloud.video.stitcher.v1.ManifestOptions.getDefaultInstance()
2859             : manifestOptions_;
2860       }
2861     }
2862     /**
2863      *
2864      *
2865      * <pre>
2866      * Additional options that affect the output of the manifest.
2867      * </pre>
2868      *
2869      * <code>.google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10;</code>
2870      */
2871     private com.google.protobuf.SingleFieldBuilderV3<
2872             com.google.cloud.video.stitcher.v1.ManifestOptions,
2873             com.google.cloud.video.stitcher.v1.ManifestOptions.Builder,
2874             com.google.cloud.video.stitcher.v1.ManifestOptionsOrBuilder>
getManifestOptionsFieldBuilder()2875         getManifestOptionsFieldBuilder() {
2876       if (manifestOptionsBuilder_ == null) {
2877         manifestOptionsBuilder_ =
2878             new com.google.protobuf.SingleFieldBuilderV3<
2879                 com.google.cloud.video.stitcher.v1.ManifestOptions,
2880                 com.google.cloud.video.stitcher.v1.ManifestOptions.Builder,
2881                 com.google.cloud.video.stitcher.v1.ManifestOptionsOrBuilder>(
2882                 getManifestOptions(), getParentForChildren(), isClean());
2883         manifestOptions_ = null;
2884       }
2885       return manifestOptionsBuilder_;
2886     }
2887 
2888     private java.lang.Object streamId_ = "";
2889     /**
2890      *
2891      *
2892      * <pre>
2893      * Output only. The generated ID of the LiveSession's source stream.
2894      * </pre>
2895      *
2896      * <code>string stream_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2897      *
2898      * @return The streamId.
2899      */
getStreamId()2900     public java.lang.String getStreamId() {
2901       java.lang.Object ref = streamId_;
2902       if (!(ref instanceof java.lang.String)) {
2903         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2904         java.lang.String s = bs.toStringUtf8();
2905         streamId_ = s;
2906         return s;
2907       } else {
2908         return (java.lang.String) ref;
2909       }
2910     }
2911     /**
2912      *
2913      *
2914      * <pre>
2915      * Output only. The generated ID of the LiveSession's source stream.
2916      * </pre>
2917      *
2918      * <code>string stream_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2919      *
2920      * @return The bytes for streamId.
2921      */
getStreamIdBytes()2922     public com.google.protobuf.ByteString getStreamIdBytes() {
2923       java.lang.Object ref = streamId_;
2924       if (ref instanceof String) {
2925         com.google.protobuf.ByteString b =
2926             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2927         streamId_ = b;
2928         return b;
2929       } else {
2930         return (com.google.protobuf.ByteString) ref;
2931       }
2932     }
2933     /**
2934      *
2935      *
2936      * <pre>
2937      * Output only. The generated ID of the LiveSession's source stream.
2938      * </pre>
2939      *
2940      * <code>string stream_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2941      *
2942      * @param value The streamId to set.
2943      * @return This builder for chaining.
2944      */
setStreamId(java.lang.String value)2945     public Builder setStreamId(java.lang.String value) {
2946       if (value == null) {
2947         throw new NullPointerException();
2948       }
2949       streamId_ = value;
2950       bitField0_ |= 0x00000400;
2951       onChanged();
2952       return this;
2953     }
2954     /**
2955      *
2956      *
2957      * <pre>
2958      * Output only. The generated ID of the LiveSession's source stream.
2959      * </pre>
2960      *
2961      * <code>string stream_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2962      *
2963      * @return This builder for chaining.
2964      */
clearStreamId()2965     public Builder clearStreamId() {
2966       streamId_ = getDefaultInstance().getStreamId();
2967       bitField0_ = (bitField0_ & ~0x00000400);
2968       onChanged();
2969       return this;
2970     }
2971     /**
2972      *
2973      *
2974      * <pre>
2975      * Output only. The generated ID of the LiveSession's source stream.
2976      * </pre>
2977      *
2978      * <code>string stream_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
2979      *
2980      * @param value The bytes for streamId to set.
2981      * @return This builder for chaining.
2982      */
setStreamIdBytes(com.google.protobuf.ByteString value)2983     public Builder setStreamIdBytes(com.google.protobuf.ByteString value) {
2984       if (value == null) {
2985         throw new NullPointerException();
2986       }
2987       checkByteStringIsUtf8(value);
2988       streamId_ = value;
2989       bitField0_ |= 0x00000400;
2990       onChanged();
2991       return this;
2992     }
2993 
2994     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2995     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
2996       return super.setUnknownFields(unknownFields);
2997     }
2998 
2999     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3000     public final Builder mergeUnknownFields(
3001         final com.google.protobuf.UnknownFieldSet unknownFields) {
3002       return super.mergeUnknownFields(unknownFields);
3003     }
3004 
3005     // @@protoc_insertion_point(builder_scope:google.cloud.video.stitcher.v1.LiveSession)
3006   }
3007 
3008   // @@protoc_insertion_point(class_scope:google.cloud.video.stitcher.v1.LiveSession)
3009   private static final com.google.cloud.video.stitcher.v1.LiveSession DEFAULT_INSTANCE;
3010 
3011   static {
3012     DEFAULT_INSTANCE = new com.google.cloud.video.stitcher.v1.LiveSession();
3013   }
3014 
getDefaultInstance()3015   public static com.google.cloud.video.stitcher.v1.LiveSession getDefaultInstance() {
3016     return DEFAULT_INSTANCE;
3017   }
3018 
3019   private static final com.google.protobuf.Parser<LiveSession> PARSER =
3020       new com.google.protobuf.AbstractParser<LiveSession>() {
3021         @java.lang.Override
3022         public LiveSession parsePartialFrom(
3023             com.google.protobuf.CodedInputStream input,
3024             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3025             throws com.google.protobuf.InvalidProtocolBufferException {
3026           Builder builder = newBuilder();
3027           try {
3028             builder.mergeFrom(input, extensionRegistry);
3029           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3030             throw e.setUnfinishedMessage(builder.buildPartial());
3031           } catch (com.google.protobuf.UninitializedMessageException e) {
3032             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
3033           } catch (java.io.IOException e) {
3034             throw new com.google.protobuf.InvalidProtocolBufferException(e)
3035                 .setUnfinishedMessage(builder.buildPartial());
3036           }
3037           return builder.buildPartial();
3038         }
3039       };
3040 
parser()3041   public static com.google.protobuf.Parser<LiveSession> parser() {
3042     return PARSER;
3043   }
3044 
3045   @java.lang.Override
getParserForType()3046   public com.google.protobuf.Parser<LiveSession> getParserForType() {
3047     return PARSER;
3048   }
3049 
3050   @java.lang.Override
getDefaultInstanceForType()3051   public com.google.cloud.video.stitcher.v1.LiveSession getDefaultInstanceForType() {
3052     return DEFAULT_INSTANCE;
3053   }
3054 }
3055