• 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/device_manager.proto
18 
19 package com.google.cloud.iot.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Request for `UpdateDeviceRegistry`.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.iot.v1.UpdateDeviceRegistryRequest}
29  */
30 public final class UpdateDeviceRegistryRequest extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.iot.v1.UpdateDeviceRegistryRequest)
33     UpdateDeviceRegistryRequestOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use UpdateDeviceRegistryRequest.newBuilder() to construct.
UpdateDeviceRegistryRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private UpdateDeviceRegistryRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
UpdateDeviceRegistryRequest()40   private UpdateDeviceRegistryRequest() {}
41 
42   @java.lang.Override
43   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)44   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
45     return new UpdateDeviceRegistryRequest();
46   }
47 
48   @java.lang.Override
getUnknownFields()49   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
50     return this.unknownFields;
51   }
52 
getDescriptor()53   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
54     return com.google.cloud.iot.v1.DeviceManagerProto
55         .internal_static_google_cloud_iot_v1_UpdateDeviceRegistryRequest_descriptor;
56   }
57 
58   @java.lang.Override
59   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()60       internalGetFieldAccessorTable() {
61     return com.google.cloud.iot.v1.DeviceManagerProto
62         .internal_static_google_cloud_iot_v1_UpdateDeviceRegistryRequest_fieldAccessorTable
63         .ensureFieldAccessorsInitialized(
64             com.google.cloud.iot.v1.UpdateDeviceRegistryRequest.class,
65             com.google.cloud.iot.v1.UpdateDeviceRegistryRequest.Builder.class);
66   }
67 
68   public static final int DEVICE_REGISTRY_FIELD_NUMBER = 1;
69   private com.google.cloud.iot.v1.DeviceRegistry deviceRegistry_;
70   /**
71    *
72    *
73    * <pre>
74    * Required. The new values for the device registry. The `id` field must be empty, and
75    * the `name` field must indicate the path of the resource. For example,
76    * `projects/example-project/locations/us-central1/registries/my-registry`.
77    * </pre>
78    *
79    * <code>
80    * .google.cloud.iot.v1.DeviceRegistry device_registry = 1 [(.google.api.field_behavior) = REQUIRED];
81    * </code>
82    *
83    * @return Whether the deviceRegistry field is set.
84    */
85   @java.lang.Override
hasDeviceRegistry()86   public boolean hasDeviceRegistry() {
87     return deviceRegistry_ != null;
88   }
89   /**
90    *
91    *
92    * <pre>
93    * Required. The new values for the device registry. The `id` field must be empty, and
94    * the `name` field must indicate the path of the resource. For example,
95    * `projects/example-project/locations/us-central1/registries/my-registry`.
96    * </pre>
97    *
98    * <code>
99    * .google.cloud.iot.v1.DeviceRegistry device_registry = 1 [(.google.api.field_behavior) = REQUIRED];
100    * </code>
101    *
102    * @return The deviceRegistry.
103    */
104   @java.lang.Override
getDeviceRegistry()105   public com.google.cloud.iot.v1.DeviceRegistry getDeviceRegistry() {
106     return deviceRegistry_ == null
107         ? com.google.cloud.iot.v1.DeviceRegistry.getDefaultInstance()
108         : deviceRegistry_;
109   }
110   /**
111    *
112    *
113    * <pre>
114    * Required. The new values for the device registry. The `id` field must be empty, and
115    * the `name` field must indicate the path of the resource. For example,
116    * `projects/example-project/locations/us-central1/registries/my-registry`.
117    * </pre>
118    *
119    * <code>
120    * .google.cloud.iot.v1.DeviceRegistry device_registry = 1 [(.google.api.field_behavior) = REQUIRED];
121    * </code>
122    */
123   @java.lang.Override
getDeviceRegistryOrBuilder()124   public com.google.cloud.iot.v1.DeviceRegistryOrBuilder getDeviceRegistryOrBuilder() {
125     return deviceRegistry_ == null
126         ? com.google.cloud.iot.v1.DeviceRegistry.getDefaultInstance()
127         : deviceRegistry_;
128   }
129 
130   public static final int UPDATE_MASK_FIELD_NUMBER = 2;
131   private com.google.protobuf.FieldMask updateMask_;
132   /**
133    *
134    *
135    * <pre>
136    * Required. Only updates the `device_registry` fields indicated by this mask.
137    * The field mask must not be empty, and it must not contain fields that
138    * are immutable or only set by the server.
139    * Mutable top-level fields: `event_notification_config`, `http_config`,
140    * `mqtt_config`, and `state_notification_config`.
141    * </pre>
142    *
143    * <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
144    * </code>
145    *
146    * @return Whether the updateMask field is set.
147    */
148   @java.lang.Override
hasUpdateMask()149   public boolean hasUpdateMask() {
150     return updateMask_ != null;
151   }
152   /**
153    *
154    *
155    * <pre>
156    * Required. Only updates the `device_registry` fields indicated by this mask.
157    * The field mask must not be empty, and it must not contain fields that
158    * are immutable or only set by the server.
159    * Mutable top-level fields: `event_notification_config`, `http_config`,
160    * `mqtt_config`, and `state_notification_config`.
161    * </pre>
162    *
163    * <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
164    * </code>
165    *
166    * @return The updateMask.
167    */
168   @java.lang.Override
getUpdateMask()169   public com.google.protobuf.FieldMask getUpdateMask() {
170     return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_;
171   }
172   /**
173    *
174    *
175    * <pre>
176    * Required. Only updates the `device_registry` fields indicated by this mask.
177    * The field mask must not be empty, and it must not contain fields that
178    * are immutable or only set by the server.
179    * Mutable top-level fields: `event_notification_config`, `http_config`,
180    * `mqtt_config`, and `state_notification_config`.
181    * </pre>
182    *
183    * <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
184    * </code>
185    */
186   @java.lang.Override
getUpdateMaskOrBuilder()187   public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() {
188     return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_;
189   }
190 
191   private byte memoizedIsInitialized = -1;
192 
193   @java.lang.Override
isInitialized()194   public final boolean isInitialized() {
195     byte isInitialized = memoizedIsInitialized;
196     if (isInitialized == 1) return true;
197     if (isInitialized == 0) return false;
198 
199     memoizedIsInitialized = 1;
200     return true;
201   }
202 
203   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)204   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
205     if (deviceRegistry_ != null) {
206       output.writeMessage(1, getDeviceRegistry());
207     }
208     if (updateMask_ != null) {
209       output.writeMessage(2, getUpdateMask());
210     }
211     getUnknownFields().writeTo(output);
212   }
213 
214   @java.lang.Override
getSerializedSize()215   public int getSerializedSize() {
216     int size = memoizedSize;
217     if (size != -1) return size;
218 
219     size = 0;
220     if (deviceRegistry_ != null) {
221       size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDeviceRegistry());
222     }
223     if (updateMask_ != null) {
224       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask());
225     }
226     size += getUnknownFields().getSerializedSize();
227     memoizedSize = size;
228     return size;
229   }
230 
231   @java.lang.Override
equals(final java.lang.Object obj)232   public boolean equals(final java.lang.Object obj) {
233     if (obj == this) {
234       return true;
235     }
236     if (!(obj instanceof com.google.cloud.iot.v1.UpdateDeviceRegistryRequest)) {
237       return super.equals(obj);
238     }
239     com.google.cloud.iot.v1.UpdateDeviceRegistryRequest other =
240         (com.google.cloud.iot.v1.UpdateDeviceRegistryRequest) obj;
241 
242     if (hasDeviceRegistry() != other.hasDeviceRegistry()) return false;
243     if (hasDeviceRegistry()) {
244       if (!getDeviceRegistry().equals(other.getDeviceRegistry())) return false;
245     }
246     if (hasUpdateMask() != other.hasUpdateMask()) return false;
247     if (hasUpdateMask()) {
248       if (!getUpdateMask().equals(other.getUpdateMask())) return false;
249     }
250     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
251     return true;
252   }
253 
254   @java.lang.Override
hashCode()255   public int hashCode() {
256     if (memoizedHashCode != 0) {
257       return memoizedHashCode;
258     }
259     int hash = 41;
260     hash = (19 * hash) + getDescriptor().hashCode();
261     if (hasDeviceRegistry()) {
262       hash = (37 * hash) + DEVICE_REGISTRY_FIELD_NUMBER;
263       hash = (53 * hash) + getDeviceRegistry().hashCode();
264     }
265     if (hasUpdateMask()) {
266       hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER;
267       hash = (53 * hash) + getUpdateMask().hashCode();
268     }
269     hash = (29 * hash) + getUnknownFields().hashCode();
270     memoizedHashCode = hash;
271     return hash;
272   }
273 
parseFrom( java.nio.ByteBuffer data)274   public static com.google.cloud.iot.v1.UpdateDeviceRegistryRequest parseFrom(
275       java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
276     return PARSER.parseFrom(data);
277   }
278 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)279   public static com.google.cloud.iot.v1.UpdateDeviceRegistryRequest parseFrom(
280       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
281       throws com.google.protobuf.InvalidProtocolBufferException {
282     return PARSER.parseFrom(data, extensionRegistry);
283   }
284 
parseFrom( com.google.protobuf.ByteString data)285   public static com.google.cloud.iot.v1.UpdateDeviceRegistryRequest parseFrom(
286       com.google.protobuf.ByteString data)
287       throws com.google.protobuf.InvalidProtocolBufferException {
288     return PARSER.parseFrom(data);
289   }
290 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)291   public static com.google.cloud.iot.v1.UpdateDeviceRegistryRequest parseFrom(
292       com.google.protobuf.ByteString data,
293       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
294       throws com.google.protobuf.InvalidProtocolBufferException {
295     return PARSER.parseFrom(data, extensionRegistry);
296   }
297 
parseFrom(byte[] data)298   public static com.google.cloud.iot.v1.UpdateDeviceRegistryRequest parseFrom(byte[] data)
299       throws com.google.protobuf.InvalidProtocolBufferException {
300     return PARSER.parseFrom(data);
301   }
302 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)303   public static com.google.cloud.iot.v1.UpdateDeviceRegistryRequest parseFrom(
304       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
305       throws com.google.protobuf.InvalidProtocolBufferException {
306     return PARSER.parseFrom(data, extensionRegistry);
307   }
308 
parseFrom( java.io.InputStream input)309   public static com.google.cloud.iot.v1.UpdateDeviceRegistryRequest parseFrom(
310       java.io.InputStream input) throws java.io.IOException {
311     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
312   }
313 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)314   public static com.google.cloud.iot.v1.UpdateDeviceRegistryRequest parseFrom(
315       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
316       throws java.io.IOException {
317     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
318         PARSER, input, extensionRegistry);
319   }
320 
parseDelimitedFrom( java.io.InputStream input)321   public static com.google.cloud.iot.v1.UpdateDeviceRegistryRequest parseDelimitedFrom(
322       java.io.InputStream input) throws java.io.IOException {
323     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
324   }
325 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)326   public static com.google.cloud.iot.v1.UpdateDeviceRegistryRequest parseDelimitedFrom(
327       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
328       throws java.io.IOException {
329     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
330         PARSER, input, extensionRegistry);
331   }
332 
parseFrom( com.google.protobuf.CodedInputStream input)333   public static com.google.cloud.iot.v1.UpdateDeviceRegistryRequest parseFrom(
334       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
335     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
336   }
337 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)338   public static com.google.cloud.iot.v1.UpdateDeviceRegistryRequest parseFrom(
339       com.google.protobuf.CodedInputStream input,
340       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
341       throws java.io.IOException {
342     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
343         PARSER, input, extensionRegistry);
344   }
345 
346   @java.lang.Override
newBuilderForType()347   public Builder newBuilderForType() {
348     return newBuilder();
349   }
350 
newBuilder()351   public static Builder newBuilder() {
352     return DEFAULT_INSTANCE.toBuilder();
353   }
354 
newBuilder(com.google.cloud.iot.v1.UpdateDeviceRegistryRequest prototype)355   public static Builder newBuilder(com.google.cloud.iot.v1.UpdateDeviceRegistryRequest prototype) {
356     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
357   }
358 
359   @java.lang.Override
toBuilder()360   public Builder toBuilder() {
361     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
362   }
363 
364   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)365   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
366     Builder builder = new Builder(parent);
367     return builder;
368   }
369   /**
370    *
371    *
372    * <pre>
373    * Request for `UpdateDeviceRegistry`.
374    * </pre>
375    *
376    * Protobuf type {@code google.cloud.iot.v1.UpdateDeviceRegistryRequest}
377    */
378   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
379       implements
380       // @@protoc_insertion_point(builder_implements:google.cloud.iot.v1.UpdateDeviceRegistryRequest)
381       com.google.cloud.iot.v1.UpdateDeviceRegistryRequestOrBuilder {
getDescriptor()382     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
383       return com.google.cloud.iot.v1.DeviceManagerProto
384           .internal_static_google_cloud_iot_v1_UpdateDeviceRegistryRequest_descriptor;
385     }
386 
387     @java.lang.Override
388     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()389         internalGetFieldAccessorTable() {
390       return com.google.cloud.iot.v1.DeviceManagerProto
391           .internal_static_google_cloud_iot_v1_UpdateDeviceRegistryRequest_fieldAccessorTable
392           .ensureFieldAccessorsInitialized(
393               com.google.cloud.iot.v1.UpdateDeviceRegistryRequest.class,
394               com.google.cloud.iot.v1.UpdateDeviceRegistryRequest.Builder.class);
395     }
396 
397     // Construct using com.google.cloud.iot.v1.UpdateDeviceRegistryRequest.newBuilder()
Builder()398     private Builder() {}
399 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)400     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
401       super(parent);
402     }
403 
404     @java.lang.Override
clear()405     public Builder clear() {
406       super.clear();
407       bitField0_ = 0;
408       deviceRegistry_ = null;
409       if (deviceRegistryBuilder_ != null) {
410         deviceRegistryBuilder_.dispose();
411         deviceRegistryBuilder_ = null;
412       }
413       updateMask_ = null;
414       if (updateMaskBuilder_ != null) {
415         updateMaskBuilder_.dispose();
416         updateMaskBuilder_ = null;
417       }
418       return this;
419     }
420 
421     @java.lang.Override
getDescriptorForType()422     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
423       return com.google.cloud.iot.v1.DeviceManagerProto
424           .internal_static_google_cloud_iot_v1_UpdateDeviceRegistryRequest_descriptor;
425     }
426 
427     @java.lang.Override
getDefaultInstanceForType()428     public com.google.cloud.iot.v1.UpdateDeviceRegistryRequest getDefaultInstanceForType() {
429       return com.google.cloud.iot.v1.UpdateDeviceRegistryRequest.getDefaultInstance();
430     }
431 
432     @java.lang.Override
build()433     public com.google.cloud.iot.v1.UpdateDeviceRegistryRequest build() {
434       com.google.cloud.iot.v1.UpdateDeviceRegistryRequest result = buildPartial();
435       if (!result.isInitialized()) {
436         throw newUninitializedMessageException(result);
437       }
438       return result;
439     }
440 
441     @java.lang.Override
buildPartial()442     public com.google.cloud.iot.v1.UpdateDeviceRegistryRequest buildPartial() {
443       com.google.cloud.iot.v1.UpdateDeviceRegistryRequest result =
444           new com.google.cloud.iot.v1.UpdateDeviceRegistryRequest(this);
445       if (bitField0_ != 0) {
446         buildPartial0(result);
447       }
448       onBuilt();
449       return result;
450     }
451 
buildPartial0(com.google.cloud.iot.v1.UpdateDeviceRegistryRequest result)452     private void buildPartial0(com.google.cloud.iot.v1.UpdateDeviceRegistryRequest result) {
453       int from_bitField0_ = bitField0_;
454       if (((from_bitField0_ & 0x00000001) != 0)) {
455         result.deviceRegistry_ =
456             deviceRegistryBuilder_ == null ? deviceRegistry_ : deviceRegistryBuilder_.build();
457       }
458       if (((from_bitField0_ & 0x00000002) != 0)) {
459         result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build();
460       }
461     }
462 
463     @java.lang.Override
clone()464     public Builder clone() {
465       return super.clone();
466     }
467 
468     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)469     public Builder setField(
470         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
471       return super.setField(field, value);
472     }
473 
474     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)475     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
476       return super.clearField(field);
477     }
478 
479     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)480     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
481       return super.clearOneof(oneof);
482     }
483 
484     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)485     public Builder setRepeatedField(
486         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
487       return super.setRepeatedField(field, index, value);
488     }
489 
490     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)491     public Builder addRepeatedField(
492         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
493       return super.addRepeatedField(field, value);
494     }
495 
496     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)497     public Builder mergeFrom(com.google.protobuf.Message other) {
498       if (other instanceof com.google.cloud.iot.v1.UpdateDeviceRegistryRequest) {
499         return mergeFrom((com.google.cloud.iot.v1.UpdateDeviceRegistryRequest) other);
500       } else {
501         super.mergeFrom(other);
502         return this;
503       }
504     }
505 
mergeFrom(com.google.cloud.iot.v1.UpdateDeviceRegistryRequest other)506     public Builder mergeFrom(com.google.cloud.iot.v1.UpdateDeviceRegistryRequest other) {
507       if (other == com.google.cloud.iot.v1.UpdateDeviceRegistryRequest.getDefaultInstance())
508         return this;
509       if (other.hasDeviceRegistry()) {
510         mergeDeviceRegistry(other.getDeviceRegistry());
511       }
512       if (other.hasUpdateMask()) {
513         mergeUpdateMask(other.getUpdateMask());
514       }
515       this.mergeUnknownFields(other.getUnknownFields());
516       onChanged();
517       return this;
518     }
519 
520     @java.lang.Override
isInitialized()521     public final boolean isInitialized() {
522       return true;
523     }
524 
525     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)526     public Builder mergeFrom(
527         com.google.protobuf.CodedInputStream input,
528         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
529         throws java.io.IOException {
530       if (extensionRegistry == null) {
531         throw new java.lang.NullPointerException();
532       }
533       try {
534         boolean done = false;
535         while (!done) {
536           int tag = input.readTag();
537           switch (tag) {
538             case 0:
539               done = true;
540               break;
541             case 10:
542               {
543                 input.readMessage(getDeviceRegistryFieldBuilder().getBuilder(), extensionRegistry);
544                 bitField0_ |= 0x00000001;
545                 break;
546               } // case 10
547             case 18:
548               {
549                 input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry);
550                 bitField0_ |= 0x00000002;
551                 break;
552               } // case 18
553             default:
554               {
555                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
556                   done = true; // was an endgroup tag
557                 }
558                 break;
559               } // default:
560           } // switch (tag)
561         } // while (!done)
562       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
563         throw e.unwrapIOException();
564       } finally {
565         onChanged();
566       } // finally
567       return this;
568     }
569 
570     private int bitField0_;
571 
572     private com.google.cloud.iot.v1.DeviceRegistry deviceRegistry_;
573     private com.google.protobuf.SingleFieldBuilderV3<
574             com.google.cloud.iot.v1.DeviceRegistry,
575             com.google.cloud.iot.v1.DeviceRegistry.Builder,
576             com.google.cloud.iot.v1.DeviceRegistryOrBuilder>
577         deviceRegistryBuilder_;
578     /**
579      *
580      *
581      * <pre>
582      * Required. The new values for the device registry. The `id` field must be empty, and
583      * the `name` field must indicate the path of the resource. For example,
584      * `projects/example-project/locations/us-central1/registries/my-registry`.
585      * </pre>
586      *
587      * <code>
588      * .google.cloud.iot.v1.DeviceRegistry device_registry = 1 [(.google.api.field_behavior) = REQUIRED];
589      * </code>
590      *
591      * @return Whether the deviceRegistry field is set.
592      */
hasDeviceRegistry()593     public boolean hasDeviceRegistry() {
594       return ((bitField0_ & 0x00000001) != 0);
595     }
596     /**
597      *
598      *
599      * <pre>
600      * Required. The new values for the device registry. The `id` field must be empty, and
601      * the `name` field must indicate the path of the resource. For example,
602      * `projects/example-project/locations/us-central1/registries/my-registry`.
603      * </pre>
604      *
605      * <code>
606      * .google.cloud.iot.v1.DeviceRegistry device_registry = 1 [(.google.api.field_behavior) = REQUIRED];
607      * </code>
608      *
609      * @return The deviceRegistry.
610      */
getDeviceRegistry()611     public com.google.cloud.iot.v1.DeviceRegistry getDeviceRegistry() {
612       if (deviceRegistryBuilder_ == null) {
613         return deviceRegistry_ == null
614             ? com.google.cloud.iot.v1.DeviceRegistry.getDefaultInstance()
615             : deviceRegistry_;
616       } else {
617         return deviceRegistryBuilder_.getMessage();
618       }
619     }
620     /**
621      *
622      *
623      * <pre>
624      * Required. The new values for the device registry. The `id` field must be empty, and
625      * the `name` field must indicate the path of the resource. For example,
626      * `projects/example-project/locations/us-central1/registries/my-registry`.
627      * </pre>
628      *
629      * <code>
630      * .google.cloud.iot.v1.DeviceRegistry device_registry = 1 [(.google.api.field_behavior) = REQUIRED];
631      * </code>
632      */
setDeviceRegistry(com.google.cloud.iot.v1.DeviceRegistry value)633     public Builder setDeviceRegistry(com.google.cloud.iot.v1.DeviceRegistry value) {
634       if (deviceRegistryBuilder_ == null) {
635         if (value == null) {
636           throw new NullPointerException();
637         }
638         deviceRegistry_ = value;
639       } else {
640         deviceRegistryBuilder_.setMessage(value);
641       }
642       bitField0_ |= 0x00000001;
643       onChanged();
644       return this;
645     }
646     /**
647      *
648      *
649      * <pre>
650      * Required. The new values for the device registry. The `id` field must be empty, and
651      * the `name` field must indicate the path of the resource. For example,
652      * `projects/example-project/locations/us-central1/registries/my-registry`.
653      * </pre>
654      *
655      * <code>
656      * .google.cloud.iot.v1.DeviceRegistry device_registry = 1 [(.google.api.field_behavior) = REQUIRED];
657      * </code>
658      */
setDeviceRegistry( com.google.cloud.iot.v1.DeviceRegistry.Builder builderForValue)659     public Builder setDeviceRegistry(
660         com.google.cloud.iot.v1.DeviceRegistry.Builder builderForValue) {
661       if (deviceRegistryBuilder_ == null) {
662         deviceRegistry_ = builderForValue.build();
663       } else {
664         deviceRegistryBuilder_.setMessage(builderForValue.build());
665       }
666       bitField0_ |= 0x00000001;
667       onChanged();
668       return this;
669     }
670     /**
671      *
672      *
673      * <pre>
674      * Required. The new values for the device registry. The `id` field must be empty, and
675      * the `name` field must indicate the path of the resource. For example,
676      * `projects/example-project/locations/us-central1/registries/my-registry`.
677      * </pre>
678      *
679      * <code>
680      * .google.cloud.iot.v1.DeviceRegistry device_registry = 1 [(.google.api.field_behavior) = REQUIRED];
681      * </code>
682      */
mergeDeviceRegistry(com.google.cloud.iot.v1.DeviceRegistry value)683     public Builder mergeDeviceRegistry(com.google.cloud.iot.v1.DeviceRegistry value) {
684       if (deviceRegistryBuilder_ == null) {
685         if (((bitField0_ & 0x00000001) != 0)
686             && deviceRegistry_ != null
687             && deviceRegistry_ != com.google.cloud.iot.v1.DeviceRegistry.getDefaultInstance()) {
688           getDeviceRegistryBuilder().mergeFrom(value);
689         } else {
690           deviceRegistry_ = value;
691         }
692       } else {
693         deviceRegistryBuilder_.mergeFrom(value);
694       }
695       bitField0_ |= 0x00000001;
696       onChanged();
697       return this;
698     }
699     /**
700      *
701      *
702      * <pre>
703      * Required. The new values for the device registry. The `id` field must be empty, and
704      * the `name` field must indicate the path of the resource. For example,
705      * `projects/example-project/locations/us-central1/registries/my-registry`.
706      * </pre>
707      *
708      * <code>
709      * .google.cloud.iot.v1.DeviceRegistry device_registry = 1 [(.google.api.field_behavior) = REQUIRED];
710      * </code>
711      */
clearDeviceRegistry()712     public Builder clearDeviceRegistry() {
713       bitField0_ = (bitField0_ & ~0x00000001);
714       deviceRegistry_ = null;
715       if (deviceRegistryBuilder_ != null) {
716         deviceRegistryBuilder_.dispose();
717         deviceRegistryBuilder_ = null;
718       }
719       onChanged();
720       return this;
721     }
722     /**
723      *
724      *
725      * <pre>
726      * Required. The new values for the device registry. The `id` field must be empty, and
727      * the `name` field must indicate the path of the resource. For example,
728      * `projects/example-project/locations/us-central1/registries/my-registry`.
729      * </pre>
730      *
731      * <code>
732      * .google.cloud.iot.v1.DeviceRegistry device_registry = 1 [(.google.api.field_behavior) = REQUIRED];
733      * </code>
734      */
getDeviceRegistryBuilder()735     public com.google.cloud.iot.v1.DeviceRegistry.Builder getDeviceRegistryBuilder() {
736       bitField0_ |= 0x00000001;
737       onChanged();
738       return getDeviceRegistryFieldBuilder().getBuilder();
739     }
740     /**
741      *
742      *
743      * <pre>
744      * Required. The new values for the device registry. The `id` field must be empty, and
745      * the `name` field must indicate the path of the resource. For example,
746      * `projects/example-project/locations/us-central1/registries/my-registry`.
747      * </pre>
748      *
749      * <code>
750      * .google.cloud.iot.v1.DeviceRegistry device_registry = 1 [(.google.api.field_behavior) = REQUIRED];
751      * </code>
752      */
getDeviceRegistryOrBuilder()753     public com.google.cloud.iot.v1.DeviceRegistryOrBuilder getDeviceRegistryOrBuilder() {
754       if (deviceRegistryBuilder_ != null) {
755         return deviceRegistryBuilder_.getMessageOrBuilder();
756       } else {
757         return deviceRegistry_ == null
758             ? com.google.cloud.iot.v1.DeviceRegistry.getDefaultInstance()
759             : deviceRegistry_;
760       }
761     }
762     /**
763      *
764      *
765      * <pre>
766      * Required. The new values for the device registry. The `id` field must be empty, and
767      * the `name` field must indicate the path of the resource. For example,
768      * `projects/example-project/locations/us-central1/registries/my-registry`.
769      * </pre>
770      *
771      * <code>
772      * .google.cloud.iot.v1.DeviceRegistry device_registry = 1 [(.google.api.field_behavior) = REQUIRED];
773      * </code>
774      */
775     private com.google.protobuf.SingleFieldBuilderV3<
776             com.google.cloud.iot.v1.DeviceRegistry,
777             com.google.cloud.iot.v1.DeviceRegistry.Builder,
778             com.google.cloud.iot.v1.DeviceRegistryOrBuilder>
getDeviceRegistryFieldBuilder()779         getDeviceRegistryFieldBuilder() {
780       if (deviceRegistryBuilder_ == null) {
781         deviceRegistryBuilder_ =
782             new com.google.protobuf.SingleFieldBuilderV3<
783                 com.google.cloud.iot.v1.DeviceRegistry,
784                 com.google.cloud.iot.v1.DeviceRegistry.Builder,
785                 com.google.cloud.iot.v1.DeviceRegistryOrBuilder>(
786                 getDeviceRegistry(), getParentForChildren(), isClean());
787         deviceRegistry_ = null;
788       }
789       return deviceRegistryBuilder_;
790     }
791 
792     private com.google.protobuf.FieldMask updateMask_;
793     private com.google.protobuf.SingleFieldBuilderV3<
794             com.google.protobuf.FieldMask,
795             com.google.protobuf.FieldMask.Builder,
796             com.google.protobuf.FieldMaskOrBuilder>
797         updateMaskBuilder_;
798     /**
799      *
800      *
801      * <pre>
802      * Required. Only updates the `device_registry` fields indicated by this mask.
803      * The field mask must not be empty, and it must not contain fields that
804      * are immutable or only set by the server.
805      * Mutable top-level fields: `event_notification_config`, `http_config`,
806      * `mqtt_config`, and `state_notification_config`.
807      * </pre>
808      *
809      * <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
810      * </code>
811      *
812      * @return Whether the updateMask field is set.
813      */
hasUpdateMask()814     public boolean hasUpdateMask() {
815       return ((bitField0_ & 0x00000002) != 0);
816     }
817     /**
818      *
819      *
820      * <pre>
821      * Required. Only updates the `device_registry` fields indicated by this mask.
822      * The field mask must not be empty, and it must not contain fields that
823      * are immutable or only set by the server.
824      * Mutable top-level fields: `event_notification_config`, `http_config`,
825      * `mqtt_config`, and `state_notification_config`.
826      * </pre>
827      *
828      * <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
829      * </code>
830      *
831      * @return The updateMask.
832      */
getUpdateMask()833     public com.google.protobuf.FieldMask getUpdateMask() {
834       if (updateMaskBuilder_ == null) {
835         return updateMask_ == null
836             ? com.google.protobuf.FieldMask.getDefaultInstance()
837             : updateMask_;
838       } else {
839         return updateMaskBuilder_.getMessage();
840       }
841     }
842     /**
843      *
844      *
845      * <pre>
846      * Required. Only updates the `device_registry` fields indicated by this mask.
847      * The field mask must not be empty, and it must not contain fields that
848      * are immutable or only set by the server.
849      * Mutable top-level fields: `event_notification_config`, `http_config`,
850      * `mqtt_config`, and `state_notification_config`.
851      * </pre>
852      *
853      * <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
854      * </code>
855      */
setUpdateMask(com.google.protobuf.FieldMask value)856     public Builder setUpdateMask(com.google.protobuf.FieldMask value) {
857       if (updateMaskBuilder_ == null) {
858         if (value == null) {
859           throw new NullPointerException();
860         }
861         updateMask_ = value;
862       } else {
863         updateMaskBuilder_.setMessage(value);
864       }
865       bitField0_ |= 0x00000002;
866       onChanged();
867       return this;
868     }
869     /**
870      *
871      *
872      * <pre>
873      * Required. Only updates the `device_registry` fields indicated by this mask.
874      * The field mask must not be empty, and it must not contain fields that
875      * are immutable or only set by the server.
876      * Mutable top-level fields: `event_notification_config`, `http_config`,
877      * `mqtt_config`, and `state_notification_config`.
878      * </pre>
879      *
880      * <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
881      * </code>
882      */
setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue)883     public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) {
884       if (updateMaskBuilder_ == null) {
885         updateMask_ = builderForValue.build();
886       } else {
887         updateMaskBuilder_.setMessage(builderForValue.build());
888       }
889       bitField0_ |= 0x00000002;
890       onChanged();
891       return this;
892     }
893     /**
894      *
895      *
896      * <pre>
897      * Required. Only updates the `device_registry` fields indicated by this mask.
898      * The field mask must not be empty, and it must not contain fields that
899      * are immutable or only set by the server.
900      * Mutable top-level fields: `event_notification_config`, `http_config`,
901      * `mqtt_config`, and `state_notification_config`.
902      * </pre>
903      *
904      * <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
905      * </code>
906      */
mergeUpdateMask(com.google.protobuf.FieldMask value)907     public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) {
908       if (updateMaskBuilder_ == null) {
909         if (((bitField0_ & 0x00000002) != 0)
910             && updateMask_ != null
911             && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) {
912           getUpdateMaskBuilder().mergeFrom(value);
913         } else {
914           updateMask_ = value;
915         }
916       } else {
917         updateMaskBuilder_.mergeFrom(value);
918       }
919       bitField0_ |= 0x00000002;
920       onChanged();
921       return this;
922     }
923     /**
924      *
925      *
926      * <pre>
927      * Required. Only updates the `device_registry` fields indicated by this mask.
928      * The field mask must not be empty, and it must not contain fields that
929      * are immutable or only set by the server.
930      * Mutable top-level fields: `event_notification_config`, `http_config`,
931      * `mqtt_config`, and `state_notification_config`.
932      * </pre>
933      *
934      * <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
935      * </code>
936      */
clearUpdateMask()937     public Builder clearUpdateMask() {
938       bitField0_ = (bitField0_ & ~0x00000002);
939       updateMask_ = null;
940       if (updateMaskBuilder_ != null) {
941         updateMaskBuilder_.dispose();
942         updateMaskBuilder_ = null;
943       }
944       onChanged();
945       return this;
946     }
947     /**
948      *
949      *
950      * <pre>
951      * Required. Only updates the `device_registry` fields indicated by this mask.
952      * The field mask must not be empty, and it must not contain fields that
953      * are immutable or only set by the server.
954      * Mutable top-level fields: `event_notification_config`, `http_config`,
955      * `mqtt_config`, and `state_notification_config`.
956      * </pre>
957      *
958      * <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
959      * </code>
960      */
getUpdateMaskBuilder()961     public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() {
962       bitField0_ |= 0x00000002;
963       onChanged();
964       return getUpdateMaskFieldBuilder().getBuilder();
965     }
966     /**
967      *
968      *
969      * <pre>
970      * Required. Only updates the `device_registry` fields indicated by this mask.
971      * The field mask must not be empty, and it must not contain fields that
972      * are immutable or only set by the server.
973      * Mutable top-level fields: `event_notification_config`, `http_config`,
974      * `mqtt_config`, and `state_notification_config`.
975      * </pre>
976      *
977      * <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
978      * </code>
979      */
getUpdateMaskOrBuilder()980     public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() {
981       if (updateMaskBuilder_ != null) {
982         return updateMaskBuilder_.getMessageOrBuilder();
983       } else {
984         return updateMask_ == null
985             ? com.google.protobuf.FieldMask.getDefaultInstance()
986             : updateMask_;
987       }
988     }
989     /**
990      *
991      *
992      * <pre>
993      * Required. Only updates the `device_registry` fields indicated by this mask.
994      * The field mask must not be empty, and it must not contain fields that
995      * are immutable or only set by the server.
996      * Mutable top-level fields: `event_notification_config`, `http_config`,
997      * `mqtt_config`, and `state_notification_config`.
998      * </pre>
999      *
1000      * <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
1001      * </code>
1002      */
1003     private com.google.protobuf.SingleFieldBuilderV3<
1004             com.google.protobuf.FieldMask,
1005             com.google.protobuf.FieldMask.Builder,
1006             com.google.protobuf.FieldMaskOrBuilder>
getUpdateMaskFieldBuilder()1007         getUpdateMaskFieldBuilder() {
1008       if (updateMaskBuilder_ == null) {
1009         updateMaskBuilder_ =
1010             new com.google.protobuf.SingleFieldBuilderV3<
1011                 com.google.protobuf.FieldMask,
1012                 com.google.protobuf.FieldMask.Builder,
1013                 com.google.protobuf.FieldMaskOrBuilder>(
1014                 getUpdateMask(), getParentForChildren(), isClean());
1015         updateMask_ = null;
1016       }
1017       return updateMaskBuilder_;
1018     }
1019 
1020     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1021     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1022       return super.setUnknownFields(unknownFields);
1023     }
1024 
1025     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1026     public final Builder mergeUnknownFields(
1027         final com.google.protobuf.UnknownFieldSet unknownFields) {
1028       return super.mergeUnknownFields(unknownFields);
1029     }
1030 
1031     // @@protoc_insertion_point(builder_scope:google.cloud.iot.v1.UpdateDeviceRegistryRequest)
1032   }
1033 
1034   // @@protoc_insertion_point(class_scope:google.cloud.iot.v1.UpdateDeviceRegistryRequest)
1035   private static final com.google.cloud.iot.v1.UpdateDeviceRegistryRequest DEFAULT_INSTANCE;
1036 
1037   static {
1038     DEFAULT_INSTANCE = new com.google.cloud.iot.v1.UpdateDeviceRegistryRequest();
1039   }
1040 
getDefaultInstance()1041   public static com.google.cloud.iot.v1.UpdateDeviceRegistryRequest getDefaultInstance() {
1042     return DEFAULT_INSTANCE;
1043   }
1044 
1045   private static final com.google.protobuf.Parser<UpdateDeviceRegistryRequest> PARSER =
1046       new com.google.protobuf.AbstractParser<UpdateDeviceRegistryRequest>() {
1047         @java.lang.Override
1048         public UpdateDeviceRegistryRequest parsePartialFrom(
1049             com.google.protobuf.CodedInputStream input,
1050             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1051             throws com.google.protobuf.InvalidProtocolBufferException {
1052           Builder builder = newBuilder();
1053           try {
1054             builder.mergeFrom(input, extensionRegistry);
1055           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1056             throw e.setUnfinishedMessage(builder.buildPartial());
1057           } catch (com.google.protobuf.UninitializedMessageException e) {
1058             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1059           } catch (java.io.IOException e) {
1060             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1061                 .setUnfinishedMessage(builder.buildPartial());
1062           }
1063           return builder.buildPartial();
1064         }
1065       };
1066 
parser()1067   public static com.google.protobuf.Parser<UpdateDeviceRegistryRequest> parser() {
1068     return PARSER;
1069   }
1070 
1071   @java.lang.Override
getParserForType()1072   public com.google.protobuf.Parser<UpdateDeviceRegistryRequest> getParserForType() {
1073     return PARSER;
1074   }
1075 
1076   @java.lang.Override
getDefaultInstanceForType()1077   public com.google.cloud.iot.v1.UpdateDeviceRegistryRequest getDefaultInstanceForType() {
1078     return DEFAULT_INSTANCE;
1079   }
1080 }
1081