• 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  * A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. The load balancer doesn't wait for responses from the shadow service. Before sending traffic to the shadow service, the host or authority header is suffixed with -shadow.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.compute.v1.RequestMirrorPolicy}
29  */
30 public final class RequestMirrorPolicy extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.RequestMirrorPolicy)
33     RequestMirrorPolicyOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use RequestMirrorPolicy.newBuilder() to construct.
RequestMirrorPolicy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private RequestMirrorPolicy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
RequestMirrorPolicy()40   private RequestMirrorPolicy() {
41     backendService_ = "";
42   }
43 
44   @java.lang.Override
45   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)46   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
47     return new RequestMirrorPolicy();
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_RequestMirrorPolicy_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_RequestMirrorPolicy_fieldAccessorTable
65         .ensureFieldAccessorsInitialized(
66             com.google.cloud.compute.v1.RequestMirrorPolicy.class,
67             com.google.cloud.compute.v1.RequestMirrorPolicy.Builder.class);
68   }
69 
70   private int bitField0_;
71   public static final int BACKEND_SERVICE_FIELD_NUMBER = 306946058;
72 
73   @SuppressWarnings("serial")
74   private volatile java.lang.Object backendService_ = "";
75   /**
76    *
77    *
78    * <pre>
79    * The full or partial URL to the BackendService resource being mirrored to. The backend service configured for a mirroring policy must reference backends that are of the same type as the original backend service matched in the URL map. Serverless NEG backends are not currently supported as a mirrored backend service.
80    * </pre>
81    *
82    * <code>optional string backend_service = 306946058;</code>
83    *
84    * @return Whether the backendService field is set.
85    */
86   @java.lang.Override
hasBackendService()87   public boolean hasBackendService() {
88     return ((bitField0_ & 0x00000001) != 0);
89   }
90   /**
91    *
92    *
93    * <pre>
94    * The full or partial URL to the BackendService resource being mirrored to. The backend service configured for a mirroring policy must reference backends that are of the same type as the original backend service matched in the URL map. Serverless NEG backends are not currently supported as a mirrored backend service.
95    * </pre>
96    *
97    * <code>optional string backend_service = 306946058;</code>
98    *
99    * @return The backendService.
100    */
101   @java.lang.Override
getBackendService()102   public java.lang.String getBackendService() {
103     java.lang.Object ref = backendService_;
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       backendService_ = s;
110       return s;
111     }
112   }
113   /**
114    *
115    *
116    * <pre>
117    * The full or partial URL to the BackendService resource being mirrored to. The backend service configured for a mirroring policy must reference backends that are of the same type as the original backend service matched in the URL map. Serverless NEG backends are not currently supported as a mirrored backend service.
118    * </pre>
119    *
120    * <code>optional string backend_service = 306946058;</code>
121    *
122    * @return The bytes for backendService.
123    */
124   @java.lang.Override
getBackendServiceBytes()125   public com.google.protobuf.ByteString getBackendServiceBytes() {
126     java.lang.Object ref = backendService_;
127     if (ref instanceof java.lang.String) {
128       com.google.protobuf.ByteString b =
129           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
130       backendService_ = b;
131       return b;
132     } else {
133       return (com.google.protobuf.ByteString) ref;
134     }
135   }
136 
137   private byte memoizedIsInitialized = -1;
138 
139   @java.lang.Override
isInitialized()140   public final boolean isInitialized() {
141     byte isInitialized = memoizedIsInitialized;
142     if (isInitialized == 1) return true;
143     if (isInitialized == 0) return false;
144 
145     memoizedIsInitialized = 1;
146     return true;
147   }
148 
149   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)150   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
151     if (((bitField0_ & 0x00000001) != 0)) {
152       com.google.protobuf.GeneratedMessageV3.writeString(output, 306946058, backendService_);
153     }
154     getUnknownFields().writeTo(output);
155   }
156 
157   @java.lang.Override
getSerializedSize()158   public int getSerializedSize() {
159     int size = memoizedSize;
160     if (size != -1) return size;
161 
162     size = 0;
163     if (((bitField0_ & 0x00000001) != 0)) {
164       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(306946058, backendService_);
165     }
166     size += getUnknownFields().getSerializedSize();
167     memoizedSize = size;
168     return size;
169   }
170 
171   @java.lang.Override
equals(final java.lang.Object obj)172   public boolean equals(final java.lang.Object obj) {
173     if (obj == this) {
174       return true;
175     }
176     if (!(obj instanceof com.google.cloud.compute.v1.RequestMirrorPolicy)) {
177       return super.equals(obj);
178     }
179     com.google.cloud.compute.v1.RequestMirrorPolicy other =
180         (com.google.cloud.compute.v1.RequestMirrorPolicy) obj;
181 
182     if (hasBackendService() != other.hasBackendService()) return false;
183     if (hasBackendService()) {
184       if (!getBackendService().equals(other.getBackendService())) return false;
185     }
186     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
187     return true;
188   }
189 
190   @java.lang.Override
hashCode()191   public int hashCode() {
192     if (memoizedHashCode != 0) {
193       return memoizedHashCode;
194     }
195     int hash = 41;
196     hash = (19 * hash) + getDescriptor().hashCode();
197     if (hasBackendService()) {
198       hash = (37 * hash) + BACKEND_SERVICE_FIELD_NUMBER;
199       hash = (53 * hash) + getBackendService().hashCode();
200     }
201     hash = (29 * hash) + getUnknownFields().hashCode();
202     memoizedHashCode = hash;
203     return hash;
204   }
205 
parseFrom(java.nio.ByteBuffer data)206   public static com.google.cloud.compute.v1.RequestMirrorPolicy parseFrom(java.nio.ByteBuffer data)
207       throws com.google.protobuf.InvalidProtocolBufferException {
208     return PARSER.parseFrom(data);
209   }
210 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)211   public static com.google.cloud.compute.v1.RequestMirrorPolicy parseFrom(
212       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
213       throws com.google.protobuf.InvalidProtocolBufferException {
214     return PARSER.parseFrom(data, extensionRegistry);
215   }
216 
parseFrom( com.google.protobuf.ByteString data)217   public static com.google.cloud.compute.v1.RequestMirrorPolicy parseFrom(
218       com.google.protobuf.ByteString data)
219       throws com.google.protobuf.InvalidProtocolBufferException {
220     return PARSER.parseFrom(data);
221   }
222 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)223   public static com.google.cloud.compute.v1.RequestMirrorPolicy parseFrom(
224       com.google.protobuf.ByteString data,
225       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
226       throws com.google.protobuf.InvalidProtocolBufferException {
227     return PARSER.parseFrom(data, extensionRegistry);
228   }
229 
parseFrom(byte[] data)230   public static com.google.cloud.compute.v1.RequestMirrorPolicy parseFrom(byte[] data)
231       throws com.google.protobuf.InvalidProtocolBufferException {
232     return PARSER.parseFrom(data);
233   }
234 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)235   public static com.google.cloud.compute.v1.RequestMirrorPolicy parseFrom(
236       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
237       throws com.google.protobuf.InvalidProtocolBufferException {
238     return PARSER.parseFrom(data, extensionRegistry);
239   }
240 
parseFrom(java.io.InputStream input)241   public static com.google.cloud.compute.v1.RequestMirrorPolicy parseFrom(java.io.InputStream input)
242       throws java.io.IOException {
243     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
244   }
245 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)246   public static com.google.cloud.compute.v1.RequestMirrorPolicy parseFrom(
247       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
248       throws java.io.IOException {
249     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
250         PARSER, input, extensionRegistry);
251   }
252 
parseDelimitedFrom( java.io.InputStream input)253   public static com.google.cloud.compute.v1.RequestMirrorPolicy parseDelimitedFrom(
254       java.io.InputStream input) throws java.io.IOException {
255     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
256   }
257 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)258   public static com.google.cloud.compute.v1.RequestMirrorPolicy parseDelimitedFrom(
259       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
260       throws java.io.IOException {
261     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
262         PARSER, input, extensionRegistry);
263   }
264 
parseFrom( com.google.protobuf.CodedInputStream input)265   public static com.google.cloud.compute.v1.RequestMirrorPolicy parseFrom(
266       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
267     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
268   }
269 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)270   public static com.google.cloud.compute.v1.RequestMirrorPolicy parseFrom(
271       com.google.protobuf.CodedInputStream input,
272       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
273       throws java.io.IOException {
274     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
275         PARSER, input, extensionRegistry);
276   }
277 
278   @java.lang.Override
newBuilderForType()279   public Builder newBuilderForType() {
280     return newBuilder();
281   }
282 
newBuilder()283   public static Builder newBuilder() {
284     return DEFAULT_INSTANCE.toBuilder();
285   }
286 
newBuilder(com.google.cloud.compute.v1.RequestMirrorPolicy prototype)287   public static Builder newBuilder(com.google.cloud.compute.v1.RequestMirrorPolicy prototype) {
288     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
289   }
290 
291   @java.lang.Override
toBuilder()292   public Builder toBuilder() {
293     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
294   }
295 
296   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)297   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
298     Builder builder = new Builder(parent);
299     return builder;
300   }
301   /**
302    *
303    *
304    * <pre>
305    * A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. The load balancer doesn't wait for responses from the shadow service. Before sending traffic to the shadow service, the host or authority header is suffixed with -shadow.
306    * </pre>
307    *
308    * Protobuf type {@code google.cloud.compute.v1.RequestMirrorPolicy}
309    */
310   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
311       implements
312       // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.RequestMirrorPolicy)
313       com.google.cloud.compute.v1.RequestMirrorPolicyOrBuilder {
getDescriptor()314     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
315       return com.google.cloud.compute.v1.Compute
316           .internal_static_google_cloud_compute_v1_RequestMirrorPolicy_descriptor;
317     }
318 
319     @java.lang.Override
320     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()321         internalGetFieldAccessorTable() {
322       return com.google.cloud.compute.v1.Compute
323           .internal_static_google_cloud_compute_v1_RequestMirrorPolicy_fieldAccessorTable
324           .ensureFieldAccessorsInitialized(
325               com.google.cloud.compute.v1.RequestMirrorPolicy.class,
326               com.google.cloud.compute.v1.RequestMirrorPolicy.Builder.class);
327     }
328 
329     // Construct using com.google.cloud.compute.v1.RequestMirrorPolicy.newBuilder()
Builder()330     private Builder() {}
331 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)332     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
333       super(parent);
334     }
335 
336     @java.lang.Override
clear()337     public Builder clear() {
338       super.clear();
339       bitField0_ = 0;
340       backendService_ = "";
341       return this;
342     }
343 
344     @java.lang.Override
getDescriptorForType()345     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
346       return com.google.cloud.compute.v1.Compute
347           .internal_static_google_cloud_compute_v1_RequestMirrorPolicy_descriptor;
348     }
349 
350     @java.lang.Override
getDefaultInstanceForType()351     public com.google.cloud.compute.v1.RequestMirrorPolicy getDefaultInstanceForType() {
352       return com.google.cloud.compute.v1.RequestMirrorPolicy.getDefaultInstance();
353     }
354 
355     @java.lang.Override
build()356     public com.google.cloud.compute.v1.RequestMirrorPolicy build() {
357       com.google.cloud.compute.v1.RequestMirrorPolicy result = buildPartial();
358       if (!result.isInitialized()) {
359         throw newUninitializedMessageException(result);
360       }
361       return result;
362     }
363 
364     @java.lang.Override
buildPartial()365     public com.google.cloud.compute.v1.RequestMirrorPolicy buildPartial() {
366       com.google.cloud.compute.v1.RequestMirrorPolicy result =
367           new com.google.cloud.compute.v1.RequestMirrorPolicy(this);
368       if (bitField0_ != 0) {
369         buildPartial0(result);
370       }
371       onBuilt();
372       return result;
373     }
374 
buildPartial0(com.google.cloud.compute.v1.RequestMirrorPolicy result)375     private void buildPartial0(com.google.cloud.compute.v1.RequestMirrorPolicy result) {
376       int from_bitField0_ = bitField0_;
377       int to_bitField0_ = 0;
378       if (((from_bitField0_ & 0x00000001) != 0)) {
379         result.backendService_ = backendService_;
380         to_bitField0_ |= 0x00000001;
381       }
382       result.bitField0_ |= to_bitField0_;
383     }
384 
385     @java.lang.Override
clone()386     public Builder clone() {
387       return super.clone();
388     }
389 
390     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)391     public Builder setField(
392         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
393       return super.setField(field, value);
394     }
395 
396     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)397     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
398       return super.clearField(field);
399     }
400 
401     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)402     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
403       return super.clearOneof(oneof);
404     }
405 
406     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)407     public Builder setRepeatedField(
408         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
409       return super.setRepeatedField(field, index, value);
410     }
411 
412     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)413     public Builder addRepeatedField(
414         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
415       return super.addRepeatedField(field, value);
416     }
417 
418     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)419     public Builder mergeFrom(com.google.protobuf.Message other) {
420       if (other instanceof com.google.cloud.compute.v1.RequestMirrorPolicy) {
421         return mergeFrom((com.google.cloud.compute.v1.RequestMirrorPolicy) other);
422       } else {
423         super.mergeFrom(other);
424         return this;
425       }
426     }
427 
mergeFrom(com.google.cloud.compute.v1.RequestMirrorPolicy other)428     public Builder mergeFrom(com.google.cloud.compute.v1.RequestMirrorPolicy other) {
429       if (other == com.google.cloud.compute.v1.RequestMirrorPolicy.getDefaultInstance())
430         return this;
431       if (other.hasBackendService()) {
432         backendService_ = other.backendService_;
433         bitField0_ |= 0x00000001;
434         onChanged();
435       }
436       this.mergeUnknownFields(other.getUnknownFields());
437       onChanged();
438       return this;
439     }
440 
441     @java.lang.Override
isInitialized()442     public final boolean isInitialized() {
443       return true;
444     }
445 
446     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)447     public Builder mergeFrom(
448         com.google.protobuf.CodedInputStream input,
449         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
450         throws java.io.IOException {
451       if (extensionRegistry == null) {
452         throw new java.lang.NullPointerException();
453       }
454       try {
455         boolean done = false;
456         while (!done) {
457           int tag = input.readTag();
458           switch (tag) {
459             case 0:
460               done = true;
461               break;
462             case -1839398830:
463               {
464                 backendService_ = input.readStringRequireUtf8();
465                 bitField0_ |= 0x00000001;
466                 break;
467               } // case -1839398830
468             default:
469               {
470                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
471                   done = true; // was an endgroup tag
472                 }
473                 break;
474               } // default:
475           } // switch (tag)
476         } // while (!done)
477       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
478         throw e.unwrapIOException();
479       } finally {
480         onChanged();
481       } // finally
482       return this;
483     }
484 
485     private int bitField0_;
486 
487     private java.lang.Object backendService_ = "";
488     /**
489      *
490      *
491      * <pre>
492      * The full or partial URL to the BackendService resource being mirrored to. The backend service configured for a mirroring policy must reference backends that are of the same type as the original backend service matched in the URL map. Serverless NEG backends are not currently supported as a mirrored backend service.
493      * </pre>
494      *
495      * <code>optional string backend_service = 306946058;</code>
496      *
497      * @return Whether the backendService field is set.
498      */
hasBackendService()499     public boolean hasBackendService() {
500       return ((bitField0_ & 0x00000001) != 0);
501     }
502     /**
503      *
504      *
505      * <pre>
506      * The full or partial URL to the BackendService resource being mirrored to. The backend service configured for a mirroring policy must reference backends that are of the same type as the original backend service matched in the URL map. Serverless NEG backends are not currently supported as a mirrored backend service.
507      * </pre>
508      *
509      * <code>optional string backend_service = 306946058;</code>
510      *
511      * @return The backendService.
512      */
getBackendService()513     public java.lang.String getBackendService() {
514       java.lang.Object ref = backendService_;
515       if (!(ref instanceof java.lang.String)) {
516         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
517         java.lang.String s = bs.toStringUtf8();
518         backendService_ = s;
519         return s;
520       } else {
521         return (java.lang.String) ref;
522       }
523     }
524     /**
525      *
526      *
527      * <pre>
528      * The full or partial URL to the BackendService resource being mirrored to. The backend service configured for a mirroring policy must reference backends that are of the same type as the original backend service matched in the URL map. Serverless NEG backends are not currently supported as a mirrored backend service.
529      * </pre>
530      *
531      * <code>optional string backend_service = 306946058;</code>
532      *
533      * @return The bytes for backendService.
534      */
getBackendServiceBytes()535     public com.google.protobuf.ByteString getBackendServiceBytes() {
536       java.lang.Object ref = backendService_;
537       if (ref instanceof String) {
538         com.google.protobuf.ByteString b =
539             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
540         backendService_ = b;
541         return b;
542       } else {
543         return (com.google.protobuf.ByteString) ref;
544       }
545     }
546     /**
547      *
548      *
549      * <pre>
550      * The full or partial URL to the BackendService resource being mirrored to. The backend service configured for a mirroring policy must reference backends that are of the same type as the original backend service matched in the URL map. Serverless NEG backends are not currently supported as a mirrored backend service.
551      * </pre>
552      *
553      * <code>optional string backend_service = 306946058;</code>
554      *
555      * @param value The backendService to set.
556      * @return This builder for chaining.
557      */
setBackendService(java.lang.String value)558     public Builder setBackendService(java.lang.String value) {
559       if (value == null) {
560         throw new NullPointerException();
561       }
562       backendService_ = value;
563       bitField0_ |= 0x00000001;
564       onChanged();
565       return this;
566     }
567     /**
568      *
569      *
570      * <pre>
571      * The full or partial URL to the BackendService resource being mirrored to. The backend service configured for a mirroring policy must reference backends that are of the same type as the original backend service matched in the URL map. Serverless NEG backends are not currently supported as a mirrored backend service.
572      * </pre>
573      *
574      * <code>optional string backend_service = 306946058;</code>
575      *
576      * @return This builder for chaining.
577      */
clearBackendService()578     public Builder clearBackendService() {
579       backendService_ = getDefaultInstance().getBackendService();
580       bitField0_ = (bitField0_ & ~0x00000001);
581       onChanged();
582       return this;
583     }
584     /**
585      *
586      *
587      * <pre>
588      * The full or partial URL to the BackendService resource being mirrored to. The backend service configured for a mirroring policy must reference backends that are of the same type as the original backend service matched in the URL map. Serverless NEG backends are not currently supported as a mirrored backend service.
589      * </pre>
590      *
591      * <code>optional string backend_service = 306946058;</code>
592      *
593      * @param value The bytes for backendService to set.
594      * @return This builder for chaining.
595      */
setBackendServiceBytes(com.google.protobuf.ByteString value)596     public Builder setBackendServiceBytes(com.google.protobuf.ByteString value) {
597       if (value == null) {
598         throw new NullPointerException();
599       }
600       checkByteStringIsUtf8(value);
601       backendService_ = value;
602       bitField0_ |= 0x00000001;
603       onChanged();
604       return this;
605     }
606 
607     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)608     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
609       return super.setUnknownFields(unknownFields);
610     }
611 
612     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)613     public final Builder mergeUnknownFields(
614         final com.google.protobuf.UnknownFieldSet unknownFields) {
615       return super.mergeUnknownFields(unknownFields);
616     }
617 
618     // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.RequestMirrorPolicy)
619   }
620 
621   // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.RequestMirrorPolicy)
622   private static final com.google.cloud.compute.v1.RequestMirrorPolicy DEFAULT_INSTANCE;
623 
624   static {
625     DEFAULT_INSTANCE = new com.google.cloud.compute.v1.RequestMirrorPolicy();
626   }
627 
getDefaultInstance()628   public static com.google.cloud.compute.v1.RequestMirrorPolicy getDefaultInstance() {
629     return DEFAULT_INSTANCE;
630   }
631 
632   private static final com.google.protobuf.Parser<RequestMirrorPolicy> PARSER =
633       new com.google.protobuf.AbstractParser<RequestMirrorPolicy>() {
634         @java.lang.Override
635         public RequestMirrorPolicy parsePartialFrom(
636             com.google.protobuf.CodedInputStream input,
637             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
638             throws com.google.protobuf.InvalidProtocolBufferException {
639           Builder builder = newBuilder();
640           try {
641             builder.mergeFrom(input, extensionRegistry);
642           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
643             throw e.setUnfinishedMessage(builder.buildPartial());
644           } catch (com.google.protobuf.UninitializedMessageException e) {
645             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
646           } catch (java.io.IOException e) {
647             throw new com.google.protobuf.InvalidProtocolBufferException(e)
648                 .setUnfinishedMessage(builder.buildPartial());
649           }
650           return builder.buildPartial();
651         }
652       };
653 
parser()654   public static com.google.protobuf.Parser<RequestMirrorPolicy> parser() {
655     return PARSER;
656   }
657 
658   @java.lang.Override
getParserForType()659   public com.google.protobuf.Parser<RequestMirrorPolicy> getParserForType() {
660     return PARSER;
661   }
662 
663   @java.lang.Override
getDefaultInstanceForType()664   public com.google.cloud.compute.v1.RequestMirrorPolicy getDefaultInstanceForType() {
665     return DEFAULT_INSTANCE;
666   }
667 }
668