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