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 * Message containing Cloud CDN configuration for a backend bucket. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.compute.v1.BackendBucketCdnPolicy} 29 */ 30 public final class BackendBucketCdnPolicy extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.BackendBucketCdnPolicy) 33 BackendBucketCdnPolicyOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use BackendBucketCdnPolicy.newBuilder() to construct. BackendBucketCdnPolicy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private BackendBucketCdnPolicy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 BackendBucketCdnPolicy()40 private BackendBucketCdnPolicy() { 41 bypassCacheOnRequestHeaders_ = java.util.Collections.emptyList(); 42 cacheMode_ = ""; 43 negativeCachingPolicy_ = java.util.Collections.emptyList(); 44 signedUrlKeyNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; 45 } 46 47 @java.lang.Override 48 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)49 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 50 return new BackendBucketCdnPolicy(); 51 } 52 53 @java.lang.Override getUnknownFields()54 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 55 return this.unknownFields; 56 } 57 getDescriptor()58 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 59 return com.google.cloud.compute.v1.Compute 60 .internal_static_google_cloud_compute_v1_BackendBucketCdnPolicy_descriptor; 61 } 62 63 @java.lang.Override 64 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()65 internalGetFieldAccessorTable() { 66 return com.google.cloud.compute.v1.Compute 67 .internal_static_google_cloud_compute_v1_BackendBucketCdnPolicy_fieldAccessorTable 68 .ensureFieldAccessorsInitialized( 69 com.google.cloud.compute.v1.BackendBucketCdnPolicy.class, 70 com.google.cloud.compute.v1.BackendBucketCdnPolicy.Builder.class); 71 } 72 73 /** 74 * 75 * 76 * <pre> 77 * Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. 78 * </pre> 79 * 80 * Protobuf enum {@code google.cloud.compute.v1.BackendBucketCdnPolicy.CacheMode} 81 */ 82 public enum CacheMode implements com.google.protobuf.ProtocolMessageEnum { 83 /** 84 * 85 * 86 * <pre> 87 * A value indicating that the enum field is not set. 88 * </pre> 89 * 90 * <code>UNDEFINED_CACHE_MODE = 0;</code> 91 */ 92 UNDEFINED_CACHE_MODE(0), 93 /** 94 * 95 * 96 * <pre> 97 * Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. 98 * </pre> 99 * 100 * <code>CACHE_ALL_STATIC = 355027945;</code> 101 */ 102 CACHE_ALL_STATIC(355027945), 103 /** 104 * 105 * 106 * <pre> 107 * Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. 108 * </pre> 109 * 110 * <code>FORCE_CACHE_ALL = 486026928;</code> 111 */ 112 FORCE_CACHE_ALL(486026928), 113 /** <code>INVALID_CACHE_MODE = 381295560;</code> */ 114 INVALID_CACHE_MODE(381295560), 115 /** 116 * 117 * 118 * <pre> 119 * Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. 120 * </pre> 121 * 122 * <code>USE_ORIGIN_HEADERS = 55380261;</code> 123 */ 124 USE_ORIGIN_HEADERS(55380261), 125 UNRECOGNIZED(-1), 126 ; 127 128 /** 129 * 130 * 131 * <pre> 132 * A value indicating that the enum field is not set. 133 * </pre> 134 * 135 * <code>UNDEFINED_CACHE_MODE = 0;</code> 136 */ 137 public static final int UNDEFINED_CACHE_MODE_VALUE = 0; 138 /** 139 * 140 * 141 * <pre> 142 * Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. 143 * </pre> 144 * 145 * <code>CACHE_ALL_STATIC = 355027945;</code> 146 */ 147 public static final int CACHE_ALL_STATIC_VALUE = 355027945; 148 /** 149 * 150 * 151 * <pre> 152 * Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. 153 * </pre> 154 * 155 * <code>FORCE_CACHE_ALL = 486026928;</code> 156 */ 157 public static final int FORCE_CACHE_ALL_VALUE = 486026928; 158 /** <code>INVALID_CACHE_MODE = 381295560;</code> */ 159 public static final int INVALID_CACHE_MODE_VALUE = 381295560; 160 /** 161 * 162 * 163 * <pre> 164 * Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. 165 * </pre> 166 * 167 * <code>USE_ORIGIN_HEADERS = 55380261;</code> 168 */ 169 public static final int USE_ORIGIN_HEADERS_VALUE = 55380261; 170 getNumber()171 public final int getNumber() { 172 if (this == UNRECOGNIZED) { 173 throw new java.lang.IllegalArgumentException( 174 "Can't get the number of an unknown enum value."); 175 } 176 return value; 177 } 178 179 /** 180 * @param value The numeric wire value of the corresponding enum entry. 181 * @return The enum associated with the given numeric wire value. 182 * @deprecated Use {@link #forNumber(int)} instead. 183 */ 184 @java.lang.Deprecated valueOf(int value)185 public static CacheMode valueOf(int value) { 186 return forNumber(value); 187 } 188 189 /** 190 * @param value The numeric wire value of the corresponding enum entry. 191 * @return The enum associated with the given numeric wire value. 192 */ forNumber(int value)193 public static CacheMode forNumber(int value) { 194 switch (value) { 195 case 0: 196 return UNDEFINED_CACHE_MODE; 197 case 355027945: 198 return CACHE_ALL_STATIC; 199 case 486026928: 200 return FORCE_CACHE_ALL; 201 case 381295560: 202 return INVALID_CACHE_MODE; 203 case 55380261: 204 return USE_ORIGIN_HEADERS; 205 default: 206 return null; 207 } 208 } 209 internalGetValueMap()210 public static com.google.protobuf.Internal.EnumLiteMap<CacheMode> internalGetValueMap() { 211 return internalValueMap; 212 } 213 214 private static final com.google.protobuf.Internal.EnumLiteMap<CacheMode> internalValueMap = 215 new com.google.protobuf.Internal.EnumLiteMap<CacheMode>() { 216 public CacheMode findValueByNumber(int number) { 217 return CacheMode.forNumber(number); 218 } 219 }; 220 getValueDescriptor()221 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 222 if (this == UNRECOGNIZED) { 223 throw new java.lang.IllegalStateException( 224 "Can't get the descriptor of an unrecognized enum value."); 225 } 226 return getDescriptor().getValues().get(ordinal()); 227 } 228 getDescriptorForType()229 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 230 return getDescriptor(); 231 } 232 getDescriptor()233 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 234 return com.google.cloud.compute.v1.BackendBucketCdnPolicy.getDescriptor() 235 .getEnumTypes() 236 .get(0); 237 } 238 239 private static final CacheMode[] VALUES = values(); 240 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)241 public static CacheMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 242 if (desc.getType() != getDescriptor()) { 243 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 244 } 245 if (desc.getIndex() == -1) { 246 return UNRECOGNIZED; 247 } 248 return VALUES[desc.getIndex()]; 249 } 250 251 private final int value; 252 CacheMode(int value)253 private CacheMode(int value) { 254 this.value = value; 255 } 256 257 // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.BackendBucketCdnPolicy.CacheMode) 258 } 259 260 private int bitField0_; 261 public static final int BYPASS_CACHE_ON_REQUEST_HEADERS_FIELD_NUMBER = 486203082; 262 263 @SuppressWarnings("serial") 264 private java.util.List< 265 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader> 266 bypassCacheOnRequestHeaders_; 267 /** 268 * 269 * 270 * <pre> 271 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 272 * </pre> 273 * 274 * <code> 275 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 276 * </code> 277 */ 278 @java.lang.Override 279 public java.util.List< 280 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader> getBypassCacheOnRequestHeadersList()281 getBypassCacheOnRequestHeadersList() { 282 return bypassCacheOnRequestHeaders_; 283 } 284 /** 285 * 286 * 287 * <pre> 288 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 289 * </pre> 290 * 291 * <code> 292 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 293 * </code> 294 */ 295 @java.lang.Override 296 public java.util.List< 297 ? extends 298 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeaderOrBuilder> getBypassCacheOnRequestHeadersOrBuilderList()299 getBypassCacheOnRequestHeadersOrBuilderList() { 300 return bypassCacheOnRequestHeaders_; 301 } 302 /** 303 * 304 * 305 * <pre> 306 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 307 * </pre> 308 * 309 * <code> 310 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 311 * </code> 312 */ 313 @java.lang.Override getBypassCacheOnRequestHeadersCount()314 public int getBypassCacheOnRequestHeadersCount() { 315 return bypassCacheOnRequestHeaders_.size(); 316 } 317 /** 318 * 319 * 320 * <pre> 321 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 322 * </pre> 323 * 324 * <code> 325 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 326 * </code> 327 */ 328 @java.lang.Override 329 public com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader getBypassCacheOnRequestHeaders(int index)330 getBypassCacheOnRequestHeaders(int index) { 331 return bypassCacheOnRequestHeaders_.get(index); 332 } 333 /** 334 * 335 * 336 * <pre> 337 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 338 * </pre> 339 * 340 * <code> 341 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 342 * </code> 343 */ 344 @java.lang.Override 345 public com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeaderOrBuilder getBypassCacheOnRequestHeadersOrBuilder(int index)346 getBypassCacheOnRequestHeadersOrBuilder(int index) { 347 return bypassCacheOnRequestHeaders_.get(index); 348 } 349 350 public static final int CACHE_KEY_POLICY_FIELD_NUMBER = 159263727; 351 private com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy cacheKeyPolicy_; 352 /** 353 * 354 * 355 * <pre> 356 * The CacheKeyPolicy for this CdnPolicy. 357 * </pre> 358 * 359 * <code> 360 * optional .google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy cache_key_policy = 159263727; 361 * </code> 362 * 363 * @return Whether the cacheKeyPolicy field is set. 364 */ 365 @java.lang.Override hasCacheKeyPolicy()366 public boolean hasCacheKeyPolicy() { 367 return ((bitField0_ & 0x00000001) != 0); 368 } 369 /** 370 * 371 * 372 * <pre> 373 * The CacheKeyPolicy for this CdnPolicy. 374 * </pre> 375 * 376 * <code> 377 * optional .google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy cache_key_policy = 159263727; 378 * </code> 379 * 380 * @return The cacheKeyPolicy. 381 */ 382 @java.lang.Override getCacheKeyPolicy()383 public com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy getCacheKeyPolicy() { 384 return cacheKeyPolicy_ == null 385 ? com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy.getDefaultInstance() 386 : cacheKeyPolicy_; 387 } 388 /** 389 * 390 * 391 * <pre> 392 * The CacheKeyPolicy for this CdnPolicy. 393 * </pre> 394 * 395 * <code> 396 * optional .google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy cache_key_policy = 159263727; 397 * </code> 398 */ 399 @java.lang.Override 400 public com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicyOrBuilder getCacheKeyPolicyOrBuilder()401 getCacheKeyPolicyOrBuilder() { 402 return cacheKeyPolicy_ == null 403 ? com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy.getDefaultInstance() 404 : cacheKeyPolicy_; 405 } 406 407 public static final int CACHE_MODE_FIELD_NUMBER = 28877888; 408 409 @SuppressWarnings("serial") 410 private volatile java.lang.Object cacheMode_ = ""; 411 /** 412 * 413 * 414 * <pre> 415 * Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. 416 * Check the CacheMode enum for the list of possible values. 417 * </pre> 418 * 419 * <code>optional string cache_mode = 28877888;</code> 420 * 421 * @return Whether the cacheMode field is set. 422 */ 423 @java.lang.Override hasCacheMode()424 public boolean hasCacheMode() { 425 return ((bitField0_ & 0x00000002) != 0); 426 } 427 /** 428 * 429 * 430 * <pre> 431 * Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. 432 * Check the CacheMode enum for the list of possible values. 433 * </pre> 434 * 435 * <code>optional string cache_mode = 28877888;</code> 436 * 437 * @return The cacheMode. 438 */ 439 @java.lang.Override getCacheMode()440 public java.lang.String getCacheMode() { 441 java.lang.Object ref = cacheMode_; 442 if (ref instanceof java.lang.String) { 443 return (java.lang.String) ref; 444 } else { 445 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 446 java.lang.String s = bs.toStringUtf8(); 447 cacheMode_ = s; 448 return s; 449 } 450 } 451 /** 452 * 453 * 454 * <pre> 455 * Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. 456 * Check the CacheMode enum for the list of possible values. 457 * </pre> 458 * 459 * <code>optional string cache_mode = 28877888;</code> 460 * 461 * @return The bytes for cacheMode. 462 */ 463 @java.lang.Override getCacheModeBytes()464 public com.google.protobuf.ByteString getCacheModeBytes() { 465 java.lang.Object ref = cacheMode_; 466 if (ref instanceof java.lang.String) { 467 com.google.protobuf.ByteString b = 468 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 469 cacheMode_ = b; 470 return b; 471 } else { 472 return (com.google.protobuf.ByteString) ref; 473 } 474 } 475 476 public static final int CLIENT_TTL_FIELD_NUMBER = 29034360; 477 private int clientTtl_ = 0; 478 /** 479 * 480 * 481 * <pre> 482 * Specifies a separate client (e.g. browser client) maximum TTL. This is used to clamp the max-age (or Expires) value sent to the client. With FORCE_CACHE_ALL, the lesser of client_ttl and default_ttl is used for the response max-age directive, along with a "public" directive. For cacheable content in CACHE_ALL_STATIC mode, client_ttl clamps the max-age from the origin (if specified), or else sets the response max-age directive to the lesser of the client_ttl and default_ttl, and also ensures a "public" cache-control directive is present. If a client TTL is not specified, a default value (1 hour) will be used. The maximum allowed value is 31,622,400s (1 year). 483 * </pre> 484 * 485 * <code>optional int32 client_ttl = 29034360;</code> 486 * 487 * @return Whether the clientTtl field is set. 488 */ 489 @java.lang.Override hasClientTtl()490 public boolean hasClientTtl() { 491 return ((bitField0_ & 0x00000004) != 0); 492 } 493 /** 494 * 495 * 496 * <pre> 497 * Specifies a separate client (e.g. browser client) maximum TTL. This is used to clamp the max-age (or Expires) value sent to the client. With FORCE_CACHE_ALL, the lesser of client_ttl and default_ttl is used for the response max-age directive, along with a "public" directive. For cacheable content in CACHE_ALL_STATIC mode, client_ttl clamps the max-age from the origin (if specified), or else sets the response max-age directive to the lesser of the client_ttl and default_ttl, and also ensures a "public" cache-control directive is present. If a client TTL is not specified, a default value (1 hour) will be used. The maximum allowed value is 31,622,400s (1 year). 498 * </pre> 499 * 500 * <code>optional int32 client_ttl = 29034360;</code> 501 * 502 * @return The clientTtl. 503 */ 504 @java.lang.Override getClientTtl()505 public int getClientTtl() { 506 return clientTtl_; 507 } 508 509 public static final int DEFAULT_TTL_FIELD_NUMBER = 100253422; 510 private int defaultTtl_ = 0; 511 /** 512 * 513 * 514 * <pre> 515 * Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Setting a TTL of "0" means "always revalidate". The value of defaultTTL cannot be set to a value greater than that of maxTTL, but can be equal. When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. 516 * </pre> 517 * 518 * <code>optional int32 default_ttl = 100253422;</code> 519 * 520 * @return Whether the defaultTtl field is set. 521 */ 522 @java.lang.Override hasDefaultTtl()523 public boolean hasDefaultTtl() { 524 return ((bitField0_ & 0x00000008) != 0); 525 } 526 /** 527 * 528 * 529 * <pre> 530 * Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Setting a TTL of "0" means "always revalidate". The value of defaultTTL cannot be set to a value greater than that of maxTTL, but can be equal. When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. 531 * </pre> 532 * 533 * <code>optional int32 default_ttl = 100253422;</code> 534 * 535 * @return The defaultTtl. 536 */ 537 @java.lang.Override getDefaultTtl()538 public int getDefaultTtl() { 539 return defaultTtl_; 540 } 541 542 public static final int MAX_TTL_FIELD_NUMBER = 307578001; 543 private int maxTtl_ = 0; 544 /** 545 * 546 * 547 * <pre> 548 * Specifies the maximum allowed TTL for cached content served by this origin. Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTTL seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive. Headers sent to the client will not be modified. Setting a TTL of "0" means "always revalidate". The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. 549 * </pre> 550 * 551 * <code>optional int32 max_ttl = 307578001;</code> 552 * 553 * @return Whether the maxTtl field is set. 554 */ 555 @java.lang.Override hasMaxTtl()556 public boolean hasMaxTtl() { 557 return ((bitField0_ & 0x00000010) != 0); 558 } 559 /** 560 * 561 * 562 * <pre> 563 * Specifies the maximum allowed TTL for cached content served by this origin. Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTTL seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive. Headers sent to the client will not be modified. Setting a TTL of "0" means "always revalidate". The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. 564 * </pre> 565 * 566 * <code>optional int32 max_ttl = 307578001;</code> 567 * 568 * @return The maxTtl. 569 */ 570 @java.lang.Override getMaxTtl()571 public int getMaxTtl() { 572 return maxTtl_; 573 } 574 575 public static final int NEGATIVE_CACHING_FIELD_NUMBER = 336110005; 576 private boolean negativeCaching_ = false; 577 /** 578 * 579 * 580 * <pre> 581 * Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. When the cache mode is set to CACHE_ALL_STATIC or USE_ORIGIN_HEADERS, negative caching applies to responses with the specified response code that lack any Cache-Control, Expires, or Pragma: no-cache directives. When the cache mode is set to FORCE_CACHE_ALL, negative caching applies to all responses with the specified response code, and override any caching headers. By default, Cloud CDN will apply the following default TTLs to these status codes: HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s HTTP 405 (Method Not Found), 421 (Misdirected Request), 501 (Not Implemented): 60s. These defaults can be overridden in negative_caching_policy. 582 * </pre> 583 * 584 * <code>optional bool negative_caching = 336110005;</code> 585 * 586 * @return Whether the negativeCaching field is set. 587 */ 588 @java.lang.Override hasNegativeCaching()589 public boolean hasNegativeCaching() { 590 return ((bitField0_ & 0x00000020) != 0); 591 } 592 /** 593 * 594 * 595 * <pre> 596 * Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. When the cache mode is set to CACHE_ALL_STATIC or USE_ORIGIN_HEADERS, negative caching applies to responses with the specified response code that lack any Cache-Control, Expires, or Pragma: no-cache directives. When the cache mode is set to FORCE_CACHE_ALL, negative caching applies to all responses with the specified response code, and override any caching headers. By default, Cloud CDN will apply the following default TTLs to these status codes: HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s HTTP 405 (Method Not Found), 421 (Misdirected Request), 501 (Not Implemented): 60s. These defaults can be overridden in negative_caching_policy. 597 * </pre> 598 * 599 * <code>optional bool negative_caching = 336110005;</code> 600 * 601 * @return The negativeCaching. 602 */ 603 @java.lang.Override getNegativeCaching()604 public boolean getNegativeCaching() { 605 return negativeCaching_; 606 } 607 608 public static final int NEGATIVE_CACHING_POLICY_FIELD_NUMBER = 155359996; 609 610 @SuppressWarnings("serial") 611 private java.util.List<com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy> 612 negativeCachingPolicy_; 613 /** 614 * 615 * 616 * <pre> 617 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 618 * </pre> 619 * 620 * <code> 621 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 622 * </code> 623 */ 624 @java.lang.Override 625 public java.util.List<com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy> getNegativeCachingPolicyList()626 getNegativeCachingPolicyList() { 627 return negativeCachingPolicy_; 628 } 629 /** 630 * 631 * 632 * <pre> 633 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 634 * </pre> 635 * 636 * <code> 637 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 638 * </code> 639 */ 640 @java.lang.Override 641 public java.util.List< 642 ? extends 643 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicyOrBuilder> getNegativeCachingPolicyOrBuilderList()644 getNegativeCachingPolicyOrBuilderList() { 645 return negativeCachingPolicy_; 646 } 647 /** 648 * 649 * 650 * <pre> 651 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 652 * </pre> 653 * 654 * <code> 655 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 656 * </code> 657 */ 658 @java.lang.Override getNegativeCachingPolicyCount()659 public int getNegativeCachingPolicyCount() { 660 return negativeCachingPolicy_.size(); 661 } 662 /** 663 * 664 * 665 * <pre> 666 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 667 * </pre> 668 * 669 * <code> 670 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 671 * </code> 672 */ 673 @java.lang.Override 674 public com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy getNegativeCachingPolicy(int index)675 getNegativeCachingPolicy(int index) { 676 return negativeCachingPolicy_.get(index); 677 } 678 /** 679 * 680 * 681 * <pre> 682 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 683 * </pre> 684 * 685 * <code> 686 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 687 * </code> 688 */ 689 @java.lang.Override 690 public com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicyOrBuilder getNegativeCachingPolicyOrBuilder(int index)691 getNegativeCachingPolicyOrBuilder(int index) { 692 return negativeCachingPolicy_.get(index); 693 } 694 695 public static final int REQUEST_COALESCING_FIELD_NUMBER = 532808276; 696 private boolean requestCoalescing_ = false; 697 /** 698 * 699 * 700 * <pre> 701 * If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin. 702 * </pre> 703 * 704 * <code>optional bool request_coalescing = 532808276;</code> 705 * 706 * @return Whether the requestCoalescing field is set. 707 */ 708 @java.lang.Override hasRequestCoalescing()709 public boolean hasRequestCoalescing() { 710 return ((bitField0_ & 0x00000040) != 0); 711 } 712 /** 713 * 714 * 715 * <pre> 716 * If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin. 717 * </pre> 718 * 719 * <code>optional bool request_coalescing = 532808276;</code> 720 * 721 * @return The requestCoalescing. 722 */ 723 @java.lang.Override getRequestCoalescing()724 public boolean getRequestCoalescing() { 725 return requestCoalescing_; 726 } 727 728 public static final int SERVE_WHILE_STALE_FIELD_NUMBER = 236682203; 729 private int serveWhileStale_ = 0; 730 /** 731 * 732 * 733 * <pre> 734 * Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. This setting defines the default "max-stale" duration for any cached responses that do not specify a max-stale directive. Stale responses that exceed the TTL configured here will not be served. The default limit (max-stale) is 86400s (1 day), which will allow stale content to be served up to this limit beyond the max-age (or s-max-age) of a cached response. The maximum allowed value is 604800 (1 week). Set this to zero (0) to disable serve-while-stale. 735 * </pre> 736 * 737 * <code>optional int32 serve_while_stale = 236682203;</code> 738 * 739 * @return Whether the serveWhileStale field is set. 740 */ 741 @java.lang.Override hasServeWhileStale()742 public boolean hasServeWhileStale() { 743 return ((bitField0_ & 0x00000080) != 0); 744 } 745 /** 746 * 747 * 748 * <pre> 749 * Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. This setting defines the default "max-stale" duration for any cached responses that do not specify a max-stale directive. Stale responses that exceed the TTL configured here will not be served. The default limit (max-stale) is 86400s (1 day), which will allow stale content to be served up to this limit beyond the max-age (or s-max-age) of a cached response. The maximum allowed value is 604800 (1 week). Set this to zero (0) to disable serve-while-stale. 750 * </pre> 751 * 752 * <code>optional int32 serve_while_stale = 236682203;</code> 753 * 754 * @return The serveWhileStale. 755 */ 756 @java.lang.Override getServeWhileStale()757 public int getServeWhileStale() { 758 return serveWhileStale_; 759 } 760 761 public static final int SIGNED_URL_CACHE_MAX_AGE_SEC_FIELD_NUMBER = 269374534; 762 private long signedUrlCacheMaxAgeSec_ = 0L; 763 /** 764 * 765 * 766 * <pre> 767 * Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. 768 * </pre> 769 * 770 * <code>optional int64 signed_url_cache_max_age_sec = 269374534;</code> 771 * 772 * @return Whether the signedUrlCacheMaxAgeSec field is set. 773 */ 774 @java.lang.Override hasSignedUrlCacheMaxAgeSec()775 public boolean hasSignedUrlCacheMaxAgeSec() { 776 return ((bitField0_ & 0x00000100) != 0); 777 } 778 /** 779 * 780 * 781 * <pre> 782 * Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. 783 * </pre> 784 * 785 * <code>optional int64 signed_url_cache_max_age_sec = 269374534;</code> 786 * 787 * @return The signedUrlCacheMaxAgeSec. 788 */ 789 @java.lang.Override getSignedUrlCacheMaxAgeSec()790 public long getSignedUrlCacheMaxAgeSec() { 791 return signedUrlCacheMaxAgeSec_; 792 } 793 794 public static final int SIGNED_URL_KEY_NAMES_FIELD_NUMBER = 371848885; 795 796 @SuppressWarnings("serial") 797 private com.google.protobuf.LazyStringList signedUrlKeyNames_; 798 /** 799 * 800 * 801 * <pre> 802 * [Output Only] Names of the keys for signing request URLs. 803 * </pre> 804 * 805 * <code>repeated string signed_url_key_names = 371848885;</code> 806 * 807 * @return A list containing the signedUrlKeyNames. 808 */ getSignedUrlKeyNamesList()809 public com.google.protobuf.ProtocolStringList getSignedUrlKeyNamesList() { 810 return signedUrlKeyNames_; 811 } 812 /** 813 * 814 * 815 * <pre> 816 * [Output Only] Names of the keys for signing request URLs. 817 * </pre> 818 * 819 * <code>repeated string signed_url_key_names = 371848885;</code> 820 * 821 * @return The count of signedUrlKeyNames. 822 */ getSignedUrlKeyNamesCount()823 public int getSignedUrlKeyNamesCount() { 824 return signedUrlKeyNames_.size(); 825 } 826 /** 827 * 828 * 829 * <pre> 830 * [Output Only] Names of the keys for signing request URLs. 831 * </pre> 832 * 833 * <code>repeated string signed_url_key_names = 371848885;</code> 834 * 835 * @param index The index of the element to return. 836 * @return The signedUrlKeyNames at the given index. 837 */ getSignedUrlKeyNames(int index)838 public java.lang.String getSignedUrlKeyNames(int index) { 839 return signedUrlKeyNames_.get(index); 840 } 841 /** 842 * 843 * 844 * <pre> 845 * [Output Only] Names of the keys for signing request URLs. 846 * </pre> 847 * 848 * <code>repeated string signed_url_key_names = 371848885;</code> 849 * 850 * @param index The index of the value to return. 851 * @return The bytes of the signedUrlKeyNames at the given index. 852 */ getSignedUrlKeyNamesBytes(int index)853 public com.google.protobuf.ByteString getSignedUrlKeyNamesBytes(int index) { 854 return signedUrlKeyNames_.getByteString(index); 855 } 856 857 private byte memoizedIsInitialized = -1; 858 859 @java.lang.Override isInitialized()860 public final boolean isInitialized() { 861 byte isInitialized = memoizedIsInitialized; 862 if (isInitialized == 1) return true; 863 if (isInitialized == 0) return false; 864 865 memoizedIsInitialized = 1; 866 return true; 867 } 868 869 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)870 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 871 if (((bitField0_ & 0x00000002) != 0)) { 872 com.google.protobuf.GeneratedMessageV3.writeString(output, 28877888, cacheMode_); 873 } 874 if (((bitField0_ & 0x00000004) != 0)) { 875 output.writeInt32(29034360, clientTtl_); 876 } 877 if (((bitField0_ & 0x00000008) != 0)) { 878 output.writeInt32(100253422, defaultTtl_); 879 } 880 for (int i = 0; i < negativeCachingPolicy_.size(); i++) { 881 output.writeMessage(155359996, negativeCachingPolicy_.get(i)); 882 } 883 if (((bitField0_ & 0x00000001) != 0)) { 884 output.writeMessage(159263727, getCacheKeyPolicy()); 885 } 886 if (((bitField0_ & 0x00000080) != 0)) { 887 output.writeInt32(236682203, serveWhileStale_); 888 } 889 if (((bitField0_ & 0x00000100) != 0)) { 890 output.writeInt64(269374534, signedUrlCacheMaxAgeSec_); 891 } 892 if (((bitField0_ & 0x00000010) != 0)) { 893 output.writeInt32(307578001, maxTtl_); 894 } 895 if (((bitField0_ & 0x00000020) != 0)) { 896 output.writeBool(336110005, negativeCaching_); 897 } 898 for (int i = 0; i < signedUrlKeyNames_.size(); i++) { 899 com.google.protobuf.GeneratedMessageV3.writeString( 900 output, 371848885, signedUrlKeyNames_.getRaw(i)); 901 } 902 for (int i = 0; i < bypassCacheOnRequestHeaders_.size(); i++) { 903 output.writeMessage(486203082, bypassCacheOnRequestHeaders_.get(i)); 904 } 905 if (((bitField0_ & 0x00000040) != 0)) { 906 output.writeBool(532808276, requestCoalescing_); 907 } 908 getUnknownFields().writeTo(output); 909 } 910 911 @java.lang.Override getSerializedSize()912 public int getSerializedSize() { 913 int size = memoizedSize; 914 if (size != -1) return size; 915 916 size = 0; 917 if (((bitField0_ & 0x00000002) != 0)) { 918 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(28877888, cacheMode_); 919 } 920 if (((bitField0_ & 0x00000004) != 0)) { 921 size += com.google.protobuf.CodedOutputStream.computeInt32Size(29034360, clientTtl_); 922 } 923 if (((bitField0_ & 0x00000008) != 0)) { 924 size += com.google.protobuf.CodedOutputStream.computeInt32Size(100253422, defaultTtl_); 925 } 926 for (int i = 0; i < negativeCachingPolicy_.size(); i++) { 927 size += 928 com.google.protobuf.CodedOutputStream.computeMessageSize( 929 155359996, negativeCachingPolicy_.get(i)); 930 } 931 if (((bitField0_ & 0x00000001) != 0)) { 932 size += 933 com.google.protobuf.CodedOutputStream.computeMessageSize(159263727, getCacheKeyPolicy()); 934 } 935 if (((bitField0_ & 0x00000080) != 0)) { 936 size += com.google.protobuf.CodedOutputStream.computeInt32Size(236682203, serveWhileStale_); 937 } 938 if (((bitField0_ & 0x00000100) != 0)) { 939 size += 940 com.google.protobuf.CodedOutputStream.computeInt64Size( 941 269374534, signedUrlCacheMaxAgeSec_); 942 } 943 if (((bitField0_ & 0x00000010) != 0)) { 944 size += com.google.protobuf.CodedOutputStream.computeInt32Size(307578001, maxTtl_); 945 } 946 if (((bitField0_ & 0x00000020) != 0)) { 947 size += com.google.protobuf.CodedOutputStream.computeBoolSize(336110005, negativeCaching_); 948 } 949 { 950 int dataSize = 0; 951 for (int i = 0; i < signedUrlKeyNames_.size(); i++) { 952 dataSize += computeStringSizeNoTag(signedUrlKeyNames_.getRaw(i)); 953 } 954 size += dataSize; 955 size += 5 * getSignedUrlKeyNamesList().size(); 956 } 957 for (int i = 0; i < bypassCacheOnRequestHeaders_.size(); i++) { 958 size += 959 com.google.protobuf.CodedOutputStream.computeMessageSize( 960 486203082, bypassCacheOnRequestHeaders_.get(i)); 961 } 962 if (((bitField0_ & 0x00000040) != 0)) { 963 size += com.google.protobuf.CodedOutputStream.computeBoolSize(532808276, requestCoalescing_); 964 } 965 size += getUnknownFields().getSerializedSize(); 966 memoizedSize = size; 967 return size; 968 } 969 970 @java.lang.Override equals(final java.lang.Object obj)971 public boolean equals(final java.lang.Object obj) { 972 if (obj == this) { 973 return true; 974 } 975 if (!(obj instanceof com.google.cloud.compute.v1.BackendBucketCdnPolicy)) { 976 return super.equals(obj); 977 } 978 com.google.cloud.compute.v1.BackendBucketCdnPolicy other = 979 (com.google.cloud.compute.v1.BackendBucketCdnPolicy) obj; 980 981 if (!getBypassCacheOnRequestHeadersList().equals(other.getBypassCacheOnRequestHeadersList())) 982 return false; 983 if (hasCacheKeyPolicy() != other.hasCacheKeyPolicy()) return false; 984 if (hasCacheKeyPolicy()) { 985 if (!getCacheKeyPolicy().equals(other.getCacheKeyPolicy())) return false; 986 } 987 if (hasCacheMode() != other.hasCacheMode()) return false; 988 if (hasCacheMode()) { 989 if (!getCacheMode().equals(other.getCacheMode())) return false; 990 } 991 if (hasClientTtl() != other.hasClientTtl()) return false; 992 if (hasClientTtl()) { 993 if (getClientTtl() != other.getClientTtl()) return false; 994 } 995 if (hasDefaultTtl() != other.hasDefaultTtl()) return false; 996 if (hasDefaultTtl()) { 997 if (getDefaultTtl() != other.getDefaultTtl()) return false; 998 } 999 if (hasMaxTtl() != other.hasMaxTtl()) return false; 1000 if (hasMaxTtl()) { 1001 if (getMaxTtl() != other.getMaxTtl()) return false; 1002 } 1003 if (hasNegativeCaching() != other.hasNegativeCaching()) return false; 1004 if (hasNegativeCaching()) { 1005 if (getNegativeCaching() != other.getNegativeCaching()) return false; 1006 } 1007 if (!getNegativeCachingPolicyList().equals(other.getNegativeCachingPolicyList())) return false; 1008 if (hasRequestCoalescing() != other.hasRequestCoalescing()) return false; 1009 if (hasRequestCoalescing()) { 1010 if (getRequestCoalescing() != other.getRequestCoalescing()) return false; 1011 } 1012 if (hasServeWhileStale() != other.hasServeWhileStale()) return false; 1013 if (hasServeWhileStale()) { 1014 if (getServeWhileStale() != other.getServeWhileStale()) return false; 1015 } 1016 if (hasSignedUrlCacheMaxAgeSec() != other.hasSignedUrlCacheMaxAgeSec()) return false; 1017 if (hasSignedUrlCacheMaxAgeSec()) { 1018 if (getSignedUrlCacheMaxAgeSec() != other.getSignedUrlCacheMaxAgeSec()) return false; 1019 } 1020 if (!getSignedUrlKeyNamesList().equals(other.getSignedUrlKeyNamesList())) return false; 1021 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1022 return true; 1023 } 1024 1025 @java.lang.Override hashCode()1026 public int hashCode() { 1027 if (memoizedHashCode != 0) { 1028 return memoizedHashCode; 1029 } 1030 int hash = 41; 1031 hash = (19 * hash) + getDescriptor().hashCode(); 1032 if (getBypassCacheOnRequestHeadersCount() > 0) { 1033 hash = (37 * hash) + BYPASS_CACHE_ON_REQUEST_HEADERS_FIELD_NUMBER; 1034 hash = (53 * hash) + getBypassCacheOnRequestHeadersList().hashCode(); 1035 } 1036 if (hasCacheKeyPolicy()) { 1037 hash = (37 * hash) + CACHE_KEY_POLICY_FIELD_NUMBER; 1038 hash = (53 * hash) + getCacheKeyPolicy().hashCode(); 1039 } 1040 if (hasCacheMode()) { 1041 hash = (37 * hash) + CACHE_MODE_FIELD_NUMBER; 1042 hash = (53 * hash) + getCacheMode().hashCode(); 1043 } 1044 if (hasClientTtl()) { 1045 hash = (37 * hash) + CLIENT_TTL_FIELD_NUMBER; 1046 hash = (53 * hash) + getClientTtl(); 1047 } 1048 if (hasDefaultTtl()) { 1049 hash = (37 * hash) + DEFAULT_TTL_FIELD_NUMBER; 1050 hash = (53 * hash) + getDefaultTtl(); 1051 } 1052 if (hasMaxTtl()) { 1053 hash = (37 * hash) + MAX_TTL_FIELD_NUMBER; 1054 hash = (53 * hash) + getMaxTtl(); 1055 } 1056 if (hasNegativeCaching()) { 1057 hash = (37 * hash) + NEGATIVE_CACHING_FIELD_NUMBER; 1058 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNegativeCaching()); 1059 } 1060 if (getNegativeCachingPolicyCount() > 0) { 1061 hash = (37 * hash) + NEGATIVE_CACHING_POLICY_FIELD_NUMBER; 1062 hash = (53 * hash) + getNegativeCachingPolicyList().hashCode(); 1063 } 1064 if (hasRequestCoalescing()) { 1065 hash = (37 * hash) + REQUEST_COALESCING_FIELD_NUMBER; 1066 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestCoalescing()); 1067 } 1068 if (hasServeWhileStale()) { 1069 hash = (37 * hash) + SERVE_WHILE_STALE_FIELD_NUMBER; 1070 hash = (53 * hash) + getServeWhileStale(); 1071 } 1072 if (hasSignedUrlCacheMaxAgeSec()) { 1073 hash = (37 * hash) + SIGNED_URL_CACHE_MAX_AGE_SEC_FIELD_NUMBER; 1074 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSignedUrlCacheMaxAgeSec()); 1075 } 1076 if (getSignedUrlKeyNamesCount() > 0) { 1077 hash = (37 * hash) + SIGNED_URL_KEY_NAMES_FIELD_NUMBER; 1078 hash = (53 * hash) + getSignedUrlKeyNamesList().hashCode(); 1079 } 1080 hash = (29 * hash) + getUnknownFields().hashCode(); 1081 memoizedHashCode = hash; 1082 return hash; 1083 } 1084 parseFrom( java.nio.ByteBuffer data)1085 public static com.google.cloud.compute.v1.BackendBucketCdnPolicy parseFrom( 1086 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 1087 return PARSER.parseFrom(data); 1088 } 1089 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1090 public static com.google.cloud.compute.v1.BackendBucketCdnPolicy parseFrom( 1091 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1092 throws com.google.protobuf.InvalidProtocolBufferException { 1093 return PARSER.parseFrom(data, extensionRegistry); 1094 } 1095 parseFrom( com.google.protobuf.ByteString data)1096 public static com.google.cloud.compute.v1.BackendBucketCdnPolicy parseFrom( 1097 com.google.protobuf.ByteString data) 1098 throws com.google.protobuf.InvalidProtocolBufferException { 1099 return PARSER.parseFrom(data); 1100 } 1101 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1102 public static com.google.cloud.compute.v1.BackendBucketCdnPolicy parseFrom( 1103 com.google.protobuf.ByteString data, 1104 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1105 throws com.google.protobuf.InvalidProtocolBufferException { 1106 return PARSER.parseFrom(data, extensionRegistry); 1107 } 1108 parseFrom(byte[] data)1109 public static com.google.cloud.compute.v1.BackendBucketCdnPolicy parseFrom(byte[] data) 1110 throws com.google.protobuf.InvalidProtocolBufferException { 1111 return PARSER.parseFrom(data); 1112 } 1113 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1114 public static com.google.cloud.compute.v1.BackendBucketCdnPolicy parseFrom( 1115 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1116 throws com.google.protobuf.InvalidProtocolBufferException { 1117 return PARSER.parseFrom(data, extensionRegistry); 1118 } 1119 parseFrom( java.io.InputStream input)1120 public static com.google.cloud.compute.v1.BackendBucketCdnPolicy parseFrom( 1121 java.io.InputStream input) throws java.io.IOException { 1122 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1123 } 1124 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1125 public static com.google.cloud.compute.v1.BackendBucketCdnPolicy parseFrom( 1126 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1127 throws java.io.IOException { 1128 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1129 PARSER, input, extensionRegistry); 1130 } 1131 parseDelimitedFrom( java.io.InputStream input)1132 public static com.google.cloud.compute.v1.BackendBucketCdnPolicy parseDelimitedFrom( 1133 java.io.InputStream input) throws java.io.IOException { 1134 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1135 } 1136 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1137 public static com.google.cloud.compute.v1.BackendBucketCdnPolicy parseDelimitedFrom( 1138 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1139 throws java.io.IOException { 1140 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1141 PARSER, input, extensionRegistry); 1142 } 1143 parseFrom( com.google.protobuf.CodedInputStream input)1144 public static com.google.cloud.compute.v1.BackendBucketCdnPolicy parseFrom( 1145 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1146 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1147 } 1148 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1149 public static com.google.cloud.compute.v1.BackendBucketCdnPolicy parseFrom( 1150 com.google.protobuf.CodedInputStream input, 1151 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1152 throws java.io.IOException { 1153 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1154 PARSER, input, extensionRegistry); 1155 } 1156 1157 @java.lang.Override newBuilderForType()1158 public Builder newBuilderForType() { 1159 return newBuilder(); 1160 } 1161 newBuilder()1162 public static Builder newBuilder() { 1163 return DEFAULT_INSTANCE.toBuilder(); 1164 } 1165 newBuilder(com.google.cloud.compute.v1.BackendBucketCdnPolicy prototype)1166 public static Builder newBuilder(com.google.cloud.compute.v1.BackendBucketCdnPolicy prototype) { 1167 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1168 } 1169 1170 @java.lang.Override toBuilder()1171 public Builder toBuilder() { 1172 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1173 } 1174 1175 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1176 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1177 Builder builder = new Builder(parent); 1178 return builder; 1179 } 1180 /** 1181 * 1182 * 1183 * <pre> 1184 * Message containing Cloud CDN configuration for a backend bucket. 1185 * </pre> 1186 * 1187 * Protobuf type {@code google.cloud.compute.v1.BackendBucketCdnPolicy} 1188 */ 1189 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1190 implements 1191 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.BackendBucketCdnPolicy) 1192 com.google.cloud.compute.v1.BackendBucketCdnPolicyOrBuilder { getDescriptor()1193 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1194 return com.google.cloud.compute.v1.Compute 1195 .internal_static_google_cloud_compute_v1_BackendBucketCdnPolicy_descriptor; 1196 } 1197 1198 @java.lang.Override 1199 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1200 internalGetFieldAccessorTable() { 1201 return com.google.cloud.compute.v1.Compute 1202 .internal_static_google_cloud_compute_v1_BackendBucketCdnPolicy_fieldAccessorTable 1203 .ensureFieldAccessorsInitialized( 1204 com.google.cloud.compute.v1.BackendBucketCdnPolicy.class, 1205 com.google.cloud.compute.v1.BackendBucketCdnPolicy.Builder.class); 1206 } 1207 1208 // Construct using com.google.cloud.compute.v1.BackendBucketCdnPolicy.newBuilder() Builder()1209 private Builder() { 1210 maybeForceBuilderInitialization(); 1211 } 1212 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1213 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1214 super(parent); 1215 maybeForceBuilderInitialization(); 1216 } 1217 maybeForceBuilderInitialization()1218 private void maybeForceBuilderInitialization() { 1219 if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { 1220 getBypassCacheOnRequestHeadersFieldBuilder(); 1221 getCacheKeyPolicyFieldBuilder(); 1222 getNegativeCachingPolicyFieldBuilder(); 1223 } 1224 } 1225 1226 @java.lang.Override clear()1227 public Builder clear() { 1228 super.clear(); 1229 bitField0_ = 0; 1230 if (bypassCacheOnRequestHeadersBuilder_ == null) { 1231 bypassCacheOnRequestHeaders_ = java.util.Collections.emptyList(); 1232 } else { 1233 bypassCacheOnRequestHeaders_ = null; 1234 bypassCacheOnRequestHeadersBuilder_.clear(); 1235 } 1236 bitField0_ = (bitField0_ & ~0x00000001); 1237 cacheKeyPolicy_ = null; 1238 if (cacheKeyPolicyBuilder_ != null) { 1239 cacheKeyPolicyBuilder_.dispose(); 1240 cacheKeyPolicyBuilder_ = null; 1241 } 1242 cacheMode_ = ""; 1243 clientTtl_ = 0; 1244 defaultTtl_ = 0; 1245 maxTtl_ = 0; 1246 negativeCaching_ = false; 1247 if (negativeCachingPolicyBuilder_ == null) { 1248 negativeCachingPolicy_ = java.util.Collections.emptyList(); 1249 } else { 1250 negativeCachingPolicy_ = null; 1251 negativeCachingPolicyBuilder_.clear(); 1252 } 1253 bitField0_ = (bitField0_ & ~0x00000080); 1254 requestCoalescing_ = false; 1255 serveWhileStale_ = 0; 1256 signedUrlCacheMaxAgeSec_ = 0L; 1257 signedUrlKeyNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1258 bitField0_ = (bitField0_ & ~0x00000800); 1259 return this; 1260 } 1261 1262 @java.lang.Override getDescriptorForType()1263 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1264 return com.google.cloud.compute.v1.Compute 1265 .internal_static_google_cloud_compute_v1_BackendBucketCdnPolicy_descriptor; 1266 } 1267 1268 @java.lang.Override getDefaultInstanceForType()1269 public com.google.cloud.compute.v1.BackendBucketCdnPolicy getDefaultInstanceForType() { 1270 return com.google.cloud.compute.v1.BackendBucketCdnPolicy.getDefaultInstance(); 1271 } 1272 1273 @java.lang.Override build()1274 public com.google.cloud.compute.v1.BackendBucketCdnPolicy build() { 1275 com.google.cloud.compute.v1.BackendBucketCdnPolicy result = buildPartial(); 1276 if (!result.isInitialized()) { 1277 throw newUninitializedMessageException(result); 1278 } 1279 return result; 1280 } 1281 1282 @java.lang.Override buildPartial()1283 public com.google.cloud.compute.v1.BackendBucketCdnPolicy buildPartial() { 1284 com.google.cloud.compute.v1.BackendBucketCdnPolicy result = 1285 new com.google.cloud.compute.v1.BackendBucketCdnPolicy(this); 1286 buildPartialRepeatedFields(result); 1287 if (bitField0_ != 0) { 1288 buildPartial0(result); 1289 } 1290 onBuilt(); 1291 return result; 1292 } 1293 buildPartialRepeatedFields( com.google.cloud.compute.v1.BackendBucketCdnPolicy result)1294 private void buildPartialRepeatedFields( 1295 com.google.cloud.compute.v1.BackendBucketCdnPolicy result) { 1296 if (bypassCacheOnRequestHeadersBuilder_ == null) { 1297 if (((bitField0_ & 0x00000001) != 0)) { 1298 bypassCacheOnRequestHeaders_ = 1299 java.util.Collections.unmodifiableList(bypassCacheOnRequestHeaders_); 1300 bitField0_ = (bitField0_ & ~0x00000001); 1301 } 1302 result.bypassCacheOnRequestHeaders_ = bypassCacheOnRequestHeaders_; 1303 } else { 1304 result.bypassCacheOnRequestHeaders_ = bypassCacheOnRequestHeadersBuilder_.build(); 1305 } 1306 if (negativeCachingPolicyBuilder_ == null) { 1307 if (((bitField0_ & 0x00000080) != 0)) { 1308 negativeCachingPolicy_ = java.util.Collections.unmodifiableList(negativeCachingPolicy_); 1309 bitField0_ = (bitField0_ & ~0x00000080); 1310 } 1311 result.negativeCachingPolicy_ = negativeCachingPolicy_; 1312 } else { 1313 result.negativeCachingPolicy_ = negativeCachingPolicyBuilder_.build(); 1314 } 1315 if (((bitField0_ & 0x00000800) != 0)) { 1316 signedUrlKeyNames_ = signedUrlKeyNames_.getUnmodifiableView(); 1317 bitField0_ = (bitField0_ & ~0x00000800); 1318 } 1319 result.signedUrlKeyNames_ = signedUrlKeyNames_; 1320 } 1321 buildPartial0(com.google.cloud.compute.v1.BackendBucketCdnPolicy result)1322 private void buildPartial0(com.google.cloud.compute.v1.BackendBucketCdnPolicy result) { 1323 int from_bitField0_ = bitField0_; 1324 int to_bitField0_ = 0; 1325 if (((from_bitField0_ & 0x00000002) != 0)) { 1326 result.cacheKeyPolicy_ = 1327 cacheKeyPolicyBuilder_ == null ? cacheKeyPolicy_ : cacheKeyPolicyBuilder_.build(); 1328 to_bitField0_ |= 0x00000001; 1329 } 1330 if (((from_bitField0_ & 0x00000004) != 0)) { 1331 result.cacheMode_ = cacheMode_; 1332 to_bitField0_ |= 0x00000002; 1333 } 1334 if (((from_bitField0_ & 0x00000008) != 0)) { 1335 result.clientTtl_ = clientTtl_; 1336 to_bitField0_ |= 0x00000004; 1337 } 1338 if (((from_bitField0_ & 0x00000010) != 0)) { 1339 result.defaultTtl_ = defaultTtl_; 1340 to_bitField0_ |= 0x00000008; 1341 } 1342 if (((from_bitField0_ & 0x00000020) != 0)) { 1343 result.maxTtl_ = maxTtl_; 1344 to_bitField0_ |= 0x00000010; 1345 } 1346 if (((from_bitField0_ & 0x00000040) != 0)) { 1347 result.negativeCaching_ = negativeCaching_; 1348 to_bitField0_ |= 0x00000020; 1349 } 1350 if (((from_bitField0_ & 0x00000100) != 0)) { 1351 result.requestCoalescing_ = requestCoalescing_; 1352 to_bitField0_ |= 0x00000040; 1353 } 1354 if (((from_bitField0_ & 0x00000200) != 0)) { 1355 result.serveWhileStale_ = serveWhileStale_; 1356 to_bitField0_ |= 0x00000080; 1357 } 1358 if (((from_bitField0_ & 0x00000400) != 0)) { 1359 result.signedUrlCacheMaxAgeSec_ = signedUrlCacheMaxAgeSec_; 1360 to_bitField0_ |= 0x00000100; 1361 } 1362 result.bitField0_ |= to_bitField0_; 1363 } 1364 1365 @java.lang.Override clone()1366 public Builder clone() { 1367 return super.clone(); 1368 } 1369 1370 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1371 public Builder setField( 1372 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1373 return super.setField(field, value); 1374 } 1375 1376 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1377 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1378 return super.clearField(field); 1379 } 1380 1381 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1382 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1383 return super.clearOneof(oneof); 1384 } 1385 1386 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1387 public Builder setRepeatedField( 1388 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1389 return super.setRepeatedField(field, index, value); 1390 } 1391 1392 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1393 public Builder addRepeatedField( 1394 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1395 return super.addRepeatedField(field, value); 1396 } 1397 1398 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1399 public Builder mergeFrom(com.google.protobuf.Message other) { 1400 if (other instanceof com.google.cloud.compute.v1.BackendBucketCdnPolicy) { 1401 return mergeFrom((com.google.cloud.compute.v1.BackendBucketCdnPolicy) other); 1402 } else { 1403 super.mergeFrom(other); 1404 return this; 1405 } 1406 } 1407 mergeFrom(com.google.cloud.compute.v1.BackendBucketCdnPolicy other)1408 public Builder mergeFrom(com.google.cloud.compute.v1.BackendBucketCdnPolicy other) { 1409 if (other == com.google.cloud.compute.v1.BackendBucketCdnPolicy.getDefaultInstance()) 1410 return this; 1411 if (bypassCacheOnRequestHeadersBuilder_ == null) { 1412 if (!other.bypassCacheOnRequestHeaders_.isEmpty()) { 1413 if (bypassCacheOnRequestHeaders_.isEmpty()) { 1414 bypassCacheOnRequestHeaders_ = other.bypassCacheOnRequestHeaders_; 1415 bitField0_ = (bitField0_ & ~0x00000001); 1416 } else { 1417 ensureBypassCacheOnRequestHeadersIsMutable(); 1418 bypassCacheOnRequestHeaders_.addAll(other.bypassCacheOnRequestHeaders_); 1419 } 1420 onChanged(); 1421 } 1422 } else { 1423 if (!other.bypassCacheOnRequestHeaders_.isEmpty()) { 1424 if (bypassCacheOnRequestHeadersBuilder_.isEmpty()) { 1425 bypassCacheOnRequestHeadersBuilder_.dispose(); 1426 bypassCacheOnRequestHeadersBuilder_ = null; 1427 bypassCacheOnRequestHeaders_ = other.bypassCacheOnRequestHeaders_; 1428 bitField0_ = (bitField0_ & ~0x00000001); 1429 bypassCacheOnRequestHeadersBuilder_ = 1430 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 1431 ? getBypassCacheOnRequestHeadersFieldBuilder() 1432 : null; 1433 } else { 1434 bypassCacheOnRequestHeadersBuilder_.addAllMessages(other.bypassCacheOnRequestHeaders_); 1435 } 1436 } 1437 } 1438 if (other.hasCacheKeyPolicy()) { 1439 mergeCacheKeyPolicy(other.getCacheKeyPolicy()); 1440 } 1441 if (other.hasCacheMode()) { 1442 cacheMode_ = other.cacheMode_; 1443 bitField0_ |= 0x00000004; 1444 onChanged(); 1445 } 1446 if (other.hasClientTtl()) { 1447 setClientTtl(other.getClientTtl()); 1448 } 1449 if (other.hasDefaultTtl()) { 1450 setDefaultTtl(other.getDefaultTtl()); 1451 } 1452 if (other.hasMaxTtl()) { 1453 setMaxTtl(other.getMaxTtl()); 1454 } 1455 if (other.hasNegativeCaching()) { 1456 setNegativeCaching(other.getNegativeCaching()); 1457 } 1458 if (negativeCachingPolicyBuilder_ == null) { 1459 if (!other.negativeCachingPolicy_.isEmpty()) { 1460 if (negativeCachingPolicy_.isEmpty()) { 1461 negativeCachingPolicy_ = other.negativeCachingPolicy_; 1462 bitField0_ = (bitField0_ & ~0x00000080); 1463 } else { 1464 ensureNegativeCachingPolicyIsMutable(); 1465 negativeCachingPolicy_.addAll(other.negativeCachingPolicy_); 1466 } 1467 onChanged(); 1468 } 1469 } else { 1470 if (!other.negativeCachingPolicy_.isEmpty()) { 1471 if (negativeCachingPolicyBuilder_.isEmpty()) { 1472 negativeCachingPolicyBuilder_.dispose(); 1473 negativeCachingPolicyBuilder_ = null; 1474 negativeCachingPolicy_ = other.negativeCachingPolicy_; 1475 bitField0_ = (bitField0_ & ~0x00000080); 1476 negativeCachingPolicyBuilder_ = 1477 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 1478 ? getNegativeCachingPolicyFieldBuilder() 1479 : null; 1480 } else { 1481 negativeCachingPolicyBuilder_.addAllMessages(other.negativeCachingPolicy_); 1482 } 1483 } 1484 } 1485 if (other.hasRequestCoalescing()) { 1486 setRequestCoalescing(other.getRequestCoalescing()); 1487 } 1488 if (other.hasServeWhileStale()) { 1489 setServeWhileStale(other.getServeWhileStale()); 1490 } 1491 if (other.hasSignedUrlCacheMaxAgeSec()) { 1492 setSignedUrlCacheMaxAgeSec(other.getSignedUrlCacheMaxAgeSec()); 1493 } 1494 if (!other.signedUrlKeyNames_.isEmpty()) { 1495 if (signedUrlKeyNames_.isEmpty()) { 1496 signedUrlKeyNames_ = other.signedUrlKeyNames_; 1497 bitField0_ = (bitField0_ & ~0x00000800); 1498 } else { 1499 ensureSignedUrlKeyNamesIsMutable(); 1500 signedUrlKeyNames_.addAll(other.signedUrlKeyNames_); 1501 } 1502 onChanged(); 1503 } 1504 this.mergeUnknownFields(other.getUnknownFields()); 1505 onChanged(); 1506 return this; 1507 } 1508 1509 @java.lang.Override isInitialized()1510 public final boolean isInitialized() { 1511 return true; 1512 } 1513 1514 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1515 public Builder mergeFrom( 1516 com.google.protobuf.CodedInputStream input, 1517 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1518 throws java.io.IOException { 1519 if (extensionRegistry == null) { 1520 throw new java.lang.NullPointerException(); 1521 } 1522 try { 1523 boolean done = false; 1524 while (!done) { 1525 int tag = input.readTag(); 1526 switch (tag) { 1527 case 0: 1528 done = true; 1529 break; 1530 case 231023106: 1531 { 1532 cacheMode_ = input.readStringRequireUtf8(); 1533 bitField0_ |= 0x00000004; 1534 break; 1535 } // case 231023106 1536 case 232274880: 1537 { 1538 clientTtl_ = input.readInt32(); 1539 bitField0_ |= 0x00000008; 1540 break; 1541 } // case 232274880 1542 case 802027376: 1543 { 1544 defaultTtl_ = input.readInt32(); 1545 bitField0_ |= 0x00000010; 1546 break; 1547 } // case 802027376 1548 case 1242879970: 1549 { 1550 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy m = 1551 input.readMessage( 1552 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy 1553 .parser(), 1554 extensionRegistry); 1555 if (negativeCachingPolicyBuilder_ == null) { 1556 ensureNegativeCachingPolicyIsMutable(); 1557 negativeCachingPolicy_.add(m); 1558 } else { 1559 negativeCachingPolicyBuilder_.addMessage(m); 1560 } 1561 break; 1562 } // case 1242879970 1563 case 1274109818: 1564 { 1565 input.readMessage(getCacheKeyPolicyFieldBuilder().getBuilder(), extensionRegistry); 1566 bitField0_ |= 0x00000002; 1567 break; 1568 } // case 1274109818 1569 case 1893457624: 1570 { 1571 serveWhileStale_ = input.readInt32(); 1572 bitField0_ |= 0x00000200; 1573 break; 1574 } // case 1893457624 1575 case -2139971024: 1576 { 1577 signedUrlCacheMaxAgeSec_ = input.readInt64(); 1578 bitField0_ |= 0x00000400; 1579 break; 1580 } // case -2139971024 1581 case -1834343288: 1582 { 1583 maxTtl_ = input.readInt32(); 1584 bitField0_ |= 0x00000020; 1585 break; 1586 } // case -1834343288 1587 case -1606087256: 1588 { 1589 negativeCaching_ = input.readBool(); 1590 bitField0_ |= 0x00000040; 1591 break; 1592 } // case -1606087256 1593 case -1320176214: 1594 { 1595 java.lang.String s = input.readStringRequireUtf8(); 1596 ensureSignedUrlKeyNamesIsMutable(); 1597 signedUrlKeyNames_.add(s); 1598 break; 1599 } // case -1320176214 1600 case -405342638: 1601 { 1602 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader m = 1603 input.readMessage( 1604 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader 1605 .parser(), 1606 extensionRegistry); 1607 if (bypassCacheOnRequestHeadersBuilder_ == null) { 1608 ensureBypassCacheOnRequestHeadersIsMutable(); 1609 bypassCacheOnRequestHeaders_.add(m); 1610 } else { 1611 bypassCacheOnRequestHeadersBuilder_.addMessage(m); 1612 } 1613 break; 1614 } // case -405342638 1615 case -32501088: 1616 { 1617 requestCoalescing_ = input.readBool(); 1618 bitField0_ |= 0x00000100; 1619 break; 1620 } // case -32501088 1621 default: 1622 { 1623 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1624 done = true; // was an endgroup tag 1625 } 1626 break; 1627 } // default: 1628 } // switch (tag) 1629 } // while (!done) 1630 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1631 throw e.unwrapIOException(); 1632 } finally { 1633 onChanged(); 1634 } // finally 1635 return this; 1636 } 1637 1638 private int bitField0_; 1639 1640 private java.util.List< 1641 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader> 1642 bypassCacheOnRequestHeaders_ = java.util.Collections.emptyList(); 1643 ensureBypassCacheOnRequestHeadersIsMutable()1644 private void ensureBypassCacheOnRequestHeadersIsMutable() { 1645 if (!((bitField0_ & 0x00000001) != 0)) { 1646 bypassCacheOnRequestHeaders_ = 1647 new java.util.ArrayList< 1648 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader>( 1649 bypassCacheOnRequestHeaders_); 1650 bitField0_ |= 0x00000001; 1651 } 1652 } 1653 1654 private com.google.protobuf.RepeatedFieldBuilderV3< 1655 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader, 1656 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader.Builder, 1657 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeaderOrBuilder> 1658 bypassCacheOnRequestHeadersBuilder_; 1659 1660 /** 1661 * 1662 * 1663 * <pre> 1664 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 1665 * </pre> 1666 * 1667 * <code> 1668 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 1669 * </code> 1670 */ 1671 public java.util.List< 1672 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader> getBypassCacheOnRequestHeadersList()1673 getBypassCacheOnRequestHeadersList() { 1674 if (bypassCacheOnRequestHeadersBuilder_ == null) { 1675 return java.util.Collections.unmodifiableList(bypassCacheOnRequestHeaders_); 1676 } else { 1677 return bypassCacheOnRequestHeadersBuilder_.getMessageList(); 1678 } 1679 } 1680 /** 1681 * 1682 * 1683 * <pre> 1684 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 1685 * </pre> 1686 * 1687 * <code> 1688 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 1689 * </code> 1690 */ getBypassCacheOnRequestHeadersCount()1691 public int getBypassCacheOnRequestHeadersCount() { 1692 if (bypassCacheOnRequestHeadersBuilder_ == null) { 1693 return bypassCacheOnRequestHeaders_.size(); 1694 } else { 1695 return bypassCacheOnRequestHeadersBuilder_.getCount(); 1696 } 1697 } 1698 /** 1699 * 1700 * 1701 * <pre> 1702 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 1703 * </pre> 1704 * 1705 * <code> 1706 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 1707 * </code> 1708 */ 1709 public com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader getBypassCacheOnRequestHeaders(int index)1710 getBypassCacheOnRequestHeaders(int index) { 1711 if (bypassCacheOnRequestHeadersBuilder_ == null) { 1712 return bypassCacheOnRequestHeaders_.get(index); 1713 } else { 1714 return bypassCacheOnRequestHeadersBuilder_.getMessage(index); 1715 } 1716 } 1717 /** 1718 * 1719 * 1720 * <pre> 1721 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 1722 * </pre> 1723 * 1724 * <code> 1725 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 1726 * </code> 1727 */ setBypassCacheOnRequestHeaders( int index, com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader value)1728 public Builder setBypassCacheOnRequestHeaders( 1729 int index, 1730 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader value) { 1731 if (bypassCacheOnRequestHeadersBuilder_ == null) { 1732 if (value == null) { 1733 throw new NullPointerException(); 1734 } 1735 ensureBypassCacheOnRequestHeadersIsMutable(); 1736 bypassCacheOnRequestHeaders_.set(index, value); 1737 onChanged(); 1738 } else { 1739 bypassCacheOnRequestHeadersBuilder_.setMessage(index, value); 1740 } 1741 return this; 1742 } 1743 /** 1744 * 1745 * 1746 * <pre> 1747 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 1748 * </pre> 1749 * 1750 * <code> 1751 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 1752 * </code> 1753 */ setBypassCacheOnRequestHeaders( int index, com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader.Builder builderForValue)1754 public Builder setBypassCacheOnRequestHeaders( 1755 int index, 1756 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader.Builder 1757 builderForValue) { 1758 if (bypassCacheOnRequestHeadersBuilder_ == null) { 1759 ensureBypassCacheOnRequestHeadersIsMutable(); 1760 bypassCacheOnRequestHeaders_.set(index, builderForValue.build()); 1761 onChanged(); 1762 } else { 1763 bypassCacheOnRequestHeadersBuilder_.setMessage(index, builderForValue.build()); 1764 } 1765 return this; 1766 } 1767 /** 1768 * 1769 * 1770 * <pre> 1771 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 1772 * </pre> 1773 * 1774 * <code> 1775 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 1776 * </code> 1777 */ addBypassCacheOnRequestHeaders( com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader value)1778 public Builder addBypassCacheOnRequestHeaders( 1779 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader value) { 1780 if (bypassCacheOnRequestHeadersBuilder_ == null) { 1781 if (value == null) { 1782 throw new NullPointerException(); 1783 } 1784 ensureBypassCacheOnRequestHeadersIsMutable(); 1785 bypassCacheOnRequestHeaders_.add(value); 1786 onChanged(); 1787 } else { 1788 bypassCacheOnRequestHeadersBuilder_.addMessage(value); 1789 } 1790 return this; 1791 } 1792 /** 1793 * 1794 * 1795 * <pre> 1796 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 1797 * </pre> 1798 * 1799 * <code> 1800 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 1801 * </code> 1802 */ addBypassCacheOnRequestHeaders( int index, com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader value)1803 public Builder addBypassCacheOnRequestHeaders( 1804 int index, 1805 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader value) { 1806 if (bypassCacheOnRequestHeadersBuilder_ == null) { 1807 if (value == null) { 1808 throw new NullPointerException(); 1809 } 1810 ensureBypassCacheOnRequestHeadersIsMutable(); 1811 bypassCacheOnRequestHeaders_.add(index, value); 1812 onChanged(); 1813 } else { 1814 bypassCacheOnRequestHeadersBuilder_.addMessage(index, value); 1815 } 1816 return this; 1817 } 1818 /** 1819 * 1820 * 1821 * <pre> 1822 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 1823 * </pre> 1824 * 1825 * <code> 1826 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 1827 * </code> 1828 */ addBypassCacheOnRequestHeaders( com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader.Builder builderForValue)1829 public Builder addBypassCacheOnRequestHeaders( 1830 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader.Builder 1831 builderForValue) { 1832 if (bypassCacheOnRequestHeadersBuilder_ == null) { 1833 ensureBypassCacheOnRequestHeadersIsMutable(); 1834 bypassCacheOnRequestHeaders_.add(builderForValue.build()); 1835 onChanged(); 1836 } else { 1837 bypassCacheOnRequestHeadersBuilder_.addMessage(builderForValue.build()); 1838 } 1839 return this; 1840 } 1841 /** 1842 * 1843 * 1844 * <pre> 1845 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 1846 * </pre> 1847 * 1848 * <code> 1849 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 1850 * </code> 1851 */ addBypassCacheOnRequestHeaders( int index, com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader.Builder builderForValue)1852 public Builder addBypassCacheOnRequestHeaders( 1853 int index, 1854 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader.Builder 1855 builderForValue) { 1856 if (bypassCacheOnRequestHeadersBuilder_ == null) { 1857 ensureBypassCacheOnRequestHeadersIsMutable(); 1858 bypassCacheOnRequestHeaders_.add(index, builderForValue.build()); 1859 onChanged(); 1860 } else { 1861 bypassCacheOnRequestHeadersBuilder_.addMessage(index, builderForValue.build()); 1862 } 1863 return this; 1864 } 1865 /** 1866 * 1867 * 1868 * <pre> 1869 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 1870 * </pre> 1871 * 1872 * <code> 1873 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 1874 * </code> 1875 */ addAllBypassCacheOnRequestHeaders( java.lang.Iterable< ? extends com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader> values)1876 public Builder addAllBypassCacheOnRequestHeaders( 1877 java.lang.Iterable< 1878 ? extends 1879 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader> 1880 values) { 1881 if (bypassCacheOnRequestHeadersBuilder_ == null) { 1882 ensureBypassCacheOnRequestHeadersIsMutable(); 1883 com.google.protobuf.AbstractMessageLite.Builder.addAll( 1884 values, bypassCacheOnRequestHeaders_); 1885 onChanged(); 1886 } else { 1887 bypassCacheOnRequestHeadersBuilder_.addAllMessages(values); 1888 } 1889 return this; 1890 } 1891 /** 1892 * 1893 * 1894 * <pre> 1895 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 1896 * </pre> 1897 * 1898 * <code> 1899 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 1900 * </code> 1901 */ clearBypassCacheOnRequestHeaders()1902 public Builder clearBypassCacheOnRequestHeaders() { 1903 if (bypassCacheOnRequestHeadersBuilder_ == null) { 1904 bypassCacheOnRequestHeaders_ = java.util.Collections.emptyList(); 1905 bitField0_ = (bitField0_ & ~0x00000001); 1906 onChanged(); 1907 } else { 1908 bypassCacheOnRequestHeadersBuilder_.clear(); 1909 } 1910 return this; 1911 } 1912 /** 1913 * 1914 * 1915 * <pre> 1916 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 1917 * </pre> 1918 * 1919 * <code> 1920 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 1921 * </code> 1922 */ removeBypassCacheOnRequestHeaders(int index)1923 public Builder removeBypassCacheOnRequestHeaders(int index) { 1924 if (bypassCacheOnRequestHeadersBuilder_ == null) { 1925 ensureBypassCacheOnRequestHeadersIsMutable(); 1926 bypassCacheOnRequestHeaders_.remove(index); 1927 onChanged(); 1928 } else { 1929 bypassCacheOnRequestHeadersBuilder_.remove(index); 1930 } 1931 return this; 1932 } 1933 /** 1934 * 1935 * 1936 * <pre> 1937 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 1938 * </pre> 1939 * 1940 * <code> 1941 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 1942 * </code> 1943 */ 1944 public com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader.Builder getBypassCacheOnRequestHeadersBuilder(int index)1945 getBypassCacheOnRequestHeadersBuilder(int index) { 1946 return getBypassCacheOnRequestHeadersFieldBuilder().getBuilder(index); 1947 } 1948 /** 1949 * 1950 * 1951 * <pre> 1952 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 1953 * </pre> 1954 * 1955 * <code> 1956 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 1957 * </code> 1958 */ 1959 public com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeaderOrBuilder getBypassCacheOnRequestHeadersOrBuilder(int index)1960 getBypassCacheOnRequestHeadersOrBuilder(int index) { 1961 if (bypassCacheOnRequestHeadersBuilder_ == null) { 1962 return bypassCacheOnRequestHeaders_.get(index); 1963 } else { 1964 return bypassCacheOnRequestHeadersBuilder_.getMessageOrBuilder(index); 1965 } 1966 } 1967 /** 1968 * 1969 * 1970 * <pre> 1971 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 1972 * </pre> 1973 * 1974 * <code> 1975 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 1976 * </code> 1977 */ 1978 public java.util.List< 1979 ? extends 1980 com.google.cloud.compute.v1 1981 .BackendBucketCdnPolicyBypassCacheOnRequestHeaderOrBuilder> getBypassCacheOnRequestHeadersOrBuilderList()1982 getBypassCacheOnRequestHeadersOrBuilderList() { 1983 if (bypassCacheOnRequestHeadersBuilder_ != null) { 1984 return bypassCacheOnRequestHeadersBuilder_.getMessageOrBuilderList(); 1985 } else { 1986 return java.util.Collections.unmodifiableList(bypassCacheOnRequestHeaders_); 1987 } 1988 } 1989 /** 1990 * 1991 * 1992 * <pre> 1993 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 1994 * </pre> 1995 * 1996 * <code> 1997 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 1998 * </code> 1999 */ 2000 public com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader.Builder addBypassCacheOnRequestHeadersBuilder()2001 addBypassCacheOnRequestHeadersBuilder() { 2002 return getBypassCacheOnRequestHeadersFieldBuilder() 2003 .addBuilder( 2004 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader 2005 .getDefaultInstance()); 2006 } 2007 /** 2008 * 2009 * 2010 * <pre> 2011 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 2012 * </pre> 2013 * 2014 * <code> 2015 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 2016 * </code> 2017 */ 2018 public com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader.Builder addBypassCacheOnRequestHeadersBuilder(int index)2019 addBypassCacheOnRequestHeadersBuilder(int index) { 2020 return getBypassCacheOnRequestHeadersFieldBuilder() 2021 .addBuilder( 2022 index, 2023 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader 2024 .getDefaultInstance()); 2025 } 2026 /** 2027 * 2028 * 2029 * <pre> 2030 * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. 2031 * </pre> 2032 * 2033 * <code> 2034 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader bypass_cache_on_request_headers = 486203082; 2035 * </code> 2036 */ 2037 public java.util.List< 2038 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader.Builder> getBypassCacheOnRequestHeadersBuilderList()2039 getBypassCacheOnRequestHeadersBuilderList() { 2040 return getBypassCacheOnRequestHeadersFieldBuilder().getBuilderList(); 2041 } 2042 2043 private com.google.protobuf.RepeatedFieldBuilderV3< 2044 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader, 2045 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader.Builder, 2046 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeaderOrBuilder> getBypassCacheOnRequestHeadersFieldBuilder()2047 getBypassCacheOnRequestHeadersFieldBuilder() { 2048 if (bypassCacheOnRequestHeadersBuilder_ == null) { 2049 bypassCacheOnRequestHeadersBuilder_ = 2050 new com.google.protobuf.RepeatedFieldBuilderV3< 2051 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader, 2052 com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader 2053 .Builder, 2054 com.google.cloud.compute.v1 2055 .BackendBucketCdnPolicyBypassCacheOnRequestHeaderOrBuilder>( 2056 bypassCacheOnRequestHeaders_, 2057 ((bitField0_ & 0x00000001) != 0), 2058 getParentForChildren(), 2059 isClean()); 2060 bypassCacheOnRequestHeaders_ = null; 2061 } 2062 return bypassCacheOnRequestHeadersBuilder_; 2063 } 2064 2065 private com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy cacheKeyPolicy_; 2066 private com.google.protobuf.SingleFieldBuilderV3< 2067 com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy, 2068 com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy.Builder, 2069 com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicyOrBuilder> 2070 cacheKeyPolicyBuilder_; 2071 /** 2072 * 2073 * 2074 * <pre> 2075 * The CacheKeyPolicy for this CdnPolicy. 2076 * </pre> 2077 * 2078 * <code> 2079 * optional .google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy cache_key_policy = 159263727; 2080 * </code> 2081 * 2082 * @return Whether the cacheKeyPolicy field is set. 2083 */ hasCacheKeyPolicy()2084 public boolean hasCacheKeyPolicy() { 2085 return ((bitField0_ & 0x00000002) != 0); 2086 } 2087 /** 2088 * 2089 * 2090 * <pre> 2091 * The CacheKeyPolicy for this CdnPolicy. 2092 * </pre> 2093 * 2094 * <code> 2095 * optional .google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy cache_key_policy = 159263727; 2096 * </code> 2097 * 2098 * @return The cacheKeyPolicy. 2099 */ getCacheKeyPolicy()2100 public com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy getCacheKeyPolicy() { 2101 if (cacheKeyPolicyBuilder_ == null) { 2102 return cacheKeyPolicy_ == null 2103 ? com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy.getDefaultInstance() 2104 : cacheKeyPolicy_; 2105 } else { 2106 return cacheKeyPolicyBuilder_.getMessage(); 2107 } 2108 } 2109 /** 2110 * 2111 * 2112 * <pre> 2113 * The CacheKeyPolicy for this CdnPolicy. 2114 * </pre> 2115 * 2116 * <code> 2117 * optional .google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy cache_key_policy = 159263727; 2118 * </code> 2119 */ setCacheKeyPolicy( com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy value)2120 public Builder setCacheKeyPolicy( 2121 com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy value) { 2122 if (cacheKeyPolicyBuilder_ == null) { 2123 if (value == null) { 2124 throw new NullPointerException(); 2125 } 2126 cacheKeyPolicy_ = value; 2127 } else { 2128 cacheKeyPolicyBuilder_.setMessage(value); 2129 } 2130 bitField0_ |= 0x00000002; 2131 onChanged(); 2132 return this; 2133 } 2134 /** 2135 * 2136 * 2137 * <pre> 2138 * The CacheKeyPolicy for this CdnPolicy. 2139 * </pre> 2140 * 2141 * <code> 2142 * optional .google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy cache_key_policy = 159263727; 2143 * </code> 2144 */ setCacheKeyPolicy( com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy.Builder builderForValue)2145 public Builder setCacheKeyPolicy( 2146 com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy.Builder builderForValue) { 2147 if (cacheKeyPolicyBuilder_ == null) { 2148 cacheKeyPolicy_ = builderForValue.build(); 2149 } else { 2150 cacheKeyPolicyBuilder_.setMessage(builderForValue.build()); 2151 } 2152 bitField0_ |= 0x00000002; 2153 onChanged(); 2154 return this; 2155 } 2156 /** 2157 * 2158 * 2159 * <pre> 2160 * The CacheKeyPolicy for this CdnPolicy. 2161 * </pre> 2162 * 2163 * <code> 2164 * optional .google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy cache_key_policy = 159263727; 2165 * </code> 2166 */ mergeCacheKeyPolicy( com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy value)2167 public Builder mergeCacheKeyPolicy( 2168 com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy value) { 2169 if (cacheKeyPolicyBuilder_ == null) { 2170 if (((bitField0_ & 0x00000002) != 0) 2171 && cacheKeyPolicy_ != null 2172 && cacheKeyPolicy_ 2173 != com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy 2174 .getDefaultInstance()) { 2175 getCacheKeyPolicyBuilder().mergeFrom(value); 2176 } else { 2177 cacheKeyPolicy_ = value; 2178 } 2179 } else { 2180 cacheKeyPolicyBuilder_.mergeFrom(value); 2181 } 2182 bitField0_ |= 0x00000002; 2183 onChanged(); 2184 return this; 2185 } 2186 /** 2187 * 2188 * 2189 * <pre> 2190 * The CacheKeyPolicy for this CdnPolicy. 2191 * </pre> 2192 * 2193 * <code> 2194 * optional .google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy cache_key_policy = 159263727; 2195 * </code> 2196 */ clearCacheKeyPolicy()2197 public Builder clearCacheKeyPolicy() { 2198 bitField0_ = (bitField0_ & ~0x00000002); 2199 cacheKeyPolicy_ = null; 2200 if (cacheKeyPolicyBuilder_ != null) { 2201 cacheKeyPolicyBuilder_.dispose(); 2202 cacheKeyPolicyBuilder_ = null; 2203 } 2204 onChanged(); 2205 return this; 2206 } 2207 /** 2208 * 2209 * 2210 * <pre> 2211 * The CacheKeyPolicy for this CdnPolicy. 2212 * </pre> 2213 * 2214 * <code> 2215 * optional .google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy cache_key_policy = 159263727; 2216 * </code> 2217 */ 2218 public com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy.Builder getCacheKeyPolicyBuilder()2219 getCacheKeyPolicyBuilder() { 2220 bitField0_ |= 0x00000002; 2221 onChanged(); 2222 return getCacheKeyPolicyFieldBuilder().getBuilder(); 2223 } 2224 /** 2225 * 2226 * 2227 * <pre> 2228 * The CacheKeyPolicy for this CdnPolicy. 2229 * </pre> 2230 * 2231 * <code> 2232 * optional .google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy cache_key_policy = 159263727; 2233 * </code> 2234 */ 2235 public com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicyOrBuilder getCacheKeyPolicyOrBuilder()2236 getCacheKeyPolicyOrBuilder() { 2237 if (cacheKeyPolicyBuilder_ != null) { 2238 return cacheKeyPolicyBuilder_.getMessageOrBuilder(); 2239 } else { 2240 return cacheKeyPolicy_ == null 2241 ? com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy.getDefaultInstance() 2242 : cacheKeyPolicy_; 2243 } 2244 } 2245 /** 2246 * 2247 * 2248 * <pre> 2249 * The CacheKeyPolicy for this CdnPolicy. 2250 * </pre> 2251 * 2252 * <code> 2253 * optional .google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy cache_key_policy = 159263727; 2254 * </code> 2255 */ 2256 private com.google.protobuf.SingleFieldBuilderV3< 2257 com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy, 2258 com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy.Builder, 2259 com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicyOrBuilder> getCacheKeyPolicyFieldBuilder()2260 getCacheKeyPolicyFieldBuilder() { 2261 if (cacheKeyPolicyBuilder_ == null) { 2262 cacheKeyPolicyBuilder_ = 2263 new com.google.protobuf.SingleFieldBuilderV3< 2264 com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy, 2265 com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy.Builder, 2266 com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicyOrBuilder>( 2267 getCacheKeyPolicy(), getParentForChildren(), isClean()); 2268 cacheKeyPolicy_ = null; 2269 } 2270 return cacheKeyPolicyBuilder_; 2271 } 2272 2273 private java.lang.Object cacheMode_ = ""; 2274 /** 2275 * 2276 * 2277 * <pre> 2278 * Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. 2279 * Check the CacheMode enum for the list of possible values. 2280 * </pre> 2281 * 2282 * <code>optional string cache_mode = 28877888;</code> 2283 * 2284 * @return Whether the cacheMode field is set. 2285 */ hasCacheMode()2286 public boolean hasCacheMode() { 2287 return ((bitField0_ & 0x00000004) != 0); 2288 } 2289 /** 2290 * 2291 * 2292 * <pre> 2293 * Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. 2294 * Check the CacheMode enum for the list of possible values. 2295 * </pre> 2296 * 2297 * <code>optional string cache_mode = 28877888;</code> 2298 * 2299 * @return The cacheMode. 2300 */ getCacheMode()2301 public java.lang.String getCacheMode() { 2302 java.lang.Object ref = cacheMode_; 2303 if (!(ref instanceof java.lang.String)) { 2304 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2305 java.lang.String s = bs.toStringUtf8(); 2306 cacheMode_ = s; 2307 return s; 2308 } else { 2309 return (java.lang.String) ref; 2310 } 2311 } 2312 /** 2313 * 2314 * 2315 * <pre> 2316 * Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. 2317 * Check the CacheMode enum for the list of possible values. 2318 * </pre> 2319 * 2320 * <code>optional string cache_mode = 28877888;</code> 2321 * 2322 * @return The bytes for cacheMode. 2323 */ getCacheModeBytes()2324 public com.google.protobuf.ByteString getCacheModeBytes() { 2325 java.lang.Object ref = cacheMode_; 2326 if (ref instanceof String) { 2327 com.google.protobuf.ByteString b = 2328 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2329 cacheMode_ = b; 2330 return b; 2331 } else { 2332 return (com.google.protobuf.ByteString) ref; 2333 } 2334 } 2335 /** 2336 * 2337 * 2338 * <pre> 2339 * Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. 2340 * Check the CacheMode enum for the list of possible values. 2341 * </pre> 2342 * 2343 * <code>optional string cache_mode = 28877888;</code> 2344 * 2345 * @param value The cacheMode to set. 2346 * @return This builder for chaining. 2347 */ setCacheMode(java.lang.String value)2348 public Builder setCacheMode(java.lang.String value) { 2349 if (value == null) { 2350 throw new NullPointerException(); 2351 } 2352 cacheMode_ = value; 2353 bitField0_ |= 0x00000004; 2354 onChanged(); 2355 return this; 2356 } 2357 /** 2358 * 2359 * 2360 * <pre> 2361 * Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. 2362 * Check the CacheMode enum for the list of possible values. 2363 * </pre> 2364 * 2365 * <code>optional string cache_mode = 28877888;</code> 2366 * 2367 * @return This builder for chaining. 2368 */ clearCacheMode()2369 public Builder clearCacheMode() { 2370 cacheMode_ = getDefaultInstance().getCacheMode(); 2371 bitField0_ = (bitField0_ & ~0x00000004); 2372 onChanged(); 2373 return this; 2374 } 2375 /** 2376 * 2377 * 2378 * <pre> 2379 * Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any "private", "no-store" or "no-cache" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. 2380 * Check the CacheMode enum for the list of possible values. 2381 * </pre> 2382 * 2383 * <code>optional string cache_mode = 28877888;</code> 2384 * 2385 * @param value The bytes for cacheMode to set. 2386 * @return This builder for chaining. 2387 */ setCacheModeBytes(com.google.protobuf.ByteString value)2388 public Builder setCacheModeBytes(com.google.protobuf.ByteString value) { 2389 if (value == null) { 2390 throw new NullPointerException(); 2391 } 2392 checkByteStringIsUtf8(value); 2393 cacheMode_ = value; 2394 bitField0_ |= 0x00000004; 2395 onChanged(); 2396 return this; 2397 } 2398 2399 private int clientTtl_; 2400 /** 2401 * 2402 * 2403 * <pre> 2404 * Specifies a separate client (e.g. browser client) maximum TTL. This is used to clamp the max-age (or Expires) value sent to the client. With FORCE_CACHE_ALL, the lesser of client_ttl and default_ttl is used for the response max-age directive, along with a "public" directive. For cacheable content in CACHE_ALL_STATIC mode, client_ttl clamps the max-age from the origin (if specified), or else sets the response max-age directive to the lesser of the client_ttl and default_ttl, and also ensures a "public" cache-control directive is present. If a client TTL is not specified, a default value (1 hour) will be used. The maximum allowed value is 31,622,400s (1 year). 2405 * </pre> 2406 * 2407 * <code>optional int32 client_ttl = 29034360;</code> 2408 * 2409 * @return Whether the clientTtl field is set. 2410 */ 2411 @java.lang.Override hasClientTtl()2412 public boolean hasClientTtl() { 2413 return ((bitField0_ & 0x00000008) != 0); 2414 } 2415 /** 2416 * 2417 * 2418 * <pre> 2419 * Specifies a separate client (e.g. browser client) maximum TTL. This is used to clamp the max-age (or Expires) value sent to the client. With FORCE_CACHE_ALL, the lesser of client_ttl and default_ttl is used for the response max-age directive, along with a "public" directive. For cacheable content in CACHE_ALL_STATIC mode, client_ttl clamps the max-age from the origin (if specified), or else sets the response max-age directive to the lesser of the client_ttl and default_ttl, and also ensures a "public" cache-control directive is present. If a client TTL is not specified, a default value (1 hour) will be used. The maximum allowed value is 31,622,400s (1 year). 2420 * </pre> 2421 * 2422 * <code>optional int32 client_ttl = 29034360;</code> 2423 * 2424 * @return The clientTtl. 2425 */ 2426 @java.lang.Override getClientTtl()2427 public int getClientTtl() { 2428 return clientTtl_; 2429 } 2430 /** 2431 * 2432 * 2433 * <pre> 2434 * Specifies a separate client (e.g. browser client) maximum TTL. This is used to clamp the max-age (or Expires) value sent to the client. With FORCE_CACHE_ALL, the lesser of client_ttl and default_ttl is used for the response max-age directive, along with a "public" directive. For cacheable content in CACHE_ALL_STATIC mode, client_ttl clamps the max-age from the origin (if specified), or else sets the response max-age directive to the lesser of the client_ttl and default_ttl, and also ensures a "public" cache-control directive is present. If a client TTL is not specified, a default value (1 hour) will be used. The maximum allowed value is 31,622,400s (1 year). 2435 * </pre> 2436 * 2437 * <code>optional int32 client_ttl = 29034360;</code> 2438 * 2439 * @param value The clientTtl to set. 2440 * @return This builder for chaining. 2441 */ setClientTtl(int value)2442 public Builder setClientTtl(int value) { 2443 2444 clientTtl_ = value; 2445 bitField0_ |= 0x00000008; 2446 onChanged(); 2447 return this; 2448 } 2449 /** 2450 * 2451 * 2452 * <pre> 2453 * Specifies a separate client (e.g. browser client) maximum TTL. This is used to clamp the max-age (or Expires) value sent to the client. With FORCE_CACHE_ALL, the lesser of client_ttl and default_ttl is used for the response max-age directive, along with a "public" directive. For cacheable content in CACHE_ALL_STATIC mode, client_ttl clamps the max-age from the origin (if specified), or else sets the response max-age directive to the lesser of the client_ttl and default_ttl, and also ensures a "public" cache-control directive is present. If a client TTL is not specified, a default value (1 hour) will be used. The maximum allowed value is 31,622,400s (1 year). 2454 * </pre> 2455 * 2456 * <code>optional int32 client_ttl = 29034360;</code> 2457 * 2458 * @return This builder for chaining. 2459 */ clearClientTtl()2460 public Builder clearClientTtl() { 2461 bitField0_ = (bitField0_ & ~0x00000008); 2462 clientTtl_ = 0; 2463 onChanged(); 2464 return this; 2465 } 2466 2467 private int defaultTtl_; 2468 /** 2469 * 2470 * 2471 * <pre> 2472 * Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Setting a TTL of "0" means "always revalidate". The value of defaultTTL cannot be set to a value greater than that of maxTTL, but can be equal. When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. 2473 * </pre> 2474 * 2475 * <code>optional int32 default_ttl = 100253422;</code> 2476 * 2477 * @return Whether the defaultTtl field is set. 2478 */ 2479 @java.lang.Override hasDefaultTtl()2480 public boolean hasDefaultTtl() { 2481 return ((bitField0_ & 0x00000010) != 0); 2482 } 2483 /** 2484 * 2485 * 2486 * <pre> 2487 * Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Setting a TTL of "0" means "always revalidate". The value of defaultTTL cannot be set to a value greater than that of maxTTL, but can be equal. When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. 2488 * </pre> 2489 * 2490 * <code>optional int32 default_ttl = 100253422;</code> 2491 * 2492 * @return The defaultTtl. 2493 */ 2494 @java.lang.Override getDefaultTtl()2495 public int getDefaultTtl() { 2496 return defaultTtl_; 2497 } 2498 /** 2499 * 2500 * 2501 * <pre> 2502 * Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Setting a TTL of "0" means "always revalidate". The value of defaultTTL cannot be set to a value greater than that of maxTTL, but can be equal. When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. 2503 * </pre> 2504 * 2505 * <code>optional int32 default_ttl = 100253422;</code> 2506 * 2507 * @param value The defaultTtl to set. 2508 * @return This builder for chaining. 2509 */ setDefaultTtl(int value)2510 public Builder setDefaultTtl(int value) { 2511 2512 defaultTtl_ = value; 2513 bitField0_ |= 0x00000010; 2514 onChanged(); 2515 return this; 2516 } 2517 /** 2518 * 2519 * 2520 * <pre> 2521 * Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Setting a TTL of "0" means "always revalidate". The value of defaultTTL cannot be set to a value greater than that of maxTTL, but can be equal. When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. 2522 * </pre> 2523 * 2524 * <code>optional int32 default_ttl = 100253422;</code> 2525 * 2526 * @return This builder for chaining. 2527 */ clearDefaultTtl()2528 public Builder clearDefaultTtl() { 2529 bitField0_ = (bitField0_ & ~0x00000010); 2530 defaultTtl_ = 0; 2531 onChanged(); 2532 return this; 2533 } 2534 2535 private int maxTtl_; 2536 /** 2537 * 2538 * 2539 * <pre> 2540 * Specifies the maximum allowed TTL for cached content served by this origin. Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTTL seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive. Headers sent to the client will not be modified. Setting a TTL of "0" means "always revalidate". The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. 2541 * </pre> 2542 * 2543 * <code>optional int32 max_ttl = 307578001;</code> 2544 * 2545 * @return Whether the maxTtl field is set. 2546 */ 2547 @java.lang.Override hasMaxTtl()2548 public boolean hasMaxTtl() { 2549 return ((bitField0_ & 0x00000020) != 0); 2550 } 2551 /** 2552 * 2553 * 2554 * <pre> 2555 * Specifies the maximum allowed TTL for cached content served by this origin. Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTTL seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive. Headers sent to the client will not be modified. Setting a TTL of "0" means "always revalidate". The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. 2556 * </pre> 2557 * 2558 * <code>optional int32 max_ttl = 307578001;</code> 2559 * 2560 * @return The maxTtl. 2561 */ 2562 @java.lang.Override getMaxTtl()2563 public int getMaxTtl() { 2564 return maxTtl_; 2565 } 2566 /** 2567 * 2568 * 2569 * <pre> 2570 * Specifies the maximum allowed TTL for cached content served by this origin. Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTTL seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive. Headers sent to the client will not be modified. Setting a TTL of "0" means "always revalidate". The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. 2571 * </pre> 2572 * 2573 * <code>optional int32 max_ttl = 307578001;</code> 2574 * 2575 * @param value The maxTtl to set. 2576 * @return This builder for chaining. 2577 */ setMaxTtl(int value)2578 public Builder setMaxTtl(int value) { 2579 2580 maxTtl_ = value; 2581 bitField0_ |= 0x00000020; 2582 onChanged(); 2583 return this; 2584 } 2585 /** 2586 * 2587 * 2588 * <pre> 2589 * Specifies the maximum allowed TTL for cached content served by this origin. Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTTL seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive. Headers sent to the client will not be modified. Setting a TTL of "0" means "always revalidate". The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. 2590 * </pre> 2591 * 2592 * <code>optional int32 max_ttl = 307578001;</code> 2593 * 2594 * @return This builder for chaining. 2595 */ clearMaxTtl()2596 public Builder clearMaxTtl() { 2597 bitField0_ = (bitField0_ & ~0x00000020); 2598 maxTtl_ = 0; 2599 onChanged(); 2600 return this; 2601 } 2602 2603 private boolean negativeCaching_; 2604 /** 2605 * 2606 * 2607 * <pre> 2608 * Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. When the cache mode is set to CACHE_ALL_STATIC or USE_ORIGIN_HEADERS, negative caching applies to responses with the specified response code that lack any Cache-Control, Expires, or Pragma: no-cache directives. When the cache mode is set to FORCE_CACHE_ALL, negative caching applies to all responses with the specified response code, and override any caching headers. By default, Cloud CDN will apply the following default TTLs to these status codes: HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s HTTP 405 (Method Not Found), 421 (Misdirected Request), 501 (Not Implemented): 60s. These defaults can be overridden in negative_caching_policy. 2609 * </pre> 2610 * 2611 * <code>optional bool negative_caching = 336110005;</code> 2612 * 2613 * @return Whether the negativeCaching field is set. 2614 */ 2615 @java.lang.Override hasNegativeCaching()2616 public boolean hasNegativeCaching() { 2617 return ((bitField0_ & 0x00000040) != 0); 2618 } 2619 /** 2620 * 2621 * 2622 * <pre> 2623 * Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. When the cache mode is set to CACHE_ALL_STATIC or USE_ORIGIN_HEADERS, negative caching applies to responses with the specified response code that lack any Cache-Control, Expires, or Pragma: no-cache directives. When the cache mode is set to FORCE_CACHE_ALL, negative caching applies to all responses with the specified response code, and override any caching headers. By default, Cloud CDN will apply the following default TTLs to these status codes: HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s HTTP 405 (Method Not Found), 421 (Misdirected Request), 501 (Not Implemented): 60s. These defaults can be overridden in negative_caching_policy. 2624 * </pre> 2625 * 2626 * <code>optional bool negative_caching = 336110005;</code> 2627 * 2628 * @return The negativeCaching. 2629 */ 2630 @java.lang.Override getNegativeCaching()2631 public boolean getNegativeCaching() { 2632 return negativeCaching_; 2633 } 2634 /** 2635 * 2636 * 2637 * <pre> 2638 * Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. When the cache mode is set to CACHE_ALL_STATIC or USE_ORIGIN_HEADERS, negative caching applies to responses with the specified response code that lack any Cache-Control, Expires, or Pragma: no-cache directives. When the cache mode is set to FORCE_CACHE_ALL, negative caching applies to all responses with the specified response code, and override any caching headers. By default, Cloud CDN will apply the following default TTLs to these status codes: HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s HTTP 405 (Method Not Found), 421 (Misdirected Request), 501 (Not Implemented): 60s. These defaults can be overridden in negative_caching_policy. 2639 * </pre> 2640 * 2641 * <code>optional bool negative_caching = 336110005;</code> 2642 * 2643 * @param value The negativeCaching to set. 2644 * @return This builder for chaining. 2645 */ setNegativeCaching(boolean value)2646 public Builder setNegativeCaching(boolean value) { 2647 2648 negativeCaching_ = value; 2649 bitField0_ |= 0x00000040; 2650 onChanged(); 2651 return this; 2652 } 2653 /** 2654 * 2655 * 2656 * <pre> 2657 * Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. When the cache mode is set to CACHE_ALL_STATIC or USE_ORIGIN_HEADERS, negative caching applies to responses with the specified response code that lack any Cache-Control, Expires, or Pragma: no-cache directives. When the cache mode is set to FORCE_CACHE_ALL, negative caching applies to all responses with the specified response code, and override any caching headers. By default, Cloud CDN will apply the following default TTLs to these status codes: HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s HTTP 405 (Method Not Found), 421 (Misdirected Request), 501 (Not Implemented): 60s. These defaults can be overridden in negative_caching_policy. 2658 * </pre> 2659 * 2660 * <code>optional bool negative_caching = 336110005;</code> 2661 * 2662 * @return This builder for chaining. 2663 */ clearNegativeCaching()2664 public Builder clearNegativeCaching() { 2665 bitField0_ = (bitField0_ & ~0x00000040); 2666 negativeCaching_ = false; 2667 onChanged(); 2668 return this; 2669 } 2670 2671 private java.util.List<com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy> 2672 negativeCachingPolicy_ = java.util.Collections.emptyList(); 2673 ensureNegativeCachingPolicyIsMutable()2674 private void ensureNegativeCachingPolicyIsMutable() { 2675 if (!((bitField0_ & 0x00000080) != 0)) { 2676 negativeCachingPolicy_ = 2677 new java.util.ArrayList< 2678 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy>( 2679 negativeCachingPolicy_); 2680 bitField0_ |= 0x00000080; 2681 } 2682 } 2683 2684 private com.google.protobuf.RepeatedFieldBuilderV3< 2685 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy, 2686 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy.Builder, 2687 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicyOrBuilder> 2688 negativeCachingPolicyBuilder_; 2689 2690 /** 2691 * 2692 * 2693 * <pre> 2694 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 2695 * </pre> 2696 * 2697 * <code> 2698 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 2699 * </code> 2700 */ 2701 public java.util.List<com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy> getNegativeCachingPolicyList()2702 getNegativeCachingPolicyList() { 2703 if (negativeCachingPolicyBuilder_ == null) { 2704 return java.util.Collections.unmodifiableList(negativeCachingPolicy_); 2705 } else { 2706 return negativeCachingPolicyBuilder_.getMessageList(); 2707 } 2708 } 2709 /** 2710 * 2711 * 2712 * <pre> 2713 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 2714 * </pre> 2715 * 2716 * <code> 2717 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 2718 * </code> 2719 */ getNegativeCachingPolicyCount()2720 public int getNegativeCachingPolicyCount() { 2721 if (negativeCachingPolicyBuilder_ == null) { 2722 return negativeCachingPolicy_.size(); 2723 } else { 2724 return negativeCachingPolicyBuilder_.getCount(); 2725 } 2726 } 2727 /** 2728 * 2729 * 2730 * <pre> 2731 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 2732 * </pre> 2733 * 2734 * <code> 2735 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 2736 * </code> 2737 */ 2738 public com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy getNegativeCachingPolicy(int index)2739 getNegativeCachingPolicy(int index) { 2740 if (negativeCachingPolicyBuilder_ == null) { 2741 return negativeCachingPolicy_.get(index); 2742 } else { 2743 return negativeCachingPolicyBuilder_.getMessage(index); 2744 } 2745 } 2746 /** 2747 * 2748 * 2749 * <pre> 2750 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 2751 * </pre> 2752 * 2753 * <code> 2754 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 2755 * </code> 2756 */ setNegativeCachingPolicy( int index, com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy value)2757 public Builder setNegativeCachingPolicy( 2758 int index, com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy value) { 2759 if (negativeCachingPolicyBuilder_ == null) { 2760 if (value == null) { 2761 throw new NullPointerException(); 2762 } 2763 ensureNegativeCachingPolicyIsMutable(); 2764 negativeCachingPolicy_.set(index, value); 2765 onChanged(); 2766 } else { 2767 negativeCachingPolicyBuilder_.setMessage(index, value); 2768 } 2769 return this; 2770 } 2771 /** 2772 * 2773 * 2774 * <pre> 2775 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 2776 * </pre> 2777 * 2778 * <code> 2779 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 2780 * </code> 2781 */ setNegativeCachingPolicy( int index, com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy.Builder builderForValue)2782 public Builder setNegativeCachingPolicy( 2783 int index, 2784 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy.Builder 2785 builderForValue) { 2786 if (negativeCachingPolicyBuilder_ == null) { 2787 ensureNegativeCachingPolicyIsMutable(); 2788 negativeCachingPolicy_.set(index, builderForValue.build()); 2789 onChanged(); 2790 } else { 2791 negativeCachingPolicyBuilder_.setMessage(index, builderForValue.build()); 2792 } 2793 return this; 2794 } 2795 /** 2796 * 2797 * 2798 * <pre> 2799 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 2800 * </pre> 2801 * 2802 * <code> 2803 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 2804 * </code> 2805 */ addNegativeCachingPolicy( com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy value)2806 public Builder addNegativeCachingPolicy( 2807 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy value) { 2808 if (negativeCachingPolicyBuilder_ == null) { 2809 if (value == null) { 2810 throw new NullPointerException(); 2811 } 2812 ensureNegativeCachingPolicyIsMutable(); 2813 negativeCachingPolicy_.add(value); 2814 onChanged(); 2815 } else { 2816 negativeCachingPolicyBuilder_.addMessage(value); 2817 } 2818 return this; 2819 } 2820 /** 2821 * 2822 * 2823 * <pre> 2824 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 2825 * </pre> 2826 * 2827 * <code> 2828 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 2829 * </code> 2830 */ addNegativeCachingPolicy( int index, com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy value)2831 public Builder addNegativeCachingPolicy( 2832 int index, com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy value) { 2833 if (negativeCachingPolicyBuilder_ == null) { 2834 if (value == null) { 2835 throw new NullPointerException(); 2836 } 2837 ensureNegativeCachingPolicyIsMutable(); 2838 negativeCachingPolicy_.add(index, value); 2839 onChanged(); 2840 } else { 2841 negativeCachingPolicyBuilder_.addMessage(index, value); 2842 } 2843 return this; 2844 } 2845 /** 2846 * 2847 * 2848 * <pre> 2849 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 2850 * </pre> 2851 * 2852 * <code> 2853 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 2854 * </code> 2855 */ addNegativeCachingPolicy( com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy.Builder builderForValue)2856 public Builder addNegativeCachingPolicy( 2857 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy.Builder 2858 builderForValue) { 2859 if (negativeCachingPolicyBuilder_ == null) { 2860 ensureNegativeCachingPolicyIsMutable(); 2861 negativeCachingPolicy_.add(builderForValue.build()); 2862 onChanged(); 2863 } else { 2864 negativeCachingPolicyBuilder_.addMessage(builderForValue.build()); 2865 } 2866 return this; 2867 } 2868 /** 2869 * 2870 * 2871 * <pre> 2872 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 2873 * </pre> 2874 * 2875 * <code> 2876 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 2877 * </code> 2878 */ addNegativeCachingPolicy( int index, com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy.Builder builderForValue)2879 public Builder addNegativeCachingPolicy( 2880 int index, 2881 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy.Builder 2882 builderForValue) { 2883 if (negativeCachingPolicyBuilder_ == null) { 2884 ensureNegativeCachingPolicyIsMutable(); 2885 negativeCachingPolicy_.add(index, builderForValue.build()); 2886 onChanged(); 2887 } else { 2888 negativeCachingPolicyBuilder_.addMessage(index, builderForValue.build()); 2889 } 2890 return this; 2891 } 2892 /** 2893 * 2894 * 2895 * <pre> 2896 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 2897 * </pre> 2898 * 2899 * <code> 2900 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 2901 * </code> 2902 */ addAllNegativeCachingPolicy( java.lang.Iterable< ? extends com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy> values)2903 public Builder addAllNegativeCachingPolicy( 2904 java.lang.Iterable< 2905 ? extends com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy> 2906 values) { 2907 if (negativeCachingPolicyBuilder_ == null) { 2908 ensureNegativeCachingPolicyIsMutable(); 2909 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, negativeCachingPolicy_); 2910 onChanged(); 2911 } else { 2912 negativeCachingPolicyBuilder_.addAllMessages(values); 2913 } 2914 return this; 2915 } 2916 /** 2917 * 2918 * 2919 * <pre> 2920 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 2921 * </pre> 2922 * 2923 * <code> 2924 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 2925 * </code> 2926 */ clearNegativeCachingPolicy()2927 public Builder clearNegativeCachingPolicy() { 2928 if (negativeCachingPolicyBuilder_ == null) { 2929 negativeCachingPolicy_ = java.util.Collections.emptyList(); 2930 bitField0_ = (bitField0_ & ~0x00000080); 2931 onChanged(); 2932 } else { 2933 negativeCachingPolicyBuilder_.clear(); 2934 } 2935 return this; 2936 } 2937 /** 2938 * 2939 * 2940 * <pre> 2941 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 2942 * </pre> 2943 * 2944 * <code> 2945 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 2946 * </code> 2947 */ removeNegativeCachingPolicy(int index)2948 public Builder removeNegativeCachingPolicy(int index) { 2949 if (negativeCachingPolicyBuilder_ == null) { 2950 ensureNegativeCachingPolicyIsMutable(); 2951 negativeCachingPolicy_.remove(index); 2952 onChanged(); 2953 } else { 2954 negativeCachingPolicyBuilder_.remove(index); 2955 } 2956 return this; 2957 } 2958 /** 2959 * 2960 * 2961 * <pre> 2962 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 2963 * </pre> 2964 * 2965 * <code> 2966 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 2967 * </code> 2968 */ 2969 public com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy.Builder getNegativeCachingPolicyBuilder(int index)2970 getNegativeCachingPolicyBuilder(int index) { 2971 return getNegativeCachingPolicyFieldBuilder().getBuilder(index); 2972 } 2973 /** 2974 * 2975 * 2976 * <pre> 2977 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 2978 * </pre> 2979 * 2980 * <code> 2981 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 2982 * </code> 2983 */ 2984 public com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicyOrBuilder getNegativeCachingPolicyOrBuilder(int index)2985 getNegativeCachingPolicyOrBuilder(int index) { 2986 if (negativeCachingPolicyBuilder_ == null) { 2987 return negativeCachingPolicy_.get(index); 2988 } else { 2989 return negativeCachingPolicyBuilder_.getMessageOrBuilder(index); 2990 } 2991 } 2992 /** 2993 * 2994 * 2995 * <pre> 2996 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 2997 * </pre> 2998 * 2999 * <code> 3000 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 3001 * </code> 3002 */ 3003 public java.util.List< 3004 ? extends 3005 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicyOrBuilder> getNegativeCachingPolicyOrBuilderList()3006 getNegativeCachingPolicyOrBuilderList() { 3007 if (negativeCachingPolicyBuilder_ != null) { 3008 return negativeCachingPolicyBuilder_.getMessageOrBuilderList(); 3009 } else { 3010 return java.util.Collections.unmodifiableList(negativeCachingPolicy_); 3011 } 3012 } 3013 /** 3014 * 3015 * 3016 * <pre> 3017 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 3018 * </pre> 3019 * 3020 * <code> 3021 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 3022 * </code> 3023 */ 3024 public com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy.Builder addNegativeCachingPolicyBuilder()3025 addNegativeCachingPolicyBuilder() { 3026 return getNegativeCachingPolicyFieldBuilder() 3027 .addBuilder( 3028 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy 3029 .getDefaultInstance()); 3030 } 3031 /** 3032 * 3033 * 3034 * <pre> 3035 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 3036 * </pre> 3037 * 3038 * <code> 3039 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 3040 * </code> 3041 */ 3042 public com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy.Builder addNegativeCachingPolicyBuilder(int index)3043 addNegativeCachingPolicyBuilder(int index) { 3044 return getNegativeCachingPolicyFieldBuilder() 3045 .addBuilder( 3046 index, 3047 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy 3048 .getDefaultInstance()); 3049 } 3050 /** 3051 * 3052 * 3053 * <pre> 3054 * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. 3055 * </pre> 3056 * 3057 * <code> 3058 * repeated .google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy negative_caching_policy = 155359996; 3059 * </code> 3060 */ 3061 public java.util.List< 3062 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy.Builder> getNegativeCachingPolicyBuilderList()3063 getNegativeCachingPolicyBuilderList() { 3064 return getNegativeCachingPolicyFieldBuilder().getBuilderList(); 3065 } 3066 3067 private com.google.protobuf.RepeatedFieldBuilderV3< 3068 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy, 3069 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy.Builder, 3070 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicyOrBuilder> getNegativeCachingPolicyFieldBuilder()3071 getNegativeCachingPolicyFieldBuilder() { 3072 if (negativeCachingPolicyBuilder_ == null) { 3073 negativeCachingPolicyBuilder_ = 3074 new com.google.protobuf.RepeatedFieldBuilderV3< 3075 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy, 3076 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy.Builder, 3077 com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicyOrBuilder>( 3078 negativeCachingPolicy_, 3079 ((bitField0_ & 0x00000080) != 0), 3080 getParentForChildren(), 3081 isClean()); 3082 negativeCachingPolicy_ = null; 3083 } 3084 return negativeCachingPolicyBuilder_; 3085 } 3086 3087 private boolean requestCoalescing_; 3088 /** 3089 * 3090 * 3091 * <pre> 3092 * If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin. 3093 * </pre> 3094 * 3095 * <code>optional bool request_coalescing = 532808276;</code> 3096 * 3097 * @return Whether the requestCoalescing field is set. 3098 */ 3099 @java.lang.Override hasRequestCoalescing()3100 public boolean hasRequestCoalescing() { 3101 return ((bitField0_ & 0x00000100) != 0); 3102 } 3103 /** 3104 * 3105 * 3106 * <pre> 3107 * If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin. 3108 * </pre> 3109 * 3110 * <code>optional bool request_coalescing = 532808276;</code> 3111 * 3112 * @return The requestCoalescing. 3113 */ 3114 @java.lang.Override getRequestCoalescing()3115 public boolean getRequestCoalescing() { 3116 return requestCoalescing_; 3117 } 3118 /** 3119 * 3120 * 3121 * <pre> 3122 * If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin. 3123 * </pre> 3124 * 3125 * <code>optional bool request_coalescing = 532808276;</code> 3126 * 3127 * @param value The requestCoalescing to set. 3128 * @return This builder for chaining. 3129 */ setRequestCoalescing(boolean value)3130 public Builder setRequestCoalescing(boolean value) { 3131 3132 requestCoalescing_ = value; 3133 bitField0_ |= 0x00000100; 3134 onChanged(); 3135 return this; 3136 } 3137 /** 3138 * 3139 * 3140 * <pre> 3141 * If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin. 3142 * </pre> 3143 * 3144 * <code>optional bool request_coalescing = 532808276;</code> 3145 * 3146 * @return This builder for chaining. 3147 */ clearRequestCoalescing()3148 public Builder clearRequestCoalescing() { 3149 bitField0_ = (bitField0_ & ~0x00000100); 3150 requestCoalescing_ = false; 3151 onChanged(); 3152 return this; 3153 } 3154 3155 private int serveWhileStale_; 3156 /** 3157 * 3158 * 3159 * <pre> 3160 * Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. This setting defines the default "max-stale" duration for any cached responses that do not specify a max-stale directive. Stale responses that exceed the TTL configured here will not be served. The default limit (max-stale) is 86400s (1 day), which will allow stale content to be served up to this limit beyond the max-age (or s-max-age) of a cached response. The maximum allowed value is 604800 (1 week). Set this to zero (0) to disable serve-while-stale. 3161 * </pre> 3162 * 3163 * <code>optional int32 serve_while_stale = 236682203;</code> 3164 * 3165 * @return Whether the serveWhileStale field is set. 3166 */ 3167 @java.lang.Override hasServeWhileStale()3168 public boolean hasServeWhileStale() { 3169 return ((bitField0_ & 0x00000200) != 0); 3170 } 3171 /** 3172 * 3173 * 3174 * <pre> 3175 * Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. This setting defines the default "max-stale" duration for any cached responses that do not specify a max-stale directive. Stale responses that exceed the TTL configured here will not be served. The default limit (max-stale) is 86400s (1 day), which will allow stale content to be served up to this limit beyond the max-age (or s-max-age) of a cached response. The maximum allowed value is 604800 (1 week). Set this to zero (0) to disable serve-while-stale. 3176 * </pre> 3177 * 3178 * <code>optional int32 serve_while_stale = 236682203;</code> 3179 * 3180 * @return The serveWhileStale. 3181 */ 3182 @java.lang.Override getServeWhileStale()3183 public int getServeWhileStale() { 3184 return serveWhileStale_; 3185 } 3186 /** 3187 * 3188 * 3189 * <pre> 3190 * Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. This setting defines the default "max-stale" duration for any cached responses that do not specify a max-stale directive. Stale responses that exceed the TTL configured here will not be served. The default limit (max-stale) is 86400s (1 day), which will allow stale content to be served up to this limit beyond the max-age (or s-max-age) of a cached response. The maximum allowed value is 604800 (1 week). Set this to zero (0) to disable serve-while-stale. 3191 * </pre> 3192 * 3193 * <code>optional int32 serve_while_stale = 236682203;</code> 3194 * 3195 * @param value The serveWhileStale to set. 3196 * @return This builder for chaining. 3197 */ setServeWhileStale(int value)3198 public Builder setServeWhileStale(int value) { 3199 3200 serveWhileStale_ = value; 3201 bitField0_ |= 0x00000200; 3202 onChanged(); 3203 return this; 3204 } 3205 /** 3206 * 3207 * 3208 * <pre> 3209 * Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. This setting defines the default "max-stale" duration for any cached responses that do not specify a max-stale directive. Stale responses that exceed the TTL configured here will not be served. The default limit (max-stale) is 86400s (1 day), which will allow stale content to be served up to this limit beyond the max-age (or s-max-age) of a cached response. The maximum allowed value is 604800 (1 week). Set this to zero (0) to disable serve-while-stale. 3210 * </pre> 3211 * 3212 * <code>optional int32 serve_while_stale = 236682203;</code> 3213 * 3214 * @return This builder for chaining. 3215 */ clearServeWhileStale()3216 public Builder clearServeWhileStale() { 3217 bitField0_ = (bitField0_ & ~0x00000200); 3218 serveWhileStale_ = 0; 3219 onChanged(); 3220 return this; 3221 } 3222 3223 private long signedUrlCacheMaxAgeSec_; 3224 /** 3225 * 3226 * 3227 * <pre> 3228 * Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. 3229 * </pre> 3230 * 3231 * <code>optional int64 signed_url_cache_max_age_sec = 269374534;</code> 3232 * 3233 * @return Whether the signedUrlCacheMaxAgeSec field is set. 3234 */ 3235 @java.lang.Override hasSignedUrlCacheMaxAgeSec()3236 public boolean hasSignedUrlCacheMaxAgeSec() { 3237 return ((bitField0_ & 0x00000400) != 0); 3238 } 3239 /** 3240 * 3241 * 3242 * <pre> 3243 * Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. 3244 * </pre> 3245 * 3246 * <code>optional int64 signed_url_cache_max_age_sec = 269374534;</code> 3247 * 3248 * @return The signedUrlCacheMaxAgeSec. 3249 */ 3250 @java.lang.Override getSignedUrlCacheMaxAgeSec()3251 public long getSignedUrlCacheMaxAgeSec() { 3252 return signedUrlCacheMaxAgeSec_; 3253 } 3254 /** 3255 * 3256 * 3257 * <pre> 3258 * Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. 3259 * </pre> 3260 * 3261 * <code>optional int64 signed_url_cache_max_age_sec = 269374534;</code> 3262 * 3263 * @param value The signedUrlCacheMaxAgeSec to set. 3264 * @return This builder for chaining. 3265 */ setSignedUrlCacheMaxAgeSec(long value)3266 public Builder setSignedUrlCacheMaxAgeSec(long value) { 3267 3268 signedUrlCacheMaxAgeSec_ = value; 3269 bitField0_ |= 0x00000400; 3270 onChanged(); 3271 return this; 3272 } 3273 /** 3274 * 3275 * 3276 * <pre> 3277 * Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. 3278 * </pre> 3279 * 3280 * <code>optional int64 signed_url_cache_max_age_sec = 269374534;</code> 3281 * 3282 * @return This builder for chaining. 3283 */ clearSignedUrlCacheMaxAgeSec()3284 public Builder clearSignedUrlCacheMaxAgeSec() { 3285 bitField0_ = (bitField0_ & ~0x00000400); 3286 signedUrlCacheMaxAgeSec_ = 0L; 3287 onChanged(); 3288 return this; 3289 } 3290 3291 private com.google.protobuf.LazyStringList signedUrlKeyNames_ = 3292 com.google.protobuf.LazyStringArrayList.EMPTY; 3293 ensureSignedUrlKeyNamesIsMutable()3294 private void ensureSignedUrlKeyNamesIsMutable() { 3295 if (!((bitField0_ & 0x00000800) != 0)) { 3296 signedUrlKeyNames_ = new com.google.protobuf.LazyStringArrayList(signedUrlKeyNames_); 3297 bitField0_ |= 0x00000800; 3298 } 3299 } 3300 /** 3301 * 3302 * 3303 * <pre> 3304 * [Output Only] Names of the keys for signing request URLs. 3305 * </pre> 3306 * 3307 * <code>repeated string signed_url_key_names = 371848885;</code> 3308 * 3309 * @return A list containing the signedUrlKeyNames. 3310 */ getSignedUrlKeyNamesList()3311 public com.google.protobuf.ProtocolStringList getSignedUrlKeyNamesList() { 3312 return signedUrlKeyNames_.getUnmodifiableView(); 3313 } 3314 /** 3315 * 3316 * 3317 * <pre> 3318 * [Output Only] Names of the keys for signing request URLs. 3319 * </pre> 3320 * 3321 * <code>repeated string signed_url_key_names = 371848885;</code> 3322 * 3323 * @return The count of signedUrlKeyNames. 3324 */ getSignedUrlKeyNamesCount()3325 public int getSignedUrlKeyNamesCount() { 3326 return signedUrlKeyNames_.size(); 3327 } 3328 /** 3329 * 3330 * 3331 * <pre> 3332 * [Output Only] Names of the keys for signing request URLs. 3333 * </pre> 3334 * 3335 * <code>repeated string signed_url_key_names = 371848885;</code> 3336 * 3337 * @param index The index of the element to return. 3338 * @return The signedUrlKeyNames at the given index. 3339 */ getSignedUrlKeyNames(int index)3340 public java.lang.String getSignedUrlKeyNames(int index) { 3341 return signedUrlKeyNames_.get(index); 3342 } 3343 /** 3344 * 3345 * 3346 * <pre> 3347 * [Output Only] Names of the keys for signing request URLs. 3348 * </pre> 3349 * 3350 * <code>repeated string signed_url_key_names = 371848885;</code> 3351 * 3352 * @param index The index of the value to return. 3353 * @return The bytes of the signedUrlKeyNames at the given index. 3354 */ getSignedUrlKeyNamesBytes(int index)3355 public com.google.protobuf.ByteString getSignedUrlKeyNamesBytes(int index) { 3356 return signedUrlKeyNames_.getByteString(index); 3357 } 3358 /** 3359 * 3360 * 3361 * <pre> 3362 * [Output Only] Names of the keys for signing request URLs. 3363 * </pre> 3364 * 3365 * <code>repeated string signed_url_key_names = 371848885;</code> 3366 * 3367 * @param index The index to set the value at. 3368 * @param value The signedUrlKeyNames to set. 3369 * @return This builder for chaining. 3370 */ setSignedUrlKeyNames(int index, java.lang.String value)3371 public Builder setSignedUrlKeyNames(int index, java.lang.String value) { 3372 if (value == null) { 3373 throw new NullPointerException(); 3374 } 3375 ensureSignedUrlKeyNamesIsMutable(); 3376 signedUrlKeyNames_.set(index, value); 3377 onChanged(); 3378 return this; 3379 } 3380 /** 3381 * 3382 * 3383 * <pre> 3384 * [Output Only] Names of the keys for signing request URLs. 3385 * </pre> 3386 * 3387 * <code>repeated string signed_url_key_names = 371848885;</code> 3388 * 3389 * @param value The signedUrlKeyNames to add. 3390 * @return This builder for chaining. 3391 */ addSignedUrlKeyNames(java.lang.String value)3392 public Builder addSignedUrlKeyNames(java.lang.String value) { 3393 if (value == null) { 3394 throw new NullPointerException(); 3395 } 3396 ensureSignedUrlKeyNamesIsMutable(); 3397 signedUrlKeyNames_.add(value); 3398 onChanged(); 3399 return this; 3400 } 3401 /** 3402 * 3403 * 3404 * <pre> 3405 * [Output Only] Names of the keys for signing request URLs. 3406 * </pre> 3407 * 3408 * <code>repeated string signed_url_key_names = 371848885;</code> 3409 * 3410 * @param values The signedUrlKeyNames to add. 3411 * @return This builder for chaining. 3412 */ addAllSignedUrlKeyNames(java.lang.Iterable<java.lang.String> values)3413 public Builder addAllSignedUrlKeyNames(java.lang.Iterable<java.lang.String> values) { 3414 ensureSignedUrlKeyNamesIsMutable(); 3415 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, signedUrlKeyNames_); 3416 onChanged(); 3417 return this; 3418 } 3419 /** 3420 * 3421 * 3422 * <pre> 3423 * [Output Only] Names of the keys for signing request URLs. 3424 * </pre> 3425 * 3426 * <code>repeated string signed_url_key_names = 371848885;</code> 3427 * 3428 * @return This builder for chaining. 3429 */ clearSignedUrlKeyNames()3430 public Builder clearSignedUrlKeyNames() { 3431 signedUrlKeyNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; 3432 bitField0_ = (bitField0_ & ~0x00000800); 3433 onChanged(); 3434 return this; 3435 } 3436 /** 3437 * 3438 * 3439 * <pre> 3440 * [Output Only] Names of the keys for signing request URLs. 3441 * </pre> 3442 * 3443 * <code>repeated string signed_url_key_names = 371848885;</code> 3444 * 3445 * @param value The bytes of the signedUrlKeyNames to add. 3446 * @return This builder for chaining. 3447 */ addSignedUrlKeyNamesBytes(com.google.protobuf.ByteString value)3448 public Builder addSignedUrlKeyNamesBytes(com.google.protobuf.ByteString value) { 3449 if (value == null) { 3450 throw new NullPointerException(); 3451 } 3452 checkByteStringIsUtf8(value); 3453 ensureSignedUrlKeyNamesIsMutable(); 3454 signedUrlKeyNames_.add(value); 3455 onChanged(); 3456 return this; 3457 } 3458 3459 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3460 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 3461 return super.setUnknownFields(unknownFields); 3462 } 3463 3464 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3465 public final Builder mergeUnknownFields( 3466 final com.google.protobuf.UnknownFieldSet unknownFields) { 3467 return super.mergeUnknownFields(unknownFields); 3468 } 3469 3470 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.BackendBucketCdnPolicy) 3471 } 3472 3473 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.BackendBucketCdnPolicy) 3474 private static final com.google.cloud.compute.v1.BackendBucketCdnPolicy DEFAULT_INSTANCE; 3475 3476 static { 3477 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.BackendBucketCdnPolicy(); 3478 } 3479 getDefaultInstance()3480 public static com.google.cloud.compute.v1.BackendBucketCdnPolicy getDefaultInstance() { 3481 return DEFAULT_INSTANCE; 3482 } 3483 3484 private static final com.google.protobuf.Parser<BackendBucketCdnPolicy> PARSER = 3485 new com.google.protobuf.AbstractParser<BackendBucketCdnPolicy>() { 3486 @java.lang.Override 3487 public BackendBucketCdnPolicy parsePartialFrom( 3488 com.google.protobuf.CodedInputStream input, 3489 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3490 throws com.google.protobuf.InvalidProtocolBufferException { 3491 Builder builder = newBuilder(); 3492 try { 3493 builder.mergeFrom(input, extensionRegistry); 3494 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 3495 throw e.setUnfinishedMessage(builder.buildPartial()); 3496 } catch (com.google.protobuf.UninitializedMessageException e) { 3497 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 3498 } catch (java.io.IOException e) { 3499 throw new com.google.protobuf.InvalidProtocolBufferException(e) 3500 .setUnfinishedMessage(builder.buildPartial()); 3501 } 3502 return builder.buildPartial(); 3503 } 3504 }; 3505 parser()3506 public static com.google.protobuf.Parser<BackendBucketCdnPolicy> parser() { 3507 return PARSER; 3508 } 3509 3510 @java.lang.Override getParserForType()3511 public com.google.protobuf.Parser<BackendBucketCdnPolicy> getParserForType() { 3512 return PARSER; 3513 } 3514 3515 @java.lang.Override getDefaultInstanceForType()3516 public com.google.cloud.compute.v1.BackendBucketCdnPolicy getDefaultInstanceForType() { 3517 return DEFAULT_INSTANCE; 3518 } 3519 } 3520