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