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 Rule resource. Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.compute.v1.Firewall} 29 */ 30 public final class Firewall extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.Firewall) 33 FirewallOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use Firewall.newBuilder() to construct. Firewall(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private Firewall(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 Firewall()40 private Firewall() { 41 allowed_ = java.util.Collections.emptyList(); 42 creationTimestamp_ = ""; 43 denied_ = java.util.Collections.emptyList(); 44 description_ = ""; 45 destinationRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; 46 direction_ = ""; 47 kind_ = ""; 48 name_ = ""; 49 network_ = ""; 50 selfLink_ = ""; 51 sourceRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; 52 sourceServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; 53 sourceTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; 54 targetServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; 55 targetTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; 56 } 57 58 @java.lang.Override 59 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)60 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 61 return new Firewall(); 62 } 63 64 @java.lang.Override getUnknownFields()65 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 66 return this.unknownFields; 67 } 68 getDescriptor()69 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 70 return com.google.cloud.compute.v1.Compute 71 .internal_static_google_cloud_compute_v1_Firewall_descriptor; 72 } 73 74 @java.lang.Override 75 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()76 internalGetFieldAccessorTable() { 77 return com.google.cloud.compute.v1.Compute 78 .internal_static_google_cloud_compute_v1_Firewall_fieldAccessorTable 79 .ensureFieldAccessorsInitialized( 80 com.google.cloud.compute.v1.Firewall.class, 81 com.google.cloud.compute.v1.Firewall.Builder.class); 82 } 83 84 /** 85 * 86 * 87 * <pre> 88 * Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot specify the sourceTags fields. 89 * </pre> 90 * 91 * Protobuf enum {@code google.cloud.compute.v1.Firewall.Direction} 92 */ 93 public enum Direction implements com.google.protobuf.ProtocolMessageEnum { 94 /** 95 * 96 * 97 * <pre> 98 * A value indicating that the enum field is not set. 99 * </pre> 100 * 101 * <code>UNDEFINED_DIRECTION = 0;</code> 102 */ 103 UNDEFINED_DIRECTION(0), 104 /** 105 * 106 * 107 * <pre> 108 * Indicates that firewall should apply to outgoing traffic. 109 * </pre> 110 * 111 * <code>EGRESS = 432880501;</code> 112 */ 113 EGRESS(432880501), 114 /** 115 * 116 * 117 * <pre> 118 * Indicates that firewall should apply to incoming traffic. 119 * </pre> 120 * 121 * <code>INGRESS = 516931221;</code> 122 */ 123 INGRESS(516931221), 124 UNRECOGNIZED(-1), 125 ; 126 127 /** 128 * 129 * 130 * <pre> 131 * A value indicating that the enum field is not set. 132 * </pre> 133 * 134 * <code>UNDEFINED_DIRECTION = 0;</code> 135 */ 136 public static final int UNDEFINED_DIRECTION_VALUE = 0; 137 /** 138 * 139 * 140 * <pre> 141 * Indicates that firewall should apply to outgoing traffic. 142 * </pre> 143 * 144 * <code>EGRESS = 432880501;</code> 145 */ 146 public static final int EGRESS_VALUE = 432880501; 147 /** 148 * 149 * 150 * <pre> 151 * Indicates that firewall should apply to incoming traffic. 152 * </pre> 153 * 154 * <code>INGRESS = 516931221;</code> 155 */ 156 public static final int INGRESS_VALUE = 516931221; 157 getNumber()158 public final int getNumber() { 159 if (this == UNRECOGNIZED) { 160 throw new java.lang.IllegalArgumentException( 161 "Can't get the number of an unknown enum value."); 162 } 163 return value; 164 } 165 166 /** 167 * @param value The numeric wire value of the corresponding enum entry. 168 * @return The enum associated with the given numeric wire value. 169 * @deprecated Use {@link #forNumber(int)} instead. 170 */ 171 @java.lang.Deprecated valueOf(int value)172 public static Direction valueOf(int value) { 173 return forNumber(value); 174 } 175 176 /** 177 * @param value The numeric wire value of the corresponding enum entry. 178 * @return The enum associated with the given numeric wire value. 179 */ forNumber(int value)180 public static Direction forNumber(int value) { 181 switch (value) { 182 case 0: 183 return UNDEFINED_DIRECTION; 184 case 432880501: 185 return EGRESS; 186 case 516931221: 187 return INGRESS; 188 default: 189 return null; 190 } 191 } 192 internalGetValueMap()193 public static com.google.protobuf.Internal.EnumLiteMap<Direction> internalGetValueMap() { 194 return internalValueMap; 195 } 196 197 private static final com.google.protobuf.Internal.EnumLiteMap<Direction> internalValueMap = 198 new com.google.protobuf.Internal.EnumLiteMap<Direction>() { 199 public Direction findValueByNumber(int number) { 200 return Direction.forNumber(number); 201 } 202 }; 203 getValueDescriptor()204 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 205 if (this == UNRECOGNIZED) { 206 throw new java.lang.IllegalStateException( 207 "Can't get the descriptor of an unrecognized enum value."); 208 } 209 return getDescriptor().getValues().get(ordinal()); 210 } 211 getDescriptorForType()212 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 213 return getDescriptor(); 214 } 215 getDescriptor()216 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 217 return com.google.cloud.compute.v1.Firewall.getDescriptor().getEnumTypes().get(0); 218 } 219 220 private static final Direction[] VALUES = values(); 221 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)222 public static Direction valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 223 if (desc.getType() != getDescriptor()) { 224 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 225 } 226 if (desc.getIndex() == -1) { 227 return UNRECOGNIZED; 228 } 229 return VALUES[desc.getIndex()]; 230 } 231 232 private final int value; 233 Direction(int value)234 private Direction(int value) { 235 this.value = value; 236 } 237 238 // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.Firewall.Direction) 239 } 240 241 private int bitField0_; 242 public static final int ALLOWED_FIELD_NUMBER = 162398632; 243 244 @SuppressWarnings("serial") 245 private java.util.List<com.google.cloud.compute.v1.Allowed> allowed_; 246 /** 247 * 248 * 249 * <pre> 250 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 251 * </pre> 252 * 253 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 254 */ 255 @java.lang.Override getAllowedList()256 public java.util.List<com.google.cloud.compute.v1.Allowed> getAllowedList() { 257 return allowed_; 258 } 259 /** 260 * 261 * 262 * <pre> 263 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 264 * </pre> 265 * 266 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 267 */ 268 @java.lang.Override 269 public java.util.List<? extends com.google.cloud.compute.v1.AllowedOrBuilder> getAllowedOrBuilderList()270 getAllowedOrBuilderList() { 271 return allowed_; 272 } 273 /** 274 * 275 * 276 * <pre> 277 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 278 * </pre> 279 * 280 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 281 */ 282 @java.lang.Override getAllowedCount()283 public int getAllowedCount() { 284 return allowed_.size(); 285 } 286 /** 287 * 288 * 289 * <pre> 290 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 291 * </pre> 292 * 293 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 294 */ 295 @java.lang.Override getAllowed(int index)296 public com.google.cloud.compute.v1.Allowed getAllowed(int index) { 297 return allowed_.get(index); 298 } 299 /** 300 * 301 * 302 * <pre> 303 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 304 * </pre> 305 * 306 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 307 */ 308 @java.lang.Override getAllowedOrBuilder(int index)309 public com.google.cloud.compute.v1.AllowedOrBuilder getAllowedOrBuilder(int index) { 310 return allowed_.get(index); 311 } 312 313 public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 30525366; 314 315 @SuppressWarnings("serial") 316 private volatile java.lang.Object creationTimestamp_ = ""; 317 /** 318 * 319 * 320 * <pre> 321 * [Output Only] Creation timestamp in RFC3339 text format. 322 * </pre> 323 * 324 * <code>optional string creation_timestamp = 30525366;</code> 325 * 326 * @return Whether the creationTimestamp field is set. 327 */ 328 @java.lang.Override hasCreationTimestamp()329 public boolean hasCreationTimestamp() { 330 return ((bitField0_ & 0x00000001) != 0); 331 } 332 /** 333 * 334 * 335 * <pre> 336 * [Output Only] Creation timestamp in RFC3339 text format. 337 * </pre> 338 * 339 * <code>optional string creation_timestamp = 30525366;</code> 340 * 341 * @return The creationTimestamp. 342 */ 343 @java.lang.Override getCreationTimestamp()344 public java.lang.String getCreationTimestamp() { 345 java.lang.Object ref = creationTimestamp_; 346 if (ref instanceof java.lang.String) { 347 return (java.lang.String) ref; 348 } else { 349 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 350 java.lang.String s = bs.toStringUtf8(); 351 creationTimestamp_ = s; 352 return s; 353 } 354 } 355 /** 356 * 357 * 358 * <pre> 359 * [Output Only] Creation timestamp in RFC3339 text format. 360 * </pre> 361 * 362 * <code>optional string creation_timestamp = 30525366;</code> 363 * 364 * @return The bytes for creationTimestamp. 365 */ 366 @java.lang.Override getCreationTimestampBytes()367 public com.google.protobuf.ByteString getCreationTimestampBytes() { 368 java.lang.Object ref = creationTimestamp_; 369 if (ref instanceof java.lang.String) { 370 com.google.protobuf.ByteString b = 371 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 372 creationTimestamp_ = b; 373 return b; 374 } else { 375 return (com.google.protobuf.ByteString) ref; 376 } 377 } 378 379 public static final int DENIED_FIELD_NUMBER = 275217307; 380 381 @SuppressWarnings("serial") 382 private java.util.List<com.google.cloud.compute.v1.Denied> denied_; 383 /** 384 * 385 * 386 * <pre> 387 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 388 * </pre> 389 * 390 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 391 */ 392 @java.lang.Override getDeniedList()393 public java.util.List<com.google.cloud.compute.v1.Denied> getDeniedList() { 394 return denied_; 395 } 396 /** 397 * 398 * 399 * <pre> 400 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 401 * </pre> 402 * 403 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 404 */ 405 @java.lang.Override 406 public java.util.List<? extends com.google.cloud.compute.v1.DeniedOrBuilder> getDeniedOrBuilderList()407 getDeniedOrBuilderList() { 408 return denied_; 409 } 410 /** 411 * 412 * 413 * <pre> 414 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 415 * </pre> 416 * 417 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 418 */ 419 @java.lang.Override getDeniedCount()420 public int getDeniedCount() { 421 return denied_.size(); 422 } 423 /** 424 * 425 * 426 * <pre> 427 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 428 * </pre> 429 * 430 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 431 */ 432 @java.lang.Override getDenied(int index)433 public com.google.cloud.compute.v1.Denied getDenied(int index) { 434 return denied_.get(index); 435 } 436 /** 437 * 438 * 439 * <pre> 440 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 441 * </pre> 442 * 443 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 444 */ 445 @java.lang.Override getDeniedOrBuilder(int index)446 public com.google.cloud.compute.v1.DeniedOrBuilder getDeniedOrBuilder(int index) { 447 return denied_.get(index); 448 } 449 450 public static final int DESCRIPTION_FIELD_NUMBER = 422937596; 451 452 @SuppressWarnings("serial") 453 private volatile java.lang.Object description_ = ""; 454 /** 455 * 456 * 457 * <pre> 458 * An optional description of this resource. Provide this field when you create the resource. 459 * </pre> 460 * 461 * <code>optional string description = 422937596;</code> 462 * 463 * @return Whether the description field is set. 464 */ 465 @java.lang.Override hasDescription()466 public boolean hasDescription() { 467 return ((bitField0_ & 0x00000002) != 0); 468 } 469 /** 470 * 471 * 472 * <pre> 473 * An optional description of this resource. Provide this field when you create the resource. 474 * </pre> 475 * 476 * <code>optional string description = 422937596;</code> 477 * 478 * @return The description. 479 */ 480 @java.lang.Override getDescription()481 public java.lang.String getDescription() { 482 java.lang.Object ref = description_; 483 if (ref instanceof java.lang.String) { 484 return (java.lang.String) ref; 485 } else { 486 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 487 java.lang.String s = bs.toStringUtf8(); 488 description_ = s; 489 return s; 490 } 491 } 492 /** 493 * 494 * 495 * <pre> 496 * An optional description of this resource. Provide this field when you create the resource. 497 * </pre> 498 * 499 * <code>optional string description = 422937596;</code> 500 * 501 * @return The bytes for description. 502 */ 503 @java.lang.Override getDescriptionBytes()504 public com.google.protobuf.ByteString getDescriptionBytes() { 505 java.lang.Object ref = description_; 506 if (ref instanceof java.lang.String) { 507 com.google.protobuf.ByteString b = 508 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 509 description_ = b; 510 return b; 511 } else { 512 return (com.google.protobuf.ByteString) ref; 513 } 514 } 515 516 public static final int DESTINATION_RANGES_FIELD_NUMBER = 305699879; 517 518 @SuppressWarnings("serial") 519 private com.google.protobuf.LazyStringList destinationRanges_; 520 /** 521 * 522 * 523 * <pre> 524 * If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Both IPv4 and IPv6 are supported. 525 * </pre> 526 * 527 * <code>repeated string destination_ranges = 305699879;</code> 528 * 529 * @return A list containing the destinationRanges. 530 */ getDestinationRangesList()531 public com.google.protobuf.ProtocolStringList getDestinationRangesList() { 532 return destinationRanges_; 533 } 534 /** 535 * 536 * 537 * <pre> 538 * If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Both IPv4 and IPv6 are supported. 539 * </pre> 540 * 541 * <code>repeated string destination_ranges = 305699879;</code> 542 * 543 * @return The count of destinationRanges. 544 */ getDestinationRangesCount()545 public int getDestinationRangesCount() { 546 return destinationRanges_.size(); 547 } 548 /** 549 * 550 * 551 * <pre> 552 * If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Both IPv4 and IPv6 are supported. 553 * </pre> 554 * 555 * <code>repeated string destination_ranges = 305699879;</code> 556 * 557 * @param index The index of the element to return. 558 * @return The destinationRanges at the given index. 559 */ getDestinationRanges(int index)560 public java.lang.String getDestinationRanges(int index) { 561 return destinationRanges_.get(index); 562 } 563 /** 564 * 565 * 566 * <pre> 567 * If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Both IPv4 and IPv6 are supported. 568 * </pre> 569 * 570 * <code>repeated string destination_ranges = 305699879;</code> 571 * 572 * @param index The index of the value to return. 573 * @return The bytes of the destinationRanges at the given index. 574 */ getDestinationRangesBytes(int index)575 public com.google.protobuf.ByteString getDestinationRangesBytes(int index) { 576 return destinationRanges_.getByteString(index); 577 } 578 579 public static final int DIRECTION_FIELD_NUMBER = 111150975; 580 581 @SuppressWarnings("serial") 582 private volatile java.lang.Object direction_ = ""; 583 /** 584 * 585 * 586 * <pre> 587 * Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot specify the sourceTags fields. 588 * Check the Direction enum for the list of possible values. 589 * </pre> 590 * 591 * <code>optional string direction = 111150975;</code> 592 * 593 * @return Whether the direction field is set. 594 */ 595 @java.lang.Override hasDirection()596 public boolean hasDirection() { 597 return ((bitField0_ & 0x00000004) != 0); 598 } 599 /** 600 * 601 * 602 * <pre> 603 * Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot specify the sourceTags fields. 604 * Check the Direction enum for the list of possible values. 605 * </pre> 606 * 607 * <code>optional string direction = 111150975;</code> 608 * 609 * @return The direction. 610 */ 611 @java.lang.Override getDirection()612 public java.lang.String getDirection() { 613 java.lang.Object ref = direction_; 614 if (ref instanceof java.lang.String) { 615 return (java.lang.String) ref; 616 } else { 617 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 618 java.lang.String s = bs.toStringUtf8(); 619 direction_ = s; 620 return s; 621 } 622 } 623 /** 624 * 625 * 626 * <pre> 627 * Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot specify the sourceTags fields. 628 * Check the Direction enum for the list of possible values. 629 * </pre> 630 * 631 * <code>optional string direction = 111150975;</code> 632 * 633 * @return The bytes for direction. 634 */ 635 @java.lang.Override getDirectionBytes()636 public com.google.protobuf.ByteString getDirectionBytes() { 637 java.lang.Object ref = direction_; 638 if (ref instanceof java.lang.String) { 639 com.google.protobuf.ByteString b = 640 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 641 direction_ = b; 642 return b; 643 } else { 644 return (com.google.protobuf.ByteString) ref; 645 } 646 } 647 648 public static final int DISABLED_FIELD_NUMBER = 270940796; 649 private boolean disabled_ = false; 650 /** 651 * 652 * 653 * <pre> 654 * Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled. 655 * </pre> 656 * 657 * <code>optional bool disabled = 270940796;</code> 658 * 659 * @return Whether the disabled field is set. 660 */ 661 @java.lang.Override hasDisabled()662 public boolean hasDisabled() { 663 return ((bitField0_ & 0x00000008) != 0); 664 } 665 /** 666 * 667 * 668 * <pre> 669 * Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled. 670 * </pre> 671 * 672 * <code>optional bool disabled = 270940796;</code> 673 * 674 * @return The disabled. 675 */ 676 @java.lang.Override getDisabled()677 public boolean getDisabled() { 678 return disabled_; 679 } 680 681 public static final int ID_FIELD_NUMBER = 3355; 682 private long id_ = 0L; 683 /** 684 * 685 * 686 * <pre> 687 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 688 * </pre> 689 * 690 * <code>optional uint64 id = 3355;</code> 691 * 692 * @return Whether the id field is set. 693 */ 694 @java.lang.Override hasId()695 public boolean hasId() { 696 return ((bitField0_ & 0x00000010) != 0); 697 } 698 /** 699 * 700 * 701 * <pre> 702 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 703 * </pre> 704 * 705 * <code>optional uint64 id = 3355;</code> 706 * 707 * @return The id. 708 */ 709 @java.lang.Override getId()710 public long getId() { 711 return id_; 712 } 713 714 public static final int KIND_FIELD_NUMBER = 3292052; 715 716 @SuppressWarnings("serial") 717 private volatile java.lang.Object kind_ = ""; 718 /** 719 * 720 * 721 * <pre> 722 * [Output Only] Type of the resource. Always compute#firewall for firewall rules. 723 * </pre> 724 * 725 * <code>optional string kind = 3292052;</code> 726 * 727 * @return Whether the kind field is set. 728 */ 729 @java.lang.Override hasKind()730 public boolean hasKind() { 731 return ((bitField0_ & 0x00000020) != 0); 732 } 733 /** 734 * 735 * 736 * <pre> 737 * [Output Only] Type of the resource. Always compute#firewall for firewall rules. 738 * </pre> 739 * 740 * <code>optional string kind = 3292052;</code> 741 * 742 * @return The kind. 743 */ 744 @java.lang.Override getKind()745 public java.lang.String getKind() { 746 java.lang.Object ref = kind_; 747 if (ref instanceof java.lang.String) { 748 return (java.lang.String) ref; 749 } else { 750 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 751 java.lang.String s = bs.toStringUtf8(); 752 kind_ = s; 753 return s; 754 } 755 } 756 /** 757 * 758 * 759 * <pre> 760 * [Output Only] Type of the resource. Always compute#firewall for firewall rules. 761 * </pre> 762 * 763 * <code>optional string kind = 3292052;</code> 764 * 765 * @return The bytes for kind. 766 */ 767 @java.lang.Override getKindBytes()768 public com.google.protobuf.ByteString getKindBytes() { 769 java.lang.Object ref = kind_; 770 if (ref instanceof java.lang.String) { 771 com.google.protobuf.ByteString b = 772 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 773 kind_ = b; 774 return b; 775 } else { 776 return (com.google.protobuf.ByteString) ref; 777 } 778 } 779 780 public static final int LOG_CONFIG_FIELD_NUMBER = 351299741; 781 private com.google.cloud.compute.v1.FirewallLogConfig logConfig_; 782 /** 783 * 784 * 785 * <pre> 786 * This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging. 787 * </pre> 788 * 789 * <code>optional .google.cloud.compute.v1.FirewallLogConfig log_config = 351299741;</code> 790 * 791 * @return Whether the logConfig field is set. 792 */ 793 @java.lang.Override hasLogConfig()794 public boolean hasLogConfig() { 795 return ((bitField0_ & 0x00000040) != 0); 796 } 797 /** 798 * 799 * 800 * <pre> 801 * This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging. 802 * </pre> 803 * 804 * <code>optional .google.cloud.compute.v1.FirewallLogConfig log_config = 351299741;</code> 805 * 806 * @return The logConfig. 807 */ 808 @java.lang.Override getLogConfig()809 public com.google.cloud.compute.v1.FirewallLogConfig getLogConfig() { 810 return logConfig_ == null 811 ? com.google.cloud.compute.v1.FirewallLogConfig.getDefaultInstance() 812 : logConfig_; 813 } 814 /** 815 * 816 * 817 * <pre> 818 * This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging. 819 * </pre> 820 * 821 * <code>optional .google.cloud.compute.v1.FirewallLogConfig log_config = 351299741;</code> 822 */ 823 @java.lang.Override getLogConfigOrBuilder()824 public com.google.cloud.compute.v1.FirewallLogConfigOrBuilder getLogConfigOrBuilder() { 825 return logConfig_ == null 826 ? com.google.cloud.compute.v1.FirewallLogConfig.getDefaultInstance() 827 : logConfig_; 828 } 829 830 public static final int NAME_FIELD_NUMBER = 3373707; 831 832 @SuppressWarnings("serial") 833 private volatile java.lang.Object name_ = ""; 834 /** 835 * 836 * 837 * <pre> 838 * Name of the resource; provided by the client when the resource is created. 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. 839 * </pre> 840 * 841 * <code>optional string name = 3373707;</code> 842 * 843 * @return Whether the name field is set. 844 */ 845 @java.lang.Override hasName()846 public boolean hasName() { 847 return ((bitField0_ & 0x00000080) != 0); 848 } 849 /** 850 * 851 * 852 * <pre> 853 * Name of the resource; provided by the client when the resource is created. 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. 854 * </pre> 855 * 856 * <code>optional string name = 3373707;</code> 857 * 858 * @return The name. 859 */ 860 @java.lang.Override getName()861 public java.lang.String getName() { 862 java.lang.Object ref = name_; 863 if (ref instanceof java.lang.String) { 864 return (java.lang.String) ref; 865 } else { 866 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 867 java.lang.String s = bs.toStringUtf8(); 868 name_ = s; 869 return s; 870 } 871 } 872 /** 873 * 874 * 875 * <pre> 876 * Name of the resource; provided by the client when the resource is created. 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. 877 * </pre> 878 * 879 * <code>optional string name = 3373707;</code> 880 * 881 * @return The bytes for name. 882 */ 883 @java.lang.Override getNameBytes()884 public com.google.protobuf.ByteString getNameBytes() { 885 java.lang.Object ref = name_; 886 if (ref instanceof java.lang.String) { 887 com.google.protobuf.ByteString b = 888 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 889 name_ = b; 890 return b; 891 } else { 892 return (com.google.protobuf.ByteString) ref; 893 } 894 } 895 896 public static final int NETWORK_FIELD_NUMBER = 232872494; 897 898 @SuppressWarnings("serial") 899 private volatile java.lang.Object network_ = ""; 900 /** 901 * 902 * 903 * <pre> 904 * URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - projects/myproject/global/networks/my-network - global/networks/default 905 * </pre> 906 * 907 * <code>optional string network = 232872494;</code> 908 * 909 * @return Whether the network field is set. 910 */ 911 @java.lang.Override hasNetwork()912 public boolean hasNetwork() { 913 return ((bitField0_ & 0x00000100) != 0); 914 } 915 /** 916 * 917 * 918 * <pre> 919 * URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - projects/myproject/global/networks/my-network - global/networks/default 920 * </pre> 921 * 922 * <code>optional string network = 232872494;</code> 923 * 924 * @return The network. 925 */ 926 @java.lang.Override getNetwork()927 public java.lang.String getNetwork() { 928 java.lang.Object ref = network_; 929 if (ref instanceof java.lang.String) { 930 return (java.lang.String) ref; 931 } else { 932 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 933 java.lang.String s = bs.toStringUtf8(); 934 network_ = s; 935 return s; 936 } 937 } 938 /** 939 * 940 * 941 * <pre> 942 * URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - projects/myproject/global/networks/my-network - global/networks/default 943 * </pre> 944 * 945 * <code>optional string network = 232872494;</code> 946 * 947 * @return The bytes for network. 948 */ 949 @java.lang.Override getNetworkBytes()950 public com.google.protobuf.ByteString getNetworkBytes() { 951 java.lang.Object ref = network_; 952 if (ref instanceof java.lang.String) { 953 com.google.protobuf.ByteString b = 954 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 955 network_ = b; 956 return b; 957 } else { 958 return (com.google.protobuf.ByteString) ref; 959 } 960 } 961 962 public static final int PRIORITY_FIELD_NUMBER = 445151652; 963 private int priority_ = 0; 964 /** 965 * 966 * 967 * <pre> 968 * Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`. 969 * </pre> 970 * 971 * <code>optional int32 priority = 445151652;</code> 972 * 973 * @return Whether the priority field is set. 974 */ 975 @java.lang.Override hasPriority()976 public boolean hasPriority() { 977 return ((bitField0_ & 0x00000200) != 0); 978 } 979 /** 980 * 981 * 982 * <pre> 983 * Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`. 984 * </pre> 985 * 986 * <code>optional int32 priority = 445151652;</code> 987 * 988 * @return The priority. 989 */ 990 @java.lang.Override getPriority()991 public int getPriority() { 992 return priority_; 993 } 994 995 public static final int SELF_LINK_FIELD_NUMBER = 456214797; 996 997 @SuppressWarnings("serial") 998 private volatile java.lang.Object selfLink_ = ""; 999 /** 1000 * 1001 * 1002 * <pre> 1003 * [Output Only] Server-defined URL for the resource. 1004 * </pre> 1005 * 1006 * <code>optional string self_link = 456214797;</code> 1007 * 1008 * @return Whether the selfLink field is set. 1009 */ 1010 @java.lang.Override hasSelfLink()1011 public boolean hasSelfLink() { 1012 return ((bitField0_ & 0x00000400) != 0); 1013 } 1014 /** 1015 * 1016 * 1017 * <pre> 1018 * [Output Only] Server-defined URL for the resource. 1019 * </pre> 1020 * 1021 * <code>optional string self_link = 456214797;</code> 1022 * 1023 * @return The selfLink. 1024 */ 1025 @java.lang.Override getSelfLink()1026 public java.lang.String getSelfLink() { 1027 java.lang.Object ref = selfLink_; 1028 if (ref instanceof java.lang.String) { 1029 return (java.lang.String) ref; 1030 } else { 1031 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1032 java.lang.String s = bs.toStringUtf8(); 1033 selfLink_ = s; 1034 return s; 1035 } 1036 } 1037 /** 1038 * 1039 * 1040 * <pre> 1041 * [Output Only] Server-defined URL for the resource. 1042 * </pre> 1043 * 1044 * <code>optional string self_link = 456214797;</code> 1045 * 1046 * @return The bytes for selfLink. 1047 */ 1048 @java.lang.Override getSelfLinkBytes()1049 public com.google.protobuf.ByteString getSelfLinkBytes() { 1050 java.lang.Object ref = selfLink_; 1051 if (ref instanceof java.lang.String) { 1052 com.google.protobuf.ByteString b = 1053 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1054 selfLink_ = b; 1055 return b; 1056 } else { 1057 return (com.google.protobuf.ByteString) ref; 1058 } 1059 } 1060 1061 public static final int SOURCE_RANGES_FIELD_NUMBER = 200097658; 1062 1063 @SuppressWarnings("serial") 1064 private com.google.protobuf.LazyStringList sourceRanges_; 1065 /** 1066 * 1067 * 1068 * <pre> 1069 * If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported. 1070 * </pre> 1071 * 1072 * <code>repeated string source_ranges = 200097658;</code> 1073 * 1074 * @return A list containing the sourceRanges. 1075 */ getSourceRangesList()1076 public com.google.protobuf.ProtocolStringList getSourceRangesList() { 1077 return sourceRanges_; 1078 } 1079 /** 1080 * 1081 * 1082 * <pre> 1083 * If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported. 1084 * </pre> 1085 * 1086 * <code>repeated string source_ranges = 200097658;</code> 1087 * 1088 * @return The count of sourceRanges. 1089 */ getSourceRangesCount()1090 public int getSourceRangesCount() { 1091 return sourceRanges_.size(); 1092 } 1093 /** 1094 * 1095 * 1096 * <pre> 1097 * If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported. 1098 * </pre> 1099 * 1100 * <code>repeated string source_ranges = 200097658;</code> 1101 * 1102 * @param index The index of the element to return. 1103 * @return The sourceRanges at the given index. 1104 */ getSourceRanges(int index)1105 public java.lang.String getSourceRanges(int index) { 1106 return sourceRanges_.get(index); 1107 } 1108 /** 1109 * 1110 * 1111 * <pre> 1112 * If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported. 1113 * </pre> 1114 * 1115 * <code>repeated string source_ranges = 200097658;</code> 1116 * 1117 * @param index The index of the value to return. 1118 * @return The bytes of the sourceRanges at the given index. 1119 */ getSourceRangesBytes(int index)1120 public com.google.protobuf.ByteString getSourceRangesBytes(int index) { 1121 return sourceRanges_.getByteString(index); 1122 } 1123 1124 public static final int SOURCE_SERVICE_ACCOUNTS_FIELD_NUMBER = 105100756; 1125 1126 @SuppressWarnings("serial") 1127 private com.google.protobuf.LazyStringList sourceServiceAccounts_; 1128 /** 1129 * 1130 * 1131 * <pre> 1132 * If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. 1133 * </pre> 1134 * 1135 * <code>repeated string source_service_accounts = 105100756;</code> 1136 * 1137 * @return A list containing the sourceServiceAccounts. 1138 */ getSourceServiceAccountsList()1139 public com.google.protobuf.ProtocolStringList getSourceServiceAccountsList() { 1140 return sourceServiceAccounts_; 1141 } 1142 /** 1143 * 1144 * 1145 * <pre> 1146 * If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. 1147 * </pre> 1148 * 1149 * <code>repeated string source_service_accounts = 105100756;</code> 1150 * 1151 * @return The count of sourceServiceAccounts. 1152 */ getSourceServiceAccountsCount()1153 public int getSourceServiceAccountsCount() { 1154 return sourceServiceAccounts_.size(); 1155 } 1156 /** 1157 * 1158 * 1159 * <pre> 1160 * If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. 1161 * </pre> 1162 * 1163 * <code>repeated string source_service_accounts = 105100756;</code> 1164 * 1165 * @param index The index of the element to return. 1166 * @return The sourceServiceAccounts at the given index. 1167 */ getSourceServiceAccounts(int index)1168 public java.lang.String getSourceServiceAccounts(int index) { 1169 return sourceServiceAccounts_.get(index); 1170 } 1171 /** 1172 * 1173 * 1174 * <pre> 1175 * If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. 1176 * </pre> 1177 * 1178 * <code>repeated string source_service_accounts = 105100756;</code> 1179 * 1180 * @param index The index of the value to return. 1181 * @return The bytes of the sourceServiceAccounts at the given index. 1182 */ getSourceServiceAccountsBytes(int index)1183 public com.google.protobuf.ByteString getSourceServiceAccountsBytes(int index) { 1184 return sourceServiceAccounts_.getByteString(index); 1185 } 1186 1187 public static final int SOURCE_TAGS_FIELD_NUMBER = 452222397; 1188 1189 @SuppressWarnings("serial") 1190 private com.google.protobuf.LazyStringList sourceTags_; 1191 /** 1192 * 1193 * 1194 * <pre> 1195 * If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply. 1196 * </pre> 1197 * 1198 * <code>repeated string source_tags = 452222397;</code> 1199 * 1200 * @return A list containing the sourceTags. 1201 */ getSourceTagsList()1202 public com.google.protobuf.ProtocolStringList getSourceTagsList() { 1203 return sourceTags_; 1204 } 1205 /** 1206 * 1207 * 1208 * <pre> 1209 * If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply. 1210 * </pre> 1211 * 1212 * <code>repeated string source_tags = 452222397;</code> 1213 * 1214 * @return The count of sourceTags. 1215 */ getSourceTagsCount()1216 public int getSourceTagsCount() { 1217 return sourceTags_.size(); 1218 } 1219 /** 1220 * 1221 * 1222 * <pre> 1223 * If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply. 1224 * </pre> 1225 * 1226 * <code>repeated string source_tags = 452222397;</code> 1227 * 1228 * @param index The index of the element to return. 1229 * @return The sourceTags at the given index. 1230 */ getSourceTags(int index)1231 public java.lang.String getSourceTags(int index) { 1232 return sourceTags_.get(index); 1233 } 1234 /** 1235 * 1236 * 1237 * <pre> 1238 * If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply. 1239 * </pre> 1240 * 1241 * <code>repeated string source_tags = 452222397;</code> 1242 * 1243 * @param index The index of the value to return. 1244 * @return The bytes of the sourceTags at the given index. 1245 */ getSourceTagsBytes(int index)1246 public com.google.protobuf.ByteString getSourceTagsBytes(int index) { 1247 return sourceTags_.getByteString(index); 1248 } 1249 1250 public static final int TARGET_SERVICE_ACCOUNTS_FIELD_NUMBER = 457639710; 1251 1252 @SuppressWarnings("serial") 1253 private com.google.protobuf.LazyStringList targetServiceAccounts_; 1254 /** 1255 * 1256 * 1257 * <pre> 1258 * A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. 1259 * </pre> 1260 * 1261 * <code>repeated string target_service_accounts = 457639710;</code> 1262 * 1263 * @return A list containing the targetServiceAccounts. 1264 */ getTargetServiceAccountsList()1265 public com.google.protobuf.ProtocolStringList getTargetServiceAccountsList() { 1266 return targetServiceAccounts_; 1267 } 1268 /** 1269 * 1270 * 1271 * <pre> 1272 * A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. 1273 * </pre> 1274 * 1275 * <code>repeated string target_service_accounts = 457639710;</code> 1276 * 1277 * @return The count of targetServiceAccounts. 1278 */ getTargetServiceAccountsCount()1279 public int getTargetServiceAccountsCount() { 1280 return targetServiceAccounts_.size(); 1281 } 1282 /** 1283 * 1284 * 1285 * <pre> 1286 * A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. 1287 * </pre> 1288 * 1289 * <code>repeated string target_service_accounts = 457639710;</code> 1290 * 1291 * @param index The index of the element to return. 1292 * @return The targetServiceAccounts at the given index. 1293 */ getTargetServiceAccounts(int index)1294 public java.lang.String getTargetServiceAccounts(int index) { 1295 return targetServiceAccounts_.get(index); 1296 } 1297 /** 1298 * 1299 * 1300 * <pre> 1301 * A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. 1302 * </pre> 1303 * 1304 * <code>repeated string target_service_accounts = 457639710;</code> 1305 * 1306 * @param index The index of the value to return. 1307 * @return The bytes of the targetServiceAccounts at the given index. 1308 */ getTargetServiceAccountsBytes(int index)1309 public com.google.protobuf.ByteString getTargetServiceAccountsBytes(int index) { 1310 return targetServiceAccounts_.getByteString(index); 1311 } 1312 1313 public static final int TARGET_TAGS_FIELD_NUMBER = 62901767; 1314 1315 @SuppressWarnings("serial") 1316 private com.google.protobuf.LazyStringList targetTags_; 1317 /** 1318 * 1319 * 1320 * <pre> 1321 * A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network. 1322 * </pre> 1323 * 1324 * <code>repeated string target_tags = 62901767;</code> 1325 * 1326 * @return A list containing the targetTags. 1327 */ getTargetTagsList()1328 public com.google.protobuf.ProtocolStringList getTargetTagsList() { 1329 return targetTags_; 1330 } 1331 /** 1332 * 1333 * 1334 * <pre> 1335 * A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network. 1336 * </pre> 1337 * 1338 * <code>repeated string target_tags = 62901767;</code> 1339 * 1340 * @return The count of targetTags. 1341 */ getTargetTagsCount()1342 public int getTargetTagsCount() { 1343 return targetTags_.size(); 1344 } 1345 /** 1346 * 1347 * 1348 * <pre> 1349 * A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network. 1350 * </pre> 1351 * 1352 * <code>repeated string target_tags = 62901767;</code> 1353 * 1354 * @param index The index of the element to return. 1355 * @return The targetTags at the given index. 1356 */ getTargetTags(int index)1357 public java.lang.String getTargetTags(int index) { 1358 return targetTags_.get(index); 1359 } 1360 /** 1361 * 1362 * 1363 * <pre> 1364 * A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network. 1365 * </pre> 1366 * 1367 * <code>repeated string target_tags = 62901767;</code> 1368 * 1369 * @param index The index of the value to return. 1370 * @return The bytes of the targetTags at the given index. 1371 */ getTargetTagsBytes(int index)1372 public com.google.protobuf.ByteString getTargetTagsBytes(int index) { 1373 return targetTags_.getByteString(index); 1374 } 1375 1376 private byte memoizedIsInitialized = -1; 1377 1378 @java.lang.Override isInitialized()1379 public final boolean isInitialized() { 1380 byte isInitialized = memoizedIsInitialized; 1381 if (isInitialized == 1) return true; 1382 if (isInitialized == 0) return false; 1383 1384 memoizedIsInitialized = 1; 1385 return true; 1386 } 1387 1388 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)1389 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 1390 if (((bitField0_ & 0x00000010) != 0)) { 1391 output.writeUInt64(3355, id_); 1392 } 1393 if (((bitField0_ & 0x00000020) != 0)) { 1394 com.google.protobuf.GeneratedMessageV3.writeString(output, 3292052, kind_); 1395 } 1396 if (((bitField0_ & 0x00000080) != 0)) { 1397 com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_); 1398 } 1399 if (((bitField0_ & 0x00000001) != 0)) { 1400 com.google.protobuf.GeneratedMessageV3.writeString(output, 30525366, creationTimestamp_); 1401 } 1402 for (int i = 0; i < targetTags_.size(); i++) { 1403 com.google.protobuf.GeneratedMessageV3.writeString(output, 62901767, targetTags_.getRaw(i)); 1404 } 1405 for (int i = 0; i < sourceServiceAccounts_.size(); i++) { 1406 com.google.protobuf.GeneratedMessageV3.writeString( 1407 output, 105100756, sourceServiceAccounts_.getRaw(i)); 1408 } 1409 if (((bitField0_ & 0x00000004) != 0)) { 1410 com.google.protobuf.GeneratedMessageV3.writeString(output, 111150975, direction_); 1411 } 1412 for (int i = 0; i < allowed_.size(); i++) { 1413 output.writeMessage(162398632, allowed_.get(i)); 1414 } 1415 for (int i = 0; i < sourceRanges_.size(); i++) { 1416 com.google.protobuf.GeneratedMessageV3.writeString( 1417 output, 200097658, sourceRanges_.getRaw(i)); 1418 } 1419 if (((bitField0_ & 0x00000100) != 0)) { 1420 com.google.protobuf.GeneratedMessageV3.writeString(output, 232872494, network_); 1421 } 1422 if (((bitField0_ & 0x00000008) != 0)) { 1423 output.writeBool(270940796, disabled_); 1424 } 1425 for (int i = 0; i < denied_.size(); i++) { 1426 output.writeMessage(275217307, denied_.get(i)); 1427 } 1428 for (int i = 0; i < destinationRanges_.size(); i++) { 1429 com.google.protobuf.GeneratedMessageV3.writeString( 1430 output, 305699879, destinationRanges_.getRaw(i)); 1431 } 1432 if (((bitField0_ & 0x00000040) != 0)) { 1433 output.writeMessage(351299741, getLogConfig()); 1434 } 1435 if (((bitField0_ & 0x00000002) != 0)) { 1436 com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); 1437 } 1438 if (((bitField0_ & 0x00000200) != 0)) { 1439 output.writeInt32(445151652, priority_); 1440 } 1441 for (int i = 0; i < sourceTags_.size(); i++) { 1442 com.google.protobuf.GeneratedMessageV3.writeString(output, 452222397, sourceTags_.getRaw(i)); 1443 } 1444 if (((bitField0_ & 0x00000400) != 0)) { 1445 com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); 1446 } 1447 for (int i = 0; i < targetServiceAccounts_.size(); i++) { 1448 com.google.protobuf.GeneratedMessageV3.writeString( 1449 output, 457639710, targetServiceAccounts_.getRaw(i)); 1450 } 1451 getUnknownFields().writeTo(output); 1452 } 1453 1454 @java.lang.Override getSerializedSize()1455 public int getSerializedSize() { 1456 int size = memoizedSize; 1457 if (size != -1) return size; 1458 1459 size = 0; 1460 if (((bitField0_ & 0x00000010) != 0)) { 1461 size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3355, id_); 1462 } 1463 if (((bitField0_ & 0x00000020) != 0)) { 1464 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3292052, kind_); 1465 } 1466 if (((bitField0_ & 0x00000080) != 0)) { 1467 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_); 1468 } 1469 if (((bitField0_ & 0x00000001) != 0)) { 1470 size += 1471 com.google.protobuf.GeneratedMessageV3.computeStringSize(30525366, creationTimestamp_); 1472 } 1473 { 1474 int dataSize = 0; 1475 for (int i = 0; i < targetTags_.size(); i++) { 1476 dataSize += computeStringSizeNoTag(targetTags_.getRaw(i)); 1477 } 1478 size += dataSize; 1479 size += 5 * getTargetTagsList().size(); 1480 } 1481 { 1482 int dataSize = 0; 1483 for (int i = 0; i < sourceServiceAccounts_.size(); i++) { 1484 dataSize += computeStringSizeNoTag(sourceServiceAccounts_.getRaw(i)); 1485 } 1486 size += dataSize; 1487 size += 5 * getSourceServiceAccountsList().size(); 1488 } 1489 if (((bitField0_ & 0x00000004) != 0)) { 1490 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(111150975, direction_); 1491 } 1492 for (int i = 0; i < allowed_.size(); i++) { 1493 size += com.google.protobuf.CodedOutputStream.computeMessageSize(162398632, allowed_.get(i)); 1494 } 1495 { 1496 int dataSize = 0; 1497 for (int i = 0; i < sourceRanges_.size(); i++) { 1498 dataSize += computeStringSizeNoTag(sourceRanges_.getRaw(i)); 1499 } 1500 size += dataSize; 1501 size += 5 * getSourceRangesList().size(); 1502 } 1503 if (((bitField0_ & 0x00000100) != 0)) { 1504 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(232872494, network_); 1505 } 1506 if (((bitField0_ & 0x00000008) != 0)) { 1507 size += com.google.protobuf.CodedOutputStream.computeBoolSize(270940796, disabled_); 1508 } 1509 for (int i = 0; i < denied_.size(); i++) { 1510 size += com.google.protobuf.CodedOutputStream.computeMessageSize(275217307, denied_.get(i)); 1511 } 1512 { 1513 int dataSize = 0; 1514 for (int i = 0; i < destinationRanges_.size(); i++) { 1515 dataSize += computeStringSizeNoTag(destinationRanges_.getRaw(i)); 1516 } 1517 size += dataSize; 1518 size += 5 * getDestinationRangesList().size(); 1519 } 1520 if (((bitField0_ & 0x00000040) != 0)) { 1521 size += com.google.protobuf.CodedOutputStream.computeMessageSize(351299741, getLogConfig()); 1522 } 1523 if (((bitField0_ & 0x00000002) != 0)) { 1524 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); 1525 } 1526 if (((bitField0_ & 0x00000200) != 0)) { 1527 size += com.google.protobuf.CodedOutputStream.computeInt32Size(445151652, priority_); 1528 } 1529 { 1530 int dataSize = 0; 1531 for (int i = 0; i < sourceTags_.size(); i++) { 1532 dataSize += computeStringSizeNoTag(sourceTags_.getRaw(i)); 1533 } 1534 size += dataSize; 1535 size += 5 * getSourceTagsList().size(); 1536 } 1537 if (((bitField0_ & 0x00000400) != 0)) { 1538 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); 1539 } 1540 { 1541 int dataSize = 0; 1542 for (int i = 0; i < targetServiceAccounts_.size(); i++) { 1543 dataSize += computeStringSizeNoTag(targetServiceAccounts_.getRaw(i)); 1544 } 1545 size += dataSize; 1546 size += 5 * getTargetServiceAccountsList().size(); 1547 } 1548 size += getUnknownFields().getSerializedSize(); 1549 memoizedSize = size; 1550 return size; 1551 } 1552 1553 @java.lang.Override equals(final java.lang.Object obj)1554 public boolean equals(final java.lang.Object obj) { 1555 if (obj == this) { 1556 return true; 1557 } 1558 if (!(obj instanceof com.google.cloud.compute.v1.Firewall)) { 1559 return super.equals(obj); 1560 } 1561 com.google.cloud.compute.v1.Firewall other = (com.google.cloud.compute.v1.Firewall) obj; 1562 1563 if (!getAllowedList().equals(other.getAllowedList())) return false; 1564 if (hasCreationTimestamp() != other.hasCreationTimestamp()) return false; 1565 if (hasCreationTimestamp()) { 1566 if (!getCreationTimestamp().equals(other.getCreationTimestamp())) return false; 1567 } 1568 if (!getDeniedList().equals(other.getDeniedList())) return false; 1569 if (hasDescription() != other.hasDescription()) return false; 1570 if (hasDescription()) { 1571 if (!getDescription().equals(other.getDescription())) return false; 1572 } 1573 if (!getDestinationRangesList().equals(other.getDestinationRangesList())) return false; 1574 if (hasDirection() != other.hasDirection()) return false; 1575 if (hasDirection()) { 1576 if (!getDirection().equals(other.getDirection())) return false; 1577 } 1578 if (hasDisabled() != other.hasDisabled()) return false; 1579 if (hasDisabled()) { 1580 if (getDisabled() != other.getDisabled()) return false; 1581 } 1582 if (hasId() != other.hasId()) return false; 1583 if (hasId()) { 1584 if (getId() != other.getId()) return false; 1585 } 1586 if (hasKind() != other.hasKind()) return false; 1587 if (hasKind()) { 1588 if (!getKind().equals(other.getKind())) return false; 1589 } 1590 if (hasLogConfig() != other.hasLogConfig()) return false; 1591 if (hasLogConfig()) { 1592 if (!getLogConfig().equals(other.getLogConfig())) return false; 1593 } 1594 if (hasName() != other.hasName()) return false; 1595 if (hasName()) { 1596 if (!getName().equals(other.getName())) return false; 1597 } 1598 if (hasNetwork() != other.hasNetwork()) return false; 1599 if (hasNetwork()) { 1600 if (!getNetwork().equals(other.getNetwork())) return false; 1601 } 1602 if (hasPriority() != other.hasPriority()) return false; 1603 if (hasPriority()) { 1604 if (getPriority() != other.getPriority()) return false; 1605 } 1606 if (hasSelfLink() != other.hasSelfLink()) return false; 1607 if (hasSelfLink()) { 1608 if (!getSelfLink().equals(other.getSelfLink())) return false; 1609 } 1610 if (!getSourceRangesList().equals(other.getSourceRangesList())) return false; 1611 if (!getSourceServiceAccountsList().equals(other.getSourceServiceAccountsList())) return false; 1612 if (!getSourceTagsList().equals(other.getSourceTagsList())) return false; 1613 if (!getTargetServiceAccountsList().equals(other.getTargetServiceAccountsList())) return false; 1614 if (!getTargetTagsList().equals(other.getTargetTagsList())) return false; 1615 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1616 return true; 1617 } 1618 1619 @java.lang.Override hashCode()1620 public int hashCode() { 1621 if (memoizedHashCode != 0) { 1622 return memoizedHashCode; 1623 } 1624 int hash = 41; 1625 hash = (19 * hash) + getDescriptor().hashCode(); 1626 if (getAllowedCount() > 0) { 1627 hash = (37 * hash) + ALLOWED_FIELD_NUMBER; 1628 hash = (53 * hash) + getAllowedList().hashCode(); 1629 } 1630 if (hasCreationTimestamp()) { 1631 hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER; 1632 hash = (53 * hash) + getCreationTimestamp().hashCode(); 1633 } 1634 if (getDeniedCount() > 0) { 1635 hash = (37 * hash) + DENIED_FIELD_NUMBER; 1636 hash = (53 * hash) + getDeniedList().hashCode(); 1637 } 1638 if (hasDescription()) { 1639 hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; 1640 hash = (53 * hash) + getDescription().hashCode(); 1641 } 1642 if (getDestinationRangesCount() > 0) { 1643 hash = (37 * hash) + DESTINATION_RANGES_FIELD_NUMBER; 1644 hash = (53 * hash) + getDestinationRangesList().hashCode(); 1645 } 1646 if (hasDirection()) { 1647 hash = (37 * hash) + DIRECTION_FIELD_NUMBER; 1648 hash = (53 * hash) + getDirection().hashCode(); 1649 } 1650 if (hasDisabled()) { 1651 hash = (37 * hash) + DISABLED_FIELD_NUMBER; 1652 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisabled()); 1653 } 1654 if (hasId()) { 1655 hash = (37 * hash) + ID_FIELD_NUMBER; 1656 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId()); 1657 } 1658 if (hasKind()) { 1659 hash = (37 * hash) + KIND_FIELD_NUMBER; 1660 hash = (53 * hash) + getKind().hashCode(); 1661 } 1662 if (hasLogConfig()) { 1663 hash = (37 * hash) + LOG_CONFIG_FIELD_NUMBER; 1664 hash = (53 * hash) + getLogConfig().hashCode(); 1665 } 1666 if (hasName()) { 1667 hash = (37 * hash) + NAME_FIELD_NUMBER; 1668 hash = (53 * hash) + getName().hashCode(); 1669 } 1670 if (hasNetwork()) { 1671 hash = (37 * hash) + NETWORK_FIELD_NUMBER; 1672 hash = (53 * hash) + getNetwork().hashCode(); 1673 } 1674 if (hasPriority()) { 1675 hash = (37 * hash) + PRIORITY_FIELD_NUMBER; 1676 hash = (53 * hash) + getPriority(); 1677 } 1678 if (hasSelfLink()) { 1679 hash = (37 * hash) + SELF_LINK_FIELD_NUMBER; 1680 hash = (53 * hash) + getSelfLink().hashCode(); 1681 } 1682 if (getSourceRangesCount() > 0) { 1683 hash = (37 * hash) + SOURCE_RANGES_FIELD_NUMBER; 1684 hash = (53 * hash) + getSourceRangesList().hashCode(); 1685 } 1686 if (getSourceServiceAccountsCount() > 0) { 1687 hash = (37 * hash) + SOURCE_SERVICE_ACCOUNTS_FIELD_NUMBER; 1688 hash = (53 * hash) + getSourceServiceAccountsList().hashCode(); 1689 } 1690 if (getSourceTagsCount() > 0) { 1691 hash = (37 * hash) + SOURCE_TAGS_FIELD_NUMBER; 1692 hash = (53 * hash) + getSourceTagsList().hashCode(); 1693 } 1694 if (getTargetServiceAccountsCount() > 0) { 1695 hash = (37 * hash) + TARGET_SERVICE_ACCOUNTS_FIELD_NUMBER; 1696 hash = (53 * hash) + getTargetServiceAccountsList().hashCode(); 1697 } 1698 if (getTargetTagsCount() > 0) { 1699 hash = (37 * hash) + TARGET_TAGS_FIELD_NUMBER; 1700 hash = (53 * hash) + getTargetTagsList().hashCode(); 1701 } 1702 hash = (29 * hash) + getUnknownFields().hashCode(); 1703 memoizedHashCode = hash; 1704 return hash; 1705 } 1706 parseFrom(java.nio.ByteBuffer data)1707 public static com.google.cloud.compute.v1.Firewall parseFrom(java.nio.ByteBuffer data) 1708 throws com.google.protobuf.InvalidProtocolBufferException { 1709 return PARSER.parseFrom(data); 1710 } 1711 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1712 public static com.google.cloud.compute.v1.Firewall parseFrom( 1713 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1714 throws com.google.protobuf.InvalidProtocolBufferException { 1715 return PARSER.parseFrom(data, extensionRegistry); 1716 } 1717 parseFrom(com.google.protobuf.ByteString data)1718 public static com.google.cloud.compute.v1.Firewall parseFrom(com.google.protobuf.ByteString data) 1719 throws com.google.protobuf.InvalidProtocolBufferException { 1720 return PARSER.parseFrom(data); 1721 } 1722 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1723 public static com.google.cloud.compute.v1.Firewall parseFrom( 1724 com.google.protobuf.ByteString data, 1725 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1726 throws com.google.protobuf.InvalidProtocolBufferException { 1727 return PARSER.parseFrom(data, extensionRegistry); 1728 } 1729 parseFrom(byte[] data)1730 public static com.google.cloud.compute.v1.Firewall parseFrom(byte[] data) 1731 throws com.google.protobuf.InvalidProtocolBufferException { 1732 return PARSER.parseFrom(data); 1733 } 1734 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1735 public static com.google.cloud.compute.v1.Firewall parseFrom( 1736 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1737 throws com.google.protobuf.InvalidProtocolBufferException { 1738 return PARSER.parseFrom(data, extensionRegistry); 1739 } 1740 parseFrom(java.io.InputStream input)1741 public static com.google.cloud.compute.v1.Firewall parseFrom(java.io.InputStream input) 1742 throws java.io.IOException { 1743 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1744 } 1745 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1746 public static com.google.cloud.compute.v1.Firewall parseFrom( 1747 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1748 throws java.io.IOException { 1749 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1750 PARSER, input, extensionRegistry); 1751 } 1752 parseDelimitedFrom(java.io.InputStream input)1753 public static com.google.cloud.compute.v1.Firewall parseDelimitedFrom(java.io.InputStream input) 1754 throws java.io.IOException { 1755 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1756 } 1757 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1758 public static com.google.cloud.compute.v1.Firewall parseDelimitedFrom( 1759 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1760 throws java.io.IOException { 1761 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1762 PARSER, input, extensionRegistry); 1763 } 1764 parseFrom( com.google.protobuf.CodedInputStream input)1765 public static com.google.cloud.compute.v1.Firewall parseFrom( 1766 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1767 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1768 } 1769 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1770 public static com.google.cloud.compute.v1.Firewall parseFrom( 1771 com.google.protobuf.CodedInputStream input, 1772 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1773 throws java.io.IOException { 1774 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1775 PARSER, input, extensionRegistry); 1776 } 1777 1778 @java.lang.Override newBuilderForType()1779 public Builder newBuilderForType() { 1780 return newBuilder(); 1781 } 1782 newBuilder()1783 public static Builder newBuilder() { 1784 return DEFAULT_INSTANCE.toBuilder(); 1785 } 1786 newBuilder(com.google.cloud.compute.v1.Firewall prototype)1787 public static Builder newBuilder(com.google.cloud.compute.v1.Firewall prototype) { 1788 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1789 } 1790 1791 @java.lang.Override toBuilder()1792 public Builder toBuilder() { 1793 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1794 } 1795 1796 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1797 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1798 Builder builder = new Builder(parent); 1799 return builder; 1800 } 1801 /** 1802 * 1803 * 1804 * <pre> 1805 * Represents a Firewall Rule resource. Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules. 1806 * </pre> 1807 * 1808 * Protobuf type {@code google.cloud.compute.v1.Firewall} 1809 */ 1810 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1811 implements 1812 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.Firewall) 1813 com.google.cloud.compute.v1.FirewallOrBuilder { getDescriptor()1814 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1815 return com.google.cloud.compute.v1.Compute 1816 .internal_static_google_cloud_compute_v1_Firewall_descriptor; 1817 } 1818 1819 @java.lang.Override 1820 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1821 internalGetFieldAccessorTable() { 1822 return com.google.cloud.compute.v1.Compute 1823 .internal_static_google_cloud_compute_v1_Firewall_fieldAccessorTable 1824 .ensureFieldAccessorsInitialized( 1825 com.google.cloud.compute.v1.Firewall.class, 1826 com.google.cloud.compute.v1.Firewall.Builder.class); 1827 } 1828 1829 // Construct using com.google.cloud.compute.v1.Firewall.newBuilder() Builder()1830 private Builder() { 1831 maybeForceBuilderInitialization(); 1832 } 1833 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1834 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1835 super(parent); 1836 maybeForceBuilderInitialization(); 1837 } 1838 maybeForceBuilderInitialization()1839 private void maybeForceBuilderInitialization() { 1840 if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { 1841 getAllowedFieldBuilder(); 1842 getDeniedFieldBuilder(); 1843 getLogConfigFieldBuilder(); 1844 } 1845 } 1846 1847 @java.lang.Override clear()1848 public Builder clear() { 1849 super.clear(); 1850 bitField0_ = 0; 1851 if (allowedBuilder_ == null) { 1852 allowed_ = java.util.Collections.emptyList(); 1853 } else { 1854 allowed_ = null; 1855 allowedBuilder_.clear(); 1856 } 1857 bitField0_ = (bitField0_ & ~0x00000001); 1858 creationTimestamp_ = ""; 1859 if (deniedBuilder_ == null) { 1860 denied_ = java.util.Collections.emptyList(); 1861 } else { 1862 denied_ = null; 1863 deniedBuilder_.clear(); 1864 } 1865 bitField0_ = (bitField0_ & ~0x00000004); 1866 description_ = ""; 1867 destinationRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1868 bitField0_ = (bitField0_ & ~0x00000010); 1869 direction_ = ""; 1870 disabled_ = false; 1871 id_ = 0L; 1872 kind_ = ""; 1873 logConfig_ = null; 1874 if (logConfigBuilder_ != null) { 1875 logConfigBuilder_.dispose(); 1876 logConfigBuilder_ = null; 1877 } 1878 name_ = ""; 1879 network_ = ""; 1880 priority_ = 0; 1881 selfLink_ = ""; 1882 sourceRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1883 bitField0_ = (bitField0_ & ~0x00004000); 1884 sourceServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1885 bitField0_ = (bitField0_ & ~0x00008000); 1886 sourceTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1887 bitField0_ = (bitField0_ & ~0x00010000); 1888 targetServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1889 bitField0_ = (bitField0_ & ~0x00020000); 1890 targetTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1891 bitField0_ = (bitField0_ & ~0x00040000); 1892 return this; 1893 } 1894 1895 @java.lang.Override getDescriptorForType()1896 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1897 return com.google.cloud.compute.v1.Compute 1898 .internal_static_google_cloud_compute_v1_Firewall_descriptor; 1899 } 1900 1901 @java.lang.Override getDefaultInstanceForType()1902 public com.google.cloud.compute.v1.Firewall getDefaultInstanceForType() { 1903 return com.google.cloud.compute.v1.Firewall.getDefaultInstance(); 1904 } 1905 1906 @java.lang.Override build()1907 public com.google.cloud.compute.v1.Firewall build() { 1908 com.google.cloud.compute.v1.Firewall result = buildPartial(); 1909 if (!result.isInitialized()) { 1910 throw newUninitializedMessageException(result); 1911 } 1912 return result; 1913 } 1914 1915 @java.lang.Override buildPartial()1916 public com.google.cloud.compute.v1.Firewall buildPartial() { 1917 com.google.cloud.compute.v1.Firewall result = new com.google.cloud.compute.v1.Firewall(this); 1918 buildPartialRepeatedFields(result); 1919 if (bitField0_ != 0) { 1920 buildPartial0(result); 1921 } 1922 onBuilt(); 1923 return result; 1924 } 1925 buildPartialRepeatedFields(com.google.cloud.compute.v1.Firewall result)1926 private void buildPartialRepeatedFields(com.google.cloud.compute.v1.Firewall result) { 1927 if (allowedBuilder_ == null) { 1928 if (((bitField0_ & 0x00000001) != 0)) { 1929 allowed_ = java.util.Collections.unmodifiableList(allowed_); 1930 bitField0_ = (bitField0_ & ~0x00000001); 1931 } 1932 result.allowed_ = allowed_; 1933 } else { 1934 result.allowed_ = allowedBuilder_.build(); 1935 } 1936 if (deniedBuilder_ == null) { 1937 if (((bitField0_ & 0x00000004) != 0)) { 1938 denied_ = java.util.Collections.unmodifiableList(denied_); 1939 bitField0_ = (bitField0_ & ~0x00000004); 1940 } 1941 result.denied_ = denied_; 1942 } else { 1943 result.denied_ = deniedBuilder_.build(); 1944 } 1945 if (((bitField0_ & 0x00000010) != 0)) { 1946 destinationRanges_ = destinationRanges_.getUnmodifiableView(); 1947 bitField0_ = (bitField0_ & ~0x00000010); 1948 } 1949 result.destinationRanges_ = destinationRanges_; 1950 if (((bitField0_ & 0x00004000) != 0)) { 1951 sourceRanges_ = sourceRanges_.getUnmodifiableView(); 1952 bitField0_ = (bitField0_ & ~0x00004000); 1953 } 1954 result.sourceRanges_ = sourceRanges_; 1955 if (((bitField0_ & 0x00008000) != 0)) { 1956 sourceServiceAccounts_ = sourceServiceAccounts_.getUnmodifiableView(); 1957 bitField0_ = (bitField0_ & ~0x00008000); 1958 } 1959 result.sourceServiceAccounts_ = sourceServiceAccounts_; 1960 if (((bitField0_ & 0x00010000) != 0)) { 1961 sourceTags_ = sourceTags_.getUnmodifiableView(); 1962 bitField0_ = (bitField0_ & ~0x00010000); 1963 } 1964 result.sourceTags_ = sourceTags_; 1965 if (((bitField0_ & 0x00020000) != 0)) { 1966 targetServiceAccounts_ = targetServiceAccounts_.getUnmodifiableView(); 1967 bitField0_ = (bitField0_ & ~0x00020000); 1968 } 1969 result.targetServiceAccounts_ = targetServiceAccounts_; 1970 if (((bitField0_ & 0x00040000) != 0)) { 1971 targetTags_ = targetTags_.getUnmodifiableView(); 1972 bitField0_ = (bitField0_ & ~0x00040000); 1973 } 1974 result.targetTags_ = targetTags_; 1975 } 1976 buildPartial0(com.google.cloud.compute.v1.Firewall result)1977 private void buildPartial0(com.google.cloud.compute.v1.Firewall result) { 1978 int from_bitField0_ = bitField0_; 1979 int to_bitField0_ = 0; 1980 if (((from_bitField0_ & 0x00000002) != 0)) { 1981 result.creationTimestamp_ = creationTimestamp_; 1982 to_bitField0_ |= 0x00000001; 1983 } 1984 if (((from_bitField0_ & 0x00000008) != 0)) { 1985 result.description_ = description_; 1986 to_bitField0_ |= 0x00000002; 1987 } 1988 if (((from_bitField0_ & 0x00000020) != 0)) { 1989 result.direction_ = direction_; 1990 to_bitField0_ |= 0x00000004; 1991 } 1992 if (((from_bitField0_ & 0x00000040) != 0)) { 1993 result.disabled_ = disabled_; 1994 to_bitField0_ |= 0x00000008; 1995 } 1996 if (((from_bitField0_ & 0x00000080) != 0)) { 1997 result.id_ = id_; 1998 to_bitField0_ |= 0x00000010; 1999 } 2000 if (((from_bitField0_ & 0x00000100) != 0)) { 2001 result.kind_ = kind_; 2002 to_bitField0_ |= 0x00000020; 2003 } 2004 if (((from_bitField0_ & 0x00000200) != 0)) { 2005 result.logConfig_ = logConfigBuilder_ == null ? logConfig_ : logConfigBuilder_.build(); 2006 to_bitField0_ |= 0x00000040; 2007 } 2008 if (((from_bitField0_ & 0x00000400) != 0)) { 2009 result.name_ = name_; 2010 to_bitField0_ |= 0x00000080; 2011 } 2012 if (((from_bitField0_ & 0x00000800) != 0)) { 2013 result.network_ = network_; 2014 to_bitField0_ |= 0x00000100; 2015 } 2016 if (((from_bitField0_ & 0x00001000) != 0)) { 2017 result.priority_ = priority_; 2018 to_bitField0_ |= 0x00000200; 2019 } 2020 if (((from_bitField0_ & 0x00002000) != 0)) { 2021 result.selfLink_ = selfLink_; 2022 to_bitField0_ |= 0x00000400; 2023 } 2024 result.bitField0_ |= to_bitField0_; 2025 } 2026 2027 @java.lang.Override clone()2028 public Builder clone() { 2029 return super.clone(); 2030 } 2031 2032 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2033 public Builder setField( 2034 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 2035 return super.setField(field, value); 2036 } 2037 2038 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)2039 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 2040 return super.clearField(field); 2041 } 2042 2043 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)2044 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 2045 return super.clearOneof(oneof); 2046 } 2047 2048 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)2049 public Builder setRepeatedField( 2050 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 2051 return super.setRepeatedField(field, index, value); 2052 } 2053 2054 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2055 public Builder addRepeatedField( 2056 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 2057 return super.addRepeatedField(field, value); 2058 } 2059 2060 @java.lang.Override mergeFrom(com.google.protobuf.Message other)2061 public Builder mergeFrom(com.google.protobuf.Message other) { 2062 if (other instanceof com.google.cloud.compute.v1.Firewall) { 2063 return mergeFrom((com.google.cloud.compute.v1.Firewall) other); 2064 } else { 2065 super.mergeFrom(other); 2066 return this; 2067 } 2068 } 2069 mergeFrom(com.google.cloud.compute.v1.Firewall other)2070 public Builder mergeFrom(com.google.cloud.compute.v1.Firewall other) { 2071 if (other == com.google.cloud.compute.v1.Firewall.getDefaultInstance()) return this; 2072 if (allowedBuilder_ == null) { 2073 if (!other.allowed_.isEmpty()) { 2074 if (allowed_.isEmpty()) { 2075 allowed_ = other.allowed_; 2076 bitField0_ = (bitField0_ & ~0x00000001); 2077 } else { 2078 ensureAllowedIsMutable(); 2079 allowed_.addAll(other.allowed_); 2080 } 2081 onChanged(); 2082 } 2083 } else { 2084 if (!other.allowed_.isEmpty()) { 2085 if (allowedBuilder_.isEmpty()) { 2086 allowedBuilder_.dispose(); 2087 allowedBuilder_ = null; 2088 allowed_ = other.allowed_; 2089 bitField0_ = (bitField0_ & ~0x00000001); 2090 allowedBuilder_ = 2091 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 2092 ? getAllowedFieldBuilder() 2093 : null; 2094 } else { 2095 allowedBuilder_.addAllMessages(other.allowed_); 2096 } 2097 } 2098 } 2099 if (other.hasCreationTimestamp()) { 2100 creationTimestamp_ = other.creationTimestamp_; 2101 bitField0_ |= 0x00000002; 2102 onChanged(); 2103 } 2104 if (deniedBuilder_ == null) { 2105 if (!other.denied_.isEmpty()) { 2106 if (denied_.isEmpty()) { 2107 denied_ = other.denied_; 2108 bitField0_ = (bitField0_ & ~0x00000004); 2109 } else { 2110 ensureDeniedIsMutable(); 2111 denied_.addAll(other.denied_); 2112 } 2113 onChanged(); 2114 } 2115 } else { 2116 if (!other.denied_.isEmpty()) { 2117 if (deniedBuilder_.isEmpty()) { 2118 deniedBuilder_.dispose(); 2119 deniedBuilder_ = null; 2120 denied_ = other.denied_; 2121 bitField0_ = (bitField0_ & ~0x00000004); 2122 deniedBuilder_ = 2123 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 2124 ? getDeniedFieldBuilder() 2125 : null; 2126 } else { 2127 deniedBuilder_.addAllMessages(other.denied_); 2128 } 2129 } 2130 } 2131 if (other.hasDescription()) { 2132 description_ = other.description_; 2133 bitField0_ |= 0x00000008; 2134 onChanged(); 2135 } 2136 if (!other.destinationRanges_.isEmpty()) { 2137 if (destinationRanges_.isEmpty()) { 2138 destinationRanges_ = other.destinationRanges_; 2139 bitField0_ = (bitField0_ & ~0x00000010); 2140 } else { 2141 ensureDestinationRangesIsMutable(); 2142 destinationRanges_.addAll(other.destinationRanges_); 2143 } 2144 onChanged(); 2145 } 2146 if (other.hasDirection()) { 2147 direction_ = other.direction_; 2148 bitField0_ |= 0x00000020; 2149 onChanged(); 2150 } 2151 if (other.hasDisabled()) { 2152 setDisabled(other.getDisabled()); 2153 } 2154 if (other.hasId()) { 2155 setId(other.getId()); 2156 } 2157 if (other.hasKind()) { 2158 kind_ = other.kind_; 2159 bitField0_ |= 0x00000100; 2160 onChanged(); 2161 } 2162 if (other.hasLogConfig()) { 2163 mergeLogConfig(other.getLogConfig()); 2164 } 2165 if (other.hasName()) { 2166 name_ = other.name_; 2167 bitField0_ |= 0x00000400; 2168 onChanged(); 2169 } 2170 if (other.hasNetwork()) { 2171 network_ = other.network_; 2172 bitField0_ |= 0x00000800; 2173 onChanged(); 2174 } 2175 if (other.hasPriority()) { 2176 setPriority(other.getPriority()); 2177 } 2178 if (other.hasSelfLink()) { 2179 selfLink_ = other.selfLink_; 2180 bitField0_ |= 0x00002000; 2181 onChanged(); 2182 } 2183 if (!other.sourceRanges_.isEmpty()) { 2184 if (sourceRanges_.isEmpty()) { 2185 sourceRanges_ = other.sourceRanges_; 2186 bitField0_ = (bitField0_ & ~0x00004000); 2187 } else { 2188 ensureSourceRangesIsMutable(); 2189 sourceRanges_.addAll(other.sourceRanges_); 2190 } 2191 onChanged(); 2192 } 2193 if (!other.sourceServiceAccounts_.isEmpty()) { 2194 if (sourceServiceAccounts_.isEmpty()) { 2195 sourceServiceAccounts_ = other.sourceServiceAccounts_; 2196 bitField0_ = (bitField0_ & ~0x00008000); 2197 } else { 2198 ensureSourceServiceAccountsIsMutable(); 2199 sourceServiceAccounts_.addAll(other.sourceServiceAccounts_); 2200 } 2201 onChanged(); 2202 } 2203 if (!other.sourceTags_.isEmpty()) { 2204 if (sourceTags_.isEmpty()) { 2205 sourceTags_ = other.sourceTags_; 2206 bitField0_ = (bitField0_ & ~0x00010000); 2207 } else { 2208 ensureSourceTagsIsMutable(); 2209 sourceTags_.addAll(other.sourceTags_); 2210 } 2211 onChanged(); 2212 } 2213 if (!other.targetServiceAccounts_.isEmpty()) { 2214 if (targetServiceAccounts_.isEmpty()) { 2215 targetServiceAccounts_ = other.targetServiceAccounts_; 2216 bitField0_ = (bitField0_ & ~0x00020000); 2217 } else { 2218 ensureTargetServiceAccountsIsMutable(); 2219 targetServiceAccounts_.addAll(other.targetServiceAccounts_); 2220 } 2221 onChanged(); 2222 } 2223 if (!other.targetTags_.isEmpty()) { 2224 if (targetTags_.isEmpty()) { 2225 targetTags_ = other.targetTags_; 2226 bitField0_ = (bitField0_ & ~0x00040000); 2227 } else { 2228 ensureTargetTagsIsMutable(); 2229 targetTags_.addAll(other.targetTags_); 2230 } 2231 onChanged(); 2232 } 2233 this.mergeUnknownFields(other.getUnknownFields()); 2234 onChanged(); 2235 return this; 2236 } 2237 2238 @java.lang.Override isInitialized()2239 public final boolean isInitialized() { 2240 return true; 2241 } 2242 2243 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2244 public Builder mergeFrom( 2245 com.google.protobuf.CodedInputStream input, 2246 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2247 throws java.io.IOException { 2248 if (extensionRegistry == null) { 2249 throw new java.lang.NullPointerException(); 2250 } 2251 try { 2252 boolean done = false; 2253 while (!done) { 2254 int tag = input.readTag(); 2255 switch (tag) { 2256 case 0: 2257 done = true; 2258 break; 2259 case 26840: 2260 { 2261 id_ = input.readUInt64(); 2262 bitField0_ |= 0x00000080; 2263 break; 2264 } // case 26840 2265 case 26336418: 2266 { 2267 kind_ = input.readStringRequireUtf8(); 2268 bitField0_ |= 0x00000100; 2269 break; 2270 } // case 26336418 2271 case 26989658: 2272 { 2273 name_ = input.readStringRequireUtf8(); 2274 bitField0_ |= 0x00000400; 2275 break; 2276 } // case 26989658 2277 case 244202930: 2278 { 2279 creationTimestamp_ = input.readStringRequireUtf8(); 2280 bitField0_ |= 0x00000002; 2281 break; 2282 } // case 244202930 2283 case 503214138: 2284 { 2285 java.lang.String s = input.readStringRequireUtf8(); 2286 ensureTargetTagsIsMutable(); 2287 targetTags_.add(s); 2288 break; 2289 } // case 503214138 2290 case 840806050: 2291 { 2292 java.lang.String s = input.readStringRequireUtf8(); 2293 ensureSourceServiceAccountsIsMutable(); 2294 sourceServiceAccounts_.add(s); 2295 break; 2296 } // case 840806050 2297 case 889207802: 2298 { 2299 direction_ = input.readStringRequireUtf8(); 2300 bitField0_ |= 0x00000020; 2301 break; 2302 } // case 889207802 2303 case 1299189058: 2304 { 2305 com.google.cloud.compute.v1.Allowed m = 2306 input.readMessage( 2307 com.google.cloud.compute.v1.Allowed.parser(), extensionRegistry); 2308 if (allowedBuilder_ == null) { 2309 ensureAllowedIsMutable(); 2310 allowed_.add(m); 2311 } else { 2312 allowedBuilder_.addMessage(m); 2313 } 2314 break; 2315 } // case 1299189058 2316 case 1600781266: 2317 { 2318 java.lang.String s = input.readStringRequireUtf8(); 2319 ensureSourceRangesIsMutable(); 2320 sourceRanges_.add(s); 2321 break; 2322 } // case 1600781266 2323 case 1862979954: 2324 { 2325 network_ = input.readStringRequireUtf8(); 2326 bitField0_ |= 0x00000800; 2327 break; 2328 } // case 1862979954 2329 case -2127440928: 2330 { 2331 disabled_ = input.readBool(); 2332 bitField0_ |= 0x00000040; 2333 break; 2334 } // case -2127440928 2335 case -2093228838: 2336 { 2337 com.google.cloud.compute.v1.Denied m = 2338 input.readMessage( 2339 com.google.cloud.compute.v1.Denied.parser(), extensionRegistry); 2340 if (deniedBuilder_ == null) { 2341 ensureDeniedIsMutable(); 2342 denied_.add(m); 2343 } else { 2344 deniedBuilder_.addMessage(m); 2345 } 2346 break; 2347 } // case -2093228838 2348 case -1849368262: 2349 { 2350 java.lang.String s = input.readStringRequireUtf8(); 2351 ensureDestinationRangesIsMutable(); 2352 destinationRanges_.add(s); 2353 break; 2354 } // case -1849368262 2355 case -1484569366: 2356 { 2357 input.readMessage(getLogConfigFieldBuilder().getBuilder(), extensionRegistry); 2358 bitField0_ |= 0x00000200; 2359 break; 2360 } // case -1484569366 2361 case -911466526: 2362 { 2363 description_ = input.readStringRequireUtf8(); 2364 bitField0_ |= 0x00000008; 2365 break; 2366 } // case -911466526 2367 case -733754080: 2368 { 2369 priority_ = input.readInt32(); 2370 bitField0_ |= 0x00001000; 2371 break; 2372 } // case -733754080 2373 case -677188118: 2374 { 2375 java.lang.String s = input.readStringRequireUtf8(); 2376 ensureSourceTagsIsMutable(); 2377 sourceTags_.add(s); 2378 break; 2379 } // case -677188118 2380 case -645248918: 2381 { 2382 selfLink_ = input.readStringRequireUtf8(); 2383 bitField0_ |= 0x00002000; 2384 break; 2385 } // case -645248918 2386 case -633849614: 2387 { 2388 java.lang.String s = input.readStringRequireUtf8(); 2389 ensureTargetServiceAccountsIsMutable(); 2390 targetServiceAccounts_.add(s); 2391 break; 2392 } // case -633849614 2393 default: 2394 { 2395 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 2396 done = true; // was an endgroup tag 2397 } 2398 break; 2399 } // default: 2400 } // switch (tag) 2401 } // while (!done) 2402 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2403 throw e.unwrapIOException(); 2404 } finally { 2405 onChanged(); 2406 } // finally 2407 return this; 2408 } 2409 2410 private int bitField0_; 2411 2412 private java.util.List<com.google.cloud.compute.v1.Allowed> allowed_ = 2413 java.util.Collections.emptyList(); 2414 ensureAllowedIsMutable()2415 private void ensureAllowedIsMutable() { 2416 if (!((bitField0_ & 0x00000001) != 0)) { 2417 allowed_ = new java.util.ArrayList<com.google.cloud.compute.v1.Allowed>(allowed_); 2418 bitField0_ |= 0x00000001; 2419 } 2420 } 2421 2422 private com.google.protobuf.RepeatedFieldBuilderV3< 2423 com.google.cloud.compute.v1.Allowed, 2424 com.google.cloud.compute.v1.Allowed.Builder, 2425 com.google.cloud.compute.v1.AllowedOrBuilder> 2426 allowedBuilder_; 2427 2428 /** 2429 * 2430 * 2431 * <pre> 2432 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 2433 * </pre> 2434 * 2435 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 2436 */ getAllowedList()2437 public java.util.List<com.google.cloud.compute.v1.Allowed> getAllowedList() { 2438 if (allowedBuilder_ == null) { 2439 return java.util.Collections.unmodifiableList(allowed_); 2440 } else { 2441 return allowedBuilder_.getMessageList(); 2442 } 2443 } 2444 /** 2445 * 2446 * 2447 * <pre> 2448 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 2449 * </pre> 2450 * 2451 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 2452 */ getAllowedCount()2453 public int getAllowedCount() { 2454 if (allowedBuilder_ == null) { 2455 return allowed_.size(); 2456 } else { 2457 return allowedBuilder_.getCount(); 2458 } 2459 } 2460 /** 2461 * 2462 * 2463 * <pre> 2464 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 2465 * </pre> 2466 * 2467 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 2468 */ getAllowed(int index)2469 public com.google.cloud.compute.v1.Allowed getAllowed(int index) { 2470 if (allowedBuilder_ == null) { 2471 return allowed_.get(index); 2472 } else { 2473 return allowedBuilder_.getMessage(index); 2474 } 2475 } 2476 /** 2477 * 2478 * 2479 * <pre> 2480 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 2481 * </pre> 2482 * 2483 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 2484 */ setAllowed(int index, com.google.cloud.compute.v1.Allowed value)2485 public Builder setAllowed(int index, com.google.cloud.compute.v1.Allowed value) { 2486 if (allowedBuilder_ == null) { 2487 if (value == null) { 2488 throw new NullPointerException(); 2489 } 2490 ensureAllowedIsMutable(); 2491 allowed_.set(index, value); 2492 onChanged(); 2493 } else { 2494 allowedBuilder_.setMessage(index, value); 2495 } 2496 return this; 2497 } 2498 /** 2499 * 2500 * 2501 * <pre> 2502 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 2503 * </pre> 2504 * 2505 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 2506 */ setAllowed( int index, com.google.cloud.compute.v1.Allowed.Builder builderForValue)2507 public Builder setAllowed( 2508 int index, com.google.cloud.compute.v1.Allowed.Builder builderForValue) { 2509 if (allowedBuilder_ == null) { 2510 ensureAllowedIsMutable(); 2511 allowed_.set(index, builderForValue.build()); 2512 onChanged(); 2513 } else { 2514 allowedBuilder_.setMessage(index, builderForValue.build()); 2515 } 2516 return this; 2517 } 2518 /** 2519 * 2520 * 2521 * <pre> 2522 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 2523 * </pre> 2524 * 2525 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 2526 */ addAllowed(com.google.cloud.compute.v1.Allowed value)2527 public Builder addAllowed(com.google.cloud.compute.v1.Allowed value) { 2528 if (allowedBuilder_ == null) { 2529 if (value == null) { 2530 throw new NullPointerException(); 2531 } 2532 ensureAllowedIsMutable(); 2533 allowed_.add(value); 2534 onChanged(); 2535 } else { 2536 allowedBuilder_.addMessage(value); 2537 } 2538 return this; 2539 } 2540 /** 2541 * 2542 * 2543 * <pre> 2544 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 2545 * </pre> 2546 * 2547 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 2548 */ addAllowed(int index, com.google.cloud.compute.v1.Allowed value)2549 public Builder addAllowed(int index, com.google.cloud.compute.v1.Allowed value) { 2550 if (allowedBuilder_ == null) { 2551 if (value == null) { 2552 throw new NullPointerException(); 2553 } 2554 ensureAllowedIsMutable(); 2555 allowed_.add(index, value); 2556 onChanged(); 2557 } else { 2558 allowedBuilder_.addMessage(index, value); 2559 } 2560 return this; 2561 } 2562 /** 2563 * 2564 * 2565 * <pre> 2566 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 2567 * </pre> 2568 * 2569 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 2570 */ addAllowed(com.google.cloud.compute.v1.Allowed.Builder builderForValue)2571 public Builder addAllowed(com.google.cloud.compute.v1.Allowed.Builder builderForValue) { 2572 if (allowedBuilder_ == null) { 2573 ensureAllowedIsMutable(); 2574 allowed_.add(builderForValue.build()); 2575 onChanged(); 2576 } else { 2577 allowedBuilder_.addMessage(builderForValue.build()); 2578 } 2579 return this; 2580 } 2581 /** 2582 * 2583 * 2584 * <pre> 2585 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 2586 * </pre> 2587 * 2588 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 2589 */ addAllowed( int index, com.google.cloud.compute.v1.Allowed.Builder builderForValue)2590 public Builder addAllowed( 2591 int index, com.google.cloud.compute.v1.Allowed.Builder builderForValue) { 2592 if (allowedBuilder_ == null) { 2593 ensureAllowedIsMutable(); 2594 allowed_.add(index, builderForValue.build()); 2595 onChanged(); 2596 } else { 2597 allowedBuilder_.addMessage(index, builderForValue.build()); 2598 } 2599 return this; 2600 } 2601 /** 2602 * 2603 * 2604 * <pre> 2605 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 2606 * </pre> 2607 * 2608 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 2609 */ addAllAllowed( java.lang.Iterable<? extends com.google.cloud.compute.v1.Allowed> values)2610 public Builder addAllAllowed( 2611 java.lang.Iterable<? extends com.google.cloud.compute.v1.Allowed> values) { 2612 if (allowedBuilder_ == null) { 2613 ensureAllowedIsMutable(); 2614 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowed_); 2615 onChanged(); 2616 } else { 2617 allowedBuilder_.addAllMessages(values); 2618 } 2619 return this; 2620 } 2621 /** 2622 * 2623 * 2624 * <pre> 2625 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 2626 * </pre> 2627 * 2628 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 2629 */ clearAllowed()2630 public Builder clearAllowed() { 2631 if (allowedBuilder_ == null) { 2632 allowed_ = java.util.Collections.emptyList(); 2633 bitField0_ = (bitField0_ & ~0x00000001); 2634 onChanged(); 2635 } else { 2636 allowedBuilder_.clear(); 2637 } 2638 return this; 2639 } 2640 /** 2641 * 2642 * 2643 * <pre> 2644 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 2645 * </pre> 2646 * 2647 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 2648 */ removeAllowed(int index)2649 public Builder removeAllowed(int index) { 2650 if (allowedBuilder_ == null) { 2651 ensureAllowedIsMutable(); 2652 allowed_.remove(index); 2653 onChanged(); 2654 } else { 2655 allowedBuilder_.remove(index); 2656 } 2657 return this; 2658 } 2659 /** 2660 * 2661 * 2662 * <pre> 2663 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 2664 * </pre> 2665 * 2666 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 2667 */ getAllowedBuilder(int index)2668 public com.google.cloud.compute.v1.Allowed.Builder getAllowedBuilder(int index) { 2669 return getAllowedFieldBuilder().getBuilder(index); 2670 } 2671 /** 2672 * 2673 * 2674 * <pre> 2675 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 2676 * </pre> 2677 * 2678 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 2679 */ getAllowedOrBuilder(int index)2680 public com.google.cloud.compute.v1.AllowedOrBuilder getAllowedOrBuilder(int index) { 2681 if (allowedBuilder_ == null) { 2682 return allowed_.get(index); 2683 } else { 2684 return allowedBuilder_.getMessageOrBuilder(index); 2685 } 2686 } 2687 /** 2688 * 2689 * 2690 * <pre> 2691 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 2692 * </pre> 2693 * 2694 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 2695 */ 2696 public java.util.List<? extends com.google.cloud.compute.v1.AllowedOrBuilder> getAllowedOrBuilderList()2697 getAllowedOrBuilderList() { 2698 if (allowedBuilder_ != null) { 2699 return allowedBuilder_.getMessageOrBuilderList(); 2700 } else { 2701 return java.util.Collections.unmodifiableList(allowed_); 2702 } 2703 } 2704 /** 2705 * 2706 * 2707 * <pre> 2708 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 2709 * </pre> 2710 * 2711 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 2712 */ addAllowedBuilder()2713 public com.google.cloud.compute.v1.Allowed.Builder addAllowedBuilder() { 2714 return getAllowedFieldBuilder() 2715 .addBuilder(com.google.cloud.compute.v1.Allowed.getDefaultInstance()); 2716 } 2717 /** 2718 * 2719 * 2720 * <pre> 2721 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 2722 * </pre> 2723 * 2724 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 2725 */ addAllowedBuilder(int index)2726 public com.google.cloud.compute.v1.Allowed.Builder addAllowedBuilder(int index) { 2727 return getAllowedFieldBuilder() 2728 .addBuilder(index, com.google.cloud.compute.v1.Allowed.getDefaultInstance()); 2729 } 2730 /** 2731 * 2732 * 2733 * <pre> 2734 * The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. 2735 * </pre> 2736 * 2737 * <code>repeated .google.cloud.compute.v1.Allowed allowed = 162398632;</code> 2738 */ getAllowedBuilderList()2739 public java.util.List<com.google.cloud.compute.v1.Allowed.Builder> getAllowedBuilderList() { 2740 return getAllowedFieldBuilder().getBuilderList(); 2741 } 2742 2743 private com.google.protobuf.RepeatedFieldBuilderV3< 2744 com.google.cloud.compute.v1.Allowed, 2745 com.google.cloud.compute.v1.Allowed.Builder, 2746 com.google.cloud.compute.v1.AllowedOrBuilder> getAllowedFieldBuilder()2747 getAllowedFieldBuilder() { 2748 if (allowedBuilder_ == null) { 2749 allowedBuilder_ = 2750 new com.google.protobuf.RepeatedFieldBuilderV3< 2751 com.google.cloud.compute.v1.Allowed, 2752 com.google.cloud.compute.v1.Allowed.Builder, 2753 com.google.cloud.compute.v1.AllowedOrBuilder>( 2754 allowed_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); 2755 allowed_ = null; 2756 } 2757 return allowedBuilder_; 2758 } 2759 2760 private java.lang.Object creationTimestamp_ = ""; 2761 /** 2762 * 2763 * 2764 * <pre> 2765 * [Output Only] Creation timestamp in RFC3339 text format. 2766 * </pre> 2767 * 2768 * <code>optional string creation_timestamp = 30525366;</code> 2769 * 2770 * @return Whether the creationTimestamp field is set. 2771 */ hasCreationTimestamp()2772 public boolean hasCreationTimestamp() { 2773 return ((bitField0_ & 0x00000002) != 0); 2774 } 2775 /** 2776 * 2777 * 2778 * <pre> 2779 * [Output Only] Creation timestamp in RFC3339 text format. 2780 * </pre> 2781 * 2782 * <code>optional string creation_timestamp = 30525366;</code> 2783 * 2784 * @return The creationTimestamp. 2785 */ getCreationTimestamp()2786 public java.lang.String getCreationTimestamp() { 2787 java.lang.Object ref = creationTimestamp_; 2788 if (!(ref instanceof java.lang.String)) { 2789 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2790 java.lang.String s = bs.toStringUtf8(); 2791 creationTimestamp_ = s; 2792 return s; 2793 } else { 2794 return (java.lang.String) ref; 2795 } 2796 } 2797 /** 2798 * 2799 * 2800 * <pre> 2801 * [Output Only] Creation timestamp in RFC3339 text format. 2802 * </pre> 2803 * 2804 * <code>optional string creation_timestamp = 30525366;</code> 2805 * 2806 * @return The bytes for creationTimestamp. 2807 */ getCreationTimestampBytes()2808 public com.google.protobuf.ByteString getCreationTimestampBytes() { 2809 java.lang.Object ref = creationTimestamp_; 2810 if (ref instanceof String) { 2811 com.google.protobuf.ByteString b = 2812 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2813 creationTimestamp_ = b; 2814 return b; 2815 } else { 2816 return (com.google.protobuf.ByteString) ref; 2817 } 2818 } 2819 /** 2820 * 2821 * 2822 * <pre> 2823 * [Output Only] Creation timestamp in RFC3339 text format. 2824 * </pre> 2825 * 2826 * <code>optional string creation_timestamp = 30525366;</code> 2827 * 2828 * @param value The creationTimestamp to set. 2829 * @return This builder for chaining. 2830 */ setCreationTimestamp(java.lang.String value)2831 public Builder setCreationTimestamp(java.lang.String value) { 2832 if (value == null) { 2833 throw new NullPointerException(); 2834 } 2835 creationTimestamp_ = value; 2836 bitField0_ |= 0x00000002; 2837 onChanged(); 2838 return this; 2839 } 2840 /** 2841 * 2842 * 2843 * <pre> 2844 * [Output Only] Creation timestamp in RFC3339 text format. 2845 * </pre> 2846 * 2847 * <code>optional string creation_timestamp = 30525366;</code> 2848 * 2849 * @return This builder for chaining. 2850 */ clearCreationTimestamp()2851 public Builder clearCreationTimestamp() { 2852 creationTimestamp_ = getDefaultInstance().getCreationTimestamp(); 2853 bitField0_ = (bitField0_ & ~0x00000002); 2854 onChanged(); 2855 return this; 2856 } 2857 /** 2858 * 2859 * 2860 * <pre> 2861 * [Output Only] Creation timestamp in RFC3339 text format. 2862 * </pre> 2863 * 2864 * <code>optional string creation_timestamp = 30525366;</code> 2865 * 2866 * @param value The bytes for creationTimestamp to set. 2867 * @return This builder for chaining. 2868 */ setCreationTimestampBytes(com.google.protobuf.ByteString value)2869 public Builder setCreationTimestampBytes(com.google.protobuf.ByteString value) { 2870 if (value == null) { 2871 throw new NullPointerException(); 2872 } 2873 checkByteStringIsUtf8(value); 2874 creationTimestamp_ = value; 2875 bitField0_ |= 0x00000002; 2876 onChanged(); 2877 return this; 2878 } 2879 2880 private java.util.List<com.google.cloud.compute.v1.Denied> denied_ = 2881 java.util.Collections.emptyList(); 2882 ensureDeniedIsMutable()2883 private void ensureDeniedIsMutable() { 2884 if (!((bitField0_ & 0x00000004) != 0)) { 2885 denied_ = new java.util.ArrayList<com.google.cloud.compute.v1.Denied>(denied_); 2886 bitField0_ |= 0x00000004; 2887 } 2888 } 2889 2890 private com.google.protobuf.RepeatedFieldBuilderV3< 2891 com.google.cloud.compute.v1.Denied, 2892 com.google.cloud.compute.v1.Denied.Builder, 2893 com.google.cloud.compute.v1.DeniedOrBuilder> 2894 deniedBuilder_; 2895 2896 /** 2897 * 2898 * 2899 * <pre> 2900 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 2901 * </pre> 2902 * 2903 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 2904 */ getDeniedList()2905 public java.util.List<com.google.cloud.compute.v1.Denied> getDeniedList() { 2906 if (deniedBuilder_ == null) { 2907 return java.util.Collections.unmodifiableList(denied_); 2908 } else { 2909 return deniedBuilder_.getMessageList(); 2910 } 2911 } 2912 /** 2913 * 2914 * 2915 * <pre> 2916 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 2917 * </pre> 2918 * 2919 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 2920 */ getDeniedCount()2921 public int getDeniedCount() { 2922 if (deniedBuilder_ == null) { 2923 return denied_.size(); 2924 } else { 2925 return deniedBuilder_.getCount(); 2926 } 2927 } 2928 /** 2929 * 2930 * 2931 * <pre> 2932 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 2933 * </pre> 2934 * 2935 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 2936 */ getDenied(int index)2937 public com.google.cloud.compute.v1.Denied getDenied(int index) { 2938 if (deniedBuilder_ == null) { 2939 return denied_.get(index); 2940 } else { 2941 return deniedBuilder_.getMessage(index); 2942 } 2943 } 2944 /** 2945 * 2946 * 2947 * <pre> 2948 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 2949 * </pre> 2950 * 2951 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 2952 */ setDenied(int index, com.google.cloud.compute.v1.Denied value)2953 public Builder setDenied(int index, com.google.cloud.compute.v1.Denied value) { 2954 if (deniedBuilder_ == null) { 2955 if (value == null) { 2956 throw new NullPointerException(); 2957 } 2958 ensureDeniedIsMutable(); 2959 denied_.set(index, value); 2960 onChanged(); 2961 } else { 2962 deniedBuilder_.setMessage(index, value); 2963 } 2964 return this; 2965 } 2966 /** 2967 * 2968 * 2969 * <pre> 2970 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 2971 * </pre> 2972 * 2973 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 2974 */ setDenied( int index, com.google.cloud.compute.v1.Denied.Builder builderForValue)2975 public Builder setDenied( 2976 int index, com.google.cloud.compute.v1.Denied.Builder builderForValue) { 2977 if (deniedBuilder_ == null) { 2978 ensureDeniedIsMutable(); 2979 denied_.set(index, builderForValue.build()); 2980 onChanged(); 2981 } else { 2982 deniedBuilder_.setMessage(index, builderForValue.build()); 2983 } 2984 return this; 2985 } 2986 /** 2987 * 2988 * 2989 * <pre> 2990 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 2991 * </pre> 2992 * 2993 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 2994 */ addDenied(com.google.cloud.compute.v1.Denied value)2995 public Builder addDenied(com.google.cloud.compute.v1.Denied value) { 2996 if (deniedBuilder_ == null) { 2997 if (value == null) { 2998 throw new NullPointerException(); 2999 } 3000 ensureDeniedIsMutable(); 3001 denied_.add(value); 3002 onChanged(); 3003 } else { 3004 deniedBuilder_.addMessage(value); 3005 } 3006 return this; 3007 } 3008 /** 3009 * 3010 * 3011 * <pre> 3012 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 3013 * </pre> 3014 * 3015 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 3016 */ addDenied(int index, com.google.cloud.compute.v1.Denied value)3017 public Builder addDenied(int index, com.google.cloud.compute.v1.Denied value) { 3018 if (deniedBuilder_ == null) { 3019 if (value == null) { 3020 throw new NullPointerException(); 3021 } 3022 ensureDeniedIsMutable(); 3023 denied_.add(index, value); 3024 onChanged(); 3025 } else { 3026 deniedBuilder_.addMessage(index, value); 3027 } 3028 return this; 3029 } 3030 /** 3031 * 3032 * 3033 * <pre> 3034 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 3035 * </pre> 3036 * 3037 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 3038 */ addDenied(com.google.cloud.compute.v1.Denied.Builder builderForValue)3039 public Builder addDenied(com.google.cloud.compute.v1.Denied.Builder builderForValue) { 3040 if (deniedBuilder_ == null) { 3041 ensureDeniedIsMutable(); 3042 denied_.add(builderForValue.build()); 3043 onChanged(); 3044 } else { 3045 deniedBuilder_.addMessage(builderForValue.build()); 3046 } 3047 return this; 3048 } 3049 /** 3050 * 3051 * 3052 * <pre> 3053 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 3054 * </pre> 3055 * 3056 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 3057 */ addDenied( int index, com.google.cloud.compute.v1.Denied.Builder builderForValue)3058 public Builder addDenied( 3059 int index, com.google.cloud.compute.v1.Denied.Builder builderForValue) { 3060 if (deniedBuilder_ == null) { 3061 ensureDeniedIsMutable(); 3062 denied_.add(index, builderForValue.build()); 3063 onChanged(); 3064 } else { 3065 deniedBuilder_.addMessage(index, builderForValue.build()); 3066 } 3067 return this; 3068 } 3069 /** 3070 * 3071 * 3072 * <pre> 3073 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 3074 * </pre> 3075 * 3076 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 3077 */ addAllDenied( java.lang.Iterable<? extends com.google.cloud.compute.v1.Denied> values)3078 public Builder addAllDenied( 3079 java.lang.Iterable<? extends com.google.cloud.compute.v1.Denied> values) { 3080 if (deniedBuilder_ == null) { 3081 ensureDeniedIsMutable(); 3082 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, denied_); 3083 onChanged(); 3084 } else { 3085 deniedBuilder_.addAllMessages(values); 3086 } 3087 return this; 3088 } 3089 /** 3090 * 3091 * 3092 * <pre> 3093 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 3094 * </pre> 3095 * 3096 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 3097 */ clearDenied()3098 public Builder clearDenied() { 3099 if (deniedBuilder_ == null) { 3100 denied_ = java.util.Collections.emptyList(); 3101 bitField0_ = (bitField0_ & ~0x00000004); 3102 onChanged(); 3103 } else { 3104 deniedBuilder_.clear(); 3105 } 3106 return this; 3107 } 3108 /** 3109 * 3110 * 3111 * <pre> 3112 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 3113 * </pre> 3114 * 3115 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 3116 */ removeDenied(int index)3117 public Builder removeDenied(int index) { 3118 if (deniedBuilder_ == null) { 3119 ensureDeniedIsMutable(); 3120 denied_.remove(index); 3121 onChanged(); 3122 } else { 3123 deniedBuilder_.remove(index); 3124 } 3125 return this; 3126 } 3127 /** 3128 * 3129 * 3130 * <pre> 3131 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 3132 * </pre> 3133 * 3134 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 3135 */ getDeniedBuilder(int index)3136 public com.google.cloud.compute.v1.Denied.Builder getDeniedBuilder(int index) { 3137 return getDeniedFieldBuilder().getBuilder(index); 3138 } 3139 /** 3140 * 3141 * 3142 * <pre> 3143 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 3144 * </pre> 3145 * 3146 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 3147 */ getDeniedOrBuilder(int index)3148 public com.google.cloud.compute.v1.DeniedOrBuilder getDeniedOrBuilder(int index) { 3149 if (deniedBuilder_ == null) { 3150 return denied_.get(index); 3151 } else { 3152 return deniedBuilder_.getMessageOrBuilder(index); 3153 } 3154 } 3155 /** 3156 * 3157 * 3158 * <pre> 3159 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 3160 * </pre> 3161 * 3162 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 3163 */ 3164 public java.util.List<? extends com.google.cloud.compute.v1.DeniedOrBuilder> getDeniedOrBuilderList()3165 getDeniedOrBuilderList() { 3166 if (deniedBuilder_ != null) { 3167 return deniedBuilder_.getMessageOrBuilderList(); 3168 } else { 3169 return java.util.Collections.unmodifiableList(denied_); 3170 } 3171 } 3172 /** 3173 * 3174 * 3175 * <pre> 3176 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 3177 * </pre> 3178 * 3179 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 3180 */ addDeniedBuilder()3181 public com.google.cloud.compute.v1.Denied.Builder addDeniedBuilder() { 3182 return getDeniedFieldBuilder() 3183 .addBuilder(com.google.cloud.compute.v1.Denied.getDefaultInstance()); 3184 } 3185 /** 3186 * 3187 * 3188 * <pre> 3189 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 3190 * </pre> 3191 * 3192 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 3193 */ addDeniedBuilder(int index)3194 public com.google.cloud.compute.v1.Denied.Builder addDeniedBuilder(int index) { 3195 return getDeniedFieldBuilder() 3196 .addBuilder(index, com.google.cloud.compute.v1.Denied.getDefaultInstance()); 3197 } 3198 /** 3199 * 3200 * 3201 * <pre> 3202 * The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. 3203 * </pre> 3204 * 3205 * <code>repeated .google.cloud.compute.v1.Denied denied = 275217307;</code> 3206 */ getDeniedBuilderList()3207 public java.util.List<com.google.cloud.compute.v1.Denied.Builder> getDeniedBuilderList() { 3208 return getDeniedFieldBuilder().getBuilderList(); 3209 } 3210 3211 private com.google.protobuf.RepeatedFieldBuilderV3< 3212 com.google.cloud.compute.v1.Denied, 3213 com.google.cloud.compute.v1.Denied.Builder, 3214 com.google.cloud.compute.v1.DeniedOrBuilder> getDeniedFieldBuilder()3215 getDeniedFieldBuilder() { 3216 if (deniedBuilder_ == null) { 3217 deniedBuilder_ = 3218 new com.google.protobuf.RepeatedFieldBuilderV3< 3219 com.google.cloud.compute.v1.Denied, 3220 com.google.cloud.compute.v1.Denied.Builder, 3221 com.google.cloud.compute.v1.DeniedOrBuilder>( 3222 denied_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); 3223 denied_ = null; 3224 } 3225 return deniedBuilder_; 3226 } 3227 3228 private java.lang.Object description_ = ""; 3229 /** 3230 * 3231 * 3232 * <pre> 3233 * An optional description of this resource. Provide this field when you create the resource. 3234 * </pre> 3235 * 3236 * <code>optional string description = 422937596;</code> 3237 * 3238 * @return Whether the description field is set. 3239 */ hasDescription()3240 public boolean hasDescription() { 3241 return ((bitField0_ & 0x00000008) != 0); 3242 } 3243 /** 3244 * 3245 * 3246 * <pre> 3247 * An optional description of this resource. Provide this field when you create the resource. 3248 * </pre> 3249 * 3250 * <code>optional string description = 422937596;</code> 3251 * 3252 * @return The description. 3253 */ getDescription()3254 public java.lang.String getDescription() { 3255 java.lang.Object ref = description_; 3256 if (!(ref instanceof java.lang.String)) { 3257 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3258 java.lang.String s = bs.toStringUtf8(); 3259 description_ = s; 3260 return s; 3261 } else { 3262 return (java.lang.String) ref; 3263 } 3264 } 3265 /** 3266 * 3267 * 3268 * <pre> 3269 * An optional description of this resource. Provide this field when you create the resource. 3270 * </pre> 3271 * 3272 * <code>optional string description = 422937596;</code> 3273 * 3274 * @return The bytes for description. 3275 */ getDescriptionBytes()3276 public com.google.protobuf.ByteString getDescriptionBytes() { 3277 java.lang.Object ref = description_; 3278 if (ref instanceof String) { 3279 com.google.protobuf.ByteString b = 3280 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3281 description_ = b; 3282 return b; 3283 } else { 3284 return (com.google.protobuf.ByteString) ref; 3285 } 3286 } 3287 /** 3288 * 3289 * 3290 * <pre> 3291 * An optional description of this resource. Provide this field when you create the resource. 3292 * </pre> 3293 * 3294 * <code>optional string description = 422937596;</code> 3295 * 3296 * @param value The description to set. 3297 * @return This builder for chaining. 3298 */ setDescription(java.lang.String value)3299 public Builder setDescription(java.lang.String value) { 3300 if (value == null) { 3301 throw new NullPointerException(); 3302 } 3303 description_ = value; 3304 bitField0_ |= 0x00000008; 3305 onChanged(); 3306 return this; 3307 } 3308 /** 3309 * 3310 * 3311 * <pre> 3312 * An optional description of this resource. Provide this field when you create the resource. 3313 * </pre> 3314 * 3315 * <code>optional string description = 422937596;</code> 3316 * 3317 * @return This builder for chaining. 3318 */ clearDescription()3319 public Builder clearDescription() { 3320 description_ = getDefaultInstance().getDescription(); 3321 bitField0_ = (bitField0_ & ~0x00000008); 3322 onChanged(); 3323 return this; 3324 } 3325 /** 3326 * 3327 * 3328 * <pre> 3329 * An optional description of this resource. Provide this field when you create the resource. 3330 * </pre> 3331 * 3332 * <code>optional string description = 422937596;</code> 3333 * 3334 * @param value The bytes for description to set. 3335 * @return This builder for chaining. 3336 */ setDescriptionBytes(com.google.protobuf.ByteString value)3337 public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { 3338 if (value == null) { 3339 throw new NullPointerException(); 3340 } 3341 checkByteStringIsUtf8(value); 3342 description_ = value; 3343 bitField0_ |= 0x00000008; 3344 onChanged(); 3345 return this; 3346 } 3347 3348 private com.google.protobuf.LazyStringList destinationRanges_ = 3349 com.google.protobuf.LazyStringArrayList.EMPTY; 3350 ensureDestinationRangesIsMutable()3351 private void ensureDestinationRangesIsMutable() { 3352 if (!((bitField0_ & 0x00000010) != 0)) { 3353 destinationRanges_ = new com.google.protobuf.LazyStringArrayList(destinationRanges_); 3354 bitField0_ |= 0x00000010; 3355 } 3356 } 3357 /** 3358 * 3359 * 3360 * <pre> 3361 * If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Both IPv4 and IPv6 are supported. 3362 * </pre> 3363 * 3364 * <code>repeated string destination_ranges = 305699879;</code> 3365 * 3366 * @return A list containing the destinationRanges. 3367 */ getDestinationRangesList()3368 public com.google.protobuf.ProtocolStringList getDestinationRangesList() { 3369 return destinationRanges_.getUnmodifiableView(); 3370 } 3371 /** 3372 * 3373 * 3374 * <pre> 3375 * If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Both IPv4 and IPv6 are supported. 3376 * </pre> 3377 * 3378 * <code>repeated string destination_ranges = 305699879;</code> 3379 * 3380 * @return The count of destinationRanges. 3381 */ getDestinationRangesCount()3382 public int getDestinationRangesCount() { 3383 return destinationRanges_.size(); 3384 } 3385 /** 3386 * 3387 * 3388 * <pre> 3389 * If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Both IPv4 and IPv6 are supported. 3390 * </pre> 3391 * 3392 * <code>repeated string destination_ranges = 305699879;</code> 3393 * 3394 * @param index The index of the element to return. 3395 * @return The destinationRanges at the given index. 3396 */ getDestinationRanges(int index)3397 public java.lang.String getDestinationRanges(int index) { 3398 return destinationRanges_.get(index); 3399 } 3400 /** 3401 * 3402 * 3403 * <pre> 3404 * If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Both IPv4 and IPv6 are supported. 3405 * </pre> 3406 * 3407 * <code>repeated string destination_ranges = 305699879;</code> 3408 * 3409 * @param index The index of the value to return. 3410 * @return The bytes of the destinationRanges at the given index. 3411 */ getDestinationRangesBytes(int index)3412 public com.google.protobuf.ByteString getDestinationRangesBytes(int index) { 3413 return destinationRanges_.getByteString(index); 3414 } 3415 /** 3416 * 3417 * 3418 * <pre> 3419 * If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Both IPv4 and IPv6 are supported. 3420 * </pre> 3421 * 3422 * <code>repeated string destination_ranges = 305699879;</code> 3423 * 3424 * @param index The index to set the value at. 3425 * @param value The destinationRanges to set. 3426 * @return This builder for chaining. 3427 */ setDestinationRanges(int index, java.lang.String value)3428 public Builder setDestinationRanges(int index, java.lang.String value) { 3429 if (value == null) { 3430 throw new NullPointerException(); 3431 } 3432 ensureDestinationRangesIsMutable(); 3433 destinationRanges_.set(index, value); 3434 onChanged(); 3435 return this; 3436 } 3437 /** 3438 * 3439 * 3440 * <pre> 3441 * If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Both IPv4 and IPv6 are supported. 3442 * </pre> 3443 * 3444 * <code>repeated string destination_ranges = 305699879;</code> 3445 * 3446 * @param value The destinationRanges to add. 3447 * @return This builder for chaining. 3448 */ addDestinationRanges(java.lang.String value)3449 public Builder addDestinationRanges(java.lang.String value) { 3450 if (value == null) { 3451 throw new NullPointerException(); 3452 } 3453 ensureDestinationRangesIsMutable(); 3454 destinationRanges_.add(value); 3455 onChanged(); 3456 return this; 3457 } 3458 /** 3459 * 3460 * 3461 * <pre> 3462 * If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Both IPv4 and IPv6 are supported. 3463 * </pre> 3464 * 3465 * <code>repeated string destination_ranges = 305699879;</code> 3466 * 3467 * @param values The destinationRanges to add. 3468 * @return This builder for chaining. 3469 */ addAllDestinationRanges(java.lang.Iterable<java.lang.String> values)3470 public Builder addAllDestinationRanges(java.lang.Iterable<java.lang.String> values) { 3471 ensureDestinationRangesIsMutable(); 3472 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, destinationRanges_); 3473 onChanged(); 3474 return this; 3475 } 3476 /** 3477 * 3478 * 3479 * <pre> 3480 * If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Both IPv4 and IPv6 are supported. 3481 * </pre> 3482 * 3483 * <code>repeated string destination_ranges = 305699879;</code> 3484 * 3485 * @return This builder for chaining. 3486 */ clearDestinationRanges()3487 public Builder clearDestinationRanges() { 3488 destinationRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; 3489 bitField0_ = (bitField0_ & ~0x00000010); 3490 onChanged(); 3491 return this; 3492 } 3493 /** 3494 * 3495 * 3496 * <pre> 3497 * If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Both IPv4 and IPv6 are supported. 3498 * </pre> 3499 * 3500 * <code>repeated string destination_ranges = 305699879;</code> 3501 * 3502 * @param value The bytes of the destinationRanges to add. 3503 * @return This builder for chaining. 3504 */ addDestinationRangesBytes(com.google.protobuf.ByteString value)3505 public Builder addDestinationRangesBytes(com.google.protobuf.ByteString value) { 3506 if (value == null) { 3507 throw new NullPointerException(); 3508 } 3509 checkByteStringIsUtf8(value); 3510 ensureDestinationRangesIsMutable(); 3511 destinationRanges_.add(value); 3512 onChanged(); 3513 return this; 3514 } 3515 3516 private java.lang.Object direction_ = ""; 3517 /** 3518 * 3519 * 3520 * <pre> 3521 * Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot specify the sourceTags fields. 3522 * Check the Direction enum for the list of possible values. 3523 * </pre> 3524 * 3525 * <code>optional string direction = 111150975;</code> 3526 * 3527 * @return Whether the direction field is set. 3528 */ hasDirection()3529 public boolean hasDirection() { 3530 return ((bitField0_ & 0x00000020) != 0); 3531 } 3532 /** 3533 * 3534 * 3535 * <pre> 3536 * Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot specify the sourceTags fields. 3537 * Check the Direction enum for the list of possible values. 3538 * </pre> 3539 * 3540 * <code>optional string direction = 111150975;</code> 3541 * 3542 * @return The direction. 3543 */ getDirection()3544 public java.lang.String getDirection() { 3545 java.lang.Object ref = direction_; 3546 if (!(ref instanceof java.lang.String)) { 3547 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3548 java.lang.String s = bs.toStringUtf8(); 3549 direction_ = s; 3550 return s; 3551 } else { 3552 return (java.lang.String) ref; 3553 } 3554 } 3555 /** 3556 * 3557 * 3558 * <pre> 3559 * Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot specify the sourceTags fields. 3560 * Check the Direction enum for the list of possible values. 3561 * </pre> 3562 * 3563 * <code>optional string direction = 111150975;</code> 3564 * 3565 * @return The bytes for direction. 3566 */ getDirectionBytes()3567 public com.google.protobuf.ByteString getDirectionBytes() { 3568 java.lang.Object ref = direction_; 3569 if (ref instanceof String) { 3570 com.google.protobuf.ByteString b = 3571 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3572 direction_ = b; 3573 return b; 3574 } else { 3575 return (com.google.protobuf.ByteString) ref; 3576 } 3577 } 3578 /** 3579 * 3580 * 3581 * <pre> 3582 * Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot specify the sourceTags fields. 3583 * Check the Direction enum for the list of possible values. 3584 * </pre> 3585 * 3586 * <code>optional string direction = 111150975;</code> 3587 * 3588 * @param value The direction to set. 3589 * @return This builder for chaining. 3590 */ setDirection(java.lang.String value)3591 public Builder setDirection(java.lang.String value) { 3592 if (value == null) { 3593 throw new NullPointerException(); 3594 } 3595 direction_ = value; 3596 bitField0_ |= 0x00000020; 3597 onChanged(); 3598 return this; 3599 } 3600 /** 3601 * 3602 * 3603 * <pre> 3604 * Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot specify the sourceTags fields. 3605 * Check the Direction enum for the list of possible values. 3606 * </pre> 3607 * 3608 * <code>optional string direction = 111150975;</code> 3609 * 3610 * @return This builder for chaining. 3611 */ clearDirection()3612 public Builder clearDirection() { 3613 direction_ = getDefaultInstance().getDirection(); 3614 bitField0_ = (bitField0_ & ~0x00000020); 3615 onChanged(); 3616 return this; 3617 } 3618 /** 3619 * 3620 * 3621 * <pre> 3622 * Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot specify the sourceTags fields. 3623 * Check the Direction enum for the list of possible values. 3624 * </pre> 3625 * 3626 * <code>optional string direction = 111150975;</code> 3627 * 3628 * @param value The bytes for direction to set. 3629 * @return This builder for chaining. 3630 */ setDirectionBytes(com.google.protobuf.ByteString value)3631 public Builder setDirectionBytes(com.google.protobuf.ByteString value) { 3632 if (value == null) { 3633 throw new NullPointerException(); 3634 } 3635 checkByteStringIsUtf8(value); 3636 direction_ = value; 3637 bitField0_ |= 0x00000020; 3638 onChanged(); 3639 return this; 3640 } 3641 3642 private boolean disabled_; 3643 /** 3644 * 3645 * 3646 * <pre> 3647 * Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled. 3648 * </pre> 3649 * 3650 * <code>optional bool disabled = 270940796;</code> 3651 * 3652 * @return Whether the disabled field is set. 3653 */ 3654 @java.lang.Override hasDisabled()3655 public boolean hasDisabled() { 3656 return ((bitField0_ & 0x00000040) != 0); 3657 } 3658 /** 3659 * 3660 * 3661 * <pre> 3662 * Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled. 3663 * </pre> 3664 * 3665 * <code>optional bool disabled = 270940796;</code> 3666 * 3667 * @return The disabled. 3668 */ 3669 @java.lang.Override getDisabled()3670 public boolean getDisabled() { 3671 return disabled_; 3672 } 3673 /** 3674 * 3675 * 3676 * <pre> 3677 * Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled. 3678 * </pre> 3679 * 3680 * <code>optional bool disabled = 270940796;</code> 3681 * 3682 * @param value The disabled to set. 3683 * @return This builder for chaining. 3684 */ setDisabled(boolean value)3685 public Builder setDisabled(boolean value) { 3686 3687 disabled_ = value; 3688 bitField0_ |= 0x00000040; 3689 onChanged(); 3690 return this; 3691 } 3692 /** 3693 * 3694 * 3695 * <pre> 3696 * Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled. 3697 * </pre> 3698 * 3699 * <code>optional bool disabled = 270940796;</code> 3700 * 3701 * @return This builder for chaining. 3702 */ clearDisabled()3703 public Builder clearDisabled() { 3704 bitField0_ = (bitField0_ & ~0x00000040); 3705 disabled_ = false; 3706 onChanged(); 3707 return this; 3708 } 3709 3710 private long id_; 3711 /** 3712 * 3713 * 3714 * <pre> 3715 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 3716 * </pre> 3717 * 3718 * <code>optional uint64 id = 3355;</code> 3719 * 3720 * @return Whether the id field is set. 3721 */ 3722 @java.lang.Override hasId()3723 public boolean hasId() { 3724 return ((bitField0_ & 0x00000080) != 0); 3725 } 3726 /** 3727 * 3728 * 3729 * <pre> 3730 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 3731 * </pre> 3732 * 3733 * <code>optional uint64 id = 3355;</code> 3734 * 3735 * @return The id. 3736 */ 3737 @java.lang.Override getId()3738 public long getId() { 3739 return id_; 3740 } 3741 /** 3742 * 3743 * 3744 * <pre> 3745 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 3746 * </pre> 3747 * 3748 * <code>optional uint64 id = 3355;</code> 3749 * 3750 * @param value The id to set. 3751 * @return This builder for chaining. 3752 */ setId(long value)3753 public Builder setId(long value) { 3754 3755 id_ = value; 3756 bitField0_ |= 0x00000080; 3757 onChanged(); 3758 return this; 3759 } 3760 /** 3761 * 3762 * 3763 * <pre> 3764 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 3765 * </pre> 3766 * 3767 * <code>optional uint64 id = 3355;</code> 3768 * 3769 * @return This builder for chaining. 3770 */ clearId()3771 public Builder clearId() { 3772 bitField0_ = (bitField0_ & ~0x00000080); 3773 id_ = 0L; 3774 onChanged(); 3775 return this; 3776 } 3777 3778 private java.lang.Object kind_ = ""; 3779 /** 3780 * 3781 * 3782 * <pre> 3783 * [Output Only] Type of the resource. Always compute#firewall for firewall rules. 3784 * </pre> 3785 * 3786 * <code>optional string kind = 3292052;</code> 3787 * 3788 * @return Whether the kind field is set. 3789 */ hasKind()3790 public boolean hasKind() { 3791 return ((bitField0_ & 0x00000100) != 0); 3792 } 3793 /** 3794 * 3795 * 3796 * <pre> 3797 * [Output Only] Type of the resource. Always compute#firewall for firewall rules. 3798 * </pre> 3799 * 3800 * <code>optional string kind = 3292052;</code> 3801 * 3802 * @return The kind. 3803 */ getKind()3804 public java.lang.String getKind() { 3805 java.lang.Object ref = kind_; 3806 if (!(ref instanceof java.lang.String)) { 3807 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3808 java.lang.String s = bs.toStringUtf8(); 3809 kind_ = s; 3810 return s; 3811 } else { 3812 return (java.lang.String) ref; 3813 } 3814 } 3815 /** 3816 * 3817 * 3818 * <pre> 3819 * [Output Only] Type of the resource. Always compute#firewall for firewall rules. 3820 * </pre> 3821 * 3822 * <code>optional string kind = 3292052;</code> 3823 * 3824 * @return The bytes for kind. 3825 */ getKindBytes()3826 public com.google.protobuf.ByteString getKindBytes() { 3827 java.lang.Object ref = kind_; 3828 if (ref instanceof String) { 3829 com.google.protobuf.ByteString b = 3830 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3831 kind_ = b; 3832 return b; 3833 } else { 3834 return (com.google.protobuf.ByteString) ref; 3835 } 3836 } 3837 /** 3838 * 3839 * 3840 * <pre> 3841 * [Output Only] Type of the resource. Always compute#firewall for firewall rules. 3842 * </pre> 3843 * 3844 * <code>optional string kind = 3292052;</code> 3845 * 3846 * @param value The kind to set. 3847 * @return This builder for chaining. 3848 */ setKind(java.lang.String value)3849 public Builder setKind(java.lang.String value) { 3850 if (value == null) { 3851 throw new NullPointerException(); 3852 } 3853 kind_ = value; 3854 bitField0_ |= 0x00000100; 3855 onChanged(); 3856 return this; 3857 } 3858 /** 3859 * 3860 * 3861 * <pre> 3862 * [Output Only] Type of the resource. Always compute#firewall for firewall rules. 3863 * </pre> 3864 * 3865 * <code>optional string kind = 3292052;</code> 3866 * 3867 * @return This builder for chaining. 3868 */ clearKind()3869 public Builder clearKind() { 3870 kind_ = getDefaultInstance().getKind(); 3871 bitField0_ = (bitField0_ & ~0x00000100); 3872 onChanged(); 3873 return this; 3874 } 3875 /** 3876 * 3877 * 3878 * <pre> 3879 * [Output Only] Type of the resource. Always compute#firewall for firewall rules. 3880 * </pre> 3881 * 3882 * <code>optional string kind = 3292052;</code> 3883 * 3884 * @param value The bytes for kind to set. 3885 * @return This builder for chaining. 3886 */ setKindBytes(com.google.protobuf.ByteString value)3887 public Builder setKindBytes(com.google.protobuf.ByteString value) { 3888 if (value == null) { 3889 throw new NullPointerException(); 3890 } 3891 checkByteStringIsUtf8(value); 3892 kind_ = value; 3893 bitField0_ |= 0x00000100; 3894 onChanged(); 3895 return this; 3896 } 3897 3898 private com.google.cloud.compute.v1.FirewallLogConfig logConfig_; 3899 private com.google.protobuf.SingleFieldBuilderV3< 3900 com.google.cloud.compute.v1.FirewallLogConfig, 3901 com.google.cloud.compute.v1.FirewallLogConfig.Builder, 3902 com.google.cloud.compute.v1.FirewallLogConfigOrBuilder> 3903 logConfigBuilder_; 3904 /** 3905 * 3906 * 3907 * <pre> 3908 * This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging. 3909 * </pre> 3910 * 3911 * <code>optional .google.cloud.compute.v1.FirewallLogConfig log_config = 351299741;</code> 3912 * 3913 * @return Whether the logConfig field is set. 3914 */ hasLogConfig()3915 public boolean hasLogConfig() { 3916 return ((bitField0_ & 0x00000200) != 0); 3917 } 3918 /** 3919 * 3920 * 3921 * <pre> 3922 * This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging. 3923 * </pre> 3924 * 3925 * <code>optional .google.cloud.compute.v1.FirewallLogConfig log_config = 351299741;</code> 3926 * 3927 * @return The logConfig. 3928 */ getLogConfig()3929 public com.google.cloud.compute.v1.FirewallLogConfig getLogConfig() { 3930 if (logConfigBuilder_ == null) { 3931 return logConfig_ == null 3932 ? com.google.cloud.compute.v1.FirewallLogConfig.getDefaultInstance() 3933 : logConfig_; 3934 } else { 3935 return logConfigBuilder_.getMessage(); 3936 } 3937 } 3938 /** 3939 * 3940 * 3941 * <pre> 3942 * This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging. 3943 * </pre> 3944 * 3945 * <code>optional .google.cloud.compute.v1.FirewallLogConfig log_config = 351299741;</code> 3946 */ setLogConfig(com.google.cloud.compute.v1.FirewallLogConfig value)3947 public Builder setLogConfig(com.google.cloud.compute.v1.FirewallLogConfig value) { 3948 if (logConfigBuilder_ == null) { 3949 if (value == null) { 3950 throw new NullPointerException(); 3951 } 3952 logConfig_ = value; 3953 } else { 3954 logConfigBuilder_.setMessage(value); 3955 } 3956 bitField0_ |= 0x00000200; 3957 onChanged(); 3958 return this; 3959 } 3960 /** 3961 * 3962 * 3963 * <pre> 3964 * This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging. 3965 * </pre> 3966 * 3967 * <code>optional .google.cloud.compute.v1.FirewallLogConfig log_config = 351299741;</code> 3968 */ setLogConfig( com.google.cloud.compute.v1.FirewallLogConfig.Builder builderForValue)3969 public Builder setLogConfig( 3970 com.google.cloud.compute.v1.FirewallLogConfig.Builder builderForValue) { 3971 if (logConfigBuilder_ == null) { 3972 logConfig_ = builderForValue.build(); 3973 } else { 3974 logConfigBuilder_.setMessage(builderForValue.build()); 3975 } 3976 bitField0_ |= 0x00000200; 3977 onChanged(); 3978 return this; 3979 } 3980 /** 3981 * 3982 * 3983 * <pre> 3984 * This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging. 3985 * </pre> 3986 * 3987 * <code>optional .google.cloud.compute.v1.FirewallLogConfig log_config = 351299741;</code> 3988 */ mergeLogConfig(com.google.cloud.compute.v1.FirewallLogConfig value)3989 public Builder mergeLogConfig(com.google.cloud.compute.v1.FirewallLogConfig value) { 3990 if (logConfigBuilder_ == null) { 3991 if (((bitField0_ & 0x00000200) != 0) 3992 && logConfig_ != null 3993 && logConfig_ != com.google.cloud.compute.v1.FirewallLogConfig.getDefaultInstance()) { 3994 getLogConfigBuilder().mergeFrom(value); 3995 } else { 3996 logConfig_ = value; 3997 } 3998 } else { 3999 logConfigBuilder_.mergeFrom(value); 4000 } 4001 bitField0_ |= 0x00000200; 4002 onChanged(); 4003 return this; 4004 } 4005 /** 4006 * 4007 * 4008 * <pre> 4009 * This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging. 4010 * </pre> 4011 * 4012 * <code>optional .google.cloud.compute.v1.FirewallLogConfig log_config = 351299741;</code> 4013 */ clearLogConfig()4014 public Builder clearLogConfig() { 4015 bitField0_ = (bitField0_ & ~0x00000200); 4016 logConfig_ = null; 4017 if (logConfigBuilder_ != null) { 4018 logConfigBuilder_.dispose(); 4019 logConfigBuilder_ = null; 4020 } 4021 onChanged(); 4022 return this; 4023 } 4024 /** 4025 * 4026 * 4027 * <pre> 4028 * This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging. 4029 * </pre> 4030 * 4031 * <code>optional .google.cloud.compute.v1.FirewallLogConfig log_config = 351299741;</code> 4032 */ getLogConfigBuilder()4033 public com.google.cloud.compute.v1.FirewallLogConfig.Builder getLogConfigBuilder() { 4034 bitField0_ |= 0x00000200; 4035 onChanged(); 4036 return getLogConfigFieldBuilder().getBuilder(); 4037 } 4038 /** 4039 * 4040 * 4041 * <pre> 4042 * This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging. 4043 * </pre> 4044 * 4045 * <code>optional .google.cloud.compute.v1.FirewallLogConfig log_config = 351299741;</code> 4046 */ getLogConfigOrBuilder()4047 public com.google.cloud.compute.v1.FirewallLogConfigOrBuilder getLogConfigOrBuilder() { 4048 if (logConfigBuilder_ != null) { 4049 return logConfigBuilder_.getMessageOrBuilder(); 4050 } else { 4051 return logConfig_ == null 4052 ? com.google.cloud.compute.v1.FirewallLogConfig.getDefaultInstance() 4053 : logConfig_; 4054 } 4055 } 4056 /** 4057 * 4058 * 4059 * <pre> 4060 * This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging. 4061 * </pre> 4062 * 4063 * <code>optional .google.cloud.compute.v1.FirewallLogConfig log_config = 351299741;</code> 4064 */ 4065 private com.google.protobuf.SingleFieldBuilderV3< 4066 com.google.cloud.compute.v1.FirewallLogConfig, 4067 com.google.cloud.compute.v1.FirewallLogConfig.Builder, 4068 com.google.cloud.compute.v1.FirewallLogConfigOrBuilder> getLogConfigFieldBuilder()4069 getLogConfigFieldBuilder() { 4070 if (logConfigBuilder_ == null) { 4071 logConfigBuilder_ = 4072 new com.google.protobuf.SingleFieldBuilderV3< 4073 com.google.cloud.compute.v1.FirewallLogConfig, 4074 com.google.cloud.compute.v1.FirewallLogConfig.Builder, 4075 com.google.cloud.compute.v1.FirewallLogConfigOrBuilder>( 4076 getLogConfig(), getParentForChildren(), isClean()); 4077 logConfig_ = null; 4078 } 4079 return logConfigBuilder_; 4080 } 4081 4082 private java.lang.Object name_ = ""; 4083 /** 4084 * 4085 * 4086 * <pre> 4087 * Name of the resource; provided by the client when the resource is created. 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. 4088 * </pre> 4089 * 4090 * <code>optional string name = 3373707;</code> 4091 * 4092 * @return Whether the name field is set. 4093 */ hasName()4094 public boolean hasName() { 4095 return ((bitField0_ & 0x00000400) != 0); 4096 } 4097 /** 4098 * 4099 * 4100 * <pre> 4101 * Name of the resource; provided by the client when the resource is created. 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. 4102 * </pre> 4103 * 4104 * <code>optional string name = 3373707;</code> 4105 * 4106 * @return The name. 4107 */ getName()4108 public java.lang.String getName() { 4109 java.lang.Object ref = name_; 4110 if (!(ref instanceof java.lang.String)) { 4111 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 4112 java.lang.String s = bs.toStringUtf8(); 4113 name_ = s; 4114 return s; 4115 } else { 4116 return (java.lang.String) ref; 4117 } 4118 } 4119 /** 4120 * 4121 * 4122 * <pre> 4123 * Name of the resource; provided by the client when the resource is created. 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. 4124 * </pre> 4125 * 4126 * <code>optional string name = 3373707;</code> 4127 * 4128 * @return The bytes for name. 4129 */ getNameBytes()4130 public com.google.protobuf.ByteString getNameBytes() { 4131 java.lang.Object ref = name_; 4132 if (ref instanceof String) { 4133 com.google.protobuf.ByteString b = 4134 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 4135 name_ = b; 4136 return b; 4137 } else { 4138 return (com.google.protobuf.ByteString) ref; 4139 } 4140 } 4141 /** 4142 * 4143 * 4144 * <pre> 4145 * Name of the resource; provided by the client when the resource is created. 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. 4146 * </pre> 4147 * 4148 * <code>optional string name = 3373707;</code> 4149 * 4150 * @param value The name to set. 4151 * @return This builder for chaining. 4152 */ setName(java.lang.String value)4153 public Builder setName(java.lang.String value) { 4154 if (value == null) { 4155 throw new NullPointerException(); 4156 } 4157 name_ = value; 4158 bitField0_ |= 0x00000400; 4159 onChanged(); 4160 return this; 4161 } 4162 /** 4163 * 4164 * 4165 * <pre> 4166 * Name of the resource; provided by the client when the resource is created. 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. 4167 * </pre> 4168 * 4169 * <code>optional string name = 3373707;</code> 4170 * 4171 * @return This builder for chaining. 4172 */ clearName()4173 public Builder clearName() { 4174 name_ = getDefaultInstance().getName(); 4175 bitField0_ = (bitField0_ & ~0x00000400); 4176 onChanged(); 4177 return this; 4178 } 4179 /** 4180 * 4181 * 4182 * <pre> 4183 * Name of the resource; provided by the client when the resource is created. 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit. 4184 * </pre> 4185 * 4186 * <code>optional string name = 3373707;</code> 4187 * 4188 * @param value The bytes for name to set. 4189 * @return This builder for chaining. 4190 */ setNameBytes(com.google.protobuf.ByteString value)4191 public Builder setNameBytes(com.google.protobuf.ByteString value) { 4192 if (value == null) { 4193 throw new NullPointerException(); 4194 } 4195 checkByteStringIsUtf8(value); 4196 name_ = value; 4197 bitField0_ |= 0x00000400; 4198 onChanged(); 4199 return this; 4200 } 4201 4202 private java.lang.Object network_ = ""; 4203 /** 4204 * 4205 * 4206 * <pre> 4207 * URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - projects/myproject/global/networks/my-network - global/networks/default 4208 * </pre> 4209 * 4210 * <code>optional string network = 232872494;</code> 4211 * 4212 * @return Whether the network field is set. 4213 */ hasNetwork()4214 public boolean hasNetwork() { 4215 return ((bitField0_ & 0x00000800) != 0); 4216 } 4217 /** 4218 * 4219 * 4220 * <pre> 4221 * URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - projects/myproject/global/networks/my-network - global/networks/default 4222 * </pre> 4223 * 4224 * <code>optional string network = 232872494;</code> 4225 * 4226 * @return The network. 4227 */ getNetwork()4228 public java.lang.String getNetwork() { 4229 java.lang.Object ref = network_; 4230 if (!(ref instanceof java.lang.String)) { 4231 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 4232 java.lang.String s = bs.toStringUtf8(); 4233 network_ = s; 4234 return s; 4235 } else { 4236 return (java.lang.String) ref; 4237 } 4238 } 4239 /** 4240 * 4241 * 4242 * <pre> 4243 * URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - projects/myproject/global/networks/my-network - global/networks/default 4244 * </pre> 4245 * 4246 * <code>optional string network = 232872494;</code> 4247 * 4248 * @return The bytes for network. 4249 */ getNetworkBytes()4250 public com.google.protobuf.ByteString getNetworkBytes() { 4251 java.lang.Object ref = network_; 4252 if (ref instanceof String) { 4253 com.google.protobuf.ByteString b = 4254 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 4255 network_ = b; 4256 return b; 4257 } else { 4258 return (com.google.protobuf.ByteString) ref; 4259 } 4260 } 4261 /** 4262 * 4263 * 4264 * <pre> 4265 * URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - projects/myproject/global/networks/my-network - global/networks/default 4266 * </pre> 4267 * 4268 * <code>optional string network = 232872494;</code> 4269 * 4270 * @param value The network to set. 4271 * @return This builder for chaining. 4272 */ setNetwork(java.lang.String value)4273 public Builder setNetwork(java.lang.String value) { 4274 if (value == null) { 4275 throw new NullPointerException(); 4276 } 4277 network_ = value; 4278 bitField0_ |= 0x00000800; 4279 onChanged(); 4280 return this; 4281 } 4282 /** 4283 * 4284 * 4285 * <pre> 4286 * URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - projects/myproject/global/networks/my-network - global/networks/default 4287 * </pre> 4288 * 4289 * <code>optional string network = 232872494;</code> 4290 * 4291 * @return This builder for chaining. 4292 */ clearNetwork()4293 public Builder clearNetwork() { 4294 network_ = getDefaultInstance().getNetwork(); 4295 bitField0_ = (bitField0_ & ~0x00000800); 4296 onChanged(); 4297 return this; 4298 } 4299 /** 4300 * 4301 * 4302 * <pre> 4303 * URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network - projects/myproject/global/networks/my-network - global/networks/default 4304 * </pre> 4305 * 4306 * <code>optional string network = 232872494;</code> 4307 * 4308 * @param value The bytes for network to set. 4309 * @return This builder for chaining. 4310 */ setNetworkBytes(com.google.protobuf.ByteString value)4311 public Builder setNetworkBytes(com.google.protobuf.ByteString value) { 4312 if (value == null) { 4313 throw new NullPointerException(); 4314 } 4315 checkByteStringIsUtf8(value); 4316 network_ = value; 4317 bitField0_ |= 0x00000800; 4318 onChanged(); 4319 return this; 4320 } 4321 4322 private int priority_; 4323 /** 4324 * 4325 * 4326 * <pre> 4327 * Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`. 4328 * </pre> 4329 * 4330 * <code>optional int32 priority = 445151652;</code> 4331 * 4332 * @return Whether the priority field is set. 4333 */ 4334 @java.lang.Override hasPriority()4335 public boolean hasPriority() { 4336 return ((bitField0_ & 0x00001000) != 0); 4337 } 4338 /** 4339 * 4340 * 4341 * <pre> 4342 * Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`. 4343 * </pre> 4344 * 4345 * <code>optional int32 priority = 445151652;</code> 4346 * 4347 * @return The priority. 4348 */ 4349 @java.lang.Override getPriority()4350 public int getPriority() { 4351 return priority_; 4352 } 4353 /** 4354 * 4355 * 4356 * <pre> 4357 * Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`. 4358 * </pre> 4359 * 4360 * <code>optional int32 priority = 445151652;</code> 4361 * 4362 * @param value The priority to set. 4363 * @return This builder for chaining. 4364 */ setPriority(int value)4365 public Builder setPriority(int value) { 4366 4367 priority_ = value; 4368 bitField0_ |= 0x00001000; 4369 onChanged(); 4370 return this; 4371 } 4372 /** 4373 * 4374 * 4375 * <pre> 4376 * Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`. 4377 * </pre> 4378 * 4379 * <code>optional int32 priority = 445151652;</code> 4380 * 4381 * @return This builder for chaining. 4382 */ clearPriority()4383 public Builder clearPriority() { 4384 bitField0_ = (bitField0_ & ~0x00001000); 4385 priority_ = 0; 4386 onChanged(); 4387 return this; 4388 } 4389 4390 private java.lang.Object selfLink_ = ""; 4391 /** 4392 * 4393 * 4394 * <pre> 4395 * [Output Only] Server-defined URL for the resource. 4396 * </pre> 4397 * 4398 * <code>optional string self_link = 456214797;</code> 4399 * 4400 * @return Whether the selfLink field is set. 4401 */ hasSelfLink()4402 public boolean hasSelfLink() { 4403 return ((bitField0_ & 0x00002000) != 0); 4404 } 4405 /** 4406 * 4407 * 4408 * <pre> 4409 * [Output Only] Server-defined URL for the resource. 4410 * </pre> 4411 * 4412 * <code>optional string self_link = 456214797;</code> 4413 * 4414 * @return The selfLink. 4415 */ getSelfLink()4416 public java.lang.String getSelfLink() { 4417 java.lang.Object ref = selfLink_; 4418 if (!(ref instanceof java.lang.String)) { 4419 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 4420 java.lang.String s = bs.toStringUtf8(); 4421 selfLink_ = s; 4422 return s; 4423 } else { 4424 return (java.lang.String) ref; 4425 } 4426 } 4427 /** 4428 * 4429 * 4430 * <pre> 4431 * [Output Only] Server-defined URL for the resource. 4432 * </pre> 4433 * 4434 * <code>optional string self_link = 456214797;</code> 4435 * 4436 * @return The bytes for selfLink. 4437 */ getSelfLinkBytes()4438 public com.google.protobuf.ByteString getSelfLinkBytes() { 4439 java.lang.Object ref = selfLink_; 4440 if (ref instanceof String) { 4441 com.google.protobuf.ByteString b = 4442 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 4443 selfLink_ = b; 4444 return b; 4445 } else { 4446 return (com.google.protobuf.ByteString) ref; 4447 } 4448 } 4449 /** 4450 * 4451 * 4452 * <pre> 4453 * [Output Only] Server-defined URL for the resource. 4454 * </pre> 4455 * 4456 * <code>optional string self_link = 456214797;</code> 4457 * 4458 * @param value The selfLink to set. 4459 * @return This builder for chaining. 4460 */ setSelfLink(java.lang.String value)4461 public Builder setSelfLink(java.lang.String value) { 4462 if (value == null) { 4463 throw new NullPointerException(); 4464 } 4465 selfLink_ = value; 4466 bitField0_ |= 0x00002000; 4467 onChanged(); 4468 return this; 4469 } 4470 /** 4471 * 4472 * 4473 * <pre> 4474 * [Output Only] Server-defined URL for the resource. 4475 * </pre> 4476 * 4477 * <code>optional string self_link = 456214797;</code> 4478 * 4479 * @return This builder for chaining. 4480 */ clearSelfLink()4481 public Builder clearSelfLink() { 4482 selfLink_ = getDefaultInstance().getSelfLink(); 4483 bitField0_ = (bitField0_ & ~0x00002000); 4484 onChanged(); 4485 return this; 4486 } 4487 /** 4488 * 4489 * 4490 * <pre> 4491 * [Output Only] Server-defined URL for the resource. 4492 * </pre> 4493 * 4494 * <code>optional string self_link = 456214797;</code> 4495 * 4496 * @param value The bytes for selfLink to set. 4497 * @return This builder for chaining. 4498 */ setSelfLinkBytes(com.google.protobuf.ByteString value)4499 public Builder setSelfLinkBytes(com.google.protobuf.ByteString value) { 4500 if (value == null) { 4501 throw new NullPointerException(); 4502 } 4503 checkByteStringIsUtf8(value); 4504 selfLink_ = value; 4505 bitField0_ |= 0x00002000; 4506 onChanged(); 4507 return this; 4508 } 4509 4510 private com.google.protobuf.LazyStringList sourceRanges_ = 4511 com.google.protobuf.LazyStringArrayList.EMPTY; 4512 ensureSourceRangesIsMutable()4513 private void ensureSourceRangesIsMutable() { 4514 if (!((bitField0_ & 0x00004000) != 0)) { 4515 sourceRanges_ = new com.google.protobuf.LazyStringArrayList(sourceRanges_); 4516 bitField0_ |= 0x00004000; 4517 } 4518 } 4519 /** 4520 * 4521 * 4522 * <pre> 4523 * If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported. 4524 * </pre> 4525 * 4526 * <code>repeated string source_ranges = 200097658;</code> 4527 * 4528 * @return A list containing the sourceRanges. 4529 */ getSourceRangesList()4530 public com.google.protobuf.ProtocolStringList getSourceRangesList() { 4531 return sourceRanges_.getUnmodifiableView(); 4532 } 4533 /** 4534 * 4535 * 4536 * <pre> 4537 * If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported. 4538 * </pre> 4539 * 4540 * <code>repeated string source_ranges = 200097658;</code> 4541 * 4542 * @return The count of sourceRanges. 4543 */ getSourceRangesCount()4544 public int getSourceRangesCount() { 4545 return sourceRanges_.size(); 4546 } 4547 /** 4548 * 4549 * 4550 * <pre> 4551 * If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported. 4552 * </pre> 4553 * 4554 * <code>repeated string source_ranges = 200097658;</code> 4555 * 4556 * @param index The index of the element to return. 4557 * @return The sourceRanges at the given index. 4558 */ getSourceRanges(int index)4559 public java.lang.String getSourceRanges(int index) { 4560 return sourceRanges_.get(index); 4561 } 4562 /** 4563 * 4564 * 4565 * <pre> 4566 * If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported. 4567 * </pre> 4568 * 4569 * <code>repeated string source_ranges = 200097658;</code> 4570 * 4571 * @param index The index of the value to return. 4572 * @return The bytes of the sourceRanges at the given index. 4573 */ getSourceRangesBytes(int index)4574 public com.google.protobuf.ByteString getSourceRangesBytes(int index) { 4575 return sourceRanges_.getByteString(index); 4576 } 4577 /** 4578 * 4579 * 4580 * <pre> 4581 * If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported. 4582 * </pre> 4583 * 4584 * <code>repeated string source_ranges = 200097658;</code> 4585 * 4586 * @param index The index to set the value at. 4587 * @param value The sourceRanges to set. 4588 * @return This builder for chaining. 4589 */ setSourceRanges(int index, java.lang.String value)4590 public Builder setSourceRanges(int index, java.lang.String value) { 4591 if (value == null) { 4592 throw new NullPointerException(); 4593 } 4594 ensureSourceRangesIsMutable(); 4595 sourceRanges_.set(index, value); 4596 onChanged(); 4597 return this; 4598 } 4599 /** 4600 * 4601 * 4602 * <pre> 4603 * If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported. 4604 * </pre> 4605 * 4606 * <code>repeated string source_ranges = 200097658;</code> 4607 * 4608 * @param value The sourceRanges to add. 4609 * @return This builder for chaining. 4610 */ addSourceRanges(java.lang.String value)4611 public Builder addSourceRanges(java.lang.String value) { 4612 if (value == null) { 4613 throw new NullPointerException(); 4614 } 4615 ensureSourceRangesIsMutable(); 4616 sourceRanges_.add(value); 4617 onChanged(); 4618 return this; 4619 } 4620 /** 4621 * 4622 * 4623 * <pre> 4624 * If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported. 4625 * </pre> 4626 * 4627 * <code>repeated string source_ranges = 200097658;</code> 4628 * 4629 * @param values The sourceRanges to add. 4630 * @return This builder for chaining. 4631 */ addAllSourceRanges(java.lang.Iterable<java.lang.String> values)4632 public Builder addAllSourceRanges(java.lang.Iterable<java.lang.String> values) { 4633 ensureSourceRangesIsMutable(); 4634 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sourceRanges_); 4635 onChanged(); 4636 return this; 4637 } 4638 /** 4639 * 4640 * 4641 * <pre> 4642 * If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported. 4643 * </pre> 4644 * 4645 * <code>repeated string source_ranges = 200097658;</code> 4646 * 4647 * @return This builder for chaining. 4648 */ clearSourceRanges()4649 public Builder clearSourceRanges() { 4650 sourceRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; 4651 bitField0_ = (bitField0_ & ~0x00004000); 4652 onChanged(); 4653 return this; 4654 } 4655 /** 4656 * 4657 * 4658 * <pre> 4659 * If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported. 4660 * </pre> 4661 * 4662 * <code>repeated string source_ranges = 200097658;</code> 4663 * 4664 * @param value The bytes of the sourceRanges to add. 4665 * @return This builder for chaining. 4666 */ addSourceRangesBytes(com.google.protobuf.ByteString value)4667 public Builder addSourceRangesBytes(com.google.protobuf.ByteString value) { 4668 if (value == null) { 4669 throw new NullPointerException(); 4670 } 4671 checkByteStringIsUtf8(value); 4672 ensureSourceRangesIsMutable(); 4673 sourceRanges_.add(value); 4674 onChanged(); 4675 return this; 4676 } 4677 4678 private com.google.protobuf.LazyStringList sourceServiceAccounts_ = 4679 com.google.protobuf.LazyStringArrayList.EMPTY; 4680 ensureSourceServiceAccountsIsMutable()4681 private void ensureSourceServiceAccountsIsMutable() { 4682 if (!((bitField0_ & 0x00008000) != 0)) { 4683 sourceServiceAccounts_ = 4684 new com.google.protobuf.LazyStringArrayList(sourceServiceAccounts_); 4685 bitField0_ |= 0x00008000; 4686 } 4687 } 4688 /** 4689 * 4690 * 4691 * <pre> 4692 * If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. 4693 * </pre> 4694 * 4695 * <code>repeated string source_service_accounts = 105100756;</code> 4696 * 4697 * @return A list containing the sourceServiceAccounts. 4698 */ getSourceServiceAccountsList()4699 public com.google.protobuf.ProtocolStringList getSourceServiceAccountsList() { 4700 return sourceServiceAccounts_.getUnmodifiableView(); 4701 } 4702 /** 4703 * 4704 * 4705 * <pre> 4706 * If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. 4707 * </pre> 4708 * 4709 * <code>repeated string source_service_accounts = 105100756;</code> 4710 * 4711 * @return The count of sourceServiceAccounts. 4712 */ getSourceServiceAccountsCount()4713 public int getSourceServiceAccountsCount() { 4714 return sourceServiceAccounts_.size(); 4715 } 4716 /** 4717 * 4718 * 4719 * <pre> 4720 * If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. 4721 * </pre> 4722 * 4723 * <code>repeated string source_service_accounts = 105100756;</code> 4724 * 4725 * @param index The index of the element to return. 4726 * @return The sourceServiceAccounts at the given index. 4727 */ getSourceServiceAccounts(int index)4728 public java.lang.String getSourceServiceAccounts(int index) { 4729 return sourceServiceAccounts_.get(index); 4730 } 4731 /** 4732 * 4733 * 4734 * <pre> 4735 * If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. 4736 * </pre> 4737 * 4738 * <code>repeated string source_service_accounts = 105100756;</code> 4739 * 4740 * @param index The index of the value to return. 4741 * @return The bytes of the sourceServiceAccounts at the given index. 4742 */ getSourceServiceAccountsBytes(int index)4743 public com.google.protobuf.ByteString getSourceServiceAccountsBytes(int index) { 4744 return sourceServiceAccounts_.getByteString(index); 4745 } 4746 /** 4747 * 4748 * 4749 * <pre> 4750 * If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. 4751 * </pre> 4752 * 4753 * <code>repeated string source_service_accounts = 105100756;</code> 4754 * 4755 * @param index The index to set the value at. 4756 * @param value The sourceServiceAccounts to set. 4757 * @return This builder for chaining. 4758 */ setSourceServiceAccounts(int index, java.lang.String value)4759 public Builder setSourceServiceAccounts(int index, java.lang.String value) { 4760 if (value == null) { 4761 throw new NullPointerException(); 4762 } 4763 ensureSourceServiceAccountsIsMutable(); 4764 sourceServiceAccounts_.set(index, value); 4765 onChanged(); 4766 return this; 4767 } 4768 /** 4769 * 4770 * 4771 * <pre> 4772 * If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. 4773 * </pre> 4774 * 4775 * <code>repeated string source_service_accounts = 105100756;</code> 4776 * 4777 * @param value The sourceServiceAccounts to add. 4778 * @return This builder for chaining. 4779 */ addSourceServiceAccounts(java.lang.String value)4780 public Builder addSourceServiceAccounts(java.lang.String value) { 4781 if (value == null) { 4782 throw new NullPointerException(); 4783 } 4784 ensureSourceServiceAccountsIsMutable(); 4785 sourceServiceAccounts_.add(value); 4786 onChanged(); 4787 return this; 4788 } 4789 /** 4790 * 4791 * 4792 * <pre> 4793 * If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. 4794 * </pre> 4795 * 4796 * <code>repeated string source_service_accounts = 105100756;</code> 4797 * 4798 * @param values The sourceServiceAccounts to add. 4799 * @return This builder for chaining. 4800 */ addAllSourceServiceAccounts(java.lang.Iterable<java.lang.String> values)4801 public Builder addAllSourceServiceAccounts(java.lang.Iterable<java.lang.String> values) { 4802 ensureSourceServiceAccountsIsMutable(); 4803 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sourceServiceAccounts_); 4804 onChanged(); 4805 return this; 4806 } 4807 /** 4808 * 4809 * 4810 * <pre> 4811 * If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. 4812 * </pre> 4813 * 4814 * <code>repeated string source_service_accounts = 105100756;</code> 4815 * 4816 * @return This builder for chaining. 4817 */ clearSourceServiceAccounts()4818 public Builder clearSourceServiceAccounts() { 4819 sourceServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; 4820 bitField0_ = (bitField0_ & ~0x00008000); 4821 onChanged(); 4822 return this; 4823 } 4824 /** 4825 * 4826 * 4827 * <pre> 4828 * If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. 4829 * </pre> 4830 * 4831 * <code>repeated string source_service_accounts = 105100756;</code> 4832 * 4833 * @param value The bytes of the sourceServiceAccounts to add. 4834 * @return This builder for chaining. 4835 */ addSourceServiceAccountsBytes(com.google.protobuf.ByteString value)4836 public Builder addSourceServiceAccountsBytes(com.google.protobuf.ByteString value) { 4837 if (value == null) { 4838 throw new NullPointerException(); 4839 } 4840 checkByteStringIsUtf8(value); 4841 ensureSourceServiceAccountsIsMutable(); 4842 sourceServiceAccounts_.add(value); 4843 onChanged(); 4844 return this; 4845 } 4846 4847 private com.google.protobuf.LazyStringList sourceTags_ = 4848 com.google.protobuf.LazyStringArrayList.EMPTY; 4849 ensureSourceTagsIsMutable()4850 private void ensureSourceTagsIsMutable() { 4851 if (!((bitField0_ & 0x00010000) != 0)) { 4852 sourceTags_ = new com.google.protobuf.LazyStringArrayList(sourceTags_); 4853 bitField0_ |= 0x00010000; 4854 } 4855 } 4856 /** 4857 * 4858 * 4859 * <pre> 4860 * If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply. 4861 * </pre> 4862 * 4863 * <code>repeated string source_tags = 452222397;</code> 4864 * 4865 * @return A list containing the sourceTags. 4866 */ getSourceTagsList()4867 public com.google.protobuf.ProtocolStringList getSourceTagsList() { 4868 return sourceTags_.getUnmodifiableView(); 4869 } 4870 /** 4871 * 4872 * 4873 * <pre> 4874 * If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply. 4875 * </pre> 4876 * 4877 * <code>repeated string source_tags = 452222397;</code> 4878 * 4879 * @return The count of sourceTags. 4880 */ getSourceTagsCount()4881 public int getSourceTagsCount() { 4882 return sourceTags_.size(); 4883 } 4884 /** 4885 * 4886 * 4887 * <pre> 4888 * If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply. 4889 * </pre> 4890 * 4891 * <code>repeated string source_tags = 452222397;</code> 4892 * 4893 * @param index The index of the element to return. 4894 * @return The sourceTags at the given index. 4895 */ getSourceTags(int index)4896 public java.lang.String getSourceTags(int index) { 4897 return sourceTags_.get(index); 4898 } 4899 /** 4900 * 4901 * 4902 * <pre> 4903 * If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply. 4904 * </pre> 4905 * 4906 * <code>repeated string source_tags = 452222397;</code> 4907 * 4908 * @param index The index of the value to return. 4909 * @return The bytes of the sourceTags at the given index. 4910 */ getSourceTagsBytes(int index)4911 public com.google.protobuf.ByteString getSourceTagsBytes(int index) { 4912 return sourceTags_.getByteString(index); 4913 } 4914 /** 4915 * 4916 * 4917 * <pre> 4918 * If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply. 4919 * </pre> 4920 * 4921 * <code>repeated string source_tags = 452222397;</code> 4922 * 4923 * @param index The index to set the value at. 4924 * @param value The sourceTags to set. 4925 * @return This builder for chaining. 4926 */ setSourceTags(int index, java.lang.String value)4927 public Builder setSourceTags(int index, java.lang.String value) { 4928 if (value == null) { 4929 throw new NullPointerException(); 4930 } 4931 ensureSourceTagsIsMutable(); 4932 sourceTags_.set(index, value); 4933 onChanged(); 4934 return this; 4935 } 4936 /** 4937 * 4938 * 4939 * <pre> 4940 * If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply. 4941 * </pre> 4942 * 4943 * <code>repeated string source_tags = 452222397;</code> 4944 * 4945 * @param value The sourceTags to add. 4946 * @return This builder for chaining. 4947 */ addSourceTags(java.lang.String value)4948 public Builder addSourceTags(java.lang.String value) { 4949 if (value == null) { 4950 throw new NullPointerException(); 4951 } 4952 ensureSourceTagsIsMutable(); 4953 sourceTags_.add(value); 4954 onChanged(); 4955 return this; 4956 } 4957 /** 4958 * 4959 * 4960 * <pre> 4961 * If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply. 4962 * </pre> 4963 * 4964 * <code>repeated string source_tags = 452222397;</code> 4965 * 4966 * @param values The sourceTags to add. 4967 * @return This builder for chaining. 4968 */ addAllSourceTags(java.lang.Iterable<java.lang.String> values)4969 public Builder addAllSourceTags(java.lang.Iterable<java.lang.String> values) { 4970 ensureSourceTagsIsMutable(); 4971 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sourceTags_); 4972 onChanged(); 4973 return this; 4974 } 4975 /** 4976 * 4977 * 4978 * <pre> 4979 * If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply. 4980 * </pre> 4981 * 4982 * <code>repeated string source_tags = 452222397;</code> 4983 * 4984 * @return This builder for chaining. 4985 */ clearSourceTags()4986 public Builder clearSourceTags() { 4987 sourceTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; 4988 bitField0_ = (bitField0_ & ~0x00010000); 4989 onChanged(); 4990 return this; 4991 } 4992 /** 4993 * 4994 * 4995 * <pre> 4996 * If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply. 4997 * </pre> 4998 * 4999 * <code>repeated string source_tags = 452222397;</code> 5000 * 5001 * @param value The bytes of the sourceTags to add. 5002 * @return This builder for chaining. 5003 */ addSourceTagsBytes(com.google.protobuf.ByteString value)5004 public Builder addSourceTagsBytes(com.google.protobuf.ByteString value) { 5005 if (value == null) { 5006 throw new NullPointerException(); 5007 } 5008 checkByteStringIsUtf8(value); 5009 ensureSourceTagsIsMutable(); 5010 sourceTags_.add(value); 5011 onChanged(); 5012 return this; 5013 } 5014 5015 private com.google.protobuf.LazyStringList targetServiceAccounts_ = 5016 com.google.protobuf.LazyStringArrayList.EMPTY; 5017 ensureTargetServiceAccountsIsMutable()5018 private void ensureTargetServiceAccountsIsMutable() { 5019 if (!((bitField0_ & 0x00020000) != 0)) { 5020 targetServiceAccounts_ = 5021 new com.google.protobuf.LazyStringArrayList(targetServiceAccounts_); 5022 bitField0_ |= 0x00020000; 5023 } 5024 } 5025 /** 5026 * 5027 * 5028 * <pre> 5029 * A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. 5030 * </pre> 5031 * 5032 * <code>repeated string target_service_accounts = 457639710;</code> 5033 * 5034 * @return A list containing the targetServiceAccounts. 5035 */ getTargetServiceAccountsList()5036 public com.google.protobuf.ProtocolStringList getTargetServiceAccountsList() { 5037 return targetServiceAccounts_.getUnmodifiableView(); 5038 } 5039 /** 5040 * 5041 * 5042 * <pre> 5043 * A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. 5044 * </pre> 5045 * 5046 * <code>repeated string target_service_accounts = 457639710;</code> 5047 * 5048 * @return The count of targetServiceAccounts. 5049 */ getTargetServiceAccountsCount()5050 public int getTargetServiceAccountsCount() { 5051 return targetServiceAccounts_.size(); 5052 } 5053 /** 5054 * 5055 * 5056 * <pre> 5057 * A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. 5058 * </pre> 5059 * 5060 * <code>repeated string target_service_accounts = 457639710;</code> 5061 * 5062 * @param index The index of the element to return. 5063 * @return The targetServiceAccounts at the given index. 5064 */ getTargetServiceAccounts(int index)5065 public java.lang.String getTargetServiceAccounts(int index) { 5066 return targetServiceAccounts_.get(index); 5067 } 5068 /** 5069 * 5070 * 5071 * <pre> 5072 * A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. 5073 * </pre> 5074 * 5075 * <code>repeated string target_service_accounts = 457639710;</code> 5076 * 5077 * @param index The index of the value to return. 5078 * @return The bytes of the targetServiceAccounts at the given index. 5079 */ getTargetServiceAccountsBytes(int index)5080 public com.google.protobuf.ByteString getTargetServiceAccountsBytes(int index) { 5081 return targetServiceAccounts_.getByteString(index); 5082 } 5083 /** 5084 * 5085 * 5086 * <pre> 5087 * A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. 5088 * </pre> 5089 * 5090 * <code>repeated string target_service_accounts = 457639710;</code> 5091 * 5092 * @param index The index to set the value at. 5093 * @param value The targetServiceAccounts to set. 5094 * @return This builder for chaining. 5095 */ setTargetServiceAccounts(int index, java.lang.String value)5096 public Builder setTargetServiceAccounts(int index, java.lang.String value) { 5097 if (value == null) { 5098 throw new NullPointerException(); 5099 } 5100 ensureTargetServiceAccountsIsMutable(); 5101 targetServiceAccounts_.set(index, value); 5102 onChanged(); 5103 return this; 5104 } 5105 /** 5106 * 5107 * 5108 * <pre> 5109 * A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. 5110 * </pre> 5111 * 5112 * <code>repeated string target_service_accounts = 457639710;</code> 5113 * 5114 * @param value The targetServiceAccounts to add. 5115 * @return This builder for chaining. 5116 */ addTargetServiceAccounts(java.lang.String value)5117 public Builder addTargetServiceAccounts(java.lang.String value) { 5118 if (value == null) { 5119 throw new NullPointerException(); 5120 } 5121 ensureTargetServiceAccountsIsMutable(); 5122 targetServiceAccounts_.add(value); 5123 onChanged(); 5124 return this; 5125 } 5126 /** 5127 * 5128 * 5129 * <pre> 5130 * A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. 5131 * </pre> 5132 * 5133 * <code>repeated string target_service_accounts = 457639710;</code> 5134 * 5135 * @param values The targetServiceAccounts to add. 5136 * @return This builder for chaining. 5137 */ addAllTargetServiceAccounts(java.lang.Iterable<java.lang.String> values)5138 public Builder addAllTargetServiceAccounts(java.lang.Iterable<java.lang.String> values) { 5139 ensureTargetServiceAccountsIsMutable(); 5140 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targetServiceAccounts_); 5141 onChanged(); 5142 return this; 5143 } 5144 /** 5145 * 5146 * 5147 * <pre> 5148 * A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. 5149 * </pre> 5150 * 5151 * <code>repeated string target_service_accounts = 457639710;</code> 5152 * 5153 * @return This builder for chaining. 5154 */ clearTargetServiceAccounts()5155 public Builder clearTargetServiceAccounts() { 5156 targetServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; 5157 bitField0_ = (bitField0_ & ~0x00020000); 5158 onChanged(); 5159 return this; 5160 } 5161 /** 5162 * 5163 * 5164 * <pre> 5165 * A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. 5166 * </pre> 5167 * 5168 * <code>repeated string target_service_accounts = 457639710;</code> 5169 * 5170 * @param value The bytes of the targetServiceAccounts to add. 5171 * @return This builder for chaining. 5172 */ addTargetServiceAccountsBytes(com.google.protobuf.ByteString value)5173 public Builder addTargetServiceAccountsBytes(com.google.protobuf.ByteString value) { 5174 if (value == null) { 5175 throw new NullPointerException(); 5176 } 5177 checkByteStringIsUtf8(value); 5178 ensureTargetServiceAccountsIsMutable(); 5179 targetServiceAccounts_.add(value); 5180 onChanged(); 5181 return this; 5182 } 5183 5184 private com.google.protobuf.LazyStringList targetTags_ = 5185 com.google.protobuf.LazyStringArrayList.EMPTY; 5186 ensureTargetTagsIsMutable()5187 private void ensureTargetTagsIsMutable() { 5188 if (!((bitField0_ & 0x00040000) != 0)) { 5189 targetTags_ = new com.google.protobuf.LazyStringArrayList(targetTags_); 5190 bitField0_ |= 0x00040000; 5191 } 5192 } 5193 /** 5194 * 5195 * 5196 * <pre> 5197 * A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network. 5198 * </pre> 5199 * 5200 * <code>repeated string target_tags = 62901767;</code> 5201 * 5202 * @return A list containing the targetTags. 5203 */ getTargetTagsList()5204 public com.google.protobuf.ProtocolStringList getTargetTagsList() { 5205 return targetTags_.getUnmodifiableView(); 5206 } 5207 /** 5208 * 5209 * 5210 * <pre> 5211 * A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network. 5212 * </pre> 5213 * 5214 * <code>repeated string target_tags = 62901767;</code> 5215 * 5216 * @return The count of targetTags. 5217 */ getTargetTagsCount()5218 public int getTargetTagsCount() { 5219 return targetTags_.size(); 5220 } 5221 /** 5222 * 5223 * 5224 * <pre> 5225 * A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network. 5226 * </pre> 5227 * 5228 * <code>repeated string target_tags = 62901767;</code> 5229 * 5230 * @param index The index of the element to return. 5231 * @return The targetTags at the given index. 5232 */ getTargetTags(int index)5233 public java.lang.String getTargetTags(int index) { 5234 return targetTags_.get(index); 5235 } 5236 /** 5237 * 5238 * 5239 * <pre> 5240 * A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network. 5241 * </pre> 5242 * 5243 * <code>repeated string target_tags = 62901767;</code> 5244 * 5245 * @param index The index of the value to return. 5246 * @return The bytes of the targetTags at the given index. 5247 */ getTargetTagsBytes(int index)5248 public com.google.protobuf.ByteString getTargetTagsBytes(int index) { 5249 return targetTags_.getByteString(index); 5250 } 5251 /** 5252 * 5253 * 5254 * <pre> 5255 * A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network. 5256 * </pre> 5257 * 5258 * <code>repeated string target_tags = 62901767;</code> 5259 * 5260 * @param index The index to set the value at. 5261 * @param value The targetTags to set. 5262 * @return This builder for chaining. 5263 */ setTargetTags(int index, java.lang.String value)5264 public Builder setTargetTags(int index, java.lang.String value) { 5265 if (value == null) { 5266 throw new NullPointerException(); 5267 } 5268 ensureTargetTagsIsMutable(); 5269 targetTags_.set(index, value); 5270 onChanged(); 5271 return this; 5272 } 5273 /** 5274 * 5275 * 5276 * <pre> 5277 * A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network. 5278 * </pre> 5279 * 5280 * <code>repeated string target_tags = 62901767;</code> 5281 * 5282 * @param value The targetTags to add. 5283 * @return This builder for chaining. 5284 */ addTargetTags(java.lang.String value)5285 public Builder addTargetTags(java.lang.String value) { 5286 if (value == null) { 5287 throw new NullPointerException(); 5288 } 5289 ensureTargetTagsIsMutable(); 5290 targetTags_.add(value); 5291 onChanged(); 5292 return this; 5293 } 5294 /** 5295 * 5296 * 5297 * <pre> 5298 * A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network. 5299 * </pre> 5300 * 5301 * <code>repeated string target_tags = 62901767;</code> 5302 * 5303 * @param values The targetTags to add. 5304 * @return This builder for chaining. 5305 */ addAllTargetTags(java.lang.Iterable<java.lang.String> values)5306 public Builder addAllTargetTags(java.lang.Iterable<java.lang.String> values) { 5307 ensureTargetTagsIsMutable(); 5308 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targetTags_); 5309 onChanged(); 5310 return this; 5311 } 5312 /** 5313 * 5314 * 5315 * <pre> 5316 * A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network. 5317 * </pre> 5318 * 5319 * <code>repeated string target_tags = 62901767;</code> 5320 * 5321 * @return This builder for chaining. 5322 */ clearTargetTags()5323 public Builder clearTargetTags() { 5324 targetTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; 5325 bitField0_ = (bitField0_ & ~0x00040000); 5326 onChanged(); 5327 return this; 5328 } 5329 /** 5330 * 5331 * 5332 * <pre> 5333 * A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network. 5334 * </pre> 5335 * 5336 * <code>repeated string target_tags = 62901767;</code> 5337 * 5338 * @param value The bytes of the targetTags to add. 5339 * @return This builder for chaining. 5340 */ addTargetTagsBytes(com.google.protobuf.ByteString value)5341 public Builder addTargetTagsBytes(com.google.protobuf.ByteString value) { 5342 if (value == null) { 5343 throw new NullPointerException(); 5344 } 5345 checkByteStringIsUtf8(value); 5346 ensureTargetTagsIsMutable(); 5347 targetTags_.add(value); 5348 onChanged(); 5349 return this; 5350 } 5351 5352 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)5353 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 5354 return super.setUnknownFields(unknownFields); 5355 } 5356 5357 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)5358 public final Builder mergeUnknownFields( 5359 final com.google.protobuf.UnknownFieldSet unknownFields) { 5360 return super.mergeUnknownFields(unknownFields); 5361 } 5362 5363 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.Firewall) 5364 } 5365 5366 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.Firewall) 5367 private static final com.google.cloud.compute.v1.Firewall DEFAULT_INSTANCE; 5368 5369 static { 5370 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.Firewall(); 5371 } 5372 getDefaultInstance()5373 public static com.google.cloud.compute.v1.Firewall getDefaultInstance() { 5374 return DEFAULT_INSTANCE; 5375 } 5376 5377 private static final com.google.protobuf.Parser<Firewall> PARSER = 5378 new com.google.protobuf.AbstractParser<Firewall>() { 5379 @java.lang.Override 5380 public Firewall parsePartialFrom( 5381 com.google.protobuf.CodedInputStream input, 5382 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 5383 throws com.google.protobuf.InvalidProtocolBufferException { 5384 Builder builder = newBuilder(); 5385 try { 5386 builder.mergeFrom(input, extensionRegistry); 5387 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 5388 throw e.setUnfinishedMessage(builder.buildPartial()); 5389 } catch (com.google.protobuf.UninitializedMessageException e) { 5390 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 5391 } catch (java.io.IOException e) { 5392 throw new com.google.protobuf.InvalidProtocolBufferException(e) 5393 .setUnfinishedMessage(builder.buildPartial()); 5394 } 5395 return builder.buildPartial(); 5396 } 5397 }; 5398 parser()5399 public static com.google.protobuf.Parser<Firewall> parser() { 5400 return PARSER; 5401 } 5402 5403 @java.lang.Override getParserForType()5404 public com.google.protobuf.Parser<Firewall> getParserForType() { 5405 return PARSER; 5406 } 5407 5408 @java.lang.Override getDefaultInstanceForType()5409 public com.google.cloud.compute.v1.Firewall getDefaultInstanceForType() { 5410 return DEFAULT_INSTANCE; 5411 } 5412 } 5413