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