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 * Represents a Firewall Policy resource. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.compute.v1.FirewallPolicy} 29 */ 30 public final class FirewallPolicy extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.FirewallPolicy) 33 FirewallPolicyOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use FirewallPolicy.newBuilder() to construct. FirewallPolicy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private FirewallPolicy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 FirewallPolicy()40 private FirewallPolicy() { 41 associations_ = java.util.Collections.emptyList(); 42 creationTimestamp_ = ""; 43 description_ = ""; 44 displayName_ = ""; 45 fingerprint_ = ""; 46 kind_ = ""; 47 name_ = ""; 48 parent_ = ""; 49 region_ = ""; 50 rules_ = java.util.Collections.emptyList(); 51 selfLink_ = ""; 52 selfLinkWithId_ = ""; 53 shortName_ = ""; 54 } 55 56 @java.lang.Override 57 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)58 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 59 return new FirewallPolicy(); 60 } 61 62 @java.lang.Override getUnknownFields()63 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 64 return this.unknownFields; 65 } 66 getDescriptor()67 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 68 return com.google.cloud.compute.v1.Compute 69 .internal_static_google_cloud_compute_v1_FirewallPolicy_descriptor; 70 } 71 72 @java.lang.Override 73 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()74 internalGetFieldAccessorTable() { 75 return com.google.cloud.compute.v1.Compute 76 .internal_static_google_cloud_compute_v1_FirewallPolicy_fieldAccessorTable 77 .ensureFieldAccessorsInitialized( 78 com.google.cloud.compute.v1.FirewallPolicy.class, 79 com.google.cloud.compute.v1.FirewallPolicy.Builder.class); 80 } 81 82 private int bitField0_; 83 public static final int ASSOCIATIONS_FIELD_NUMBER = 508736530; 84 85 @SuppressWarnings("serial") 86 private java.util.List<com.google.cloud.compute.v1.FirewallPolicyAssociation> associations_; 87 /** 88 * 89 * 90 * <pre> 91 * A list of associations that belong to this firewall policy. 92 * </pre> 93 * 94 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 95 * </code> 96 */ 97 @java.lang.Override 98 public java.util.List<com.google.cloud.compute.v1.FirewallPolicyAssociation> getAssociationsList()99 getAssociationsList() { 100 return associations_; 101 } 102 /** 103 * 104 * 105 * <pre> 106 * A list of associations that belong to this firewall policy. 107 * </pre> 108 * 109 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 110 * </code> 111 */ 112 @java.lang.Override 113 public java.util.List<? extends com.google.cloud.compute.v1.FirewallPolicyAssociationOrBuilder> getAssociationsOrBuilderList()114 getAssociationsOrBuilderList() { 115 return associations_; 116 } 117 /** 118 * 119 * 120 * <pre> 121 * A list of associations that belong to this firewall policy. 122 * </pre> 123 * 124 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 125 * </code> 126 */ 127 @java.lang.Override getAssociationsCount()128 public int getAssociationsCount() { 129 return associations_.size(); 130 } 131 /** 132 * 133 * 134 * <pre> 135 * A list of associations that belong to this firewall policy. 136 * </pre> 137 * 138 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 139 * </code> 140 */ 141 @java.lang.Override getAssociations(int index)142 public com.google.cloud.compute.v1.FirewallPolicyAssociation getAssociations(int index) { 143 return associations_.get(index); 144 } 145 /** 146 * 147 * 148 * <pre> 149 * A list of associations that belong to this firewall policy. 150 * </pre> 151 * 152 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 153 * </code> 154 */ 155 @java.lang.Override getAssociationsOrBuilder( int index)156 public com.google.cloud.compute.v1.FirewallPolicyAssociationOrBuilder getAssociationsOrBuilder( 157 int index) { 158 return associations_.get(index); 159 } 160 161 public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 30525366; 162 163 @SuppressWarnings("serial") 164 private volatile java.lang.Object creationTimestamp_ = ""; 165 /** 166 * 167 * 168 * <pre> 169 * [Output Only] Creation timestamp in RFC3339 text format. 170 * </pre> 171 * 172 * <code>optional string creation_timestamp = 30525366;</code> 173 * 174 * @return Whether the creationTimestamp field is set. 175 */ 176 @java.lang.Override hasCreationTimestamp()177 public boolean hasCreationTimestamp() { 178 return ((bitField0_ & 0x00000001) != 0); 179 } 180 /** 181 * 182 * 183 * <pre> 184 * [Output Only] Creation timestamp in RFC3339 text format. 185 * </pre> 186 * 187 * <code>optional string creation_timestamp = 30525366;</code> 188 * 189 * @return The creationTimestamp. 190 */ 191 @java.lang.Override getCreationTimestamp()192 public java.lang.String getCreationTimestamp() { 193 java.lang.Object ref = creationTimestamp_; 194 if (ref instanceof java.lang.String) { 195 return (java.lang.String) ref; 196 } else { 197 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 198 java.lang.String s = bs.toStringUtf8(); 199 creationTimestamp_ = s; 200 return s; 201 } 202 } 203 /** 204 * 205 * 206 * <pre> 207 * [Output Only] Creation timestamp in RFC3339 text format. 208 * </pre> 209 * 210 * <code>optional string creation_timestamp = 30525366;</code> 211 * 212 * @return The bytes for creationTimestamp. 213 */ 214 @java.lang.Override getCreationTimestampBytes()215 public com.google.protobuf.ByteString getCreationTimestampBytes() { 216 java.lang.Object ref = creationTimestamp_; 217 if (ref instanceof java.lang.String) { 218 com.google.protobuf.ByteString b = 219 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 220 creationTimestamp_ = b; 221 return b; 222 } else { 223 return (com.google.protobuf.ByteString) ref; 224 } 225 } 226 227 public static final int DESCRIPTION_FIELD_NUMBER = 422937596; 228 229 @SuppressWarnings("serial") 230 private volatile java.lang.Object description_ = ""; 231 /** 232 * 233 * 234 * <pre> 235 * An optional description of this resource. Provide this property when you create the resource. 236 * </pre> 237 * 238 * <code>optional string description = 422937596;</code> 239 * 240 * @return Whether the description field is set. 241 */ 242 @java.lang.Override hasDescription()243 public boolean hasDescription() { 244 return ((bitField0_ & 0x00000002) != 0); 245 } 246 /** 247 * 248 * 249 * <pre> 250 * An optional description of this resource. Provide this property when you create the resource. 251 * </pre> 252 * 253 * <code>optional string description = 422937596;</code> 254 * 255 * @return The description. 256 */ 257 @java.lang.Override getDescription()258 public java.lang.String getDescription() { 259 java.lang.Object ref = description_; 260 if (ref instanceof java.lang.String) { 261 return (java.lang.String) ref; 262 } else { 263 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 264 java.lang.String s = bs.toStringUtf8(); 265 description_ = s; 266 return s; 267 } 268 } 269 /** 270 * 271 * 272 * <pre> 273 * An optional description of this resource. Provide this property when you create the resource. 274 * </pre> 275 * 276 * <code>optional string description = 422937596;</code> 277 * 278 * @return The bytes for description. 279 */ 280 @java.lang.Override getDescriptionBytes()281 public com.google.protobuf.ByteString getDescriptionBytes() { 282 java.lang.Object ref = description_; 283 if (ref instanceof java.lang.String) { 284 com.google.protobuf.ByteString b = 285 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 286 description_ = b; 287 return b; 288 } else { 289 return (com.google.protobuf.ByteString) ref; 290 } 291 } 292 293 public static final int DISPLAY_NAME_FIELD_NUMBER = 4473832; 294 295 @SuppressWarnings("serial") 296 private volatile java.lang.Object displayName_ = ""; 297 /** 298 * 299 * 300 * <pre> 301 * Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 302 * </pre> 303 * 304 * <code>optional string display_name = 4473832;</code> 305 * 306 * @return Whether the displayName field is set. 307 */ 308 @java.lang.Override hasDisplayName()309 public boolean hasDisplayName() { 310 return ((bitField0_ & 0x00000004) != 0); 311 } 312 /** 313 * 314 * 315 * <pre> 316 * Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 317 * </pre> 318 * 319 * <code>optional string display_name = 4473832;</code> 320 * 321 * @return The displayName. 322 */ 323 @java.lang.Override getDisplayName()324 public java.lang.String getDisplayName() { 325 java.lang.Object ref = displayName_; 326 if (ref instanceof java.lang.String) { 327 return (java.lang.String) ref; 328 } else { 329 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 330 java.lang.String s = bs.toStringUtf8(); 331 displayName_ = s; 332 return s; 333 } 334 } 335 /** 336 * 337 * 338 * <pre> 339 * Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 340 * </pre> 341 * 342 * <code>optional string display_name = 4473832;</code> 343 * 344 * @return The bytes for displayName. 345 */ 346 @java.lang.Override getDisplayNameBytes()347 public com.google.protobuf.ByteString getDisplayNameBytes() { 348 java.lang.Object ref = displayName_; 349 if (ref instanceof java.lang.String) { 350 com.google.protobuf.ByteString b = 351 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 352 displayName_ = b; 353 return b; 354 } else { 355 return (com.google.protobuf.ByteString) ref; 356 } 357 } 358 359 public static final int FINGERPRINT_FIELD_NUMBER = 234678500; 360 361 @SuppressWarnings("serial") 362 private volatile java.lang.Object fingerprint_ = ""; 363 /** 364 * 365 * 366 * <pre> 367 * Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy. 368 * </pre> 369 * 370 * <code>optional string fingerprint = 234678500;</code> 371 * 372 * @return Whether the fingerprint field is set. 373 */ 374 @java.lang.Override hasFingerprint()375 public boolean hasFingerprint() { 376 return ((bitField0_ & 0x00000008) != 0); 377 } 378 /** 379 * 380 * 381 * <pre> 382 * Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy. 383 * </pre> 384 * 385 * <code>optional string fingerprint = 234678500;</code> 386 * 387 * @return The fingerprint. 388 */ 389 @java.lang.Override getFingerprint()390 public java.lang.String getFingerprint() { 391 java.lang.Object ref = fingerprint_; 392 if (ref instanceof java.lang.String) { 393 return (java.lang.String) ref; 394 } else { 395 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 396 java.lang.String s = bs.toStringUtf8(); 397 fingerprint_ = s; 398 return s; 399 } 400 } 401 /** 402 * 403 * 404 * <pre> 405 * Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy. 406 * </pre> 407 * 408 * <code>optional string fingerprint = 234678500;</code> 409 * 410 * @return The bytes for fingerprint. 411 */ 412 @java.lang.Override getFingerprintBytes()413 public com.google.protobuf.ByteString getFingerprintBytes() { 414 java.lang.Object ref = fingerprint_; 415 if (ref instanceof java.lang.String) { 416 com.google.protobuf.ByteString b = 417 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 418 fingerprint_ = b; 419 return b; 420 } else { 421 return (com.google.protobuf.ByteString) ref; 422 } 423 } 424 425 public static final int ID_FIELD_NUMBER = 3355; 426 private long id_ = 0L; 427 /** 428 * 429 * 430 * <pre> 431 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 432 * </pre> 433 * 434 * <code>optional uint64 id = 3355;</code> 435 * 436 * @return Whether the id field is set. 437 */ 438 @java.lang.Override hasId()439 public boolean hasId() { 440 return ((bitField0_ & 0x00000010) != 0); 441 } 442 /** 443 * 444 * 445 * <pre> 446 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 447 * </pre> 448 * 449 * <code>optional uint64 id = 3355;</code> 450 * 451 * @return The id. 452 */ 453 @java.lang.Override getId()454 public long getId() { 455 return id_; 456 } 457 458 public static final int KIND_FIELD_NUMBER = 3292052; 459 460 @SuppressWarnings("serial") 461 private volatile java.lang.Object kind_ = ""; 462 /** 463 * 464 * 465 * <pre> 466 * [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies 467 * </pre> 468 * 469 * <code>optional string kind = 3292052;</code> 470 * 471 * @return Whether the kind field is set. 472 */ 473 @java.lang.Override hasKind()474 public boolean hasKind() { 475 return ((bitField0_ & 0x00000020) != 0); 476 } 477 /** 478 * 479 * 480 * <pre> 481 * [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies 482 * </pre> 483 * 484 * <code>optional string kind = 3292052;</code> 485 * 486 * @return The kind. 487 */ 488 @java.lang.Override getKind()489 public java.lang.String getKind() { 490 java.lang.Object ref = kind_; 491 if (ref instanceof java.lang.String) { 492 return (java.lang.String) ref; 493 } else { 494 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 495 java.lang.String s = bs.toStringUtf8(); 496 kind_ = s; 497 return s; 498 } 499 } 500 /** 501 * 502 * 503 * <pre> 504 * [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies 505 * </pre> 506 * 507 * <code>optional string kind = 3292052;</code> 508 * 509 * @return The bytes for kind. 510 */ 511 @java.lang.Override getKindBytes()512 public com.google.protobuf.ByteString getKindBytes() { 513 java.lang.Object ref = kind_; 514 if (ref instanceof java.lang.String) { 515 com.google.protobuf.ByteString b = 516 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 517 kind_ = b; 518 return b; 519 } else { 520 return (com.google.protobuf.ByteString) ref; 521 } 522 } 523 524 public static final int NAME_FIELD_NUMBER = 3373707; 525 526 @SuppressWarnings("serial") 527 private volatile java.lang.Object name_ = ""; 528 /** 529 * 530 * 531 * <pre> 532 * Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy. 533 * </pre> 534 * 535 * <code>optional string name = 3373707;</code> 536 * 537 * @return Whether the name field is set. 538 */ 539 @java.lang.Override hasName()540 public boolean hasName() { 541 return ((bitField0_ & 0x00000040) != 0); 542 } 543 /** 544 * 545 * 546 * <pre> 547 * Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy. 548 * </pre> 549 * 550 * <code>optional string name = 3373707;</code> 551 * 552 * @return The name. 553 */ 554 @java.lang.Override getName()555 public java.lang.String getName() { 556 java.lang.Object ref = name_; 557 if (ref instanceof java.lang.String) { 558 return (java.lang.String) ref; 559 } else { 560 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 561 java.lang.String s = bs.toStringUtf8(); 562 name_ = s; 563 return s; 564 } 565 } 566 /** 567 * 568 * 569 * <pre> 570 * Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy. 571 * </pre> 572 * 573 * <code>optional string name = 3373707;</code> 574 * 575 * @return The bytes for name. 576 */ 577 @java.lang.Override getNameBytes()578 public com.google.protobuf.ByteString getNameBytes() { 579 java.lang.Object ref = name_; 580 if (ref instanceof java.lang.String) { 581 com.google.protobuf.ByteString b = 582 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 583 name_ = b; 584 return b; 585 } else { 586 return (com.google.protobuf.ByteString) ref; 587 } 588 } 589 590 public static final int PARENT_FIELD_NUMBER = 78317738; 591 592 @SuppressWarnings("serial") 593 private volatile java.lang.Object parent_ = ""; 594 /** 595 * 596 * 597 * <pre> 598 * [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies. 599 * </pre> 600 * 601 * <code>optional string parent = 78317738;</code> 602 * 603 * @return Whether the parent field is set. 604 */ 605 @java.lang.Override hasParent()606 public boolean hasParent() { 607 return ((bitField0_ & 0x00000080) != 0); 608 } 609 /** 610 * 611 * 612 * <pre> 613 * [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies. 614 * </pre> 615 * 616 * <code>optional string parent = 78317738;</code> 617 * 618 * @return The parent. 619 */ 620 @java.lang.Override getParent()621 public java.lang.String getParent() { 622 java.lang.Object ref = parent_; 623 if (ref instanceof java.lang.String) { 624 return (java.lang.String) ref; 625 } else { 626 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 627 java.lang.String s = bs.toStringUtf8(); 628 parent_ = s; 629 return s; 630 } 631 } 632 /** 633 * 634 * 635 * <pre> 636 * [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies. 637 * </pre> 638 * 639 * <code>optional string parent = 78317738;</code> 640 * 641 * @return The bytes for parent. 642 */ 643 @java.lang.Override getParentBytes()644 public com.google.protobuf.ByteString getParentBytes() { 645 java.lang.Object ref = parent_; 646 if (ref instanceof java.lang.String) { 647 com.google.protobuf.ByteString b = 648 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 649 parent_ = b; 650 return b; 651 } else { 652 return (com.google.protobuf.ByteString) ref; 653 } 654 } 655 656 public static final int REGION_FIELD_NUMBER = 138946292; 657 658 @SuppressWarnings("serial") 659 private volatile java.lang.Object region_ = ""; 660 /** 661 * 662 * 663 * <pre> 664 * [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. 665 * </pre> 666 * 667 * <code>optional string region = 138946292;</code> 668 * 669 * @return Whether the region field is set. 670 */ 671 @java.lang.Override hasRegion()672 public boolean hasRegion() { 673 return ((bitField0_ & 0x00000100) != 0); 674 } 675 /** 676 * 677 * 678 * <pre> 679 * [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. 680 * </pre> 681 * 682 * <code>optional string region = 138946292;</code> 683 * 684 * @return The region. 685 */ 686 @java.lang.Override getRegion()687 public java.lang.String getRegion() { 688 java.lang.Object ref = region_; 689 if (ref instanceof java.lang.String) { 690 return (java.lang.String) ref; 691 } else { 692 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 693 java.lang.String s = bs.toStringUtf8(); 694 region_ = s; 695 return s; 696 } 697 } 698 /** 699 * 700 * 701 * <pre> 702 * [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. 703 * </pre> 704 * 705 * <code>optional string region = 138946292;</code> 706 * 707 * @return The bytes for region. 708 */ 709 @java.lang.Override getRegionBytes()710 public com.google.protobuf.ByteString getRegionBytes() { 711 java.lang.Object ref = region_; 712 if (ref instanceof java.lang.String) { 713 com.google.protobuf.ByteString b = 714 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 715 region_ = b; 716 return b; 717 } else { 718 return (com.google.protobuf.ByteString) ref; 719 } 720 } 721 722 public static final int RULE_TUPLE_COUNT_FIELD_NUMBER = 388342037; 723 private int ruleTupleCount_ = 0; 724 /** 725 * 726 * 727 * <pre> 728 * [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples. 729 * </pre> 730 * 731 * <code>optional int32 rule_tuple_count = 388342037;</code> 732 * 733 * @return Whether the ruleTupleCount field is set. 734 */ 735 @java.lang.Override hasRuleTupleCount()736 public boolean hasRuleTupleCount() { 737 return ((bitField0_ & 0x00000200) != 0); 738 } 739 /** 740 * 741 * 742 * <pre> 743 * [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples. 744 * </pre> 745 * 746 * <code>optional int32 rule_tuple_count = 388342037;</code> 747 * 748 * @return The ruleTupleCount. 749 */ 750 @java.lang.Override getRuleTupleCount()751 public int getRuleTupleCount() { 752 return ruleTupleCount_; 753 } 754 755 public static final int RULES_FIELD_NUMBER = 108873975; 756 757 @SuppressWarnings("serial") 758 private java.util.List<com.google.cloud.compute.v1.FirewallPolicyRule> rules_; 759 /** 760 * 761 * 762 * <pre> 763 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 764 * </pre> 765 * 766 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 767 */ 768 @java.lang.Override getRulesList()769 public java.util.List<com.google.cloud.compute.v1.FirewallPolicyRule> getRulesList() { 770 return rules_; 771 } 772 /** 773 * 774 * 775 * <pre> 776 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 777 * </pre> 778 * 779 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 780 */ 781 @java.lang.Override 782 public java.util.List<? extends com.google.cloud.compute.v1.FirewallPolicyRuleOrBuilder> getRulesOrBuilderList()783 getRulesOrBuilderList() { 784 return rules_; 785 } 786 /** 787 * 788 * 789 * <pre> 790 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 791 * </pre> 792 * 793 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 794 */ 795 @java.lang.Override getRulesCount()796 public int getRulesCount() { 797 return rules_.size(); 798 } 799 /** 800 * 801 * 802 * <pre> 803 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 804 * </pre> 805 * 806 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 807 */ 808 @java.lang.Override getRules(int index)809 public com.google.cloud.compute.v1.FirewallPolicyRule getRules(int index) { 810 return rules_.get(index); 811 } 812 /** 813 * 814 * 815 * <pre> 816 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 817 * </pre> 818 * 819 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 820 */ 821 @java.lang.Override getRulesOrBuilder(int index)822 public com.google.cloud.compute.v1.FirewallPolicyRuleOrBuilder getRulesOrBuilder(int index) { 823 return rules_.get(index); 824 } 825 826 public static final int SELF_LINK_FIELD_NUMBER = 456214797; 827 828 @SuppressWarnings("serial") 829 private volatile java.lang.Object selfLink_ = ""; 830 /** 831 * 832 * 833 * <pre> 834 * [Output Only] Server-defined URL for the resource. 835 * </pre> 836 * 837 * <code>optional string self_link = 456214797;</code> 838 * 839 * @return Whether the selfLink field is set. 840 */ 841 @java.lang.Override hasSelfLink()842 public boolean hasSelfLink() { 843 return ((bitField0_ & 0x00000400) != 0); 844 } 845 /** 846 * 847 * 848 * <pre> 849 * [Output Only] Server-defined URL for the resource. 850 * </pre> 851 * 852 * <code>optional string self_link = 456214797;</code> 853 * 854 * @return The selfLink. 855 */ 856 @java.lang.Override getSelfLink()857 public java.lang.String getSelfLink() { 858 java.lang.Object ref = selfLink_; 859 if (ref instanceof java.lang.String) { 860 return (java.lang.String) ref; 861 } else { 862 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 863 java.lang.String s = bs.toStringUtf8(); 864 selfLink_ = s; 865 return s; 866 } 867 } 868 /** 869 * 870 * 871 * <pre> 872 * [Output Only] Server-defined URL for the resource. 873 * </pre> 874 * 875 * <code>optional string self_link = 456214797;</code> 876 * 877 * @return The bytes for selfLink. 878 */ 879 @java.lang.Override getSelfLinkBytes()880 public com.google.protobuf.ByteString getSelfLinkBytes() { 881 java.lang.Object ref = selfLink_; 882 if (ref instanceof java.lang.String) { 883 com.google.protobuf.ByteString b = 884 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 885 selfLink_ = b; 886 return b; 887 } else { 888 return (com.google.protobuf.ByteString) ref; 889 } 890 } 891 892 public static final int SELF_LINK_WITH_ID_FIELD_NUMBER = 44520962; 893 894 @SuppressWarnings("serial") 895 private volatile java.lang.Object selfLinkWithId_ = ""; 896 /** 897 * 898 * 899 * <pre> 900 * [Output Only] Server-defined URL for this resource with the resource id. 901 * </pre> 902 * 903 * <code>optional string self_link_with_id = 44520962;</code> 904 * 905 * @return Whether the selfLinkWithId field is set. 906 */ 907 @java.lang.Override hasSelfLinkWithId()908 public boolean hasSelfLinkWithId() { 909 return ((bitField0_ & 0x00000800) != 0); 910 } 911 /** 912 * 913 * 914 * <pre> 915 * [Output Only] Server-defined URL for this resource with the resource id. 916 * </pre> 917 * 918 * <code>optional string self_link_with_id = 44520962;</code> 919 * 920 * @return The selfLinkWithId. 921 */ 922 @java.lang.Override getSelfLinkWithId()923 public java.lang.String getSelfLinkWithId() { 924 java.lang.Object ref = selfLinkWithId_; 925 if (ref instanceof java.lang.String) { 926 return (java.lang.String) ref; 927 } else { 928 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 929 java.lang.String s = bs.toStringUtf8(); 930 selfLinkWithId_ = s; 931 return s; 932 } 933 } 934 /** 935 * 936 * 937 * <pre> 938 * [Output Only] Server-defined URL for this resource with the resource id. 939 * </pre> 940 * 941 * <code>optional string self_link_with_id = 44520962;</code> 942 * 943 * @return The bytes for selfLinkWithId. 944 */ 945 @java.lang.Override getSelfLinkWithIdBytes()946 public com.google.protobuf.ByteString getSelfLinkWithIdBytes() { 947 java.lang.Object ref = selfLinkWithId_; 948 if (ref instanceof java.lang.String) { 949 com.google.protobuf.ByteString b = 950 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 951 selfLinkWithId_ = b; 952 return b; 953 } else { 954 return (com.google.protobuf.ByteString) ref; 955 } 956 } 957 958 public static final int SHORT_NAME_FIELD_NUMBER = 492051566; 959 960 @SuppressWarnings("serial") 961 private volatile java.lang.Object shortName_ = ""; 962 /** 963 * 964 * 965 * <pre> 966 * User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 967 * </pre> 968 * 969 * <code>optional string short_name = 492051566;</code> 970 * 971 * @return Whether the shortName field is set. 972 */ 973 @java.lang.Override hasShortName()974 public boolean hasShortName() { 975 return ((bitField0_ & 0x00001000) != 0); 976 } 977 /** 978 * 979 * 980 * <pre> 981 * User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 982 * </pre> 983 * 984 * <code>optional string short_name = 492051566;</code> 985 * 986 * @return The shortName. 987 */ 988 @java.lang.Override getShortName()989 public java.lang.String getShortName() { 990 java.lang.Object ref = shortName_; 991 if (ref instanceof java.lang.String) { 992 return (java.lang.String) ref; 993 } else { 994 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 995 java.lang.String s = bs.toStringUtf8(); 996 shortName_ = s; 997 return s; 998 } 999 } 1000 /** 1001 * 1002 * 1003 * <pre> 1004 * User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 1005 * </pre> 1006 * 1007 * <code>optional string short_name = 492051566;</code> 1008 * 1009 * @return The bytes for shortName. 1010 */ 1011 @java.lang.Override getShortNameBytes()1012 public com.google.protobuf.ByteString getShortNameBytes() { 1013 java.lang.Object ref = shortName_; 1014 if (ref instanceof java.lang.String) { 1015 com.google.protobuf.ByteString b = 1016 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1017 shortName_ = b; 1018 return b; 1019 } else { 1020 return (com.google.protobuf.ByteString) ref; 1021 } 1022 } 1023 1024 private byte memoizedIsInitialized = -1; 1025 1026 @java.lang.Override isInitialized()1027 public final boolean isInitialized() { 1028 byte isInitialized = memoizedIsInitialized; 1029 if (isInitialized == 1) return true; 1030 if (isInitialized == 0) return false; 1031 1032 memoizedIsInitialized = 1; 1033 return true; 1034 } 1035 1036 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)1037 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 1038 if (((bitField0_ & 0x00000010) != 0)) { 1039 output.writeUInt64(3355, id_); 1040 } 1041 if (((bitField0_ & 0x00000020) != 0)) { 1042 com.google.protobuf.GeneratedMessageV3.writeString(output, 3292052, kind_); 1043 } 1044 if (((bitField0_ & 0x00000040) != 0)) { 1045 com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_); 1046 } 1047 if (((bitField0_ & 0x00000004) != 0)) { 1048 com.google.protobuf.GeneratedMessageV3.writeString(output, 4473832, displayName_); 1049 } 1050 if (((bitField0_ & 0x00000001) != 0)) { 1051 com.google.protobuf.GeneratedMessageV3.writeString(output, 30525366, creationTimestamp_); 1052 } 1053 if (((bitField0_ & 0x00000800) != 0)) { 1054 com.google.protobuf.GeneratedMessageV3.writeString(output, 44520962, selfLinkWithId_); 1055 } 1056 if (((bitField0_ & 0x00000080) != 0)) { 1057 com.google.protobuf.GeneratedMessageV3.writeString(output, 78317738, parent_); 1058 } 1059 for (int i = 0; i < rules_.size(); i++) { 1060 output.writeMessage(108873975, rules_.get(i)); 1061 } 1062 if (((bitField0_ & 0x00000100) != 0)) { 1063 com.google.protobuf.GeneratedMessageV3.writeString(output, 138946292, region_); 1064 } 1065 if (((bitField0_ & 0x00000008) != 0)) { 1066 com.google.protobuf.GeneratedMessageV3.writeString(output, 234678500, fingerprint_); 1067 } 1068 if (((bitField0_ & 0x00000200) != 0)) { 1069 output.writeInt32(388342037, ruleTupleCount_); 1070 } 1071 if (((bitField0_ & 0x00000002) != 0)) { 1072 com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); 1073 } 1074 if (((bitField0_ & 0x00000400) != 0)) { 1075 com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); 1076 } 1077 if (((bitField0_ & 0x00001000) != 0)) { 1078 com.google.protobuf.GeneratedMessageV3.writeString(output, 492051566, shortName_); 1079 } 1080 for (int i = 0; i < associations_.size(); i++) { 1081 output.writeMessage(508736530, associations_.get(i)); 1082 } 1083 getUnknownFields().writeTo(output); 1084 } 1085 1086 @java.lang.Override getSerializedSize()1087 public int getSerializedSize() { 1088 int size = memoizedSize; 1089 if (size != -1) return size; 1090 1091 size = 0; 1092 if (((bitField0_ & 0x00000010) != 0)) { 1093 size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3355, id_); 1094 } 1095 if (((bitField0_ & 0x00000020) != 0)) { 1096 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3292052, kind_); 1097 } 1098 if (((bitField0_ & 0x00000040) != 0)) { 1099 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_); 1100 } 1101 if (((bitField0_ & 0x00000004) != 0)) { 1102 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4473832, displayName_); 1103 } 1104 if (((bitField0_ & 0x00000001) != 0)) { 1105 size += 1106 com.google.protobuf.GeneratedMessageV3.computeStringSize(30525366, creationTimestamp_); 1107 } 1108 if (((bitField0_ & 0x00000800) != 0)) { 1109 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(44520962, selfLinkWithId_); 1110 } 1111 if (((bitField0_ & 0x00000080) != 0)) { 1112 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(78317738, parent_); 1113 } 1114 for (int i = 0; i < rules_.size(); i++) { 1115 size += com.google.protobuf.CodedOutputStream.computeMessageSize(108873975, rules_.get(i)); 1116 } 1117 if (((bitField0_ & 0x00000100) != 0)) { 1118 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(138946292, region_); 1119 } 1120 if (((bitField0_ & 0x00000008) != 0)) { 1121 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(234678500, fingerprint_); 1122 } 1123 if (((bitField0_ & 0x00000200) != 0)) { 1124 size += com.google.protobuf.CodedOutputStream.computeInt32Size(388342037, ruleTupleCount_); 1125 } 1126 if (((bitField0_ & 0x00000002) != 0)) { 1127 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); 1128 } 1129 if (((bitField0_ & 0x00000400) != 0)) { 1130 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); 1131 } 1132 if (((bitField0_ & 0x00001000) != 0)) { 1133 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(492051566, shortName_); 1134 } 1135 for (int i = 0; i < associations_.size(); i++) { 1136 size += 1137 com.google.protobuf.CodedOutputStream.computeMessageSize(508736530, associations_.get(i)); 1138 } 1139 size += getUnknownFields().getSerializedSize(); 1140 memoizedSize = size; 1141 return size; 1142 } 1143 1144 @java.lang.Override equals(final java.lang.Object obj)1145 public boolean equals(final java.lang.Object obj) { 1146 if (obj == this) { 1147 return true; 1148 } 1149 if (!(obj instanceof com.google.cloud.compute.v1.FirewallPolicy)) { 1150 return super.equals(obj); 1151 } 1152 com.google.cloud.compute.v1.FirewallPolicy other = 1153 (com.google.cloud.compute.v1.FirewallPolicy) obj; 1154 1155 if (!getAssociationsList().equals(other.getAssociationsList())) return false; 1156 if (hasCreationTimestamp() != other.hasCreationTimestamp()) return false; 1157 if (hasCreationTimestamp()) { 1158 if (!getCreationTimestamp().equals(other.getCreationTimestamp())) return false; 1159 } 1160 if (hasDescription() != other.hasDescription()) return false; 1161 if (hasDescription()) { 1162 if (!getDescription().equals(other.getDescription())) return false; 1163 } 1164 if (hasDisplayName() != other.hasDisplayName()) return false; 1165 if (hasDisplayName()) { 1166 if (!getDisplayName().equals(other.getDisplayName())) return false; 1167 } 1168 if (hasFingerprint() != other.hasFingerprint()) return false; 1169 if (hasFingerprint()) { 1170 if (!getFingerprint().equals(other.getFingerprint())) return false; 1171 } 1172 if (hasId() != other.hasId()) return false; 1173 if (hasId()) { 1174 if (getId() != other.getId()) return false; 1175 } 1176 if (hasKind() != other.hasKind()) return false; 1177 if (hasKind()) { 1178 if (!getKind().equals(other.getKind())) return false; 1179 } 1180 if (hasName() != other.hasName()) return false; 1181 if (hasName()) { 1182 if (!getName().equals(other.getName())) return false; 1183 } 1184 if (hasParent() != other.hasParent()) return false; 1185 if (hasParent()) { 1186 if (!getParent().equals(other.getParent())) return false; 1187 } 1188 if (hasRegion() != other.hasRegion()) return false; 1189 if (hasRegion()) { 1190 if (!getRegion().equals(other.getRegion())) return false; 1191 } 1192 if (hasRuleTupleCount() != other.hasRuleTupleCount()) return false; 1193 if (hasRuleTupleCount()) { 1194 if (getRuleTupleCount() != other.getRuleTupleCount()) return false; 1195 } 1196 if (!getRulesList().equals(other.getRulesList())) return false; 1197 if (hasSelfLink() != other.hasSelfLink()) return false; 1198 if (hasSelfLink()) { 1199 if (!getSelfLink().equals(other.getSelfLink())) return false; 1200 } 1201 if (hasSelfLinkWithId() != other.hasSelfLinkWithId()) return false; 1202 if (hasSelfLinkWithId()) { 1203 if (!getSelfLinkWithId().equals(other.getSelfLinkWithId())) return false; 1204 } 1205 if (hasShortName() != other.hasShortName()) return false; 1206 if (hasShortName()) { 1207 if (!getShortName().equals(other.getShortName())) return false; 1208 } 1209 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1210 return true; 1211 } 1212 1213 @java.lang.Override hashCode()1214 public int hashCode() { 1215 if (memoizedHashCode != 0) { 1216 return memoizedHashCode; 1217 } 1218 int hash = 41; 1219 hash = (19 * hash) + getDescriptor().hashCode(); 1220 if (getAssociationsCount() > 0) { 1221 hash = (37 * hash) + ASSOCIATIONS_FIELD_NUMBER; 1222 hash = (53 * hash) + getAssociationsList().hashCode(); 1223 } 1224 if (hasCreationTimestamp()) { 1225 hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER; 1226 hash = (53 * hash) + getCreationTimestamp().hashCode(); 1227 } 1228 if (hasDescription()) { 1229 hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; 1230 hash = (53 * hash) + getDescription().hashCode(); 1231 } 1232 if (hasDisplayName()) { 1233 hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; 1234 hash = (53 * hash) + getDisplayName().hashCode(); 1235 } 1236 if (hasFingerprint()) { 1237 hash = (37 * hash) + FINGERPRINT_FIELD_NUMBER; 1238 hash = (53 * hash) + getFingerprint().hashCode(); 1239 } 1240 if (hasId()) { 1241 hash = (37 * hash) + ID_FIELD_NUMBER; 1242 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId()); 1243 } 1244 if (hasKind()) { 1245 hash = (37 * hash) + KIND_FIELD_NUMBER; 1246 hash = (53 * hash) + getKind().hashCode(); 1247 } 1248 if (hasName()) { 1249 hash = (37 * hash) + NAME_FIELD_NUMBER; 1250 hash = (53 * hash) + getName().hashCode(); 1251 } 1252 if (hasParent()) { 1253 hash = (37 * hash) + PARENT_FIELD_NUMBER; 1254 hash = (53 * hash) + getParent().hashCode(); 1255 } 1256 if (hasRegion()) { 1257 hash = (37 * hash) + REGION_FIELD_NUMBER; 1258 hash = (53 * hash) + getRegion().hashCode(); 1259 } 1260 if (hasRuleTupleCount()) { 1261 hash = (37 * hash) + RULE_TUPLE_COUNT_FIELD_NUMBER; 1262 hash = (53 * hash) + getRuleTupleCount(); 1263 } 1264 if (getRulesCount() > 0) { 1265 hash = (37 * hash) + RULES_FIELD_NUMBER; 1266 hash = (53 * hash) + getRulesList().hashCode(); 1267 } 1268 if (hasSelfLink()) { 1269 hash = (37 * hash) + SELF_LINK_FIELD_NUMBER; 1270 hash = (53 * hash) + getSelfLink().hashCode(); 1271 } 1272 if (hasSelfLinkWithId()) { 1273 hash = (37 * hash) + SELF_LINK_WITH_ID_FIELD_NUMBER; 1274 hash = (53 * hash) + getSelfLinkWithId().hashCode(); 1275 } 1276 if (hasShortName()) { 1277 hash = (37 * hash) + SHORT_NAME_FIELD_NUMBER; 1278 hash = (53 * hash) + getShortName().hashCode(); 1279 } 1280 hash = (29 * hash) + getUnknownFields().hashCode(); 1281 memoizedHashCode = hash; 1282 return hash; 1283 } 1284 parseFrom(java.nio.ByteBuffer data)1285 public static com.google.cloud.compute.v1.FirewallPolicy parseFrom(java.nio.ByteBuffer data) 1286 throws com.google.protobuf.InvalidProtocolBufferException { 1287 return PARSER.parseFrom(data); 1288 } 1289 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1290 public static com.google.cloud.compute.v1.FirewallPolicy parseFrom( 1291 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1292 throws com.google.protobuf.InvalidProtocolBufferException { 1293 return PARSER.parseFrom(data, extensionRegistry); 1294 } 1295 parseFrom( com.google.protobuf.ByteString data)1296 public static com.google.cloud.compute.v1.FirewallPolicy parseFrom( 1297 com.google.protobuf.ByteString data) 1298 throws com.google.protobuf.InvalidProtocolBufferException { 1299 return PARSER.parseFrom(data); 1300 } 1301 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1302 public static com.google.cloud.compute.v1.FirewallPolicy parseFrom( 1303 com.google.protobuf.ByteString data, 1304 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1305 throws com.google.protobuf.InvalidProtocolBufferException { 1306 return PARSER.parseFrom(data, extensionRegistry); 1307 } 1308 parseFrom(byte[] data)1309 public static com.google.cloud.compute.v1.FirewallPolicy parseFrom(byte[] data) 1310 throws com.google.protobuf.InvalidProtocolBufferException { 1311 return PARSER.parseFrom(data); 1312 } 1313 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1314 public static com.google.cloud.compute.v1.FirewallPolicy parseFrom( 1315 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1316 throws com.google.protobuf.InvalidProtocolBufferException { 1317 return PARSER.parseFrom(data, extensionRegistry); 1318 } 1319 parseFrom(java.io.InputStream input)1320 public static com.google.cloud.compute.v1.FirewallPolicy parseFrom(java.io.InputStream input) 1321 throws java.io.IOException { 1322 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1323 } 1324 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1325 public static com.google.cloud.compute.v1.FirewallPolicy parseFrom( 1326 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1327 throws java.io.IOException { 1328 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1329 PARSER, input, extensionRegistry); 1330 } 1331 parseDelimitedFrom( java.io.InputStream input)1332 public static com.google.cloud.compute.v1.FirewallPolicy parseDelimitedFrom( 1333 java.io.InputStream input) throws java.io.IOException { 1334 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1335 } 1336 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1337 public static com.google.cloud.compute.v1.FirewallPolicy parseDelimitedFrom( 1338 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1339 throws java.io.IOException { 1340 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1341 PARSER, input, extensionRegistry); 1342 } 1343 parseFrom( com.google.protobuf.CodedInputStream input)1344 public static com.google.cloud.compute.v1.FirewallPolicy parseFrom( 1345 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1346 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1347 } 1348 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1349 public static com.google.cloud.compute.v1.FirewallPolicy parseFrom( 1350 com.google.protobuf.CodedInputStream input, 1351 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1352 throws java.io.IOException { 1353 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1354 PARSER, input, extensionRegistry); 1355 } 1356 1357 @java.lang.Override newBuilderForType()1358 public Builder newBuilderForType() { 1359 return newBuilder(); 1360 } 1361 newBuilder()1362 public static Builder newBuilder() { 1363 return DEFAULT_INSTANCE.toBuilder(); 1364 } 1365 newBuilder(com.google.cloud.compute.v1.FirewallPolicy prototype)1366 public static Builder newBuilder(com.google.cloud.compute.v1.FirewallPolicy prototype) { 1367 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1368 } 1369 1370 @java.lang.Override toBuilder()1371 public Builder toBuilder() { 1372 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1373 } 1374 1375 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1376 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1377 Builder builder = new Builder(parent); 1378 return builder; 1379 } 1380 /** 1381 * 1382 * 1383 * <pre> 1384 * Represents a Firewall Policy resource. 1385 * </pre> 1386 * 1387 * Protobuf type {@code google.cloud.compute.v1.FirewallPolicy} 1388 */ 1389 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1390 implements 1391 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.FirewallPolicy) 1392 com.google.cloud.compute.v1.FirewallPolicyOrBuilder { getDescriptor()1393 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1394 return com.google.cloud.compute.v1.Compute 1395 .internal_static_google_cloud_compute_v1_FirewallPolicy_descriptor; 1396 } 1397 1398 @java.lang.Override 1399 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1400 internalGetFieldAccessorTable() { 1401 return com.google.cloud.compute.v1.Compute 1402 .internal_static_google_cloud_compute_v1_FirewallPolicy_fieldAccessorTable 1403 .ensureFieldAccessorsInitialized( 1404 com.google.cloud.compute.v1.FirewallPolicy.class, 1405 com.google.cloud.compute.v1.FirewallPolicy.Builder.class); 1406 } 1407 1408 // Construct using com.google.cloud.compute.v1.FirewallPolicy.newBuilder() Builder()1409 private Builder() {} 1410 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1411 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1412 super(parent); 1413 } 1414 1415 @java.lang.Override clear()1416 public Builder clear() { 1417 super.clear(); 1418 bitField0_ = 0; 1419 if (associationsBuilder_ == null) { 1420 associations_ = java.util.Collections.emptyList(); 1421 } else { 1422 associations_ = null; 1423 associationsBuilder_.clear(); 1424 } 1425 bitField0_ = (bitField0_ & ~0x00000001); 1426 creationTimestamp_ = ""; 1427 description_ = ""; 1428 displayName_ = ""; 1429 fingerprint_ = ""; 1430 id_ = 0L; 1431 kind_ = ""; 1432 name_ = ""; 1433 parent_ = ""; 1434 region_ = ""; 1435 ruleTupleCount_ = 0; 1436 if (rulesBuilder_ == null) { 1437 rules_ = java.util.Collections.emptyList(); 1438 } else { 1439 rules_ = null; 1440 rulesBuilder_.clear(); 1441 } 1442 bitField0_ = (bitField0_ & ~0x00000800); 1443 selfLink_ = ""; 1444 selfLinkWithId_ = ""; 1445 shortName_ = ""; 1446 return this; 1447 } 1448 1449 @java.lang.Override getDescriptorForType()1450 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1451 return com.google.cloud.compute.v1.Compute 1452 .internal_static_google_cloud_compute_v1_FirewallPolicy_descriptor; 1453 } 1454 1455 @java.lang.Override getDefaultInstanceForType()1456 public com.google.cloud.compute.v1.FirewallPolicy getDefaultInstanceForType() { 1457 return com.google.cloud.compute.v1.FirewallPolicy.getDefaultInstance(); 1458 } 1459 1460 @java.lang.Override build()1461 public com.google.cloud.compute.v1.FirewallPolicy build() { 1462 com.google.cloud.compute.v1.FirewallPolicy result = buildPartial(); 1463 if (!result.isInitialized()) { 1464 throw newUninitializedMessageException(result); 1465 } 1466 return result; 1467 } 1468 1469 @java.lang.Override buildPartial()1470 public com.google.cloud.compute.v1.FirewallPolicy buildPartial() { 1471 com.google.cloud.compute.v1.FirewallPolicy result = 1472 new com.google.cloud.compute.v1.FirewallPolicy(this); 1473 buildPartialRepeatedFields(result); 1474 if (bitField0_ != 0) { 1475 buildPartial0(result); 1476 } 1477 onBuilt(); 1478 return result; 1479 } 1480 buildPartialRepeatedFields(com.google.cloud.compute.v1.FirewallPolicy result)1481 private void buildPartialRepeatedFields(com.google.cloud.compute.v1.FirewallPolicy result) { 1482 if (associationsBuilder_ == null) { 1483 if (((bitField0_ & 0x00000001) != 0)) { 1484 associations_ = java.util.Collections.unmodifiableList(associations_); 1485 bitField0_ = (bitField0_ & ~0x00000001); 1486 } 1487 result.associations_ = associations_; 1488 } else { 1489 result.associations_ = associationsBuilder_.build(); 1490 } 1491 if (rulesBuilder_ == null) { 1492 if (((bitField0_ & 0x00000800) != 0)) { 1493 rules_ = java.util.Collections.unmodifiableList(rules_); 1494 bitField0_ = (bitField0_ & ~0x00000800); 1495 } 1496 result.rules_ = rules_; 1497 } else { 1498 result.rules_ = rulesBuilder_.build(); 1499 } 1500 } 1501 buildPartial0(com.google.cloud.compute.v1.FirewallPolicy result)1502 private void buildPartial0(com.google.cloud.compute.v1.FirewallPolicy result) { 1503 int from_bitField0_ = bitField0_; 1504 int to_bitField0_ = 0; 1505 if (((from_bitField0_ & 0x00000002) != 0)) { 1506 result.creationTimestamp_ = creationTimestamp_; 1507 to_bitField0_ |= 0x00000001; 1508 } 1509 if (((from_bitField0_ & 0x00000004) != 0)) { 1510 result.description_ = description_; 1511 to_bitField0_ |= 0x00000002; 1512 } 1513 if (((from_bitField0_ & 0x00000008) != 0)) { 1514 result.displayName_ = displayName_; 1515 to_bitField0_ |= 0x00000004; 1516 } 1517 if (((from_bitField0_ & 0x00000010) != 0)) { 1518 result.fingerprint_ = fingerprint_; 1519 to_bitField0_ |= 0x00000008; 1520 } 1521 if (((from_bitField0_ & 0x00000020) != 0)) { 1522 result.id_ = id_; 1523 to_bitField0_ |= 0x00000010; 1524 } 1525 if (((from_bitField0_ & 0x00000040) != 0)) { 1526 result.kind_ = kind_; 1527 to_bitField0_ |= 0x00000020; 1528 } 1529 if (((from_bitField0_ & 0x00000080) != 0)) { 1530 result.name_ = name_; 1531 to_bitField0_ |= 0x00000040; 1532 } 1533 if (((from_bitField0_ & 0x00000100) != 0)) { 1534 result.parent_ = parent_; 1535 to_bitField0_ |= 0x00000080; 1536 } 1537 if (((from_bitField0_ & 0x00000200) != 0)) { 1538 result.region_ = region_; 1539 to_bitField0_ |= 0x00000100; 1540 } 1541 if (((from_bitField0_ & 0x00000400) != 0)) { 1542 result.ruleTupleCount_ = ruleTupleCount_; 1543 to_bitField0_ |= 0x00000200; 1544 } 1545 if (((from_bitField0_ & 0x00001000) != 0)) { 1546 result.selfLink_ = selfLink_; 1547 to_bitField0_ |= 0x00000400; 1548 } 1549 if (((from_bitField0_ & 0x00002000) != 0)) { 1550 result.selfLinkWithId_ = selfLinkWithId_; 1551 to_bitField0_ |= 0x00000800; 1552 } 1553 if (((from_bitField0_ & 0x00004000) != 0)) { 1554 result.shortName_ = shortName_; 1555 to_bitField0_ |= 0x00001000; 1556 } 1557 result.bitField0_ |= to_bitField0_; 1558 } 1559 1560 @java.lang.Override clone()1561 public Builder clone() { 1562 return super.clone(); 1563 } 1564 1565 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1566 public Builder setField( 1567 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1568 return super.setField(field, value); 1569 } 1570 1571 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1572 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1573 return super.clearField(field); 1574 } 1575 1576 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1577 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1578 return super.clearOneof(oneof); 1579 } 1580 1581 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1582 public Builder setRepeatedField( 1583 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1584 return super.setRepeatedField(field, index, value); 1585 } 1586 1587 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1588 public Builder addRepeatedField( 1589 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1590 return super.addRepeatedField(field, value); 1591 } 1592 1593 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1594 public Builder mergeFrom(com.google.protobuf.Message other) { 1595 if (other instanceof com.google.cloud.compute.v1.FirewallPolicy) { 1596 return mergeFrom((com.google.cloud.compute.v1.FirewallPolicy) other); 1597 } else { 1598 super.mergeFrom(other); 1599 return this; 1600 } 1601 } 1602 mergeFrom(com.google.cloud.compute.v1.FirewallPolicy other)1603 public Builder mergeFrom(com.google.cloud.compute.v1.FirewallPolicy other) { 1604 if (other == com.google.cloud.compute.v1.FirewallPolicy.getDefaultInstance()) return this; 1605 if (associationsBuilder_ == null) { 1606 if (!other.associations_.isEmpty()) { 1607 if (associations_.isEmpty()) { 1608 associations_ = other.associations_; 1609 bitField0_ = (bitField0_ & ~0x00000001); 1610 } else { 1611 ensureAssociationsIsMutable(); 1612 associations_.addAll(other.associations_); 1613 } 1614 onChanged(); 1615 } 1616 } else { 1617 if (!other.associations_.isEmpty()) { 1618 if (associationsBuilder_.isEmpty()) { 1619 associationsBuilder_.dispose(); 1620 associationsBuilder_ = null; 1621 associations_ = other.associations_; 1622 bitField0_ = (bitField0_ & ~0x00000001); 1623 associationsBuilder_ = 1624 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 1625 ? getAssociationsFieldBuilder() 1626 : null; 1627 } else { 1628 associationsBuilder_.addAllMessages(other.associations_); 1629 } 1630 } 1631 } 1632 if (other.hasCreationTimestamp()) { 1633 creationTimestamp_ = other.creationTimestamp_; 1634 bitField0_ |= 0x00000002; 1635 onChanged(); 1636 } 1637 if (other.hasDescription()) { 1638 description_ = other.description_; 1639 bitField0_ |= 0x00000004; 1640 onChanged(); 1641 } 1642 if (other.hasDisplayName()) { 1643 displayName_ = other.displayName_; 1644 bitField0_ |= 0x00000008; 1645 onChanged(); 1646 } 1647 if (other.hasFingerprint()) { 1648 fingerprint_ = other.fingerprint_; 1649 bitField0_ |= 0x00000010; 1650 onChanged(); 1651 } 1652 if (other.hasId()) { 1653 setId(other.getId()); 1654 } 1655 if (other.hasKind()) { 1656 kind_ = other.kind_; 1657 bitField0_ |= 0x00000040; 1658 onChanged(); 1659 } 1660 if (other.hasName()) { 1661 name_ = other.name_; 1662 bitField0_ |= 0x00000080; 1663 onChanged(); 1664 } 1665 if (other.hasParent()) { 1666 parent_ = other.parent_; 1667 bitField0_ |= 0x00000100; 1668 onChanged(); 1669 } 1670 if (other.hasRegion()) { 1671 region_ = other.region_; 1672 bitField0_ |= 0x00000200; 1673 onChanged(); 1674 } 1675 if (other.hasRuleTupleCount()) { 1676 setRuleTupleCount(other.getRuleTupleCount()); 1677 } 1678 if (rulesBuilder_ == null) { 1679 if (!other.rules_.isEmpty()) { 1680 if (rules_.isEmpty()) { 1681 rules_ = other.rules_; 1682 bitField0_ = (bitField0_ & ~0x00000800); 1683 } else { 1684 ensureRulesIsMutable(); 1685 rules_.addAll(other.rules_); 1686 } 1687 onChanged(); 1688 } 1689 } else { 1690 if (!other.rules_.isEmpty()) { 1691 if (rulesBuilder_.isEmpty()) { 1692 rulesBuilder_.dispose(); 1693 rulesBuilder_ = null; 1694 rules_ = other.rules_; 1695 bitField0_ = (bitField0_ & ~0x00000800); 1696 rulesBuilder_ = 1697 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 1698 ? getRulesFieldBuilder() 1699 : null; 1700 } else { 1701 rulesBuilder_.addAllMessages(other.rules_); 1702 } 1703 } 1704 } 1705 if (other.hasSelfLink()) { 1706 selfLink_ = other.selfLink_; 1707 bitField0_ |= 0x00001000; 1708 onChanged(); 1709 } 1710 if (other.hasSelfLinkWithId()) { 1711 selfLinkWithId_ = other.selfLinkWithId_; 1712 bitField0_ |= 0x00002000; 1713 onChanged(); 1714 } 1715 if (other.hasShortName()) { 1716 shortName_ = other.shortName_; 1717 bitField0_ |= 0x00004000; 1718 onChanged(); 1719 } 1720 this.mergeUnknownFields(other.getUnknownFields()); 1721 onChanged(); 1722 return this; 1723 } 1724 1725 @java.lang.Override isInitialized()1726 public final boolean isInitialized() { 1727 return true; 1728 } 1729 1730 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1731 public Builder mergeFrom( 1732 com.google.protobuf.CodedInputStream input, 1733 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1734 throws java.io.IOException { 1735 if (extensionRegistry == null) { 1736 throw new java.lang.NullPointerException(); 1737 } 1738 try { 1739 boolean done = false; 1740 while (!done) { 1741 int tag = input.readTag(); 1742 switch (tag) { 1743 case 0: 1744 done = true; 1745 break; 1746 case 26840: 1747 { 1748 id_ = input.readUInt64(); 1749 bitField0_ |= 0x00000020; 1750 break; 1751 } // case 26840 1752 case 26336418: 1753 { 1754 kind_ = input.readStringRequireUtf8(); 1755 bitField0_ |= 0x00000040; 1756 break; 1757 } // case 26336418 1758 case 26989658: 1759 { 1760 name_ = input.readStringRequireUtf8(); 1761 bitField0_ |= 0x00000080; 1762 break; 1763 } // case 26989658 1764 case 35790658: 1765 { 1766 displayName_ = input.readStringRequireUtf8(); 1767 bitField0_ |= 0x00000008; 1768 break; 1769 } // case 35790658 1770 case 244202930: 1771 { 1772 creationTimestamp_ = input.readStringRequireUtf8(); 1773 bitField0_ |= 0x00000002; 1774 break; 1775 } // case 244202930 1776 case 356167698: 1777 { 1778 selfLinkWithId_ = input.readStringRequireUtf8(); 1779 bitField0_ |= 0x00002000; 1780 break; 1781 } // case 356167698 1782 case 626541906: 1783 { 1784 parent_ = input.readStringRequireUtf8(); 1785 bitField0_ |= 0x00000100; 1786 break; 1787 } // case 626541906 1788 case 870991802: 1789 { 1790 com.google.cloud.compute.v1.FirewallPolicyRule m = 1791 input.readMessage( 1792 com.google.cloud.compute.v1.FirewallPolicyRule.parser(), extensionRegistry); 1793 if (rulesBuilder_ == null) { 1794 ensureRulesIsMutable(); 1795 rules_.add(m); 1796 } else { 1797 rulesBuilder_.addMessage(m); 1798 } 1799 break; 1800 } // case 870991802 1801 case 1111570338: 1802 { 1803 region_ = input.readStringRequireUtf8(); 1804 bitField0_ |= 0x00000200; 1805 break; 1806 } // case 1111570338 1807 case 1877428002: 1808 { 1809 fingerprint_ = input.readStringRequireUtf8(); 1810 bitField0_ |= 0x00000010; 1811 break; 1812 } // case 1877428002 1813 case -1188231000: 1814 { 1815 ruleTupleCount_ = input.readInt32(); 1816 bitField0_ |= 0x00000400; 1817 break; 1818 } // case -1188231000 1819 case -911466526: 1820 { 1821 description_ = input.readStringRequireUtf8(); 1822 bitField0_ |= 0x00000004; 1823 break; 1824 } // case -911466526 1825 case -645248918: 1826 { 1827 selfLink_ = input.readStringRequireUtf8(); 1828 bitField0_ |= 0x00001000; 1829 break; 1830 } // case -645248918 1831 case -358554766: 1832 { 1833 shortName_ = input.readStringRequireUtf8(); 1834 bitField0_ |= 0x00004000; 1835 break; 1836 } // case -358554766 1837 case -225075054: 1838 { 1839 com.google.cloud.compute.v1.FirewallPolicyAssociation m = 1840 input.readMessage( 1841 com.google.cloud.compute.v1.FirewallPolicyAssociation.parser(), 1842 extensionRegistry); 1843 if (associationsBuilder_ == null) { 1844 ensureAssociationsIsMutable(); 1845 associations_.add(m); 1846 } else { 1847 associationsBuilder_.addMessage(m); 1848 } 1849 break; 1850 } // case -225075054 1851 default: 1852 { 1853 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1854 done = true; // was an endgroup tag 1855 } 1856 break; 1857 } // default: 1858 } // switch (tag) 1859 } // while (!done) 1860 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1861 throw e.unwrapIOException(); 1862 } finally { 1863 onChanged(); 1864 } // finally 1865 return this; 1866 } 1867 1868 private int bitField0_; 1869 1870 private java.util.List<com.google.cloud.compute.v1.FirewallPolicyAssociation> associations_ = 1871 java.util.Collections.emptyList(); 1872 ensureAssociationsIsMutable()1873 private void ensureAssociationsIsMutable() { 1874 if (!((bitField0_ & 0x00000001) != 0)) { 1875 associations_ = 1876 new java.util.ArrayList<com.google.cloud.compute.v1.FirewallPolicyAssociation>( 1877 associations_); 1878 bitField0_ |= 0x00000001; 1879 } 1880 } 1881 1882 private com.google.protobuf.RepeatedFieldBuilderV3< 1883 com.google.cloud.compute.v1.FirewallPolicyAssociation, 1884 com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder, 1885 com.google.cloud.compute.v1.FirewallPolicyAssociationOrBuilder> 1886 associationsBuilder_; 1887 1888 /** 1889 * 1890 * 1891 * <pre> 1892 * A list of associations that belong to this firewall policy. 1893 * </pre> 1894 * 1895 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 1896 * </code> 1897 */ 1898 public java.util.List<com.google.cloud.compute.v1.FirewallPolicyAssociation> getAssociationsList()1899 getAssociationsList() { 1900 if (associationsBuilder_ == null) { 1901 return java.util.Collections.unmodifiableList(associations_); 1902 } else { 1903 return associationsBuilder_.getMessageList(); 1904 } 1905 } 1906 /** 1907 * 1908 * 1909 * <pre> 1910 * A list of associations that belong to this firewall policy. 1911 * </pre> 1912 * 1913 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 1914 * </code> 1915 */ getAssociationsCount()1916 public int getAssociationsCount() { 1917 if (associationsBuilder_ == null) { 1918 return associations_.size(); 1919 } else { 1920 return associationsBuilder_.getCount(); 1921 } 1922 } 1923 /** 1924 * 1925 * 1926 * <pre> 1927 * A list of associations that belong to this firewall policy. 1928 * </pre> 1929 * 1930 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 1931 * </code> 1932 */ getAssociations(int index)1933 public com.google.cloud.compute.v1.FirewallPolicyAssociation getAssociations(int index) { 1934 if (associationsBuilder_ == null) { 1935 return associations_.get(index); 1936 } else { 1937 return associationsBuilder_.getMessage(index); 1938 } 1939 } 1940 /** 1941 * 1942 * 1943 * <pre> 1944 * A list of associations that belong to this firewall policy. 1945 * </pre> 1946 * 1947 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 1948 * </code> 1949 */ setAssociations( int index, com.google.cloud.compute.v1.FirewallPolicyAssociation value)1950 public Builder setAssociations( 1951 int index, com.google.cloud.compute.v1.FirewallPolicyAssociation value) { 1952 if (associationsBuilder_ == null) { 1953 if (value == null) { 1954 throw new NullPointerException(); 1955 } 1956 ensureAssociationsIsMutable(); 1957 associations_.set(index, value); 1958 onChanged(); 1959 } else { 1960 associationsBuilder_.setMessage(index, value); 1961 } 1962 return this; 1963 } 1964 /** 1965 * 1966 * 1967 * <pre> 1968 * A list of associations that belong to this firewall policy. 1969 * </pre> 1970 * 1971 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 1972 * </code> 1973 */ setAssociations( int index, com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder builderForValue)1974 public Builder setAssociations( 1975 int index, com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder builderForValue) { 1976 if (associationsBuilder_ == null) { 1977 ensureAssociationsIsMutable(); 1978 associations_.set(index, builderForValue.build()); 1979 onChanged(); 1980 } else { 1981 associationsBuilder_.setMessage(index, builderForValue.build()); 1982 } 1983 return this; 1984 } 1985 /** 1986 * 1987 * 1988 * <pre> 1989 * A list of associations that belong to this firewall policy. 1990 * </pre> 1991 * 1992 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 1993 * </code> 1994 */ addAssociations(com.google.cloud.compute.v1.FirewallPolicyAssociation value)1995 public Builder addAssociations(com.google.cloud.compute.v1.FirewallPolicyAssociation value) { 1996 if (associationsBuilder_ == null) { 1997 if (value == null) { 1998 throw new NullPointerException(); 1999 } 2000 ensureAssociationsIsMutable(); 2001 associations_.add(value); 2002 onChanged(); 2003 } else { 2004 associationsBuilder_.addMessage(value); 2005 } 2006 return this; 2007 } 2008 /** 2009 * 2010 * 2011 * <pre> 2012 * A list of associations that belong to this firewall policy. 2013 * </pre> 2014 * 2015 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 2016 * </code> 2017 */ addAssociations( int index, com.google.cloud.compute.v1.FirewallPolicyAssociation value)2018 public Builder addAssociations( 2019 int index, com.google.cloud.compute.v1.FirewallPolicyAssociation value) { 2020 if (associationsBuilder_ == null) { 2021 if (value == null) { 2022 throw new NullPointerException(); 2023 } 2024 ensureAssociationsIsMutable(); 2025 associations_.add(index, value); 2026 onChanged(); 2027 } else { 2028 associationsBuilder_.addMessage(index, value); 2029 } 2030 return this; 2031 } 2032 /** 2033 * 2034 * 2035 * <pre> 2036 * A list of associations that belong to this firewall policy. 2037 * </pre> 2038 * 2039 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 2040 * </code> 2041 */ addAssociations( com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder builderForValue)2042 public Builder addAssociations( 2043 com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder builderForValue) { 2044 if (associationsBuilder_ == null) { 2045 ensureAssociationsIsMutable(); 2046 associations_.add(builderForValue.build()); 2047 onChanged(); 2048 } else { 2049 associationsBuilder_.addMessage(builderForValue.build()); 2050 } 2051 return this; 2052 } 2053 /** 2054 * 2055 * 2056 * <pre> 2057 * A list of associations that belong to this firewall policy. 2058 * </pre> 2059 * 2060 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 2061 * </code> 2062 */ addAssociations( int index, com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder builderForValue)2063 public Builder addAssociations( 2064 int index, com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder builderForValue) { 2065 if (associationsBuilder_ == null) { 2066 ensureAssociationsIsMutable(); 2067 associations_.add(index, builderForValue.build()); 2068 onChanged(); 2069 } else { 2070 associationsBuilder_.addMessage(index, builderForValue.build()); 2071 } 2072 return this; 2073 } 2074 /** 2075 * 2076 * 2077 * <pre> 2078 * A list of associations that belong to this firewall policy. 2079 * </pre> 2080 * 2081 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 2082 * </code> 2083 */ addAllAssociations( java.lang.Iterable<? extends com.google.cloud.compute.v1.FirewallPolicyAssociation> values)2084 public Builder addAllAssociations( 2085 java.lang.Iterable<? extends com.google.cloud.compute.v1.FirewallPolicyAssociation> 2086 values) { 2087 if (associationsBuilder_ == null) { 2088 ensureAssociationsIsMutable(); 2089 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, associations_); 2090 onChanged(); 2091 } else { 2092 associationsBuilder_.addAllMessages(values); 2093 } 2094 return this; 2095 } 2096 /** 2097 * 2098 * 2099 * <pre> 2100 * A list of associations that belong to this firewall policy. 2101 * </pre> 2102 * 2103 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 2104 * </code> 2105 */ clearAssociations()2106 public Builder clearAssociations() { 2107 if (associationsBuilder_ == null) { 2108 associations_ = java.util.Collections.emptyList(); 2109 bitField0_ = (bitField0_ & ~0x00000001); 2110 onChanged(); 2111 } else { 2112 associationsBuilder_.clear(); 2113 } 2114 return this; 2115 } 2116 /** 2117 * 2118 * 2119 * <pre> 2120 * A list of associations that belong to this firewall policy. 2121 * </pre> 2122 * 2123 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 2124 * </code> 2125 */ removeAssociations(int index)2126 public Builder removeAssociations(int index) { 2127 if (associationsBuilder_ == null) { 2128 ensureAssociationsIsMutable(); 2129 associations_.remove(index); 2130 onChanged(); 2131 } else { 2132 associationsBuilder_.remove(index); 2133 } 2134 return this; 2135 } 2136 /** 2137 * 2138 * 2139 * <pre> 2140 * A list of associations that belong to this firewall policy. 2141 * </pre> 2142 * 2143 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 2144 * </code> 2145 */ getAssociationsBuilder( int index)2146 public com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder getAssociationsBuilder( 2147 int index) { 2148 return getAssociationsFieldBuilder().getBuilder(index); 2149 } 2150 /** 2151 * 2152 * 2153 * <pre> 2154 * A list of associations that belong to this firewall policy. 2155 * </pre> 2156 * 2157 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 2158 * </code> 2159 */ getAssociationsOrBuilder( int index)2160 public com.google.cloud.compute.v1.FirewallPolicyAssociationOrBuilder getAssociationsOrBuilder( 2161 int index) { 2162 if (associationsBuilder_ == null) { 2163 return associations_.get(index); 2164 } else { 2165 return associationsBuilder_.getMessageOrBuilder(index); 2166 } 2167 } 2168 /** 2169 * 2170 * 2171 * <pre> 2172 * A list of associations that belong to this firewall policy. 2173 * </pre> 2174 * 2175 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 2176 * </code> 2177 */ 2178 public java.util.List<? extends com.google.cloud.compute.v1.FirewallPolicyAssociationOrBuilder> getAssociationsOrBuilderList()2179 getAssociationsOrBuilderList() { 2180 if (associationsBuilder_ != null) { 2181 return associationsBuilder_.getMessageOrBuilderList(); 2182 } else { 2183 return java.util.Collections.unmodifiableList(associations_); 2184 } 2185 } 2186 /** 2187 * 2188 * 2189 * <pre> 2190 * A list of associations that belong to this firewall policy. 2191 * </pre> 2192 * 2193 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 2194 * </code> 2195 */ addAssociationsBuilder()2196 public com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder addAssociationsBuilder() { 2197 return getAssociationsFieldBuilder() 2198 .addBuilder(com.google.cloud.compute.v1.FirewallPolicyAssociation.getDefaultInstance()); 2199 } 2200 /** 2201 * 2202 * 2203 * <pre> 2204 * A list of associations that belong to this firewall policy. 2205 * </pre> 2206 * 2207 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 2208 * </code> 2209 */ addAssociationsBuilder( int index)2210 public com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder addAssociationsBuilder( 2211 int index) { 2212 return getAssociationsFieldBuilder() 2213 .addBuilder( 2214 index, com.google.cloud.compute.v1.FirewallPolicyAssociation.getDefaultInstance()); 2215 } 2216 /** 2217 * 2218 * 2219 * <pre> 2220 * A list of associations that belong to this firewall policy. 2221 * </pre> 2222 * 2223 * <code>repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530; 2224 * </code> 2225 */ 2226 public java.util.List<com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder> getAssociationsBuilderList()2227 getAssociationsBuilderList() { 2228 return getAssociationsFieldBuilder().getBuilderList(); 2229 } 2230 2231 private com.google.protobuf.RepeatedFieldBuilderV3< 2232 com.google.cloud.compute.v1.FirewallPolicyAssociation, 2233 com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder, 2234 com.google.cloud.compute.v1.FirewallPolicyAssociationOrBuilder> getAssociationsFieldBuilder()2235 getAssociationsFieldBuilder() { 2236 if (associationsBuilder_ == null) { 2237 associationsBuilder_ = 2238 new com.google.protobuf.RepeatedFieldBuilderV3< 2239 com.google.cloud.compute.v1.FirewallPolicyAssociation, 2240 com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder, 2241 com.google.cloud.compute.v1.FirewallPolicyAssociationOrBuilder>( 2242 associations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); 2243 associations_ = null; 2244 } 2245 return associationsBuilder_; 2246 } 2247 2248 private java.lang.Object creationTimestamp_ = ""; 2249 /** 2250 * 2251 * 2252 * <pre> 2253 * [Output Only] Creation timestamp in RFC3339 text format. 2254 * </pre> 2255 * 2256 * <code>optional string creation_timestamp = 30525366;</code> 2257 * 2258 * @return Whether the creationTimestamp field is set. 2259 */ hasCreationTimestamp()2260 public boolean hasCreationTimestamp() { 2261 return ((bitField0_ & 0x00000002) != 0); 2262 } 2263 /** 2264 * 2265 * 2266 * <pre> 2267 * [Output Only] Creation timestamp in RFC3339 text format. 2268 * </pre> 2269 * 2270 * <code>optional string creation_timestamp = 30525366;</code> 2271 * 2272 * @return The creationTimestamp. 2273 */ getCreationTimestamp()2274 public java.lang.String getCreationTimestamp() { 2275 java.lang.Object ref = creationTimestamp_; 2276 if (!(ref instanceof java.lang.String)) { 2277 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2278 java.lang.String s = bs.toStringUtf8(); 2279 creationTimestamp_ = s; 2280 return s; 2281 } else { 2282 return (java.lang.String) ref; 2283 } 2284 } 2285 /** 2286 * 2287 * 2288 * <pre> 2289 * [Output Only] Creation timestamp in RFC3339 text format. 2290 * </pre> 2291 * 2292 * <code>optional string creation_timestamp = 30525366;</code> 2293 * 2294 * @return The bytes for creationTimestamp. 2295 */ getCreationTimestampBytes()2296 public com.google.protobuf.ByteString getCreationTimestampBytes() { 2297 java.lang.Object ref = creationTimestamp_; 2298 if (ref instanceof String) { 2299 com.google.protobuf.ByteString b = 2300 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2301 creationTimestamp_ = b; 2302 return b; 2303 } else { 2304 return (com.google.protobuf.ByteString) ref; 2305 } 2306 } 2307 /** 2308 * 2309 * 2310 * <pre> 2311 * [Output Only] Creation timestamp in RFC3339 text format. 2312 * </pre> 2313 * 2314 * <code>optional string creation_timestamp = 30525366;</code> 2315 * 2316 * @param value The creationTimestamp to set. 2317 * @return This builder for chaining. 2318 */ setCreationTimestamp(java.lang.String value)2319 public Builder setCreationTimestamp(java.lang.String value) { 2320 if (value == null) { 2321 throw new NullPointerException(); 2322 } 2323 creationTimestamp_ = value; 2324 bitField0_ |= 0x00000002; 2325 onChanged(); 2326 return this; 2327 } 2328 /** 2329 * 2330 * 2331 * <pre> 2332 * [Output Only] Creation timestamp in RFC3339 text format. 2333 * </pre> 2334 * 2335 * <code>optional string creation_timestamp = 30525366;</code> 2336 * 2337 * @return This builder for chaining. 2338 */ clearCreationTimestamp()2339 public Builder clearCreationTimestamp() { 2340 creationTimestamp_ = getDefaultInstance().getCreationTimestamp(); 2341 bitField0_ = (bitField0_ & ~0x00000002); 2342 onChanged(); 2343 return this; 2344 } 2345 /** 2346 * 2347 * 2348 * <pre> 2349 * [Output Only] Creation timestamp in RFC3339 text format. 2350 * </pre> 2351 * 2352 * <code>optional string creation_timestamp = 30525366;</code> 2353 * 2354 * @param value The bytes for creationTimestamp to set. 2355 * @return This builder for chaining. 2356 */ setCreationTimestampBytes(com.google.protobuf.ByteString value)2357 public Builder setCreationTimestampBytes(com.google.protobuf.ByteString value) { 2358 if (value == null) { 2359 throw new NullPointerException(); 2360 } 2361 checkByteStringIsUtf8(value); 2362 creationTimestamp_ = value; 2363 bitField0_ |= 0x00000002; 2364 onChanged(); 2365 return this; 2366 } 2367 2368 private java.lang.Object description_ = ""; 2369 /** 2370 * 2371 * 2372 * <pre> 2373 * An optional description of this resource. Provide this property when you create the resource. 2374 * </pre> 2375 * 2376 * <code>optional string description = 422937596;</code> 2377 * 2378 * @return Whether the description field is set. 2379 */ hasDescription()2380 public boolean hasDescription() { 2381 return ((bitField0_ & 0x00000004) != 0); 2382 } 2383 /** 2384 * 2385 * 2386 * <pre> 2387 * An optional description of this resource. Provide this property when you create the resource. 2388 * </pre> 2389 * 2390 * <code>optional string description = 422937596;</code> 2391 * 2392 * @return The description. 2393 */ getDescription()2394 public java.lang.String getDescription() { 2395 java.lang.Object ref = description_; 2396 if (!(ref instanceof java.lang.String)) { 2397 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2398 java.lang.String s = bs.toStringUtf8(); 2399 description_ = s; 2400 return s; 2401 } else { 2402 return (java.lang.String) ref; 2403 } 2404 } 2405 /** 2406 * 2407 * 2408 * <pre> 2409 * An optional description of this resource. Provide this property when you create the resource. 2410 * </pre> 2411 * 2412 * <code>optional string description = 422937596;</code> 2413 * 2414 * @return The bytes for description. 2415 */ getDescriptionBytes()2416 public com.google.protobuf.ByteString getDescriptionBytes() { 2417 java.lang.Object ref = description_; 2418 if (ref instanceof String) { 2419 com.google.protobuf.ByteString b = 2420 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2421 description_ = b; 2422 return b; 2423 } else { 2424 return (com.google.protobuf.ByteString) ref; 2425 } 2426 } 2427 /** 2428 * 2429 * 2430 * <pre> 2431 * An optional description of this resource. Provide this property when you create the resource. 2432 * </pre> 2433 * 2434 * <code>optional string description = 422937596;</code> 2435 * 2436 * @param value The description to set. 2437 * @return This builder for chaining. 2438 */ setDescription(java.lang.String value)2439 public Builder setDescription(java.lang.String value) { 2440 if (value == null) { 2441 throw new NullPointerException(); 2442 } 2443 description_ = value; 2444 bitField0_ |= 0x00000004; 2445 onChanged(); 2446 return this; 2447 } 2448 /** 2449 * 2450 * 2451 * <pre> 2452 * An optional description of this resource. Provide this property when you create the resource. 2453 * </pre> 2454 * 2455 * <code>optional string description = 422937596;</code> 2456 * 2457 * @return This builder for chaining. 2458 */ clearDescription()2459 public Builder clearDescription() { 2460 description_ = getDefaultInstance().getDescription(); 2461 bitField0_ = (bitField0_ & ~0x00000004); 2462 onChanged(); 2463 return this; 2464 } 2465 /** 2466 * 2467 * 2468 * <pre> 2469 * An optional description of this resource. Provide this property when you create the resource. 2470 * </pre> 2471 * 2472 * <code>optional string description = 422937596;</code> 2473 * 2474 * @param value The bytes for description to set. 2475 * @return This builder for chaining. 2476 */ setDescriptionBytes(com.google.protobuf.ByteString value)2477 public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { 2478 if (value == null) { 2479 throw new NullPointerException(); 2480 } 2481 checkByteStringIsUtf8(value); 2482 description_ = value; 2483 bitField0_ |= 0x00000004; 2484 onChanged(); 2485 return this; 2486 } 2487 2488 private java.lang.Object displayName_ = ""; 2489 /** 2490 * 2491 * 2492 * <pre> 2493 * Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2494 * </pre> 2495 * 2496 * <code>optional string display_name = 4473832;</code> 2497 * 2498 * @return Whether the displayName field is set. 2499 */ hasDisplayName()2500 public boolean hasDisplayName() { 2501 return ((bitField0_ & 0x00000008) != 0); 2502 } 2503 /** 2504 * 2505 * 2506 * <pre> 2507 * Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2508 * </pre> 2509 * 2510 * <code>optional string display_name = 4473832;</code> 2511 * 2512 * @return The displayName. 2513 */ getDisplayName()2514 public java.lang.String getDisplayName() { 2515 java.lang.Object ref = displayName_; 2516 if (!(ref instanceof java.lang.String)) { 2517 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2518 java.lang.String s = bs.toStringUtf8(); 2519 displayName_ = s; 2520 return s; 2521 } else { 2522 return (java.lang.String) ref; 2523 } 2524 } 2525 /** 2526 * 2527 * 2528 * <pre> 2529 * Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2530 * </pre> 2531 * 2532 * <code>optional string display_name = 4473832;</code> 2533 * 2534 * @return The bytes for displayName. 2535 */ getDisplayNameBytes()2536 public com.google.protobuf.ByteString getDisplayNameBytes() { 2537 java.lang.Object ref = displayName_; 2538 if (ref instanceof String) { 2539 com.google.protobuf.ByteString b = 2540 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2541 displayName_ = b; 2542 return b; 2543 } else { 2544 return (com.google.protobuf.ByteString) ref; 2545 } 2546 } 2547 /** 2548 * 2549 * 2550 * <pre> 2551 * Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2552 * </pre> 2553 * 2554 * <code>optional string display_name = 4473832;</code> 2555 * 2556 * @param value The displayName to set. 2557 * @return This builder for chaining. 2558 */ setDisplayName(java.lang.String value)2559 public Builder setDisplayName(java.lang.String value) { 2560 if (value == null) { 2561 throw new NullPointerException(); 2562 } 2563 displayName_ = value; 2564 bitField0_ |= 0x00000008; 2565 onChanged(); 2566 return this; 2567 } 2568 /** 2569 * 2570 * 2571 * <pre> 2572 * Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2573 * </pre> 2574 * 2575 * <code>optional string display_name = 4473832;</code> 2576 * 2577 * @return This builder for chaining. 2578 */ clearDisplayName()2579 public Builder clearDisplayName() { 2580 displayName_ = getDefaultInstance().getDisplayName(); 2581 bitField0_ = (bitField0_ & ~0x00000008); 2582 onChanged(); 2583 return this; 2584 } 2585 /** 2586 * 2587 * 2588 * <pre> 2589 * Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2590 * </pre> 2591 * 2592 * <code>optional string display_name = 4473832;</code> 2593 * 2594 * @param value The bytes for displayName to set. 2595 * @return This builder for chaining. 2596 */ setDisplayNameBytes(com.google.protobuf.ByteString value)2597 public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { 2598 if (value == null) { 2599 throw new NullPointerException(); 2600 } 2601 checkByteStringIsUtf8(value); 2602 displayName_ = value; 2603 bitField0_ |= 0x00000008; 2604 onChanged(); 2605 return this; 2606 } 2607 2608 private java.lang.Object fingerprint_ = ""; 2609 /** 2610 * 2611 * 2612 * <pre> 2613 * Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy. 2614 * </pre> 2615 * 2616 * <code>optional string fingerprint = 234678500;</code> 2617 * 2618 * @return Whether the fingerprint field is set. 2619 */ hasFingerprint()2620 public boolean hasFingerprint() { 2621 return ((bitField0_ & 0x00000010) != 0); 2622 } 2623 /** 2624 * 2625 * 2626 * <pre> 2627 * Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy. 2628 * </pre> 2629 * 2630 * <code>optional string fingerprint = 234678500;</code> 2631 * 2632 * @return The fingerprint. 2633 */ getFingerprint()2634 public java.lang.String getFingerprint() { 2635 java.lang.Object ref = fingerprint_; 2636 if (!(ref instanceof java.lang.String)) { 2637 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2638 java.lang.String s = bs.toStringUtf8(); 2639 fingerprint_ = s; 2640 return s; 2641 } else { 2642 return (java.lang.String) ref; 2643 } 2644 } 2645 /** 2646 * 2647 * 2648 * <pre> 2649 * Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy. 2650 * </pre> 2651 * 2652 * <code>optional string fingerprint = 234678500;</code> 2653 * 2654 * @return The bytes for fingerprint. 2655 */ getFingerprintBytes()2656 public com.google.protobuf.ByteString getFingerprintBytes() { 2657 java.lang.Object ref = fingerprint_; 2658 if (ref instanceof String) { 2659 com.google.protobuf.ByteString b = 2660 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2661 fingerprint_ = b; 2662 return b; 2663 } else { 2664 return (com.google.protobuf.ByteString) ref; 2665 } 2666 } 2667 /** 2668 * 2669 * 2670 * <pre> 2671 * Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy. 2672 * </pre> 2673 * 2674 * <code>optional string fingerprint = 234678500;</code> 2675 * 2676 * @param value The fingerprint to set. 2677 * @return This builder for chaining. 2678 */ setFingerprint(java.lang.String value)2679 public Builder setFingerprint(java.lang.String value) { 2680 if (value == null) { 2681 throw new NullPointerException(); 2682 } 2683 fingerprint_ = value; 2684 bitField0_ |= 0x00000010; 2685 onChanged(); 2686 return this; 2687 } 2688 /** 2689 * 2690 * 2691 * <pre> 2692 * Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy. 2693 * </pre> 2694 * 2695 * <code>optional string fingerprint = 234678500;</code> 2696 * 2697 * @return This builder for chaining. 2698 */ clearFingerprint()2699 public Builder clearFingerprint() { 2700 fingerprint_ = getDefaultInstance().getFingerprint(); 2701 bitField0_ = (bitField0_ & ~0x00000010); 2702 onChanged(); 2703 return this; 2704 } 2705 /** 2706 * 2707 * 2708 * <pre> 2709 * Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy. 2710 * </pre> 2711 * 2712 * <code>optional string fingerprint = 234678500;</code> 2713 * 2714 * @param value The bytes for fingerprint to set. 2715 * @return This builder for chaining. 2716 */ setFingerprintBytes(com.google.protobuf.ByteString value)2717 public Builder setFingerprintBytes(com.google.protobuf.ByteString value) { 2718 if (value == null) { 2719 throw new NullPointerException(); 2720 } 2721 checkByteStringIsUtf8(value); 2722 fingerprint_ = value; 2723 bitField0_ |= 0x00000010; 2724 onChanged(); 2725 return this; 2726 } 2727 2728 private long id_; 2729 /** 2730 * 2731 * 2732 * <pre> 2733 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 2734 * </pre> 2735 * 2736 * <code>optional uint64 id = 3355;</code> 2737 * 2738 * @return Whether the id field is set. 2739 */ 2740 @java.lang.Override hasId()2741 public boolean hasId() { 2742 return ((bitField0_ & 0x00000020) != 0); 2743 } 2744 /** 2745 * 2746 * 2747 * <pre> 2748 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 2749 * </pre> 2750 * 2751 * <code>optional uint64 id = 3355;</code> 2752 * 2753 * @return The id. 2754 */ 2755 @java.lang.Override getId()2756 public long getId() { 2757 return id_; 2758 } 2759 /** 2760 * 2761 * 2762 * <pre> 2763 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 2764 * </pre> 2765 * 2766 * <code>optional uint64 id = 3355;</code> 2767 * 2768 * @param value The id to set. 2769 * @return This builder for chaining. 2770 */ setId(long value)2771 public Builder setId(long value) { 2772 2773 id_ = value; 2774 bitField0_ |= 0x00000020; 2775 onChanged(); 2776 return this; 2777 } 2778 /** 2779 * 2780 * 2781 * <pre> 2782 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 2783 * </pre> 2784 * 2785 * <code>optional uint64 id = 3355;</code> 2786 * 2787 * @return This builder for chaining. 2788 */ clearId()2789 public Builder clearId() { 2790 bitField0_ = (bitField0_ & ~0x00000020); 2791 id_ = 0L; 2792 onChanged(); 2793 return this; 2794 } 2795 2796 private java.lang.Object kind_ = ""; 2797 /** 2798 * 2799 * 2800 * <pre> 2801 * [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies 2802 * </pre> 2803 * 2804 * <code>optional string kind = 3292052;</code> 2805 * 2806 * @return Whether the kind field is set. 2807 */ hasKind()2808 public boolean hasKind() { 2809 return ((bitField0_ & 0x00000040) != 0); 2810 } 2811 /** 2812 * 2813 * 2814 * <pre> 2815 * [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies 2816 * </pre> 2817 * 2818 * <code>optional string kind = 3292052;</code> 2819 * 2820 * @return The kind. 2821 */ getKind()2822 public java.lang.String getKind() { 2823 java.lang.Object ref = kind_; 2824 if (!(ref instanceof java.lang.String)) { 2825 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2826 java.lang.String s = bs.toStringUtf8(); 2827 kind_ = s; 2828 return s; 2829 } else { 2830 return (java.lang.String) ref; 2831 } 2832 } 2833 /** 2834 * 2835 * 2836 * <pre> 2837 * [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies 2838 * </pre> 2839 * 2840 * <code>optional string kind = 3292052;</code> 2841 * 2842 * @return The bytes for kind. 2843 */ getKindBytes()2844 public com.google.protobuf.ByteString getKindBytes() { 2845 java.lang.Object ref = kind_; 2846 if (ref instanceof String) { 2847 com.google.protobuf.ByteString b = 2848 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2849 kind_ = b; 2850 return b; 2851 } else { 2852 return (com.google.protobuf.ByteString) ref; 2853 } 2854 } 2855 /** 2856 * 2857 * 2858 * <pre> 2859 * [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies 2860 * </pre> 2861 * 2862 * <code>optional string kind = 3292052;</code> 2863 * 2864 * @param value The kind to set. 2865 * @return This builder for chaining. 2866 */ setKind(java.lang.String value)2867 public Builder setKind(java.lang.String value) { 2868 if (value == null) { 2869 throw new NullPointerException(); 2870 } 2871 kind_ = value; 2872 bitField0_ |= 0x00000040; 2873 onChanged(); 2874 return this; 2875 } 2876 /** 2877 * 2878 * 2879 * <pre> 2880 * [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies 2881 * </pre> 2882 * 2883 * <code>optional string kind = 3292052;</code> 2884 * 2885 * @return This builder for chaining. 2886 */ clearKind()2887 public Builder clearKind() { 2888 kind_ = getDefaultInstance().getKind(); 2889 bitField0_ = (bitField0_ & ~0x00000040); 2890 onChanged(); 2891 return this; 2892 } 2893 /** 2894 * 2895 * 2896 * <pre> 2897 * [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies 2898 * </pre> 2899 * 2900 * <code>optional string kind = 3292052;</code> 2901 * 2902 * @param value The bytes for kind to set. 2903 * @return This builder for chaining. 2904 */ setKindBytes(com.google.protobuf.ByteString value)2905 public Builder setKindBytes(com.google.protobuf.ByteString value) { 2906 if (value == null) { 2907 throw new NullPointerException(); 2908 } 2909 checkByteStringIsUtf8(value); 2910 kind_ = value; 2911 bitField0_ |= 0x00000040; 2912 onChanged(); 2913 return this; 2914 } 2915 2916 private java.lang.Object name_ = ""; 2917 /** 2918 * 2919 * 2920 * <pre> 2921 * Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy. 2922 * </pre> 2923 * 2924 * <code>optional string name = 3373707;</code> 2925 * 2926 * @return Whether the name field is set. 2927 */ hasName()2928 public boolean hasName() { 2929 return ((bitField0_ & 0x00000080) != 0); 2930 } 2931 /** 2932 * 2933 * 2934 * <pre> 2935 * Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy. 2936 * </pre> 2937 * 2938 * <code>optional string name = 3373707;</code> 2939 * 2940 * @return The name. 2941 */ getName()2942 public java.lang.String getName() { 2943 java.lang.Object ref = name_; 2944 if (!(ref instanceof java.lang.String)) { 2945 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2946 java.lang.String s = bs.toStringUtf8(); 2947 name_ = s; 2948 return s; 2949 } else { 2950 return (java.lang.String) ref; 2951 } 2952 } 2953 /** 2954 * 2955 * 2956 * <pre> 2957 * Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy. 2958 * </pre> 2959 * 2960 * <code>optional string name = 3373707;</code> 2961 * 2962 * @return The bytes for name. 2963 */ getNameBytes()2964 public com.google.protobuf.ByteString getNameBytes() { 2965 java.lang.Object ref = name_; 2966 if (ref instanceof String) { 2967 com.google.protobuf.ByteString b = 2968 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2969 name_ = b; 2970 return b; 2971 } else { 2972 return (com.google.protobuf.ByteString) ref; 2973 } 2974 } 2975 /** 2976 * 2977 * 2978 * <pre> 2979 * Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy. 2980 * </pre> 2981 * 2982 * <code>optional string name = 3373707;</code> 2983 * 2984 * @param value The name to set. 2985 * @return This builder for chaining. 2986 */ setName(java.lang.String value)2987 public Builder setName(java.lang.String value) { 2988 if (value == null) { 2989 throw new NullPointerException(); 2990 } 2991 name_ = value; 2992 bitField0_ |= 0x00000080; 2993 onChanged(); 2994 return this; 2995 } 2996 /** 2997 * 2998 * 2999 * <pre> 3000 * Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy. 3001 * </pre> 3002 * 3003 * <code>optional string name = 3373707;</code> 3004 * 3005 * @return This builder for chaining. 3006 */ clearName()3007 public Builder clearName() { 3008 name_ = getDefaultInstance().getName(); 3009 bitField0_ = (bitField0_ & ~0x00000080); 3010 onChanged(); 3011 return this; 3012 } 3013 /** 3014 * 3015 * 3016 * <pre> 3017 * Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy. 3018 * </pre> 3019 * 3020 * <code>optional string name = 3373707;</code> 3021 * 3022 * @param value The bytes for name to set. 3023 * @return This builder for chaining. 3024 */ setNameBytes(com.google.protobuf.ByteString value)3025 public Builder setNameBytes(com.google.protobuf.ByteString value) { 3026 if (value == null) { 3027 throw new NullPointerException(); 3028 } 3029 checkByteStringIsUtf8(value); 3030 name_ = value; 3031 bitField0_ |= 0x00000080; 3032 onChanged(); 3033 return this; 3034 } 3035 3036 private java.lang.Object parent_ = ""; 3037 /** 3038 * 3039 * 3040 * <pre> 3041 * [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies. 3042 * </pre> 3043 * 3044 * <code>optional string parent = 78317738;</code> 3045 * 3046 * @return Whether the parent field is set. 3047 */ hasParent()3048 public boolean hasParent() { 3049 return ((bitField0_ & 0x00000100) != 0); 3050 } 3051 /** 3052 * 3053 * 3054 * <pre> 3055 * [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies. 3056 * </pre> 3057 * 3058 * <code>optional string parent = 78317738;</code> 3059 * 3060 * @return The parent. 3061 */ getParent()3062 public java.lang.String getParent() { 3063 java.lang.Object ref = parent_; 3064 if (!(ref instanceof java.lang.String)) { 3065 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3066 java.lang.String s = bs.toStringUtf8(); 3067 parent_ = s; 3068 return s; 3069 } else { 3070 return (java.lang.String) ref; 3071 } 3072 } 3073 /** 3074 * 3075 * 3076 * <pre> 3077 * [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies. 3078 * </pre> 3079 * 3080 * <code>optional string parent = 78317738;</code> 3081 * 3082 * @return The bytes for parent. 3083 */ getParentBytes()3084 public com.google.protobuf.ByteString getParentBytes() { 3085 java.lang.Object ref = parent_; 3086 if (ref instanceof String) { 3087 com.google.protobuf.ByteString b = 3088 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3089 parent_ = b; 3090 return b; 3091 } else { 3092 return (com.google.protobuf.ByteString) ref; 3093 } 3094 } 3095 /** 3096 * 3097 * 3098 * <pre> 3099 * [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies. 3100 * </pre> 3101 * 3102 * <code>optional string parent = 78317738;</code> 3103 * 3104 * @param value The parent to set. 3105 * @return This builder for chaining. 3106 */ setParent(java.lang.String value)3107 public Builder setParent(java.lang.String value) { 3108 if (value == null) { 3109 throw new NullPointerException(); 3110 } 3111 parent_ = value; 3112 bitField0_ |= 0x00000100; 3113 onChanged(); 3114 return this; 3115 } 3116 /** 3117 * 3118 * 3119 * <pre> 3120 * [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies. 3121 * </pre> 3122 * 3123 * <code>optional string parent = 78317738;</code> 3124 * 3125 * @return This builder for chaining. 3126 */ clearParent()3127 public Builder clearParent() { 3128 parent_ = getDefaultInstance().getParent(); 3129 bitField0_ = (bitField0_ & ~0x00000100); 3130 onChanged(); 3131 return this; 3132 } 3133 /** 3134 * 3135 * 3136 * <pre> 3137 * [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies. 3138 * </pre> 3139 * 3140 * <code>optional string parent = 78317738;</code> 3141 * 3142 * @param value The bytes for parent to set. 3143 * @return This builder for chaining. 3144 */ setParentBytes(com.google.protobuf.ByteString value)3145 public Builder setParentBytes(com.google.protobuf.ByteString value) { 3146 if (value == null) { 3147 throw new NullPointerException(); 3148 } 3149 checkByteStringIsUtf8(value); 3150 parent_ = value; 3151 bitField0_ |= 0x00000100; 3152 onChanged(); 3153 return this; 3154 } 3155 3156 private java.lang.Object region_ = ""; 3157 /** 3158 * 3159 * 3160 * <pre> 3161 * [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. 3162 * </pre> 3163 * 3164 * <code>optional string region = 138946292;</code> 3165 * 3166 * @return Whether the region field is set. 3167 */ hasRegion()3168 public boolean hasRegion() { 3169 return ((bitField0_ & 0x00000200) != 0); 3170 } 3171 /** 3172 * 3173 * 3174 * <pre> 3175 * [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. 3176 * </pre> 3177 * 3178 * <code>optional string region = 138946292;</code> 3179 * 3180 * @return The region. 3181 */ getRegion()3182 public java.lang.String getRegion() { 3183 java.lang.Object ref = region_; 3184 if (!(ref instanceof java.lang.String)) { 3185 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3186 java.lang.String s = bs.toStringUtf8(); 3187 region_ = s; 3188 return s; 3189 } else { 3190 return (java.lang.String) ref; 3191 } 3192 } 3193 /** 3194 * 3195 * 3196 * <pre> 3197 * [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. 3198 * </pre> 3199 * 3200 * <code>optional string region = 138946292;</code> 3201 * 3202 * @return The bytes for region. 3203 */ getRegionBytes()3204 public com.google.protobuf.ByteString getRegionBytes() { 3205 java.lang.Object ref = region_; 3206 if (ref instanceof String) { 3207 com.google.protobuf.ByteString b = 3208 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3209 region_ = b; 3210 return b; 3211 } else { 3212 return (com.google.protobuf.ByteString) ref; 3213 } 3214 } 3215 /** 3216 * 3217 * 3218 * <pre> 3219 * [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. 3220 * </pre> 3221 * 3222 * <code>optional string region = 138946292;</code> 3223 * 3224 * @param value The region to set. 3225 * @return This builder for chaining. 3226 */ setRegion(java.lang.String value)3227 public Builder setRegion(java.lang.String value) { 3228 if (value == null) { 3229 throw new NullPointerException(); 3230 } 3231 region_ = value; 3232 bitField0_ |= 0x00000200; 3233 onChanged(); 3234 return this; 3235 } 3236 /** 3237 * 3238 * 3239 * <pre> 3240 * [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. 3241 * </pre> 3242 * 3243 * <code>optional string region = 138946292;</code> 3244 * 3245 * @return This builder for chaining. 3246 */ clearRegion()3247 public Builder clearRegion() { 3248 region_ = getDefaultInstance().getRegion(); 3249 bitField0_ = (bitField0_ & ~0x00000200); 3250 onChanged(); 3251 return this; 3252 } 3253 /** 3254 * 3255 * 3256 * <pre> 3257 * [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. 3258 * </pre> 3259 * 3260 * <code>optional string region = 138946292;</code> 3261 * 3262 * @param value The bytes for region to set. 3263 * @return This builder for chaining. 3264 */ setRegionBytes(com.google.protobuf.ByteString value)3265 public Builder setRegionBytes(com.google.protobuf.ByteString value) { 3266 if (value == null) { 3267 throw new NullPointerException(); 3268 } 3269 checkByteStringIsUtf8(value); 3270 region_ = value; 3271 bitField0_ |= 0x00000200; 3272 onChanged(); 3273 return this; 3274 } 3275 3276 private int ruleTupleCount_; 3277 /** 3278 * 3279 * 3280 * <pre> 3281 * [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples. 3282 * </pre> 3283 * 3284 * <code>optional int32 rule_tuple_count = 388342037;</code> 3285 * 3286 * @return Whether the ruleTupleCount field is set. 3287 */ 3288 @java.lang.Override hasRuleTupleCount()3289 public boolean hasRuleTupleCount() { 3290 return ((bitField0_ & 0x00000400) != 0); 3291 } 3292 /** 3293 * 3294 * 3295 * <pre> 3296 * [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples. 3297 * </pre> 3298 * 3299 * <code>optional int32 rule_tuple_count = 388342037;</code> 3300 * 3301 * @return The ruleTupleCount. 3302 */ 3303 @java.lang.Override getRuleTupleCount()3304 public int getRuleTupleCount() { 3305 return ruleTupleCount_; 3306 } 3307 /** 3308 * 3309 * 3310 * <pre> 3311 * [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples. 3312 * </pre> 3313 * 3314 * <code>optional int32 rule_tuple_count = 388342037;</code> 3315 * 3316 * @param value The ruleTupleCount to set. 3317 * @return This builder for chaining. 3318 */ setRuleTupleCount(int value)3319 public Builder setRuleTupleCount(int value) { 3320 3321 ruleTupleCount_ = value; 3322 bitField0_ |= 0x00000400; 3323 onChanged(); 3324 return this; 3325 } 3326 /** 3327 * 3328 * 3329 * <pre> 3330 * [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples. 3331 * </pre> 3332 * 3333 * <code>optional int32 rule_tuple_count = 388342037;</code> 3334 * 3335 * @return This builder for chaining. 3336 */ clearRuleTupleCount()3337 public Builder clearRuleTupleCount() { 3338 bitField0_ = (bitField0_ & ~0x00000400); 3339 ruleTupleCount_ = 0; 3340 onChanged(); 3341 return this; 3342 } 3343 3344 private java.util.List<com.google.cloud.compute.v1.FirewallPolicyRule> rules_ = 3345 java.util.Collections.emptyList(); 3346 ensureRulesIsMutable()3347 private void ensureRulesIsMutable() { 3348 if (!((bitField0_ & 0x00000800) != 0)) { 3349 rules_ = new java.util.ArrayList<com.google.cloud.compute.v1.FirewallPolicyRule>(rules_); 3350 bitField0_ |= 0x00000800; 3351 } 3352 } 3353 3354 private com.google.protobuf.RepeatedFieldBuilderV3< 3355 com.google.cloud.compute.v1.FirewallPolicyRule, 3356 com.google.cloud.compute.v1.FirewallPolicyRule.Builder, 3357 com.google.cloud.compute.v1.FirewallPolicyRuleOrBuilder> 3358 rulesBuilder_; 3359 3360 /** 3361 * 3362 * 3363 * <pre> 3364 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 3365 * </pre> 3366 * 3367 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 3368 */ getRulesList()3369 public java.util.List<com.google.cloud.compute.v1.FirewallPolicyRule> getRulesList() { 3370 if (rulesBuilder_ == null) { 3371 return java.util.Collections.unmodifiableList(rules_); 3372 } else { 3373 return rulesBuilder_.getMessageList(); 3374 } 3375 } 3376 /** 3377 * 3378 * 3379 * <pre> 3380 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 3381 * </pre> 3382 * 3383 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 3384 */ getRulesCount()3385 public int getRulesCount() { 3386 if (rulesBuilder_ == null) { 3387 return rules_.size(); 3388 } else { 3389 return rulesBuilder_.getCount(); 3390 } 3391 } 3392 /** 3393 * 3394 * 3395 * <pre> 3396 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 3397 * </pre> 3398 * 3399 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 3400 */ getRules(int index)3401 public com.google.cloud.compute.v1.FirewallPolicyRule getRules(int index) { 3402 if (rulesBuilder_ == null) { 3403 return rules_.get(index); 3404 } else { 3405 return rulesBuilder_.getMessage(index); 3406 } 3407 } 3408 /** 3409 * 3410 * 3411 * <pre> 3412 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 3413 * </pre> 3414 * 3415 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 3416 */ setRules(int index, com.google.cloud.compute.v1.FirewallPolicyRule value)3417 public Builder setRules(int index, com.google.cloud.compute.v1.FirewallPolicyRule value) { 3418 if (rulesBuilder_ == null) { 3419 if (value == null) { 3420 throw new NullPointerException(); 3421 } 3422 ensureRulesIsMutable(); 3423 rules_.set(index, value); 3424 onChanged(); 3425 } else { 3426 rulesBuilder_.setMessage(index, value); 3427 } 3428 return this; 3429 } 3430 /** 3431 * 3432 * 3433 * <pre> 3434 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 3435 * </pre> 3436 * 3437 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 3438 */ setRules( int index, com.google.cloud.compute.v1.FirewallPolicyRule.Builder builderForValue)3439 public Builder setRules( 3440 int index, com.google.cloud.compute.v1.FirewallPolicyRule.Builder builderForValue) { 3441 if (rulesBuilder_ == null) { 3442 ensureRulesIsMutable(); 3443 rules_.set(index, builderForValue.build()); 3444 onChanged(); 3445 } else { 3446 rulesBuilder_.setMessage(index, builderForValue.build()); 3447 } 3448 return this; 3449 } 3450 /** 3451 * 3452 * 3453 * <pre> 3454 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 3455 * </pre> 3456 * 3457 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 3458 */ addRules(com.google.cloud.compute.v1.FirewallPolicyRule value)3459 public Builder addRules(com.google.cloud.compute.v1.FirewallPolicyRule value) { 3460 if (rulesBuilder_ == null) { 3461 if (value == null) { 3462 throw new NullPointerException(); 3463 } 3464 ensureRulesIsMutable(); 3465 rules_.add(value); 3466 onChanged(); 3467 } else { 3468 rulesBuilder_.addMessage(value); 3469 } 3470 return this; 3471 } 3472 /** 3473 * 3474 * 3475 * <pre> 3476 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 3477 * </pre> 3478 * 3479 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 3480 */ addRules(int index, com.google.cloud.compute.v1.FirewallPolicyRule value)3481 public Builder addRules(int index, com.google.cloud.compute.v1.FirewallPolicyRule value) { 3482 if (rulesBuilder_ == null) { 3483 if (value == null) { 3484 throw new NullPointerException(); 3485 } 3486 ensureRulesIsMutable(); 3487 rules_.add(index, value); 3488 onChanged(); 3489 } else { 3490 rulesBuilder_.addMessage(index, value); 3491 } 3492 return this; 3493 } 3494 /** 3495 * 3496 * 3497 * <pre> 3498 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 3499 * </pre> 3500 * 3501 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 3502 */ addRules( com.google.cloud.compute.v1.FirewallPolicyRule.Builder builderForValue)3503 public Builder addRules( 3504 com.google.cloud.compute.v1.FirewallPolicyRule.Builder builderForValue) { 3505 if (rulesBuilder_ == null) { 3506 ensureRulesIsMutable(); 3507 rules_.add(builderForValue.build()); 3508 onChanged(); 3509 } else { 3510 rulesBuilder_.addMessage(builderForValue.build()); 3511 } 3512 return this; 3513 } 3514 /** 3515 * 3516 * 3517 * <pre> 3518 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 3519 * </pre> 3520 * 3521 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 3522 */ addRules( int index, com.google.cloud.compute.v1.FirewallPolicyRule.Builder builderForValue)3523 public Builder addRules( 3524 int index, com.google.cloud.compute.v1.FirewallPolicyRule.Builder builderForValue) { 3525 if (rulesBuilder_ == null) { 3526 ensureRulesIsMutable(); 3527 rules_.add(index, builderForValue.build()); 3528 onChanged(); 3529 } else { 3530 rulesBuilder_.addMessage(index, builderForValue.build()); 3531 } 3532 return this; 3533 } 3534 /** 3535 * 3536 * 3537 * <pre> 3538 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 3539 * </pre> 3540 * 3541 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 3542 */ addAllRules( java.lang.Iterable<? extends com.google.cloud.compute.v1.FirewallPolicyRule> values)3543 public Builder addAllRules( 3544 java.lang.Iterable<? extends com.google.cloud.compute.v1.FirewallPolicyRule> values) { 3545 if (rulesBuilder_ == null) { 3546 ensureRulesIsMutable(); 3547 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rules_); 3548 onChanged(); 3549 } else { 3550 rulesBuilder_.addAllMessages(values); 3551 } 3552 return this; 3553 } 3554 /** 3555 * 3556 * 3557 * <pre> 3558 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 3559 * </pre> 3560 * 3561 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 3562 */ clearRules()3563 public Builder clearRules() { 3564 if (rulesBuilder_ == null) { 3565 rules_ = java.util.Collections.emptyList(); 3566 bitField0_ = (bitField0_ & ~0x00000800); 3567 onChanged(); 3568 } else { 3569 rulesBuilder_.clear(); 3570 } 3571 return this; 3572 } 3573 /** 3574 * 3575 * 3576 * <pre> 3577 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 3578 * </pre> 3579 * 3580 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 3581 */ removeRules(int index)3582 public Builder removeRules(int index) { 3583 if (rulesBuilder_ == null) { 3584 ensureRulesIsMutable(); 3585 rules_.remove(index); 3586 onChanged(); 3587 } else { 3588 rulesBuilder_.remove(index); 3589 } 3590 return this; 3591 } 3592 /** 3593 * 3594 * 3595 * <pre> 3596 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 3597 * </pre> 3598 * 3599 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 3600 */ getRulesBuilder(int index)3601 public com.google.cloud.compute.v1.FirewallPolicyRule.Builder getRulesBuilder(int index) { 3602 return getRulesFieldBuilder().getBuilder(index); 3603 } 3604 /** 3605 * 3606 * 3607 * <pre> 3608 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 3609 * </pre> 3610 * 3611 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 3612 */ getRulesOrBuilder(int index)3613 public com.google.cloud.compute.v1.FirewallPolicyRuleOrBuilder getRulesOrBuilder(int index) { 3614 if (rulesBuilder_ == null) { 3615 return rules_.get(index); 3616 } else { 3617 return rulesBuilder_.getMessageOrBuilder(index); 3618 } 3619 } 3620 /** 3621 * 3622 * 3623 * <pre> 3624 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 3625 * </pre> 3626 * 3627 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 3628 */ 3629 public java.util.List<? extends com.google.cloud.compute.v1.FirewallPolicyRuleOrBuilder> getRulesOrBuilderList()3630 getRulesOrBuilderList() { 3631 if (rulesBuilder_ != null) { 3632 return rulesBuilder_.getMessageOrBuilderList(); 3633 } else { 3634 return java.util.Collections.unmodifiableList(rules_); 3635 } 3636 } 3637 /** 3638 * 3639 * 3640 * <pre> 3641 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 3642 * </pre> 3643 * 3644 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 3645 */ addRulesBuilder()3646 public com.google.cloud.compute.v1.FirewallPolicyRule.Builder addRulesBuilder() { 3647 return getRulesFieldBuilder() 3648 .addBuilder(com.google.cloud.compute.v1.FirewallPolicyRule.getDefaultInstance()); 3649 } 3650 /** 3651 * 3652 * 3653 * <pre> 3654 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 3655 * </pre> 3656 * 3657 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 3658 */ addRulesBuilder(int index)3659 public com.google.cloud.compute.v1.FirewallPolicyRule.Builder addRulesBuilder(int index) { 3660 return getRulesFieldBuilder() 3661 .addBuilder(index, com.google.cloud.compute.v1.FirewallPolicyRule.getDefaultInstance()); 3662 } 3663 /** 3664 * 3665 * 3666 * <pre> 3667 * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. 3668 * </pre> 3669 * 3670 * <code>repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;</code> 3671 */ 3672 public java.util.List<com.google.cloud.compute.v1.FirewallPolicyRule.Builder> getRulesBuilderList()3673 getRulesBuilderList() { 3674 return getRulesFieldBuilder().getBuilderList(); 3675 } 3676 3677 private com.google.protobuf.RepeatedFieldBuilderV3< 3678 com.google.cloud.compute.v1.FirewallPolicyRule, 3679 com.google.cloud.compute.v1.FirewallPolicyRule.Builder, 3680 com.google.cloud.compute.v1.FirewallPolicyRuleOrBuilder> getRulesFieldBuilder()3681 getRulesFieldBuilder() { 3682 if (rulesBuilder_ == null) { 3683 rulesBuilder_ = 3684 new com.google.protobuf.RepeatedFieldBuilderV3< 3685 com.google.cloud.compute.v1.FirewallPolicyRule, 3686 com.google.cloud.compute.v1.FirewallPolicyRule.Builder, 3687 com.google.cloud.compute.v1.FirewallPolicyRuleOrBuilder>( 3688 rules_, ((bitField0_ & 0x00000800) != 0), getParentForChildren(), isClean()); 3689 rules_ = null; 3690 } 3691 return rulesBuilder_; 3692 } 3693 3694 private java.lang.Object selfLink_ = ""; 3695 /** 3696 * 3697 * 3698 * <pre> 3699 * [Output Only] Server-defined URL for the resource. 3700 * </pre> 3701 * 3702 * <code>optional string self_link = 456214797;</code> 3703 * 3704 * @return Whether the selfLink field is set. 3705 */ hasSelfLink()3706 public boolean hasSelfLink() { 3707 return ((bitField0_ & 0x00001000) != 0); 3708 } 3709 /** 3710 * 3711 * 3712 * <pre> 3713 * [Output Only] Server-defined URL for the resource. 3714 * </pre> 3715 * 3716 * <code>optional string self_link = 456214797;</code> 3717 * 3718 * @return The selfLink. 3719 */ getSelfLink()3720 public java.lang.String getSelfLink() { 3721 java.lang.Object ref = selfLink_; 3722 if (!(ref instanceof java.lang.String)) { 3723 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3724 java.lang.String s = bs.toStringUtf8(); 3725 selfLink_ = s; 3726 return s; 3727 } else { 3728 return (java.lang.String) ref; 3729 } 3730 } 3731 /** 3732 * 3733 * 3734 * <pre> 3735 * [Output Only] Server-defined URL for the resource. 3736 * </pre> 3737 * 3738 * <code>optional string self_link = 456214797;</code> 3739 * 3740 * @return The bytes for selfLink. 3741 */ getSelfLinkBytes()3742 public com.google.protobuf.ByteString getSelfLinkBytes() { 3743 java.lang.Object ref = selfLink_; 3744 if (ref instanceof String) { 3745 com.google.protobuf.ByteString b = 3746 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3747 selfLink_ = b; 3748 return b; 3749 } else { 3750 return (com.google.protobuf.ByteString) ref; 3751 } 3752 } 3753 /** 3754 * 3755 * 3756 * <pre> 3757 * [Output Only] Server-defined URL for the resource. 3758 * </pre> 3759 * 3760 * <code>optional string self_link = 456214797;</code> 3761 * 3762 * @param value The selfLink to set. 3763 * @return This builder for chaining. 3764 */ setSelfLink(java.lang.String value)3765 public Builder setSelfLink(java.lang.String value) { 3766 if (value == null) { 3767 throw new NullPointerException(); 3768 } 3769 selfLink_ = value; 3770 bitField0_ |= 0x00001000; 3771 onChanged(); 3772 return this; 3773 } 3774 /** 3775 * 3776 * 3777 * <pre> 3778 * [Output Only] Server-defined URL for the resource. 3779 * </pre> 3780 * 3781 * <code>optional string self_link = 456214797;</code> 3782 * 3783 * @return This builder for chaining. 3784 */ clearSelfLink()3785 public Builder clearSelfLink() { 3786 selfLink_ = getDefaultInstance().getSelfLink(); 3787 bitField0_ = (bitField0_ & ~0x00001000); 3788 onChanged(); 3789 return this; 3790 } 3791 /** 3792 * 3793 * 3794 * <pre> 3795 * [Output Only] Server-defined URL for the resource. 3796 * </pre> 3797 * 3798 * <code>optional string self_link = 456214797;</code> 3799 * 3800 * @param value The bytes for selfLink to set. 3801 * @return This builder for chaining. 3802 */ setSelfLinkBytes(com.google.protobuf.ByteString value)3803 public Builder setSelfLinkBytes(com.google.protobuf.ByteString value) { 3804 if (value == null) { 3805 throw new NullPointerException(); 3806 } 3807 checkByteStringIsUtf8(value); 3808 selfLink_ = value; 3809 bitField0_ |= 0x00001000; 3810 onChanged(); 3811 return this; 3812 } 3813 3814 private java.lang.Object selfLinkWithId_ = ""; 3815 /** 3816 * 3817 * 3818 * <pre> 3819 * [Output Only] Server-defined URL for this resource with the resource id. 3820 * </pre> 3821 * 3822 * <code>optional string self_link_with_id = 44520962;</code> 3823 * 3824 * @return Whether the selfLinkWithId field is set. 3825 */ hasSelfLinkWithId()3826 public boolean hasSelfLinkWithId() { 3827 return ((bitField0_ & 0x00002000) != 0); 3828 } 3829 /** 3830 * 3831 * 3832 * <pre> 3833 * [Output Only] Server-defined URL for this resource with the resource id. 3834 * </pre> 3835 * 3836 * <code>optional string self_link_with_id = 44520962;</code> 3837 * 3838 * @return The selfLinkWithId. 3839 */ getSelfLinkWithId()3840 public java.lang.String getSelfLinkWithId() { 3841 java.lang.Object ref = selfLinkWithId_; 3842 if (!(ref instanceof java.lang.String)) { 3843 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3844 java.lang.String s = bs.toStringUtf8(); 3845 selfLinkWithId_ = s; 3846 return s; 3847 } else { 3848 return (java.lang.String) ref; 3849 } 3850 } 3851 /** 3852 * 3853 * 3854 * <pre> 3855 * [Output Only] Server-defined URL for this resource with the resource id. 3856 * </pre> 3857 * 3858 * <code>optional string self_link_with_id = 44520962;</code> 3859 * 3860 * @return The bytes for selfLinkWithId. 3861 */ getSelfLinkWithIdBytes()3862 public com.google.protobuf.ByteString getSelfLinkWithIdBytes() { 3863 java.lang.Object ref = selfLinkWithId_; 3864 if (ref instanceof String) { 3865 com.google.protobuf.ByteString b = 3866 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3867 selfLinkWithId_ = b; 3868 return b; 3869 } else { 3870 return (com.google.protobuf.ByteString) ref; 3871 } 3872 } 3873 /** 3874 * 3875 * 3876 * <pre> 3877 * [Output Only] Server-defined URL for this resource with the resource id. 3878 * </pre> 3879 * 3880 * <code>optional string self_link_with_id = 44520962;</code> 3881 * 3882 * @param value The selfLinkWithId to set. 3883 * @return This builder for chaining. 3884 */ setSelfLinkWithId(java.lang.String value)3885 public Builder setSelfLinkWithId(java.lang.String value) { 3886 if (value == null) { 3887 throw new NullPointerException(); 3888 } 3889 selfLinkWithId_ = value; 3890 bitField0_ |= 0x00002000; 3891 onChanged(); 3892 return this; 3893 } 3894 /** 3895 * 3896 * 3897 * <pre> 3898 * [Output Only] Server-defined URL for this resource with the resource id. 3899 * </pre> 3900 * 3901 * <code>optional string self_link_with_id = 44520962;</code> 3902 * 3903 * @return This builder for chaining. 3904 */ clearSelfLinkWithId()3905 public Builder clearSelfLinkWithId() { 3906 selfLinkWithId_ = getDefaultInstance().getSelfLinkWithId(); 3907 bitField0_ = (bitField0_ & ~0x00002000); 3908 onChanged(); 3909 return this; 3910 } 3911 /** 3912 * 3913 * 3914 * <pre> 3915 * [Output Only] Server-defined URL for this resource with the resource id. 3916 * </pre> 3917 * 3918 * <code>optional string self_link_with_id = 44520962;</code> 3919 * 3920 * @param value The bytes for selfLinkWithId to set. 3921 * @return This builder for chaining. 3922 */ setSelfLinkWithIdBytes(com.google.protobuf.ByteString value)3923 public Builder setSelfLinkWithIdBytes(com.google.protobuf.ByteString value) { 3924 if (value == null) { 3925 throw new NullPointerException(); 3926 } 3927 checkByteStringIsUtf8(value); 3928 selfLinkWithId_ = value; 3929 bitField0_ |= 0x00002000; 3930 onChanged(); 3931 return this; 3932 } 3933 3934 private java.lang.Object shortName_ = ""; 3935 /** 3936 * 3937 * 3938 * <pre> 3939 * User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 3940 * </pre> 3941 * 3942 * <code>optional string short_name = 492051566;</code> 3943 * 3944 * @return Whether the shortName field is set. 3945 */ hasShortName()3946 public boolean hasShortName() { 3947 return ((bitField0_ & 0x00004000) != 0); 3948 } 3949 /** 3950 * 3951 * 3952 * <pre> 3953 * User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 3954 * </pre> 3955 * 3956 * <code>optional string short_name = 492051566;</code> 3957 * 3958 * @return The shortName. 3959 */ getShortName()3960 public java.lang.String getShortName() { 3961 java.lang.Object ref = shortName_; 3962 if (!(ref instanceof java.lang.String)) { 3963 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3964 java.lang.String s = bs.toStringUtf8(); 3965 shortName_ = s; 3966 return s; 3967 } else { 3968 return (java.lang.String) ref; 3969 } 3970 } 3971 /** 3972 * 3973 * 3974 * <pre> 3975 * User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 3976 * </pre> 3977 * 3978 * <code>optional string short_name = 492051566;</code> 3979 * 3980 * @return The bytes for shortName. 3981 */ getShortNameBytes()3982 public com.google.protobuf.ByteString getShortNameBytes() { 3983 java.lang.Object ref = shortName_; 3984 if (ref instanceof String) { 3985 com.google.protobuf.ByteString b = 3986 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3987 shortName_ = b; 3988 return b; 3989 } else { 3990 return (com.google.protobuf.ByteString) ref; 3991 } 3992 } 3993 /** 3994 * 3995 * 3996 * <pre> 3997 * User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 3998 * </pre> 3999 * 4000 * <code>optional string short_name = 492051566;</code> 4001 * 4002 * @param value The shortName to set. 4003 * @return This builder for chaining. 4004 */ setShortName(java.lang.String value)4005 public Builder setShortName(java.lang.String value) { 4006 if (value == null) { 4007 throw new NullPointerException(); 4008 } 4009 shortName_ = value; 4010 bitField0_ |= 0x00004000; 4011 onChanged(); 4012 return this; 4013 } 4014 /** 4015 * 4016 * 4017 * <pre> 4018 * User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 4019 * </pre> 4020 * 4021 * <code>optional string short_name = 492051566;</code> 4022 * 4023 * @return This builder for chaining. 4024 */ clearShortName()4025 public Builder clearShortName() { 4026 shortName_ = getDefaultInstance().getShortName(); 4027 bitField0_ = (bitField0_ & ~0x00004000); 4028 onChanged(); 4029 return this; 4030 } 4031 /** 4032 * 4033 * 4034 * <pre> 4035 * User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 4036 * </pre> 4037 * 4038 * <code>optional string short_name = 492051566;</code> 4039 * 4040 * @param value The bytes for shortName to set. 4041 * @return This builder for chaining. 4042 */ setShortNameBytes(com.google.protobuf.ByteString value)4043 public Builder setShortNameBytes(com.google.protobuf.ByteString value) { 4044 if (value == null) { 4045 throw new NullPointerException(); 4046 } 4047 checkByteStringIsUtf8(value); 4048 shortName_ = value; 4049 bitField0_ |= 0x00004000; 4050 onChanged(); 4051 return this; 4052 } 4053 4054 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)4055 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 4056 return super.setUnknownFields(unknownFields); 4057 } 4058 4059 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)4060 public final Builder mergeUnknownFields( 4061 final com.google.protobuf.UnknownFieldSet unknownFields) { 4062 return super.mergeUnknownFields(unknownFields); 4063 } 4064 4065 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.FirewallPolicy) 4066 } 4067 4068 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.FirewallPolicy) 4069 private static final com.google.cloud.compute.v1.FirewallPolicy DEFAULT_INSTANCE; 4070 4071 static { 4072 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.FirewallPolicy(); 4073 } 4074 getDefaultInstance()4075 public static com.google.cloud.compute.v1.FirewallPolicy getDefaultInstance() { 4076 return DEFAULT_INSTANCE; 4077 } 4078 4079 private static final com.google.protobuf.Parser<FirewallPolicy> PARSER = 4080 new com.google.protobuf.AbstractParser<FirewallPolicy>() { 4081 @java.lang.Override 4082 public FirewallPolicy parsePartialFrom( 4083 com.google.protobuf.CodedInputStream input, 4084 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4085 throws com.google.protobuf.InvalidProtocolBufferException { 4086 Builder builder = newBuilder(); 4087 try { 4088 builder.mergeFrom(input, extensionRegistry); 4089 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 4090 throw e.setUnfinishedMessage(builder.buildPartial()); 4091 } catch (com.google.protobuf.UninitializedMessageException e) { 4092 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 4093 } catch (java.io.IOException e) { 4094 throw new com.google.protobuf.InvalidProtocolBufferException(e) 4095 .setUnfinishedMessage(builder.buildPartial()); 4096 } 4097 return builder.buildPartial(); 4098 } 4099 }; 4100 parser()4101 public static com.google.protobuf.Parser<FirewallPolicy> parser() { 4102 return PARSER; 4103 } 4104 4105 @java.lang.Override getParserForType()4106 public com.google.protobuf.Parser<FirewallPolicy> getParserForType() { 4107 return PARSER; 4108 } 4109 4110 @java.lang.Override getDefaultInstanceForType()4111 public com.google.cloud.compute.v1.FirewallPolicy getDefaultInstanceForType() { 4112 return DEFAULT_INSTANCE; 4113 } 4114 } 4115