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