• 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  * The specification for allowing client-side cross-origin requests. For more information about the W3C recommendation for cross-origin resource sharing (CORS), see Fetch API Living Standard.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.compute.v1.CorsPolicy}
29  */
30 public final class CorsPolicy extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.CorsPolicy)
33     CorsPolicyOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use CorsPolicy.newBuilder() to construct.
CorsPolicy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private CorsPolicy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
CorsPolicy()40   private CorsPolicy() {
41     allowHeaders_ = com.google.protobuf.LazyStringArrayList.EMPTY;
42     allowMethods_ = com.google.protobuf.LazyStringArrayList.EMPTY;
43     allowOriginRegexes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
44     allowOrigins_ = com.google.protobuf.LazyStringArrayList.EMPTY;
45     exposeHeaders_ = com.google.protobuf.LazyStringArrayList.EMPTY;
46   }
47 
48   @java.lang.Override
49   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)50   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
51     return new CorsPolicy();
52   }
53 
54   @java.lang.Override
getUnknownFields()55   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
56     return this.unknownFields;
57   }
58 
getDescriptor()59   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
60     return com.google.cloud.compute.v1.Compute
61         .internal_static_google_cloud_compute_v1_CorsPolicy_descriptor;
62   }
63 
64   @java.lang.Override
65   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()66       internalGetFieldAccessorTable() {
67     return com.google.cloud.compute.v1.Compute
68         .internal_static_google_cloud_compute_v1_CorsPolicy_fieldAccessorTable
69         .ensureFieldAccessorsInitialized(
70             com.google.cloud.compute.v1.CorsPolicy.class,
71             com.google.cloud.compute.v1.CorsPolicy.Builder.class);
72   }
73 
74   private int bitField0_;
75   public static final int ALLOW_CREDENTIALS_FIELD_NUMBER = 481263366;
76   private boolean allowCredentials_ = false;
77   /**
78    *
79    *
80    * <pre>
81    * In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This field translates to the Access-Control-Allow-Credentials header. Default is false.
82    * </pre>
83    *
84    * <code>optional bool allow_credentials = 481263366;</code>
85    *
86    * @return Whether the allowCredentials field is set.
87    */
88   @java.lang.Override
hasAllowCredentials()89   public boolean hasAllowCredentials() {
90     return ((bitField0_ & 0x00000001) != 0);
91   }
92   /**
93    *
94    *
95    * <pre>
96    * In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This field translates to the Access-Control-Allow-Credentials header. Default is false.
97    * </pre>
98    *
99    * <code>optional bool allow_credentials = 481263366;</code>
100    *
101    * @return The allowCredentials.
102    */
103   @java.lang.Override
getAllowCredentials()104   public boolean getAllowCredentials() {
105     return allowCredentials_;
106   }
107 
108   public static final int ALLOW_HEADERS_FIELD_NUMBER = 45179024;
109 
110   @SuppressWarnings("serial")
111   private com.google.protobuf.LazyStringList allowHeaders_;
112   /**
113    *
114    *
115    * <pre>
116    * Specifies the content for the Access-Control-Allow-Headers header.
117    * </pre>
118    *
119    * <code>repeated string allow_headers = 45179024;</code>
120    *
121    * @return A list containing the allowHeaders.
122    */
getAllowHeadersList()123   public com.google.protobuf.ProtocolStringList getAllowHeadersList() {
124     return allowHeaders_;
125   }
126   /**
127    *
128    *
129    * <pre>
130    * Specifies the content for the Access-Control-Allow-Headers header.
131    * </pre>
132    *
133    * <code>repeated string allow_headers = 45179024;</code>
134    *
135    * @return The count of allowHeaders.
136    */
getAllowHeadersCount()137   public int getAllowHeadersCount() {
138     return allowHeaders_.size();
139   }
140   /**
141    *
142    *
143    * <pre>
144    * Specifies the content for the Access-Control-Allow-Headers header.
145    * </pre>
146    *
147    * <code>repeated string allow_headers = 45179024;</code>
148    *
149    * @param index The index of the element to return.
150    * @return The allowHeaders at the given index.
151    */
getAllowHeaders(int index)152   public java.lang.String getAllowHeaders(int index) {
153     return allowHeaders_.get(index);
154   }
155   /**
156    *
157    *
158    * <pre>
159    * Specifies the content for the Access-Control-Allow-Headers header.
160    * </pre>
161    *
162    * <code>repeated string allow_headers = 45179024;</code>
163    *
164    * @param index The index of the value to return.
165    * @return The bytes of the allowHeaders at the given index.
166    */
getAllowHeadersBytes(int index)167   public com.google.protobuf.ByteString getAllowHeadersBytes(int index) {
168     return allowHeaders_.getByteString(index);
169   }
170 
171   public static final int ALLOW_METHODS_FIELD_NUMBER = 205405372;
172 
173   @SuppressWarnings("serial")
174   private com.google.protobuf.LazyStringList allowMethods_;
175   /**
176    *
177    *
178    * <pre>
179    * Specifies the content for the Access-Control-Allow-Methods header.
180    * </pre>
181    *
182    * <code>repeated string allow_methods = 205405372;</code>
183    *
184    * @return A list containing the allowMethods.
185    */
getAllowMethodsList()186   public com.google.protobuf.ProtocolStringList getAllowMethodsList() {
187     return allowMethods_;
188   }
189   /**
190    *
191    *
192    * <pre>
193    * Specifies the content for the Access-Control-Allow-Methods header.
194    * </pre>
195    *
196    * <code>repeated string allow_methods = 205405372;</code>
197    *
198    * @return The count of allowMethods.
199    */
getAllowMethodsCount()200   public int getAllowMethodsCount() {
201     return allowMethods_.size();
202   }
203   /**
204    *
205    *
206    * <pre>
207    * Specifies the content for the Access-Control-Allow-Methods header.
208    * </pre>
209    *
210    * <code>repeated string allow_methods = 205405372;</code>
211    *
212    * @param index The index of the element to return.
213    * @return The allowMethods at the given index.
214    */
getAllowMethods(int index)215   public java.lang.String getAllowMethods(int index) {
216     return allowMethods_.get(index);
217   }
218   /**
219    *
220    *
221    * <pre>
222    * Specifies the content for the Access-Control-Allow-Methods header.
223    * </pre>
224    *
225    * <code>repeated string allow_methods = 205405372;</code>
226    *
227    * @param index The index of the value to return.
228    * @return The bytes of the allowMethods at the given index.
229    */
getAllowMethodsBytes(int index)230   public com.google.protobuf.ByteString getAllowMethodsBytes(int index) {
231     return allowMethods_.getByteString(index);
232   }
233 
234   public static final int ALLOW_ORIGIN_REGEXES_FIELD_NUMBER = 215385810;
235 
236   @SuppressWarnings("serial")
237   private com.google.protobuf.LazyStringList allowOriginRegexes_;
238   /**
239    *
240    *
241    * <pre>
242    * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
243    * </pre>
244    *
245    * <code>repeated string allow_origin_regexes = 215385810;</code>
246    *
247    * @return A list containing the allowOriginRegexes.
248    */
getAllowOriginRegexesList()249   public com.google.protobuf.ProtocolStringList getAllowOriginRegexesList() {
250     return allowOriginRegexes_;
251   }
252   /**
253    *
254    *
255    * <pre>
256    * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
257    * </pre>
258    *
259    * <code>repeated string allow_origin_regexes = 215385810;</code>
260    *
261    * @return The count of allowOriginRegexes.
262    */
getAllowOriginRegexesCount()263   public int getAllowOriginRegexesCount() {
264     return allowOriginRegexes_.size();
265   }
266   /**
267    *
268    *
269    * <pre>
270    * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
271    * </pre>
272    *
273    * <code>repeated string allow_origin_regexes = 215385810;</code>
274    *
275    * @param index The index of the element to return.
276    * @return The allowOriginRegexes at the given index.
277    */
getAllowOriginRegexes(int index)278   public java.lang.String getAllowOriginRegexes(int index) {
279     return allowOriginRegexes_.get(index);
280   }
281   /**
282    *
283    *
284    * <pre>
285    * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
286    * </pre>
287    *
288    * <code>repeated string allow_origin_regexes = 215385810;</code>
289    *
290    * @param index The index of the value to return.
291    * @return The bytes of the allowOriginRegexes at the given index.
292    */
getAllowOriginRegexesBytes(int index)293   public com.google.protobuf.ByteString getAllowOriginRegexesBytes(int index) {
294     return allowOriginRegexes_.getByteString(index);
295   }
296 
297   public static final int ALLOW_ORIGINS_FIELD_NUMBER = 194914071;
298 
299   @SuppressWarnings("serial")
300   private com.google.protobuf.LazyStringList allowOrigins_;
301   /**
302    *
303    *
304    * <pre>
305    * Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
306    * </pre>
307    *
308    * <code>repeated string allow_origins = 194914071;</code>
309    *
310    * @return A list containing the allowOrigins.
311    */
getAllowOriginsList()312   public com.google.protobuf.ProtocolStringList getAllowOriginsList() {
313     return allowOrigins_;
314   }
315   /**
316    *
317    *
318    * <pre>
319    * Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
320    * </pre>
321    *
322    * <code>repeated string allow_origins = 194914071;</code>
323    *
324    * @return The count of allowOrigins.
325    */
getAllowOriginsCount()326   public int getAllowOriginsCount() {
327     return allowOrigins_.size();
328   }
329   /**
330    *
331    *
332    * <pre>
333    * Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
334    * </pre>
335    *
336    * <code>repeated string allow_origins = 194914071;</code>
337    *
338    * @param index The index of the element to return.
339    * @return The allowOrigins at the given index.
340    */
getAllowOrigins(int index)341   public java.lang.String getAllowOrigins(int index) {
342     return allowOrigins_.get(index);
343   }
344   /**
345    *
346    *
347    * <pre>
348    * Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
349    * </pre>
350    *
351    * <code>repeated string allow_origins = 194914071;</code>
352    *
353    * @param index The index of the value to return.
354    * @return The bytes of the allowOrigins at the given index.
355    */
getAllowOriginsBytes(int index)356   public com.google.protobuf.ByteString getAllowOriginsBytes(int index) {
357     return allowOrigins_.getByteString(index);
358   }
359 
360   public static final int DISABLED_FIELD_NUMBER = 270940796;
361   private boolean disabled_ = false;
362   /**
363    *
364    *
365    * <pre>
366    * If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
367    * </pre>
368    *
369    * <code>optional bool disabled = 270940796;</code>
370    *
371    * @return Whether the disabled field is set.
372    */
373   @java.lang.Override
hasDisabled()374   public boolean hasDisabled() {
375     return ((bitField0_ & 0x00000002) != 0);
376   }
377   /**
378    *
379    *
380    * <pre>
381    * If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
382    * </pre>
383    *
384    * <code>optional bool disabled = 270940796;</code>
385    *
386    * @return The disabled.
387    */
388   @java.lang.Override
getDisabled()389   public boolean getDisabled() {
390     return disabled_;
391   }
392 
393   public static final int EXPOSE_HEADERS_FIELD_NUMBER = 247604747;
394 
395   @SuppressWarnings("serial")
396   private com.google.protobuf.LazyStringList exposeHeaders_;
397   /**
398    *
399    *
400    * <pre>
401    * Specifies the content for the Access-Control-Expose-Headers header.
402    * </pre>
403    *
404    * <code>repeated string expose_headers = 247604747;</code>
405    *
406    * @return A list containing the exposeHeaders.
407    */
getExposeHeadersList()408   public com.google.protobuf.ProtocolStringList getExposeHeadersList() {
409     return exposeHeaders_;
410   }
411   /**
412    *
413    *
414    * <pre>
415    * Specifies the content for the Access-Control-Expose-Headers header.
416    * </pre>
417    *
418    * <code>repeated string expose_headers = 247604747;</code>
419    *
420    * @return The count of exposeHeaders.
421    */
getExposeHeadersCount()422   public int getExposeHeadersCount() {
423     return exposeHeaders_.size();
424   }
425   /**
426    *
427    *
428    * <pre>
429    * Specifies the content for the Access-Control-Expose-Headers header.
430    * </pre>
431    *
432    * <code>repeated string expose_headers = 247604747;</code>
433    *
434    * @param index The index of the element to return.
435    * @return The exposeHeaders at the given index.
436    */
getExposeHeaders(int index)437   public java.lang.String getExposeHeaders(int index) {
438     return exposeHeaders_.get(index);
439   }
440   /**
441    *
442    *
443    * <pre>
444    * Specifies the content for the Access-Control-Expose-Headers header.
445    * </pre>
446    *
447    * <code>repeated string expose_headers = 247604747;</code>
448    *
449    * @param index The index of the value to return.
450    * @return The bytes of the exposeHeaders at the given index.
451    */
getExposeHeadersBytes(int index)452   public com.google.protobuf.ByteString getExposeHeadersBytes(int index) {
453     return exposeHeaders_.getByteString(index);
454   }
455 
456   public static final int MAX_AGE_FIELD_NUMBER = 307559332;
457   private int maxAge_ = 0;
458   /**
459    *
460    *
461    * <pre>
462    * Specifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header.
463    * </pre>
464    *
465    * <code>optional int32 max_age = 307559332;</code>
466    *
467    * @return Whether the maxAge field is set.
468    */
469   @java.lang.Override
hasMaxAge()470   public boolean hasMaxAge() {
471     return ((bitField0_ & 0x00000004) != 0);
472   }
473   /**
474    *
475    *
476    * <pre>
477    * Specifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header.
478    * </pre>
479    *
480    * <code>optional int32 max_age = 307559332;</code>
481    *
482    * @return The maxAge.
483    */
484   @java.lang.Override
getMaxAge()485   public int getMaxAge() {
486     return maxAge_;
487   }
488 
489   private byte memoizedIsInitialized = -1;
490 
491   @java.lang.Override
isInitialized()492   public final boolean isInitialized() {
493     byte isInitialized = memoizedIsInitialized;
494     if (isInitialized == 1) return true;
495     if (isInitialized == 0) return false;
496 
497     memoizedIsInitialized = 1;
498     return true;
499   }
500 
501   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)502   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
503     for (int i = 0; i < allowHeaders_.size(); i++) {
504       com.google.protobuf.GeneratedMessageV3.writeString(output, 45179024, allowHeaders_.getRaw(i));
505     }
506     for (int i = 0; i < allowOrigins_.size(); i++) {
507       com.google.protobuf.GeneratedMessageV3.writeString(
508           output, 194914071, allowOrigins_.getRaw(i));
509     }
510     for (int i = 0; i < allowMethods_.size(); i++) {
511       com.google.protobuf.GeneratedMessageV3.writeString(
512           output, 205405372, allowMethods_.getRaw(i));
513     }
514     for (int i = 0; i < allowOriginRegexes_.size(); i++) {
515       com.google.protobuf.GeneratedMessageV3.writeString(
516           output, 215385810, allowOriginRegexes_.getRaw(i));
517     }
518     for (int i = 0; i < exposeHeaders_.size(); i++) {
519       com.google.protobuf.GeneratedMessageV3.writeString(
520           output, 247604747, exposeHeaders_.getRaw(i));
521     }
522     if (((bitField0_ & 0x00000002) != 0)) {
523       output.writeBool(270940796, disabled_);
524     }
525     if (((bitField0_ & 0x00000004) != 0)) {
526       output.writeInt32(307559332, maxAge_);
527     }
528     if (((bitField0_ & 0x00000001) != 0)) {
529       output.writeBool(481263366, allowCredentials_);
530     }
531     getUnknownFields().writeTo(output);
532   }
533 
534   @java.lang.Override
getSerializedSize()535   public int getSerializedSize() {
536     int size = memoizedSize;
537     if (size != -1) return size;
538 
539     size = 0;
540     {
541       int dataSize = 0;
542       for (int i = 0; i < allowHeaders_.size(); i++) {
543         dataSize += computeStringSizeNoTag(allowHeaders_.getRaw(i));
544       }
545       size += dataSize;
546       size += 5 * getAllowHeadersList().size();
547     }
548     {
549       int dataSize = 0;
550       for (int i = 0; i < allowOrigins_.size(); i++) {
551         dataSize += computeStringSizeNoTag(allowOrigins_.getRaw(i));
552       }
553       size += dataSize;
554       size += 5 * getAllowOriginsList().size();
555     }
556     {
557       int dataSize = 0;
558       for (int i = 0; i < allowMethods_.size(); i++) {
559         dataSize += computeStringSizeNoTag(allowMethods_.getRaw(i));
560       }
561       size += dataSize;
562       size += 5 * getAllowMethodsList().size();
563     }
564     {
565       int dataSize = 0;
566       for (int i = 0; i < allowOriginRegexes_.size(); i++) {
567         dataSize += computeStringSizeNoTag(allowOriginRegexes_.getRaw(i));
568       }
569       size += dataSize;
570       size += 5 * getAllowOriginRegexesList().size();
571     }
572     {
573       int dataSize = 0;
574       for (int i = 0; i < exposeHeaders_.size(); i++) {
575         dataSize += computeStringSizeNoTag(exposeHeaders_.getRaw(i));
576       }
577       size += dataSize;
578       size += 5 * getExposeHeadersList().size();
579     }
580     if (((bitField0_ & 0x00000002) != 0)) {
581       size += com.google.protobuf.CodedOutputStream.computeBoolSize(270940796, disabled_);
582     }
583     if (((bitField0_ & 0x00000004) != 0)) {
584       size += com.google.protobuf.CodedOutputStream.computeInt32Size(307559332, maxAge_);
585     }
586     if (((bitField0_ & 0x00000001) != 0)) {
587       size += com.google.protobuf.CodedOutputStream.computeBoolSize(481263366, allowCredentials_);
588     }
589     size += getUnknownFields().getSerializedSize();
590     memoizedSize = size;
591     return size;
592   }
593 
594   @java.lang.Override
equals(final java.lang.Object obj)595   public boolean equals(final java.lang.Object obj) {
596     if (obj == this) {
597       return true;
598     }
599     if (!(obj instanceof com.google.cloud.compute.v1.CorsPolicy)) {
600       return super.equals(obj);
601     }
602     com.google.cloud.compute.v1.CorsPolicy other = (com.google.cloud.compute.v1.CorsPolicy) obj;
603 
604     if (hasAllowCredentials() != other.hasAllowCredentials()) return false;
605     if (hasAllowCredentials()) {
606       if (getAllowCredentials() != other.getAllowCredentials()) return false;
607     }
608     if (!getAllowHeadersList().equals(other.getAllowHeadersList())) return false;
609     if (!getAllowMethodsList().equals(other.getAllowMethodsList())) return false;
610     if (!getAllowOriginRegexesList().equals(other.getAllowOriginRegexesList())) return false;
611     if (!getAllowOriginsList().equals(other.getAllowOriginsList())) return false;
612     if (hasDisabled() != other.hasDisabled()) return false;
613     if (hasDisabled()) {
614       if (getDisabled() != other.getDisabled()) return false;
615     }
616     if (!getExposeHeadersList().equals(other.getExposeHeadersList())) return false;
617     if (hasMaxAge() != other.hasMaxAge()) return false;
618     if (hasMaxAge()) {
619       if (getMaxAge() != other.getMaxAge()) return false;
620     }
621     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
622     return true;
623   }
624 
625   @java.lang.Override
hashCode()626   public int hashCode() {
627     if (memoizedHashCode != 0) {
628       return memoizedHashCode;
629     }
630     int hash = 41;
631     hash = (19 * hash) + getDescriptor().hashCode();
632     if (hasAllowCredentials()) {
633       hash = (37 * hash) + ALLOW_CREDENTIALS_FIELD_NUMBER;
634       hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowCredentials());
635     }
636     if (getAllowHeadersCount() > 0) {
637       hash = (37 * hash) + ALLOW_HEADERS_FIELD_NUMBER;
638       hash = (53 * hash) + getAllowHeadersList().hashCode();
639     }
640     if (getAllowMethodsCount() > 0) {
641       hash = (37 * hash) + ALLOW_METHODS_FIELD_NUMBER;
642       hash = (53 * hash) + getAllowMethodsList().hashCode();
643     }
644     if (getAllowOriginRegexesCount() > 0) {
645       hash = (37 * hash) + ALLOW_ORIGIN_REGEXES_FIELD_NUMBER;
646       hash = (53 * hash) + getAllowOriginRegexesList().hashCode();
647     }
648     if (getAllowOriginsCount() > 0) {
649       hash = (37 * hash) + ALLOW_ORIGINS_FIELD_NUMBER;
650       hash = (53 * hash) + getAllowOriginsList().hashCode();
651     }
652     if (hasDisabled()) {
653       hash = (37 * hash) + DISABLED_FIELD_NUMBER;
654       hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisabled());
655     }
656     if (getExposeHeadersCount() > 0) {
657       hash = (37 * hash) + EXPOSE_HEADERS_FIELD_NUMBER;
658       hash = (53 * hash) + getExposeHeadersList().hashCode();
659     }
660     if (hasMaxAge()) {
661       hash = (37 * hash) + MAX_AGE_FIELD_NUMBER;
662       hash = (53 * hash) + getMaxAge();
663     }
664     hash = (29 * hash) + getUnknownFields().hashCode();
665     memoizedHashCode = hash;
666     return hash;
667   }
668 
parseFrom(java.nio.ByteBuffer data)669   public static com.google.cloud.compute.v1.CorsPolicy parseFrom(java.nio.ByteBuffer data)
670       throws com.google.protobuf.InvalidProtocolBufferException {
671     return PARSER.parseFrom(data);
672   }
673 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)674   public static com.google.cloud.compute.v1.CorsPolicy parseFrom(
675       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
676       throws com.google.protobuf.InvalidProtocolBufferException {
677     return PARSER.parseFrom(data, extensionRegistry);
678   }
679 
parseFrom( com.google.protobuf.ByteString data)680   public static com.google.cloud.compute.v1.CorsPolicy parseFrom(
681       com.google.protobuf.ByteString data)
682       throws com.google.protobuf.InvalidProtocolBufferException {
683     return PARSER.parseFrom(data);
684   }
685 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)686   public static com.google.cloud.compute.v1.CorsPolicy parseFrom(
687       com.google.protobuf.ByteString data,
688       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
689       throws com.google.protobuf.InvalidProtocolBufferException {
690     return PARSER.parseFrom(data, extensionRegistry);
691   }
692 
parseFrom(byte[] data)693   public static com.google.cloud.compute.v1.CorsPolicy parseFrom(byte[] data)
694       throws com.google.protobuf.InvalidProtocolBufferException {
695     return PARSER.parseFrom(data);
696   }
697 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)698   public static com.google.cloud.compute.v1.CorsPolicy parseFrom(
699       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
700       throws com.google.protobuf.InvalidProtocolBufferException {
701     return PARSER.parseFrom(data, extensionRegistry);
702   }
703 
parseFrom(java.io.InputStream input)704   public static com.google.cloud.compute.v1.CorsPolicy parseFrom(java.io.InputStream input)
705       throws java.io.IOException {
706     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
707   }
708 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)709   public static com.google.cloud.compute.v1.CorsPolicy parseFrom(
710       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
711       throws java.io.IOException {
712     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
713         PARSER, input, extensionRegistry);
714   }
715 
parseDelimitedFrom(java.io.InputStream input)716   public static com.google.cloud.compute.v1.CorsPolicy parseDelimitedFrom(java.io.InputStream input)
717       throws java.io.IOException {
718     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
719   }
720 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)721   public static com.google.cloud.compute.v1.CorsPolicy parseDelimitedFrom(
722       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
723       throws java.io.IOException {
724     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
725         PARSER, input, extensionRegistry);
726   }
727 
parseFrom( com.google.protobuf.CodedInputStream input)728   public static com.google.cloud.compute.v1.CorsPolicy parseFrom(
729       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
730     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
731   }
732 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)733   public static com.google.cloud.compute.v1.CorsPolicy parseFrom(
734       com.google.protobuf.CodedInputStream input,
735       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
736       throws java.io.IOException {
737     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
738         PARSER, input, extensionRegistry);
739   }
740 
741   @java.lang.Override
newBuilderForType()742   public Builder newBuilderForType() {
743     return newBuilder();
744   }
745 
newBuilder()746   public static Builder newBuilder() {
747     return DEFAULT_INSTANCE.toBuilder();
748   }
749 
newBuilder(com.google.cloud.compute.v1.CorsPolicy prototype)750   public static Builder newBuilder(com.google.cloud.compute.v1.CorsPolicy prototype) {
751     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
752   }
753 
754   @java.lang.Override
toBuilder()755   public Builder toBuilder() {
756     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
757   }
758 
759   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)760   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
761     Builder builder = new Builder(parent);
762     return builder;
763   }
764   /**
765    *
766    *
767    * <pre>
768    * The specification for allowing client-side cross-origin requests. For more information about the W3C recommendation for cross-origin resource sharing (CORS), see Fetch API Living Standard.
769    * </pre>
770    *
771    * Protobuf type {@code google.cloud.compute.v1.CorsPolicy}
772    */
773   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
774       implements
775       // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.CorsPolicy)
776       com.google.cloud.compute.v1.CorsPolicyOrBuilder {
getDescriptor()777     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
778       return com.google.cloud.compute.v1.Compute
779           .internal_static_google_cloud_compute_v1_CorsPolicy_descriptor;
780     }
781 
782     @java.lang.Override
783     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()784         internalGetFieldAccessorTable() {
785       return com.google.cloud.compute.v1.Compute
786           .internal_static_google_cloud_compute_v1_CorsPolicy_fieldAccessorTable
787           .ensureFieldAccessorsInitialized(
788               com.google.cloud.compute.v1.CorsPolicy.class,
789               com.google.cloud.compute.v1.CorsPolicy.Builder.class);
790     }
791 
792     // Construct using com.google.cloud.compute.v1.CorsPolicy.newBuilder()
Builder()793     private Builder() {}
794 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)795     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
796       super(parent);
797     }
798 
799     @java.lang.Override
clear()800     public Builder clear() {
801       super.clear();
802       bitField0_ = 0;
803       allowCredentials_ = false;
804       allowHeaders_ = com.google.protobuf.LazyStringArrayList.EMPTY;
805       bitField0_ = (bitField0_ & ~0x00000002);
806       allowMethods_ = com.google.protobuf.LazyStringArrayList.EMPTY;
807       bitField0_ = (bitField0_ & ~0x00000004);
808       allowOriginRegexes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
809       bitField0_ = (bitField0_ & ~0x00000008);
810       allowOrigins_ = com.google.protobuf.LazyStringArrayList.EMPTY;
811       bitField0_ = (bitField0_ & ~0x00000010);
812       disabled_ = false;
813       exposeHeaders_ = com.google.protobuf.LazyStringArrayList.EMPTY;
814       bitField0_ = (bitField0_ & ~0x00000040);
815       maxAge_ = 0;
816       return this;
817     }
818 
819     @java.lang.Override
getDescriptorForType()820     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
821       return com.google.cloud.compute.v1.Compute
822           .internal_static_google_cloud_compute_v1_CorsPolicy_descriptor;
823     }
824 
825     @java.lang.Override
getDefaultInstanceForType()826     public com.google.cloud.compute.v1.CorsPolicy getDefaultInstanceForType() {
827       return com.google.cloud.compute.v1.CorsPolicy.getDefaultInstance();
828     }
829 
830     @java.lang.Override
build()831     public com.google.cloud.compute.v1.CorsPolicy build() {
832       com.google.cloud.compute.v1.CorsPolicy result = buildPartial();
833       if (!result.isInitialized()) {
834         throw newUninitializedMessageException(result);
835       }
836       return result;
837     }
838 
839     @java.lang.Override
buildPartial()840     public com.google.cloud.compute.v1.CorsPolicy buildPartial() {
841       com.google.cloud.compute.v1.CorsPolicy result =
842           new com.google.cloud.compute.v1.CorsPolicy(this);
843       buildPartialRepeatedFields(result);
844       if (bitField0_ != 0) {
845         buildPartial0(result);
846       }
847       onBuilt();
848       return result;
849     }
850 
buildPartialRepeatedFields(com.google.cloud.compute.v1.CorsPolicy result)851     private void buildPartialRepeatedFields(com.google.cloud.compute.v1.CorsPolicy result) {
852       if (((bitField0_ & 0x00000002) != 0)) {
853         allowHeaders_ = allowHeaders_.getUnmodifiableView();
854         bitField0_ = (bitField0_ & ~0x00000002);
855       }
856       result.allowHeaders_ = allowHeaders_;
857       if (((bitField0_ & 0x00000004) != 0)) {
858         allowMethods_ = allowMethods_.getUnmodifiableView();
859         bitField0_ = (bitField0_ & ~0x00000004);
860       }
861       result.allowMethods_ = allowMethods_;
862       if (((bitField0_ & 0x00000008) != 0)) {
863         allowOriginRegexes_ = allowOriginRegexes_.getUnmodifiableView();
864         bitField0_ = (bitField0_ & ~0x00000008);
865       }
866       result.allowOriginRegexes_ = allowOriginRegexes_;
867       if (((bitField0_ & 0x00000010) != 0)) {
868         allowOrigins_ = allowOrigins_.getUnmodifiableView();
869         bitField0_ = (bitField0_ & ~0x00000010);
870       }
871       result.allowOrigins_ = allowOrigins_;
872       if (((bitField0_ & 0x00000040) != 0)) {
873         exposeHeaders_ = exposeHeaders_.getUnmodifiableView();
874         bitField0_ = (bitField0_ & ~0x00000040);
875       }
876       result.exposeHeaders_ = exposeHeaders_;
877     }
878 
buildPartial0(com.google.cloud.compute.v1.CorsPolicy result)879     private void buildPartial0(com.google.cloud.compute.v1.CorsPolicy result) {
880       int from_bitField0_ = bitField0_;
881       int to_bitField0_ = 0;
882       if (((from_bitField0_ & 0x00000001) != 0)) {
883         result.allowCredentials_ = allowCredentials_;
884         to_bitField0_ |= 0x00000001;
885       }
886       if (((from_bitField0_ & 0x00000020) != 0)) {
887         result.disabled_ = disabled_;
888         to_bitField0_ |= 0x00000002;
889       }
890       if (((from_bitField0_ & 0x00000080) != 0)) {
891         result.maxAge_ = maxAge_;
892         to_bitField0_ |= 0x00000004;
893       }
894       result.bitField0_ |= to_bitField0_;
895     }
896 
897     @java.lang.Override
clone()898     public Builder clone() {
899       return super.clone();
900     }
901 
902     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)903     public Builder setField(
904         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
905       return super.setField(field, value);
906     }
907 
908     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)909     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
910       return super.clearField(field);
911     }
912 
913     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)914     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
915       return super.clearOneof(oneof);
916     }
917 
918     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)919     public Builder setRepeatedField(
920         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
921       return super.setRepeatedField(field, index, value);
922     }
923 
924     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)925     public Builder addRepeatedField(
926         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
927       return super.addRepeatedField(field, value);
928     }
929 
930     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)931     public Builder mergeFrom(com.google.protobuf.Message other) {
932       if (other instanceof com.google.cloud.compute.v1.CorsPolicy) {
933         return mergeFrom((com.google.cloud.compute.v1.CorsPolicy) other);
934       } else {
935         super.mergeFrom(other);
936         return this;
937       }
938     }
939 
mergeFrom(com.google.cloud.compute.v1.CorsPolicy other)940     public Builder mergeFrom(com.google.cloud.compute.v1.CorsPolicy other) {
941       if (other == com.google.cloud.compute.v1.CorsPolicy.getDefaultInstance()) return this;
942       if (other.hasAllowCredentials()) {
943         setAllowCredentials(other.getAllowCredentials());
944       }
945       if (!other.allowHeaders_.isEmpty()) {
946         if (allowHeaders_.isEmpty()) {
947           allowHeaders_ = other.allowHeaders_;
948           bitField0_ = (bitField0_ & ~0x00000002);
949         } else {
950           ensureAllowHeadersIsMutable();
951           allowHeaders_.addAll(other.allowHeaders_);
952         }
953         onChanged();
954       }
955       if (!other.allowMethods_.isEmpty()) {
956         if (allowMethods_.isEmpty()) {
957           allowMethods_ = other.allowMethods_;
958           bitField0_ = (bitField0_ & ~0x00000004);
959         } else {
960           ensureAllowMethodsIsMutable();
961           allowMethods_.addAll(other.allowMethods_);
962         }
963         onChanged();
964       }
965       if (!other.allowOriginRegexes_.isEmpty()) {
966         if (allowOriginRegexes_.isEmpty()) {
967           allowOriginRegexes_ = other.allowOriginRegexes_;
968           bitField0_ = (bitField0_ & ~0x00000008);
969         } else {
970           ensureAllowOriginRegexesIsMutable();
971           allowOriginRegexes_.addAll(other.allowOriginRegexes_);
972         }
973         onChanged();
974       }
975       if (!other.allowOrigins_.isEmpty()) {
976         if (allowOrigins_.isEmpty()) {
977           allowOrigins_ = other.allowOrigins_;
978           bitField0_ = (bitField0_ & ~0x00000010);
979         } else {
980           ensureAllowOriginsIsMutable();
981           allowOrigins_.addAll(other.allowOrigins_);
982         }
983         onChanged();
984       }
985       if (other.hasDisabled()) {
986         setDisabled(other.getDisabled());
987       }
988       if (!other.exposeHeaders_.isEmpty()) {
989         if (exposeHeaders_.isEmpty()) {
990           exposeHeaders_ = other.exposeHeaders_;
991           bitField0_ = (bitField0_ & ~0x00000040);
992         } else {
993           ensureExposeHeadersIsMutable();
994           exposeHeaders_.addAll(other.exposeHeaders_);
995         }
996         onChanged();
997       }
998       if (other.hasMaxAge()) {
999         setMaxAge(other.getMaxAge());
1000       }
1001       this.mergeUnknownFields(other.getUnknownFields());
1002       onChanged();
1003       return this;
1004     }
1005 
1006     @java.lang.Override
isInitialized()1007     public final boolean isInitialized() {
1008       return true;
1009     }
1010 
1011     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1012     public Builder mergeFrom(
1013         com.google.protobuf.CodedInputStream input,
1014         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1015         throws java.io.IOException {
1016       if (extensionRegistry == null) {
1017         throw new java.lang.NullPointerException();
1018       }
1019       try {
1020         boolean done = false;
1021         while (!done) {
1022           int tag = input.readTag();
1023           switch (tag) {
1024             case 0:
1025               done = true;
1026               break;
1027             case 361432194:
1028               {
1029                 java.lang.String s = input.readStringRequireUtf8();
1030                 ensureAllowHeadersIsMutable();
1031                 allowHeaders_.add(s);
1032                 break;
1033               } // case 361432194
1034             case 1559312570:
1035               {
1036                 java.lang.String s = input.readStringRequireUtf8();
1037                 ensureAllowOriginsIsMutable();
1038                 allowOrigins_.add(s);
1039                 break;
1040               } // case 1559312570
1041             case 1643242978:
1042               {
1043                 java.lang.String s = input.readStringRequireUtf8();
1044                 ensureAllowMethodsIsMutable();
1045                 allowMethods_.add(s);
1046                 break;
1047               } // case 1643242978
1048             case 1723086482:
1049               {
1050                 java.lang.String s = input.readStringRequireUtf8();
1051                 ensureAllowOriginRegexesIsMutable();
1052                 allowOriginRegexes_.add(s);
1053                 break;
1054               } // case 1723086482
1055             case 1980837978:
1056               {
1057                 java.lang.String s = input.readStringRequireUtf8();
1058                 ensureExposeHeadersIsMutable();
1059                 exposeHeaders_.add(s);
1060                 break;
1061               } // case 1980837978
1062             case -2127440928:
1063               {
1064                 disabled_ = input.readBool();
1065                 bitField0_ |= 0x00000020;
1066                 break;
1067               } // case -2127440928
1068             case -1834492640:
1069               {
1070                 maxAge_ = input.readInt32();
1071                 bitField0_ |= 0x00000080;
1072                 break;
1073               } // case -1834492640
1074             case -444860368:
1075               {
1076                 allowCredentials_ = input.readBool();
1077                 bitField0_ |= 0x00000001;
1078                 break;
1079               } // case -444860368
1080             default:
1081               {
1082                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1083                   done = true; // was an endgroup tag
1084                 }
1085                 break;
1086               } // default:
1087           } // switch (tag)
1088         } // while (!done)
1089       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1090         throw e.unwrapIOException();
1091       } finally {
1092         onChanged();
1093       } // finally
1094       return this;
1095     }
1096 
1097     private int bitField0_;
1098 
1099     private boolean allowCredentials_;
1100     /**
1101      *
1102      *
1103      * <pre>
1104      * In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This field translates to the Access-Control-Allow-Credentials header. Default is false.
1105      * </pre>
1106      *
1107      * <code>optional bool allow_credentials = 481263366;</code>
1108      *
1109      * @return Whether the allowCredentials field is set.
1110      */
1111     @java.lang.Override
hasAllowCredentials()1112     public boolean hasAllowCredentials() {
1113       return ((bitField0_ & 0x00000001) != 0);
1114     }
1115     /**
1116      *
1117      *
1118      * <pre>
1119      * In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This field translates to the Access-Control-Allow-Credentials header. Default is false.
1120      * </pre>
1121      *
1122      * <code>optional bool allow_credentials = 481263366;</code>
1123      *
1124      * @return The allowCredentials.
1125      */
1126     @java.lang.Override
getAllowCredentials()1127     public boolean getAllowCredentials() {
1128       return allowCredentials_;
1129     }
1130     /**
1131      *
1132      *
1133      * <pre>
1134      * In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This field translates to the Access-Control-Allow-Credentials header. Default is false.
1135      * </pre>
1136      *
1137      * <code>optional bool allow_credentials = 481263366;</code>
1138      *
1139      * @param value The allowCredentials to set.
1140      * @return This builder for chaining.
1141      */
setAllowCredentials(boolean value)1142     public Builder setAllowCredentials(boolean value) {
1143 
1144       allowCredentials_ = value;
1145       bitField0_ |= 0x00000001;
1146       onChanged();
1147       return this;
1148     }
1149     /**
1150      *
1151      *
1152      * <pre>
1153      * In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This field translates to the Access-Control-Allow-Credentials header. Default is false.
1154      * </pre>
1155      *
1156      * <code>optional bool allow_credentials = 481263366;</code>
1157      *
1158      * @return This builder for chaining.
1159      */
clearAllowCredentials()1160     public Builder clearAllowCredentials() {
1161       bitField0_ = (bitField0_ & ~0x00000001);
1162       allowCredentials_ = false;
1163       onChanged();
1164       return this;
1165     }
1166 
1167     private com.google.protobuf.LazyStringList allowHeaders_ =
1168         com.google.protobuf.LazyStringArrayList.EMPTY;
1169 
ensureAllowHeadersIsMutable()1170     private void ensureAllowHeadersIsMutable() {
1171       if (!((bitField0_ & 0x00000002) != 0)) {
1172         allowHeaders_ = new com.google.protobuf.LazyStringArrayList(allowHeaders_);
1173         bitField0_ |= 0x00000002;
1174       }
1175     }
1176     /**
1177      *
1178      *
1179      * <pre>
1180      * Specifies the content for the Access-Control-Allow-Headers header.
1181      * </pre>
1182      *
1183      * <code>repeated string allow_headers = 45179024;</code>
1184      *
1185      * @return A list containing the allowHeaders.
1186      */
getAllowHeadersList()1187     public com.google.protobuf.ProtocolStringList getAllowHeadersList() {
1188       return allowHeaders_.getUnmodifiableView();
1189     }
1190     /**
1191      *
1192      *
1193      * <pre>
1194      * Specifies the content for the Access-Control-Allow-Headers header.
1195      * </pre>
1196      *
1197      * <code>repeated string allow_headers = 45179024;</code>
1198      *
1199      * @return The count of allowHeaders.
1200      */
getAllowHeadersCount()1201     public int getAllowHeadersCount() {
1202       return allowHeaders_.size();
1203     }
1204     /**
1205      *
1206      *
1207      * <pre>
1208      * Specifies the content for the Access-Control-Allow-Headers header.
1209      * </pre>
1210      *
1211      * <code>repeated string allow_headers = 45179024;</code>
1212      *
1213      * @param index The index of the element to return.
1214      * @return The allowHeaders at the given index.
1215      */
getAllowHeaders(int index)1216     public java.lang.String getAllowHeaders(int index) {
1217       return allowHeaders_.get(index);
1218     }
1219     /**
1220      *
1221      *
1222      * <pre>
1223      * Specifies the content for the Access-Control-Allow-Headers header.
1224      * </pre>
1225      *
1226      * <code>repeated string allow_headers = 45179024;</code>
1227      *
1228      * @param index The index of the value to return.
1229      * @return The bytes of the allowHeaders at the given index.
1230      */
getAllowHeadersBytes(int index)1231     public com.google.protobuf.ByteString getAllowHeadersBytes(int index) {
1232       return allowHeaders_.getByteString(index);
1233     }
1234     /**
1235      *
1236      *
1237      * <pre>
1238      * Specifies the content for the Access-Control-Allow-Headers header.
1239      * </pre>
1240      *
1241      * <code>repeated string allow_headers = 45179024;</code>
1242      *
1243      * @param index The index to set the value at.
1244      * @param value The allowHeaders to set.
1245      * @return This builder for chaining.
1246      */
setAllowHeaders(int index, java.lang.String value)1247     public Builder setAllowHeaders(int index, java.lang.String value) {
1248       if (value == null) {
1249         throw new NullPointerException();
1250       }
1251       ensureAllowHeadersIsMutable();
1252       allowHeaders_.set(index, value);
1253       onChanged();
1254       return this;
1255     }
1256     /**
1257      *
1258      *
1259      * <pre>
1260      * Specifies the content for the Access-Control-Allow-Headers header.
1261      * </pre>
1262      *
1263      * <code>repeated string allow_headers = 45179024;</code>
1264      *
1265      * @param value The allowHeaders to add.
1266      * @return This builder for chaining.
1267      */
addAllowHeaders(java.lang.String value)1268     public Builder addAllowHeaders(java.lang.String value) {
1269       if (value == null) {
1270         throw new NullPointerException();
1271       }
1272       ensureAllowHeadersIsMutable();
1273       allowHeaders_.add(value);
1274       onChanged();
1275       return this;
1276     }
1277     /**
1278      *
1279      *
1280      * <pre>
1281      * Specifies the content for the Access-Control-Allow-Headers header.
1282      * </pre>
1283      *
1284      * <code>repeated string allow_headers = 45179024;</code>
1285      *
1286      * @param values The allowHeaders to add.
1287      * @return This builder for chaining.
1288      */
addAllAllowHeaders(java.lang.Iterable<java.lang.String> values)1289     public Builder addAllAllowHeaders(java.lang.Iterable<java.lang.String> values) {
1290       ensureAllowHeadersIsMutable();
1291       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowHeaders_);
1292       onChanged();
1293       return this;
1294     }
1295     /**
1296      *
1297      *
1298      * <pre>
1299      * Specifies the content for the Access-Control-Allow-Headers header.
1300      * </pre>
1301      *
1302      * <code>repeated string allow_headers = 45179024;</code>
1303      *
1304      * @return This builder for chaining.
1305      */
clearAllowHeaders()1306     public Builder clearAllowHeaders() {
1307       allowHeaders_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1308       bitField0_ = (bitField0_ & ~0x00000002);
1309       onChanged();
1310       return this;
1311     }
1312     /**
1313      *
1314      *
1315      * <pre>
1316      * Specifies the content for the Access-Control-Allow-Headers header.
1317      * </pre>
1318      *
1319      * <code>repeated string allow_headers = 45179024;</code>
1320      *
1321      * @param value The bytes of the allowHeaders to add.
1322      * @return This builder for chaining.
1323      */
addAllowHeadersBytes(com.google.protobuf.ByteString value)1324     public Builder addAllowHeadersBytes(com.google.protobuf.ByteString value) {
1325       if (value == null) {
1326         throw new NullPointerException();
1327       }
1328       checkByteStringIsUtf8(value);
1329       ensureAllowHeadersIsMutable();
1330       allowHeaders_.add(value);
1331       onChanged();
1332       return this;
1333     }
1334 
1335     private com.google.protobuf.LazyStringList allowMethods_ =
1336         com.google.protobuf.LazyStringArrayList.EMPTY;
1337 
ensureAllowMethodsIsMutable()1338     private void ensureAllowMethodsIsMutable() {
1339       if (!((bitField0_ & 0x00000004) != 0)) {
1340         allowMethods_ = new com.google.protobuf.LazyStringArrayList(allowMethods_);
1341         bitField0_ |= 0x00000004;
1342       }
1343     }
1344     /**
1345      *
1346      *
1347      * <pre>
1348      * Specifies the content for the Access-Control-Allow-Methods header.
1349      * </pre>
1350      *
1351      * <code>repeated string allow_methods = 205405372;</code>
1352      *
1353      * @return A list containing the allowMethods.
1354      */
getAllowMethodsList()1355     public com.google.protobuf.ProtocolStringList getAllowMethodsList() {
1356       return allowMethods_.getUnmodifiableView();
1357     }
1358     /**
1359      *
1360      *
1361      * <pre>
1362      * Specifies the content for the Access-Control-Allow-Methods header.
1363      * </pre>
1364      *
1365      * <code>repeated string allow_methods = 205405372;</code>
1366      *
1367      * @return The count of allowMethods.
1368      */
getAllowMethodsCount()1369     public int getAllowMethodsCount() {
1370       return allowMethods_.size();
1371     }
1372     /**
1373      *
1374      *
1375      * <pre>
1376      * Specifies the content for the Access-Control-Allow-Methods header.
1377      * </pre>
1378      *
1379      * <code>repeated string allow_methods = 205405372;</code>
1380      *
1381      * @param index The index of the element to return.
1382      * @return The allowMethods at the given index.
1383      */
getAllowMethods(int index)1384     public java.lang.String getAllowMethods(int index) {
1385       return allowMethods_.get(index);
1386     }
1387     /**
1388      *
1389      *
1390      * <pre>
1391      * Specifies the content for the Access-Control-Allow-Methods header.
1392      * </pre>
1393      *
1394      * <code>repeated string allow_methods = 205405372;</code>
1395      *
1396      * @param index The index of the value to return.
1397      * @return The bytes of the allowMethods at the given index.
1398      */
getAllowMethodsBytes(int index)1399     public com.google.protobuf.ByteString getAllowMethodsBytes(int index) {
1400       return allowMethods_.getByteString(index);
1401     }
1402     /**
1403      *
1404      *
1405      * <pre>
1406      * Specifies the content for the Access-Control-Allow-Methods header.
1407      * </pre>
1408      *
1409      * <code>repeated string allow_methods = 205405372;</code>
1410      *
1411      * @param index The index to set the value at.
1412      * @param value The allowMethods to set.
1413      * @return This builder for chaining.
1414      */
setAllowMethods(int index, java.lang.String value)1415     public Builder setAllowMethods(int index, java.lang.String value) {
1416       if (value == null) {
1417         throw new NullPointerException();
1418       }
1419       ensureAllowMethodsIsMutable();
1420       allowMethods_.set(index, value);
1421       onChanged();
1422       return this;
1423     }
1424     /**
1425      *
1426      *
1427      * <pre>
1428      * Specifies the content for the Access-Control-Allow-Methods header.
1429      * </pre>
1430      *
1431      * <code>repeated string allow_methods = 205405372;</code>
1432      *
1433      * @param value The allowMethods to add.
1434      * @return This builder for chaining.
1435      */
addAllowMethods(java.lang.String value)1436     public Builder addAllowMethods(java.lang.String value) {
1437       if (value == null) {
1438         throw new NullPointerException();
1439       }
1440       ensureAllowMethodsIsMutable();
1441       allowMethods_.add(value);
1442       onChanged();
1443       return this;
1444     }
1445     /**
1446      *
1447      *
1448      * <pre>
1449      * Specifies the content for the Access-Control-Allow-Methods header.
1450      * </pre>
1451      *
1452      * <code>repeated string allow_methods = 205405372;</code>
1453      *
1454      * @param values The allowMethods to add.
1455      * @return This builder for chaining.
1456      */
addAllAllowMethods(java.lang.Iterable<java.lang.String> values)1457     public Builder addAllAllowMethods(java.lang.Iterable<java.lang.String> values) {
1458       ensureAllowMethodsIsMutable();
1459       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowMethods_);
1460       onChanged();
1461       return this;
1462     }
1463     /**
1464      *
1465      *
1466      * <pre>
1467      * Specifies the content for the Access-Control-Allow-Methods header.
1468      * </pre>
1469      *
1470      * <code>repeated string allow_methods = 205405372;</code>
1471      *
1472      * @return This builder for chaining.
1473      */
clearAllowMethods()1474     public Builder clearAllowMethods() {
1475       allowMethods_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1476       bitField0_ = (bitField0_ & ~0x00000004);
1477       onChanged();
1478       return this;
1479     }
1480     /**
1481      *
1482      *
1483      * <pre>
1484      * Specifies the content for the Access-Control-Allow-Methods header.
1485      * </pre>
1486      *
1487      * <code>repeated string allow_methods = 205405372;</code>
1488      *
1489      * @param value The bytes of the allowMethods to add.
1490      * @return This builder for chaining.
1491      */
addAllowMethodsBytes(com.google.protobuf.ByteString value)1492     public Builder addAllowMethodsBytes(com.google.protobuf.ByteString value) {
1493       if (value == null) {
1494         throw new NullPointerException();
1495       }
1496       checkByteStringIsUtf8(value);
1497       ensureAllowMethodsIsMutable();
1498       allowMethods_.add(value);
1499       onChanged();
1500       return this;
1501     }
1502 
1503     private com.google.protobuf.LazyStringList allowOriginRegexes_ =
1504         com.google.protobuf.LazyStringArrayList.EMPTY;
1505 
ensureAllowOriginRegexesIsMutable()1506     private void ensureAllowOriginRegexesIsMutable() {
1507       if (!((bitField0_ & 0x00000008) != 0)) {
1508         allowOriginRegexes_ = new com.google.protobuf.LazyStringArrayList(allowOriginRegexes_);
1509         bitField0_ |= 0x00000008;
1510       }
1511     }
1512     /**
1513      *
1514      *
1515      * <pre>
1516      * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
1517      * </pre>
1518      *
1519      * <code>repeated string allow_origin_regexes = 215385810;</code>
1520      *
1521      * @return A list containing the allowOriginRegexes.
1522      */
getAllowOriginRegexesList()1523     public com.google.protobuf.ProtocolStringList getAllowOriginRegexesList() {
1524       return allowOriginRegexes_.getUnmodifiableView();
1525     }
1526     /**
1527      *
1528      *
1529      * <pre>
1530      * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
1531      * </pre>
1532      *
1533      * <code>repeated string allow_origin_regexes = 215385810;</code>
1534      *
1535      * @return The count of allowOriginRegexes.
1536      */
getAllowOriginRegexesCount()1537     public int getAllowOriginRegexesCount() {
1538       return allowOriginRegexes_.size();
1539     }
1540     /**
1541      *
1542      *
1543      * <pre>
1544      * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
1545      * </pre>
1546      *
1547      * <code>repeated string allow_origin_regexes = 215385810;</code>
1548      *
1549      * @param index The index of the element to return.
1550      * @return The allowOriginRegexes at the given index.
1551      */
getAllowOriginRegexes(int index)1552     public java.lang.String getAllowOriginRegexes(int index) {
1553       return allowOriginRegexes_.get(index);
1554     }
1555     /**
1556      *
1557      *
1558      * <pre>
1559      * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
1560      * </pre>
1561      *
1562      * <code>repeated string allow_origin_regexes = 215385810;</code>
1563      *
1564      * @param index The index of the value to return.
1565      * @return The bytes of the allowOriginRegexes at the given index.
1566      */
getAllowOriginRegexesBytes(int index)1567     public com.google.protobuf.ByteString getAllowOriginRegexesBytes(int index) {
1568       return allowOriginRegexes_.getByteString(index);
1569     }
1570     /**
1571      *
1572      *
1573      * <pre>
1574      * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
1575      * </pre>
1576      *
1577      * <code>repeated string allow_origin_regexes = 215385810;</code>
1578      *
1579      * @param index The index to set the value at.
1580      * @param value The allowOriginRegexes to set.
1581      * @return This builder for chaining.
1582      */
setAllowOriginRegexes(int index, java.lang.String value)1583     public Builder setAllowOriginRegexes(int index, java.lang.String value) {
1584       if (value == null) {
1585         throw new NullPointerException();
1586       }
1587       ensureAllowOriginRegexesIsMutable();
1588       allowOriginRegexes_.set(index, value);
1589       onChanged();
1590       return this;
1591     }
1592     /**
1593      *
1594      *
1595      * <pre>
1596      * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
1597      * </pre>
1598      *
1599      * <code>repeated string allow_origin_regexes = 215385810;</code>
1600      *
1601      * @param value The allowOriginRegexes to add.
1602      * @return This builder for chaining.
1603      */
addAllowOriginRegexes(java.lang.String value)1604     public Builder addAllowOriginRegexes(java.lang.String value) {
1605       if (value == null) {
1606         throw new NullPointerException();
1607       }
1608       ensureAllowOriginRegexesIsMutable();
1609       allowOriginRegexes_.add(value);
1610       onChanged();
1611       return this;
1612     }
1613     /**
1614      *
1615      *
1616      * <pre>
1617      * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
1618      * </pre>
1619      *
1620      * <code>repeated string allow_origin_regexes = 215385810;</code>
1621      *
1622      * @param values The allowOriginRegexes to add.
1623      * @return This builder for chaining.
1624      */
addAllAllowOriginRegexes(java.lang.Iterable<java.lang.String> values)1625     public Builder addAllAllowOriginRegexes(java.lang.Iterable<java.lang.String> values) {
1626       ensureAllowOriginRegexesIsMutable();
1627       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowOriginRegexes_);
1628       onChanged();
1629       return this;
1630     }
1631     /**
1632      *
1633      *
1634      * <pre>
1635      * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
1636      * </pre>
1637      *
1638      * <code>repeated string allow_origin_regexes = 215385810;</code>
1639      *
1640      * @return This builder for chaining.
1641      */
clearAllowOriginRegexes()1642     public Builder clearAllowOriginRegexes() {
1643       allowOriginRegexes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1644       bitField0_ = (bitField0_ & ~0x00000008);
1645       onChanged();
1646       return this;
1647     }
1648     /**
1649      *
1650      *
1651      * <pre>
1652      * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
1653      * </pre>
1654      *
1655      * <code>repeated string allow_origin_regexes = 215385810;</code>
1656      *
1657      * @param value The bytes of the allowOriginRegexes to add.
1658      * @return This builder for chaining.
1659      */
addAllowOriginRegexesBytes(com.google.protobuf.ByteString value)1660     public Builder addAllowOriginRegexesBytes(com.google.protobuf.ByteString value) {
1661       if (value == null) {
1662         throw new NullPointerException();
1663       }
1664       checkByteStringIsUtf8(value);
1665       ensureAllowOriginRegexesIsMutable();
1666       allowOriginRegexes_.add(value);
1667       onChanged();
1668       return this;
1669     }
1670 
1671     private com.google.protobuf.LazyStringList allowOrigins_ =
1672         com.google.protobuf.LazyStringArrayList.EMPTY;
1673 
ensureAllowOriginsIsMutable()1674     private void ensureAllowOriginsIsMutable() {
1675       if (!((bitField0_ & 0x00000010) != 0)) {
1676         allowOrigins_ = new com.google.protobuf.LazyStringArrayList(allowOrigins_);
1677         bitField0_ |= 0x00000010;
1678       }
1679     }
1680     /**
1681      *
1682      *
1683      * <pre>
1684      * Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1685      * </pre>
1686      *
1687      * <code>repeated string allow_origins = 194914071;</code>
1688      *
1689      * @return A list containing the allowOrigins.
1690      */
getAllowOriginsList()1691     public com.google.protobuf.ProtocolStringList getAllowOriginsList() {
1692       return allowOrigins_.getUnmodifiableView();
1693     }
1694     /**
1695      *
1696      *
1697      * <pre>
1698      * Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1699      * </pre>
1700      *
1701      * <code>repeated string allow_origins = 194914071;</code>
1702      *
1703      * @return The count of allowOrigins.
1704      */
getAllowOriginsCount()1705     public int getAllowOriginsCount() {
1706       return allowOrigins_.size();
1707     }
1708     /**
1709      *
1710      *
1711      * <pre>
1712      * Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1713      * </pre>
1714      *
1715      * <code>repeated string allow_origins = 194914071;</code>
1716      *
1717      * @param index The index of the element to return.
1718      * @return The allowOrigins at the given index.
1719      */
getAllowOrigins(int index)1720     public java.lang.String getAllowOrigins(int index) {
1721       return allowOrigins_.get(index);
1722     }
1723     /**
1724      *
1725      *
1726      * <pre>
1727      * Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1728      * </pre>
1729      *
1730      * <code>repeated string allow_origins = 194914071;</code>
1731      *
1732      * @param index The index of the value to return.
1733      * @return The bytes of the allowOrigins at the given index.
1734      */
getAllowOriginsBytes(int index)1735     public com.google.protobuf.ByteString getAllowOriginsBytes(int index) {
1736       return allowOrigins_.getByteString(index);
1737     }
1738     /**
1739      *
1740      *
1741      * <pre>
1742      * Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1743      * </pre>
1744      *
1745      * <code>repeated string allow_origins = 194914071;</code>
1746      *
1747      * @param index The index to set the value at.
1748      * @param value The allowOrigins to set.
1749      * @return This builder for chaining.
1750      */
setAllowOrigins(int index, java.lang.String value)1751     public Builder setAllowOrigins(int index, java.lang.String value) {
1752       if (value == null) {
1753         throw new NullPointerException();
1754       }
1755       ensureAllowOriginsIsMutable();
1756       allowOrigins_.set(index, value);
1757       onChanged();
1758       return this;
1759     }
1760     /**
1761      *
1762      *
1763      * <pre>
1764      * Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1765      * </pre>
1766      *
1767      * <code>repeated string allow_origins = 194914071;</code>
1768      *
1769      * @param value The allowOrigins to add.
1770      * @return This builder for chaining.
1771      */
addAllowOrigins(java.lang.String value)1772     public Builder addAllowOrigins(java.lang.String value) {
1773       if (value == null) {
1774         throw new NullPointerException();
1775       }
1776       ensureAllowOriginsIsMutable();
1777       allowOrigins_.add(value);
1778       onChanged();
1779       return this;
1780     }
1781     /**
1782      *
1783      *
1784      * <pre>
1785      * Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1786      * </pre>
1787      *
1788      * <code>repeated string allow_origins = 194914071;</code>
1789      *
1790      * @param values The allowOrigins to add.
1791      * @return This builder for chaining.
1792      */
addAllAllowOrigins(java.lang.Iterable<java.lang.String> values)1793     public Builder addAllAllowOrigins(java.lang.Iterable<java.lang.String> values) {
1794       ensureAllowOriginsIsMutable();
1795       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowOrigins_);
1796       onChanged();
1797       return this;
1798     }
1799     /**
1800      *
1801      *
1802      * <pre>
1803      * Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1804      * </pre>
1805      *
1806      * <code>repeated string allow_origins = 194914071;</code>
1807      *
1808      * @return This builder for chaining.
1809      */
clearAllowOrigins()1810     public Builder clearAllowOrigins() {
1811       allowOrigins_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1812       bitField0_ = (bitField0_ & ~0x00000010);
1813       onChanged();
1814       return this;
1815     }
1816     /**
1817      *
1818      *
1819      * <pre>
1820      * Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes.
1821      * </pre>
1822      *
1823      * <code>repeated string allow_origins = 194914071;</code>
1824      *
1825      * @param value The bytes of the allowOrigins to add.
1826      * @return This builder for chaining.
1827      */
addAllowOriginsBytes(com.google.protobuf.ByteString value)1828     public Builder addAllowOriginsBytes(com.google.protobuf.ByteString value) {
1829       if (value == null) {
1830         throw new NullPointerException();
1831       }
1832       checkByteStringIsUtf8(value);
1833       ensureAllowOriginsIsMutable();
1834       allowOrigins_.add(value);
1835       onChanged();
1836       return this;
1837     }
1838 
1839     private boolean disabled_;
1840     /**
1841      *
1842      *
1843      * <pre>
1844      * If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
1845      * </pre>
1846      *
1847      * <code>optional bool disabled = 270940796;</code>
1848      *
1849      * @return Whether the disabled field is set.
1850      */
1851     @java.lang.Override
hasDisabled()1852     public boolean hasDisabled() {
1853       return ((bitField0_ & 0x00000020) != 0);
1854     }
1855     /**
1856      *
1857      *
1858      * <pre>
1859      * If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
1860      * </pre>
1861      *
1862      * <code>optional bool disabled = 270940796;</code>
1863      *
1864      * @return The disabled.
1865      */
1866     @java.lang.Override
getDisabled()1867     public boolean getDisabled() {
1868       return disabled_;
1869     }
1870     /**
1871      *
1872      *
1873      * <pre>
1874      * If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
1875      * </pre>
1876      *
1877      * <code>optional bool disabled = 270940796;</code>
1878      *
1879      * @param value The disabled to set.
1880      * @return This builder for chaining.
1881      */
setDisabled(boolean value)1882     public Builder setDisabled(boolean value) {
1883 
1884       disabled_ = value;
1885       bitField0_ |= 0x00000020;
1886       onChanged();
1887       return this;
1888     }
1889     /**
1890      *
1891      *
1892      * <pre>
1893      * If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.
1894      * </pre>
1895      *
1896      * <code>optional bool disabled = 270940796;</code>
1897      *
1898      * @return This builder for chaining.
1899      */
clearDisabled()1900     public Builder clearDisabled() {
1901       bitField0_ = (bitField0_ & ~0x00000020);
1902       disabled_ = false;
1903       onChanged();
1904       return this;
1905     }
1906 
1907     private com.google.protobuf.LazyStringList exposeHeaders_ =
1908         com.google.protobuf.LazyStringArrayList.EMPTY;
1909 
ensureExposeHeadersIsMutable()1910     private void ensureExposeHeadersIsMutable() {
1911       if (!((bitField0_ & 0x00000040) != 0)) {
1912         exposeHeaders_ = new com.google.protobuf.LazyStringArrayList(exposeHeaders_);
1913         bitField0_ |= 0x00000040;
1914       }
1915     }
1916     /**
1917      *
1918      *
1919      * <pre>
1920      * Specifies the content for the Access-Control-Expose-Headers header.
1921      * </pre>
1922      *
1923      * <code>repeated string expose_headers = 247604747;</code>
1924      *
1925      * @return A list containing the exposeHeaders.
1926      */
getExposeHeadersList()1927     public com.google.protobuf.ProtocolStringList getExposeHeadersList() {
1928       return exposeHeaders_.getUnmodifiableView();
1929     }
1930     /**
1931      *
1932      *
1933      * <pre>
1934      * Specifies the content for the Access-Control-Expose-Headers header.
1935      * </pre>
1936      *
1937      * <code>repeated string expose_headers = 247604747;</code>
1938      *
1939      * @return The count of exposeHeaders.
1940      */
getExposeHeadersCount()1941     public int getExposeHeadersCount() {
1942       return exposeHeaders_.size();
1943     }
1944     /**
1945      *
1946      *
1947      * <pre>
1948      * Specifies the content for the Access-Control-Expose-Headers header.
1949      * </pre>
1950      *
1951      * <code>repeated string expose_headers = 247604747;</code>
1952      *
1953      * @param index The index of the element to return.
1954      * @return The exposeHeaders at the given index.
1955      */
getExposeHeaders(int index)1956     public java.lang.String getExposeHeaders(int index) {
1957       return exposeHeaders_.get(index);
1958     }
1959     /**
1960      *
1961      *
1962      * <pre>
1963      * Specifies the content for the Access-Control-Expose-Headers header.
1964      * </pre>
1965      *
1966      * <code>repeated string expose_headers = 247604747;</code>
1967      *
1968      * @param index The index of the value to return.
1969      * @return The bytes of the exposeHeaders at the given index.
1970      */
getExposeHeadersBytes(int index)1971     public com.google.protobuf.ByteString getExposeHeadersBytes(int index) {
1972       return exposeHeaders_.getByteString(index);
1973     }
1974     /**
1975      *
1976      *
1977      * <pre>
1978      * Specifies the content for the Access-Control-Expose-Headers header.
1979      * </pre>
1980      *
1981      * <code>repeated string expose_headers = 247604747;</code>
1982      *
1983      * @param index The index to set the value at.
1984      * @param value The exposeHeaders to set.
1985      * @return This builder for chaining.
1986      */
setExposeHeaders(int index, java.lang.String value)1987     public Builder setExposeHeaders(int index, java.lang.String value) {
1988       if (value == null) {
1989         throw new NullPointerException();
1990       }
1991       ensureExposeHeadersIsMutable();
1992       exposeHeaders_.set(index, value);
1993       onChanged();
1994       return this;
1995     }
1996     /**
1997      *
1998      *
1999      * <pre>
2000      * Specifies the content for the Access-Control-Expose-Headers header.
2001      * </pre>
2002      *
2003      * <code>repeated string expose_headers = 247604747;</code>
2004      *
2005      * @param value The exposeHeaders to add.
2006      * @return This builder for chaining.
2007      */
addExposeHeaders(java.lang.String value)2008     public Builder addExposeHeaders(java.lang.String value) {
2009       if (value == null) {
2010         throw new NullPointerException();
2011       }
2012       ensureExposeHeadersIsMutable();
2013       exposeHeaders_.add(value);
2014       onChanged();
2015       return this;
2016     }
2017     /**
2018      *
2019      *
2020      * <pre>
2021      * Specifies the content for the Access-Control-Expose-Headers header.
2022      * </pre>
2023      *
2024      * <code>repeated string expose_headers = 247604747;</code>
2025      *
2026      * @param values The exposeHeaders to add.
2027      * @return This builder for chaining.
2028      */
addAllExposeHeaders(java.lang.Iterable<java.lang.String> values)2029     public Builder addAllExposeHeaders(java.lang.Iterable<java.lang.String> values) {
2030       ensureExposeHeadersIsMutable();
2031       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exposeHeaders_);
2032       onChanged();
2033       return this;
2034     }
2035     /**
2036      *
2037      *
2038      * <pre>
2039      * Specifies the content for the Access-Control-Expose-Headers header.
2040      * </pre>
2041      *
2042      * <code>repeated string expose_headers = 247604747;</code>
2043      *
2044      * @return This builder for chaining.
2045      */
clearExposeHeaders()2046     public Builder clearExposeHeaders() {
2047       exposeHeaders_ = com.google.protobuf.LazyStringArrayList.EMPTY;
2048       bitField0_ = (bitField0_ & ~0x00000040);
2049       onChanged();
2050       return this;
2051     }
2052     /**
2053      *
2054      *
2055      * <pre>
2056      * Specifies the content for the Access-Control-Expose-Headers header.
2057      * </pre>
2058      *
2059      * <code>repeated string expose_headers = 247604747;</code>
2060      *
2061      * @param value The bytes of the exposeHeaders to add.
2062      * @return This builder for chaining.
2063      */
addExposeHeadersBytes(com.google.protobuf.ByteString value)2064     public Builder addExposeHeadersBytes(com.google.protobuf.ByteString value) {
2065       if (value == null) {
2066         throw new NullPointerException();
2067       }
2068       checkByteStringIsUtf8(value);
2069       ensureExposeHeadersIsMutable();
2070       exposeHeaders_.add(value);
2071       onChanged();
2072       return this;
2073     }
2074 
2075     private int maxAge_;
2076     /**
2077      *
2078      *
2079      * <pre>
2080      * Specifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header.
2081      * </pre>
2082      *
2083      * <code>optional int32 max_age = 307559332;</code>
2084      *
2085      * @return Whether the maxAge field is set.
2086      */
2087     @java.lang.Override
hasMaxAge()2088     public boolean hasMaxAge() {
2089       return ((bitField0_ & 0x00000080) != 0);
2090     }
2091     /**
2092      *
2093      *
2094      * <pre>
2095      * Specifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header.
2096      * </pre>
2097      *
2098      * <code>optional int32 max_age = 307559332;</code>
2099      *
2100      * @return The maxAge.
2101      */
2102     @java.lang.Override
getMaxAge()2103     public int getMaxAge() {
2104       return maxAge_;
2105     }
2106     /**
2107      *
2108      *
2109      * <pre>
2110      * Specifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header.
2111      * </pre>
2112      *
2113      * <code>optional int32 max_age = 307559332;</code>
2114      *
2115      * @param value The maxAge to set.
2116      * @return This builder for chaining.
2117      */
setMaxAge(int value)2118     public Builder setMaxAge(int value) {
2119 
2120       maxAge_ = value;
2121       bitField0_ |= 0x00000080;
2122       onChanged();
2123       return this;
2124     }
2125     /**
2126      *
2127      *
2128      * <pre>
2129      * Specifies how long results of a preflight request can be cached in seconds. This field translates to the Access-Control-Max-Age header.
2130      * </pre>
2131      *
2132      * <code>optional int32 max_age = 307559332;</code>
2133      *
2134      * @return This builder for chaining.
2135      */
clearMaxAge()2136     public Builder clearMaxAge() {
2137       bitField0_ = (bitField0_ & ~0x00000080);
2138       maxAge_ = 0;
2139       onChanged();
2140       return this;
2141     }
2142 
2143     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2144     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
2145       return super.setUnknownFields(unknownFields);
2146     }
2147 
2148     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2149     public final Builder mergeUnknownFields(
2150         final com.google.protobuf.UnknownFieldSet unknownFields) {
2151       return super.mergeUnknownFields(unknownFields);
2152     }
2153 
2154     // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.CorsPolicy)
2155   }
2156 
2157   // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.CorsPolicy)
2158   private static final com.google.cloud.compute.v1.CorsPolicy DEFAULT_INSTANCE;
2159 
2160   static {
2161     DEFAULT_INSTANCE = new com.google.cloud.compute.v1.CorsPolicy();
2162   }
2163 
getDefaultInstance()2164   public static com.google.cloud.compute.v1.CorsPolicy getDefaultInstance() {
2165     return DEFAULT_INSTANCE;
2166   }
2167 
2168   private static final com.google.protobuf.Parser<CorsPolicy> PARSER =
2169       new com.google.protobuf.AbstractParser<CorsPolicy>() {
2170         @java.lang.Override
2171         public CorsPolicy parsePartialFrom(
2172             com.google.protobuf.CodedInputStream input,
2173             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2174             throws com.google.protobuf.InvalidProtocolBufferException {
2175           Builder builder = newBuilder();
2176           try {
2177             builder.mergeFrom(input, extensionRegistry);
2178           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2179             throw e.setUnfinishedMessage(builder.buildPartial());
2180           } catch (com.google.protobuf.UninitializedMessageException e) {
2181             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
2182           } catch (java.io.IOException e) {
2183             throw new com.google.protobuf.InvalidProtocolBufferException(e)
2184                 .setUnfinishedMessage(builder.buildPartial());
2185           }
2186           return builder.buildPartial();
2187         }
2188       };
2189 
parser()2190   public static com.google.protobuf.Parser<CorsPolicy> parser() {
2191     return PARSER;
2192   }
2193 
2194   @java.lang.Override
getParserForType()2195   public com.google.protobuf.Parser<CorsPolicy> getParserForType() {
2196     return PARSER;
2197   }
2198 
2199   @java.lang.Override
getDefaultInstanceForType()2200   public com.google.cloud.compute.v1.CorsPolicy getDefaultInstanceForType() {
2201     return DEFAULT_INSTANCE;
2202   }
2203 }
2204