• 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/channel/v1/products.proto
18 
19 package com.google.cloud.channel.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Represents media information.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.channel.v1.Media}
29  */
30 public final class Media extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.Media)
33     MediaOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use Media.newBuilder() to construct.
Media(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private Media(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
Media()40   private Media() {
41     title_ = "";
42     content_ = "";
43     type_ = 0;
44   }
45 
46   @java.lang.Override
47   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)48   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
49     return new Media();
50   }
51 
52   @java.lang.Override
getUnknownFields()53   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
54     return this.unknownFields;
55   }
56 
getDescriptor()57   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
58     return com.google.cloud.channel.v1.ProductsProto
59         .internal_static_google_cloud_channel_v1_Media_descriptor;
60   }
61 
62   @java.lang.Override
63   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()64       internalGetFieldAccessorTable() {
65     return com.google.cloud.channel.v1.ProductsProto
66         .internal_static_google_cloud_channel_v1_Media_fieldAccessorTable
67         .ensureFieldAccessorsInitialized(
68             com.google.cloud.channel.v1.Media.class,
69             com.google.cloud.channel.v1.Media.Builder.class);
70   }
71 
72   public static final int TITLE_FIELD_NUMBER = 1;
73 
74   @SuppressWarnings("serial")
75   private volatile java.lang.Object title_ = "";
76   /**
77    *
78    *
79    * <pre>
80    * Title of the media.
81    * </pre>
82    *
83    * <code>string title = 1;</code>
84    *
85    * @return The title.
86    */
87   @java.lang.Override
getTitle()88   public java.lang.String getTitle() {
89     java.lang.Object ref = title_;
90     if (ref instanceof java.lang.String) {
91       return (java.lang.String) ref;
92     } else {
93       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
94       java.lang.String s = bs.toStringUtf8();
95       title_ = s;
96       return s;
97     }
98   }
99   /**
100    *
101    *
102    * <pre>
103    * Title of the media.
104    * </pre>
105    *
106    * <code>string title = 1;</code>
107    *
108    * @return The bytes for title.
109    */
110   @java.lang.Override
getTitleBytes()111   public com.google.protobuf.ByteString getTitleBytes() {
112     java.lang.Object ref = title_;
113     if (ref instanceof java.lang.String) {
114       com.google.protobuf.ByteString b =
115           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
116       title_ = b;
117       return b;
118     } else {
119       return (com.google.protobuf.ByteString) ref;
120     }
121   }
122 
123   public static final int CONTENT_FIELD_NUMBER = 2;
124 
125   @SuppressWarnings("serial")
126   private volatile java.lang.Object content_ = "";
127   /**
128    *
129    *
130    * <pre>
131    * URL of the media.
132    * </pre>
133    *
134    * <code>string content = 2;</code>
135    *
136    * @return The content.
137    */
138   @java.lang.Override
getContent()139   public java.lang.String getContent() {
140     java.lang.Object ref = content_;
141     if (ref instanceof java.lang.String) {
142       return (java.lang.String) ref;
143     } else {
144       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
145       java.lang.String s = bs.toStringUtf8();
146       content_ = s;
147       return s;
148     }
149   }
150   /**
151    *
152    *
153    * <pre>
154    * URL of the media.
155    * </pre>
156    *
157    * <code>string content = 2;</code>
158    *
159    * @return The bytes for content.
160    */
161   @java.lang.Override
getContentBytes()162   public com.google.protobuf.ByteString getContentBytes() {
163     java.lang.Object ref = content_;
164     if (ref instanceof java.lang.String) {
165       com.google.protobuf.ByteString b =
166           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
167       content_ = b;
168       return b;
169     } else {
170       return (com.google.protobuf.ByteString) ref;
171     }
172   }
173 
174   public static final int TYPE_FIELD_NUMBER = 3;
175   private int type_ = 0;
176   /**
177    *
178    *
179    * <pre>
180    * Type of the media.
181    * </pre>
182    *
183    * <code>.google.cloud.channel.v1.MediaType type = 3;</code>
184    *
185    * @return The enum numeric value on the wire for type.
186    */
187   @java.lang.Override
getTypeValue()188   public int getTypeValue() {
189     return type_;
190   }
191   /**
192    *
193    *
194    * <pre>
195    * Type of the media.
196    * </pre>
197    *
198    * <code>.google.cloud.channel.v1.MediaType type = 3;</code>
199    *
200    * @return The type.
201    */
202   @java.lang.Override
getType()203   public com.google.cloud.channel.v1.MediaType getType() {
204     com.google.cloud.channel.v1.MediaType result =
205         com.google.cloud.channel.v1.MediaType.forNumber(type_);
206     return result == null ? com.google.cloud.channel.v1.MediaType.UNRECOGNIZED : result;
207   }
208 
209   private byte memoizedIsInitialized = -1;
210 
211   @java.lang.Override
isInitialized()212   public final boolean isInitialized() {
213     byte isInitialized = memoizedIsInitialized;
214     if (isInitialized == 1) return true;
215     if (isInitialized == 0) return false;
216 
217     memoizedIsInitialized = 1;
218     return true;
219   }
220 
221   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)222   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
223     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
224       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
225     }
226     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) {
227       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_);
228     }
229     if (type_ != com.google.cloud.channel.v1.MediaType.MEDIA_TYPE_UNSPECIFIED.getNumber()) {
230       output.writeEnum(3, type_);
231     }
232     getUnknownFields().writeTo(output);
233   }
234 
235   @java.lang.Override
getSerializedSize()236   public int getSerializedSize() {
237     int size = memoizedSize;
238     if (size != -1) return size;
239 
240     size = 0;
241     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
242       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
243     }
244     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) {
245       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_);
246     }
247     if (type_ != com.google.cloud.channel.v1.MediaType.MEDIA_TYPE_UNSPECIFIED.getNumber()) {
248       size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_);
249     }
250     size += getUnknownFields().getSerializedSize();
251     memoizedSize = size;
252     return size;
253   }
254 
255   @java.lang.Override
equals(final java.lang.Object obj)256   public boolean equals(final java.lang.Object obj) {
257     if (obj == this) {
258       return true;
259     }
260     if (!(obj instanceof com.google.cloud.channel.v1.Media)) {
261       return super.equals(obj);
262     }
263     com.google.cloud.channel.v1.Media other = (com.google.cloud.channel.v1.Media) obj;
264 
265     if (!getTitle().equals(other.getTitle())) return false;
266     if (!getContent().equals(other.getContent())) return false;
267     if (type_ != other.type_) return false;
268     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
269     return true;
270   }
271 
272   @java.lang.Override
hashCode()273   public int hashCode() {
274     if (memoizedHashCode != 0) {
275       return memoizedHashCode;
276     }
277     int hash = 41;
278     hash = (19 * hash) + getDescriptor().hashCode();
279     hash = (37 * hash) + TITLE_FIELD_NUMBER;
280     hash = (53 * hash) + getTitle().hashCode();
281     hash = (37 * hash) + CONTENT_FIELD_NUMBER;
282     hash = (53 * hash) + getContent().hashCode();
283     hash = (37 * hash) + TYPE_FIELD_NUMBER;
284     hash = (53 * hash) + type_;
285     hash = (29 * hash) + getUnknownFields().hashCode();
286     memoizedHashCode = hash;
287     return hash;
288   }
289 
parseFrom(java.nio.ByteBuffer data)290   public static com.google.cloud.channel.v1.Media parseFrom(java.nio.ByteBuffer data)
291       throws com.google.protobuf.InvalidProtocolBufferException {
292     return PARSER.parseFrom(data);
293   }
294 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)295   public static com.google.cloud.channel.v1.Media parseFrom(
296       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
297       throws com.google.protobuf.InvalidProtocolBufferException {
298     return PARSER.parseFrom(data, extensionRegistry);
299   }
300 
parseFrom(com.google.protobuf.ByteString data)301   public static com.google.cloud.channel.v1.Media parseFrom(com.google.protobuf.ByteString data)
302       throws com.google.protobuf.InvalidProtocolBufferException {
303     return PARSER.parseFrom(data);
304   }
305 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)306   public static com.google.cloud.channel.v1.Media parseFrom(
307       com.google.protobuf.ByteString data,
308       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
309       throws com.google.protobuf.InvalidProtocolBufferException {
310     return PARSER.parseFrom(data, extensionRegistry);
311   }
312 
parseFrom(byte[] data)313   public static com.google.cloud.channel.v1.Media parseFrom(byte[] data)
314       throws com.google.protobuf.InvalidProtocolBufferException {
315     return PARSER.parseFrom(data);
316   }
317 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)318   public static com.google.cloud.channel.v1.Media parseFrom(
319       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
320       throws com.google.protobuf.InvalidProtocolBufferException {
321     return PARSER.parseFrom(data, extensionRegistry);
322   }
323 
parseFrom(java.io.InputStream input)324   public static com.google.cloud.channel.v1.Media parseFrom(java.io.InputStream input)
325       throws java.io.IOException {
326     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
327   }
328 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)329   public static com.google.cloud.channel.v1.Media parseFrom(
330       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
331       throws java.io.IOException {
332     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
333         PARSER, input, extensionRegistry);
334   }
335 
parseDelimitedFrom(java.io.InputStream input)336   public static com.google.cloud.channel.v1.Media parseDelimitedFrom(java.io.InputStream input)
337       throws java.io.IOException {
338     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
339   }
340 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)341   public static com.google.cloud.channel.v1.Media parseDelimitedFrom(
342       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
343       throws java.io.IOException {
344     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
345         PARSER, input, extensionRegistry);
346   }
347 
parseFrom( com.google.protobuf.CodedInputStream input)348   public static com.google.cloud.channel.v1.Media parseFrom(
349       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
350     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
351   }
352 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)353   public static com.google.cloud.channel.v1.Media parseFrom(
354       com.google.protobuf.CodedInputStream input,
355       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
356       throws java.io.IOException {
357     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
358         PARSER, input, extensionRegistry);
359   }
360 
361   @java.lang.Override
newBuilderForType()362   public Builder newBuilderForType() {
363     return newBuilder();
364   }
365 
newBuilder()366   public static Builder newBuilder() {
367     return DEFAULT_INSTANCE.toBuilder();
368   }
369 
newBuilder(com.google.cloud.channel.v1.Media prototype)370   public static Builder newBuilder(com.google.cloud.channel.v1.Media prototype) {
371     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
372   }
373 
374   @java.lang.Override
toBuilder()375   public Builder toBuilder() {
376     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
377   }
378 
379   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)380   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
381     Builder builder = new Builder(parent);
382     return builder;
383   }
384   /**
385    *
386    *
387    * <pre>
388    * Represents media information.
389    * </pre>
390    *
391    * Protobuf type {@code google.cloud.channel.v1.Media}
392    */
393   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
394       implements
395       // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.Media)
396       com.google.cloud.channel.v1.MediaOrBuilder {
getDescriptor()397     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
398       return com.google.cloud.channel.v1.ProductsProto
399           .internal_static_google_cloud_channel_v1_Media_descriptor;
400     }
401 
402     @java.lang.Override
403     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()404         internalGetFieldAccessorTable() {
405       return com.google.cloud.channel.v1.ProductsProto
406           .internal_static_google_cloud_channel_v1_Media_fieldAccessorTable
407           .ensureFieldAccessorsInitialized(
408               com.google.cloud.channel.v1.Media.class,
409               com.google.cloud.channel.v1.Media.Builder.class);
410     }
411 
412     // Construct using com.google.cloud.channel.v1.Media.newBuilder()
Builder()413     private Builder() {}
414 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)415     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
416       super(parent);
417     }
418 
419     @java.lang.Override
clear()420     public Builder clear() {
421       super.clear();
422       bitField0_ = 0;
423       title_ = "";
424       content_ = "";
425       type_ = 0;
426       return this;
427     }
428 
429     @java.lang.Override
getDescriptorForType()430     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
431       return com.google.cloud.channel.v1.ProductsProto
432           .internal_static_google_cloud_channel_v1_Media_descriptor;
433     }
434 
435     @java.lang.Override
getDefaultInstanceForType()436     public com.google.cloud.channel.v1.Media getDefaultInstanceForType() {
437       return com.google.cloud.channel.v1.Media.getDefaultInstance();
438     }
439 
440     @java.lang.Override
build()441     public com.google.cloud.channel.v1.Media build() {
442       com.google.cloud.channel.v1.Media result = buildPartial();
443       if (!result.isInitialized()) {
444         throw newUninitializedMessageException(result);
445       }
446       return result;
447     }
448 
449     @java.lang.Override
buildPartial()450     public com.google.cloud.channel.v1.Media buildPartial() {
451       com.google.cloud.channel.v1.Media result = new com.google.cloud.channel.v1.Media(this);
452       if (bitField0_ != 0) {
453         buildPartial0(result);
454       }
455       onBuilt();
456       return result;
457     }
458 
buildPartial0(com.google.cloud.channel.v1.Media result)459     private void buildPartial0(com.google.cloud.channel.v1.Media result) {
460       int from_bitField0_ = bitField0_;
461       if (((from_bitField0_ & 0x00000001) != 0)) {
462         result.title_ = title_;
463       }
464       if (((from_bitField0_ & 0x00000002) != 0)) {
465         result.content_ = content_;
466       }
467       if (((from_bitField0_ & 0x00000004) != 0)) {
468         result.type_ = type_;
469       }
470     }
471 
472     @java.lang.Override
clone()473     public Builder clone() {
474       return super.clone();
475     }
476 
477     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)478     public Builder setField(
479         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
480       return super.setField(field, value);
481     }
482 
483     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)484     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
485       return super.clearField(field);
486     }
487 
488     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)489     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
490       return super.clearOneof(oneof);
491     }
492 
493     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)494     public Builder setRepeatedField(
495         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
496       return super.setRepeatedField(field, index, value);
497     }
498 
499     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)500     public Builder addRepeatedField(
501         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
502       return super.addRepeatedField(field, value);
503     }
504 
505     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)506     public Builder mergeFrom(com.google.protobuf.Message other) {
507       if (other instanceof com.google.cloud.channel.v1.Media) {
508         return mergeFrom((com.google.cloud.channel.v1.Media) other);
509       } else {
510         super.mergeFrom(other);
511         return this;
512       }
513     }
514 
mergeFrom(com.google.cloud.channel.v1.Media other)515     public Builder mergeFrom(com.google.cloud.channel.v1.Media other) {
516       if (other == com.google.cloud.channel.v1.Media.getDefaultInstance()) return this;
517       if (!other.getTitle().isEmpty()) {
518         title_ = other.title_;
519         bitField0_ |= 0x00000001;
520         onChanged();
521       }
522       if (!other.getContent().isEmpty()) {
523         content_ = other.content_;
524         bitField0_ |= 0x00000002;
525         onChanged();
526       }
527       if (other.type_ != 0) {
528         setTypeValue(other.getTypeValue());
529       }
530       this.mergeUnknownFields(other.getUnknownFields());
531       onChanged();
532       return this;
533     }
534 
535     @java.lang.Override
isInitialized()536     public final boolean isInitialized() {
537       return true;
538     }
539 
540     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)541     public Builder mergeFrom(
542         com.google.protobuf.CodedInputStream input,
543         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
544         throws java.io.IOException {
545       if (extensionRegistry == null) {
546         throw new java.lang.NullPointerException();
547       }
548       try {
549         boolean done = false;
550         while (!done) {
551           int tag = input.readTag();
552           switch (tag) {
553             case 0:
554               done = true;
555               break;
556             case 10:
557               {
558                 title_ = input.readStringRequireUtf8();
559                 bitField0_ |= 0x00000001;
560                 break;
561               } // case 10
562             case 18:
563               {
564                 content_ = input.readStringRequireUtf8();
565                 bitField0_ |= 0x00000002;
566                 break;
567               } // case 18
568             case 24:
569               {
570                 type_ = input.readEnum();
571                 bitField0_ |= 0x00000004;
572                 break;
573               } // case 24
574             default:
575               {
576                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
577                   done = true; // was an endgroup tag
578                 }
579                 break;
580               } // default:
581           } // switch (tag)
582         } // while (!done)
583       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
584         throw e.unwrapIOException();
585       } finally {
586         onChanged();
587       } // finally
588       return this;
589     }
590 
591     private int bitField0_;
592 
593     private java.lang.Object title_ = "";
594     /**
595      *
596      *
597      * <pre>
598      * Title of the media.
599      * </pre>
600      *
601      * <code>string title = 1;</code>
602      *
603      * @return The title.
604      */
getTitle()605     public java.lang.String getTitle() {
606       java.lang.Object ref = title_;
607       if (!(ref instanceof java.lang.String)) {
608         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
609         java.lang.String s = bs.toStringUtf8();
610         title_ = s;
611         return s;
612       } else {
613         return (java.lang.String) ref;
614       }
615     }
616     /**
617      *
618      *
619      * <pre>
620      * Title of the media.
621      * </pre>
622      *
623      * <code>string title = 1;</code>
624      *
625      * @return The bytes for title.
626      */
getTitleBytes()627     public com.google.protobuf.ByteString getTitleBytes() {
628       java.lang.Object ref = title_;
629       if (ref instanceof String) {
630         com.google.protobuf.ByteString b =
631             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
632         title_ = b;
633         return b;
634       } else {
635         return (com.google.protobuf.ByteString) ref;
636       }
637     }
638     /**
639      *
640      *
641      * <pre>
642      * Title of the media.
643      * </pre>
644      *
645      * <code>string title = 1;</code>
646      *
647      * @param value The title to set.
648      * @return This builder for chaining.
649      */
setTitle(java.lang.String value)650     public Builder setTitle(java.lang.String value) {
651       if (value == null) {
652         throw new NullPointerException();
653       }
654       title_ = value;
655       bitField0_ |= 0x00000001;
656       onChanged();
657       return this;
658     }
659     /**
660      *
661      *
662      * <pre>
663      * Title of the media.
664      * </pre>
665      *
666      * <code>string title = 1;</code>
667      *
668      * @return This builder for chaining.
669      */
clearTitle()670     public Builder clearTitle() {
671       title_ = getDefaultInstance().getTitle();
672       bitField0_ = (bitField0_ & ~0x00000001);
673       onChanged();
674       return this;
675     }
676     /**
677      *
678      *
679      * <pre>
680      * Title of the media.
681      * </pre>
682      *
683      * <code>string title = 1;</code>
684      *
685      * @param value The bytes for title to set.
686      * @return This builder for chaining.
687      */
setTitleBytes(com.google.protobuf.ByteString value)688     public Builder setTitleBytes(com.google.protobuf.ByteString value) {
689       if (value == null) {
690         throw new NullPointerException();
691       }
692       checkByteStringIsUtf8(value);
693       title_ = value;
694       bitField0_ |= 0x00000001;
695       onChanged();
696       return this;
697     }
698 
699     private java.lang.Object content_ = "";
700     /**
701      *
702      *
703      * <pre>
704      * URL of the media.
705      * </pre>
706      *
707      * <code>string content = 2;</code>
708      *
709      * @return The content.
710      */
getContent()711     public java.lang.String getContent() {
712       java.lang.Object ref = content_;
713       if (!(ref instanceof java.lang.String)) {
714         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
715         java.lang.String s = bs.toStringUtf8();
716         content_ = s;
717         return s;
718       } else {
719         return (java.lang.String) ref;
720       }
721     }
722     /**
723      *
724      *
725      * <pre>
726      * URL of the media.
727      * </pre>
728      *
729      * <code>string content = 2;</code>
730      *
731      * @return The bytes for content.
732      */
getContentBytes()733     public com.google.protobuf.ByteString getContentBytes() {
734       java.lang.Object ref = content_;
735       if (ref instanceof String) {
736         com.google.protobuf.ByteString b =
737             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
738         content_ = b;
739         return b;
740       } else {
741         return (com.google.protobuf.ByteString) ref;
742       }
743     }
744     /**
745      *
746      *
747      * <pre>
748      * URL of the media.
749      * </pre>
750      *
751      * <code>string content = 2;</code>
752      *
753      * @param value The content to set.
754      * @return This builder for chaining.
755      */
setContent(java.lang.String value)756     public Builder setContent(java.lang.String value) {
757       if (value == null) {
758         throw new NullPointerException();
759       }
760       content_ = value;
761       bitField0_ |= 0x00000002;
762       onChanged();
763       return this;
764     }
765     /**
766      *
767      *
768      * <pre>
769      * URL of the media.
770      * </pre>
771      *
772      * <code>string content = 2;</code>
773      *
774      * @return This builder for chaining.
775      */
clearContent()776     public Builder clearContent() {
777       content_ = getDefaultInstance().getContent();
778       bitField0_ = (bitField0_ & ~0x00000002);
779       onChanged();
780       return this;
781     }
782     /**
783      *
784      *
785      * <pre>
786      * URL of the media.
787      * </pre>
788      *
789      * <code>string content = 2;</code>
790      *
791      * @param value The bytes for content to set.
792      * @return This builder for chaining.
793      */
setContentBytes(com.google.protobuf.ByteString value)794     public Builder setContentBytes(com.google.protobuf.ByteString value) {
795       if (value == null) {
796         throw new NullPointerException();
797       }
798       checkByteStringIsUtf8(value);
799       content_ = value;
800       bitField0_ |= 0x00000002;
801       onChanged();
802       return this;
803     }
804 
805     private int type_ = 0;
806     /**
807      *
808      *
809      * <pre>
810      * Type of the media.
811      * </pre>
812      *
813      * <code>.google.cloud.channel.v1.MediaType type = 3;</code>
814      *
815      * @return The enum numeric value on the wire for type.
816      */
817     @java.lang.Override
getTypeValue()818     public int getTypeValue() {
819       return type_;
820     }
821     /**
822      *
823      *
824      * <pre>
825      * Type of the media.
826      * </pre>
827      *
828      * <code>.google.cloud.channel.v1.MediaType type = 3;</code>
829      *
830      * @param value The enum numeric value on the wire for type to set.
831      * @return This builder for chaining.
832      */
setTypeValue(int value)833     public Builder setTypeValue(int value) {
834       type_ = value;
835       bitField0_ |= 0x00000004;
836       onChanged();
837       return this;
838     }
839     /**
840      *
841      *
842      * <pre>
843      * Type of the media.
844      * </pre>
845      *
846      * <code>.google.cloud.channel.v1.MediaType type = 3;</code>
847      *
848      * @return The type.
849      */
850     @java.lang.Override
getType()851     public com.google.cloud.channel.v1.MediaType getType() {
852       com.google.cloud.channel.v1.MediaType result =
853           com.google.cloud.channel.v1.MediaType.forNumber(type_);
854       return result == null ? com.google.cloud.channel.v1.MediaType.UNRECOGNIZED : result;
855     }
856     /**
857      *
858      *
859      * <pre>
860      * Type of the media.
861      * </pre>
862      *
863      * <code>.google.cloud.channel.v1.MediaType type = 3;</code>
864      *
865      * @param value The type to set.
866      * @return This builder for chaining.
867      */
setType(com.google.cloud.channel.v1.MediaType value)868     public Builder setType(com.google.cloud.channel.v1.MediaType value) {
869       if (value == null) {
870         throw new NullPointerException();
871       }
872       bitField0_ |= 0x00000004;
873       type_ = value.getNumber();
874       onChanged();
875       return this;
876     }
877     /**
878      *
879      *
880      * <pre>
881      * Type of the media.
882      * </pre>
883      *
884      * <code>.google.cloud.channel.v1.MediaType type = 3;</code>
885      *
886      * @return This builder for chaining.
887      */
clearType()888     public Builder clearType() {
889       bitField0_ = (bitField0_ & ~0x00000004);
890       type_ = 0;
891       onChanged();
892       return this;
893     }
894 
895     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)896     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
897       return super.setUnknownFields(unknownFields);
898     }
899 
900     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)901     public final Builder mergeUnknownFields(
902         final com.google.protobuf.UnknownFieldSet unknownFields) {
903       return super.mergeUnknownFields(unknownFields);
904     }
905 
906     // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.Media)
907   }
908 
909   // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.Media)
910   private static final com.google.cloud.channel.v1.Media DEFAULT_INSTANCE;
911 
912   static {
913     DEFAULT_INSTANCE = new com.google.cloud.channel.v1.Media();
914   }
915 
getDefaultInstance()916   public static com.google.cloud.channel.v1.Media getDefaultInstance() {
917     return DEFAULT_INSTANCE;
918   }
919 
920   private static final com.google.protobuf.Parser<Media> PARSER =
921       new com.google.protobuf.AbstractParser<Media>() {
922         @java.lang.Override
923         public Media parsePartialFrom(
924             com.google.protobuf.CodedInputStream input,
925             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
926             throws com.google.protobuf.InvalidProtocolBufferException {
927           Builder builder = newBuilder();
928           try {
929             builder.mergeFrom(input, extensionRegistry);
930           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
931             throw e.setUnfinishedMessage(builder.buildPartial());
932           } catch (com.google.protobuf.UninitializedMessageException e) {
933             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
934           } catch (java.io.IOException e) {
935             throw new com.google.protobuf.InvalidProtocolBufferException(e)
936                 .setUnfinishedMessage(builder.buildPartial());
937           }
938           return builder.buildPartial();
939         }
940       };
941 
parser()942   public static com.google.protobuf.Parser<Media> parser() {
943     return PARSER;
944   }
945 
946   @java.lang.Override
getParserForType()947   public com.google.protobuf.Parser<Media> getParserForType() {
948     return PARSER;
949   }
950 
951   @java.lang.Override
getDefaultInstanceForType()952   public com.google.cloud.channel.v1.Media getDefaultInstanceForType() {
953     return DEFAULT_INSTANCE;
954   }
955 }
956