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 * </pre> 26 * 27 * Protobuf type {@code google.cloud.compute.v1.FirewallPolicyAssociation} 28 */ 29 public final class FirewallPolicyAssociation extends com.google.protobuf.GeneratedMessageV3 30 implements 31 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.FirewallPolicyAssociation) 32 FirewallPolicyAssociationOrBuilder { 33 private static final long serialVersionUID = 0L; 34 // Use FirewallPolicyAssociation.newBuilder() to construct. FirewallPolicyAssociation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)35 private FirewallPolicyAssociation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 36 super(builder); 37 } 38 FirewallPolicyAssociation()39 private FirewallPolicyAssociation() { 40 attachmentTarget_ = ""; 41 displayName_ = ""; 42 firewallPolicyId_ = ""; 43 name_ = ""; 44 shortName_ = ""; 45 } 46 47 @java.lang.Override 48 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)49 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 50 return new FirewallPolicyAssociation(); 51 } 52 53 @java.lang.Override getUnknownFields()54 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 55 return this.unknownFields; 56 } 57 getDescriptor()58 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 59 return com.google.cloud.compute.v1.Compute 60 .internal_static_google_cloud_compute_v1_FirewallPolicyAssociation_descriptor; 61 } 62 63 @java.lang.Override 64 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()65 internalGetFieldAccessorTable() { 66 return com.google.cloud.compute.v1.Compute 67 .internal_static_google_cloud_compute_v1_FirewallPolicyAssociation_fieldAccessorTable 68 .ensureFieldAccessorsInitialized( 69 com.google.cloud.compute.v1.FirewallPolicyAssociation.class, 70 com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder.class); 71 } 72 73 private int bitField0_; 74 public static final int ATTACHMENT_TARGET_FIELD_NUMBER = 175773741; 75 76 @SuppressWarnings("serial") 77 private volatile java.lang.Object attachmentTarget_ = ""; 78 /** 79 * 80 * 81 * <pre> 82 * The target that the firewall policy is attached to. 83 * </pre> 84 * 85 * <code>optional string attachment_target = 175773741;</code> 86 * 87 * @return Whether the attachmentTarget field is set. 88 */ 89 @java.lang.Override hasAttachmentTarget()90 public boolean hasAttachmentTarget() { 91 return ((bitField0_ & 0x00000001) != 0); 92 } 93 /** 94 * 95 * 96 * <pre> 97 * The target that the firewall policy is attached to. 98 * </pre> 99 * 100 * <code>optional string attachment_target = 175773741;</code> 101 * 102 * @return The attachmentTarget. 103 */ 104 @java.lang.Override getAttachmentTarget()105 public java.lang.String getAttachmentTarget() { 106 java.lang.Object ref = attachmentTarget_; 107 if (ref instanceof java.lang.String) { 108 return (java.lang.String) ref; 109 } else { 110 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 111 java.lang.String s = bs.toStringUtf8(); 112 attachmentTarget_ = s; 113 return s; 114 } 115 } 116 /** 117 * 118 * 119 * <pre> 120 * The target that the firewall policy is attached to. 121 * </pre> 122 * 123 * <code>optional string attachment_target = 175773741;</code> 124 * 125 * @return The bytes for attachmentTarget. 126 */ 127 @java.lang.Override getAttachmentTargetBytes()128 public com.google.protobuf.ByteString getAttachmentTargetBytes() { 129 java.lang.Object ref = attachmentTarget_; 130 if (ref instanceof java.lang.String) { 131 com.google.protobuf.ByteString b = 132 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 133 attachmentTarget_ = b; 134 return b; 135 } else { 136 return (com.google.protobuf.ByteString) ref; 137 } 138 } 139 140 public static final int DISPLAY_NAME_FIELD_NUMBER = 4473832; 141 142 @SuppressWarnings("serial") 143 private volatile java.lang.Object displayName_ = ""; 144 /** 145 * 146 * 147 * <pre> 148 * [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. 149 * </pre> 150 * 151 * <code>optional string display_name = 4473832;</code> 152 * 153 * @return Whether the displayName field is set. 154 */ 155 @java.lang.Override hasDisplayName()156 public boolean hasDisplayName() { 157 return ((bitField0_ & 0x00000002) != 0); 158 } 159 /** 160 * 161 * 162 * <pre> 163 * [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. 164 * </pre> 165 * 166 * <code>optional string display_name = 4473832;</code> 167 * 168 * @return The displayName. 169 */ 170 @java.lang.Override getDisplayName()171 public java.lang.String getDisplayName() { 172 java.lang.Object ref = displayName_; 173 if (ref instanceof java.lang.String) { 174 return (java.lang.String) ref; 175 } else { 176 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 177 java.lang.String s = bs.toStringUtf8(); 178 displayName_ = s; 179 return s; 180 } 181 } 182 /** 183 * 184 * 185 * <pre> 186 * [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. 187 * </pre> 188 * 189 * <code>optional string display_name = 4473832;</code> 190 * 191 * @return The bytes for displayName. 192 */ 193 @java.lang.Override getDisplayNameBytes()194 public com.google.protobuf.ByteString getDisplayNameBytes() { 195 java.lang.Object ref = displayName_; 196 if (ref instanceof java.lang.String) { 197 com.google.protobuf.ByteString b = 198 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 199 displayName_ = b; 200 return b; 201 } else { 202 return (com.google.protobuf.ByteString) ref; 203 } 204 } 205 206 public static final int FIREWALL_POLICY_ID_FIELD_NUMBER = 357211849; 207 208 @SuppressWarnings("serial") 209 private volatile java.lang.Object firewallPolicyId_ = ""; 210 /** 211 * 212 * 213 * <pre> 214 * [Output Only] The firewall policy ID of the association. 215 * </pre> 216 * 217 * <code>optional string firewall_policy_id = 357211849;</code> 218 * 219 * @return Whether the firewallPolicyId field is set. 220 */ 221 @java.lang.Override hasFirewallPolicyId()222 public boolean hasFirewallPolicyId() { 223 return ((bitField0_ & 0x00000004) != 0); 224 } 225 /** 226 * 227 * 228 * <pre> 229 * [Output Only] The firewall policy ID of the association. 230 * </pre> 231 * 232 * <code>optional string firewall_policy_id = 357211849;</code> 233 * 234 * @return The firewallPolicyId. 235 */ 236 @java.lang.Override getFirewallPolicyId()237 public java.lang.String getFirewallPolicyId() { 238 java.lang.Object ref = firewallPolicyId_; 239 if (ref instanceof java.lang.String) { 240 return (java.lang.String) ref; 241 } else { 242 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 243 java.lang.String s = bs.toStringUtf8(); 244 firewallPolicyId_ = s; 245 return s; 246 } 247 } 248 /** 249 * 250 * 251 * <pre> 252 * [Output Only] The firewall policy ID of the association. 253 * </pre> 254 * 255 * <code>optional string firewall_policy_id = 357211849;</code> 256 * 257 * @return The bytes for firewallPolicyId. 258 */ 259 @java.lang.Override getFirewallPolicyIdBytes()260 public com.google.protobuf.ByteString getFirewallPolicyIdBytes() { 261 java.lang.Object ref = firewallPolicyId_; 262 if (ref instanceof java.lang.String) { 263 com.google.protobuf.ByteString b = 264 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 265 firewallPolicyId_ = b; 266 return b; 267 } else { 268 return (com.google.protobuf.ByteString) ref; 269 } 270 } 271 272 public static final int NAME_FIELD_NUMBER = 3373707; 273 274 @SuppressWarnings("serial") 275 private volatile java.lang.Object name_ = ""; 276 /** 277 * 278 * 279 * <pre> 280 * The name for an association. 281 * </pre> 282 * 283 * <code>optional string name = 3373707;</code> 284 * 285 * @return Whether the name field is set. 286 */ 287 @java.lang.Override hasName()288 public boolean hasName() { 289 return ((bitField0_ & 0x00000008) != 0); 290 } 291 /** 292 * 293 * 294 * <pre> 295 * The name for an association. 296 * </pre> 297 * 298 * <code>optional string name = 3373707;</code> 299 * 300 * @return The name. 301 */ 302 @java.lang.Override getName()303 public java.lang.String getName() { 304 java.lang.Object ref = name_; 305 if (ref instanceof java.lang.String) { 306 return (java.lang.String) ref; 307 } else { 308 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 309 java.lang.String s = bs.toStringUtf8(); 310 name_ = s; 311 return s; 312 } 313 } 314 /** 315 * 316 * 317 * <pre> 318 * The name for an association. 319 * </pre> 320 * 321 * <code>optional string name = 3373707;</code> 322 * 323 * @return The bytes for name. 324 */ 325 @java.lang.Override getNameBytes()326 public com.google.protobuf.ByteString getNameBytes() { 327 java.lang.Object ref = name_; 328 if (ref instanceof java.lang.String) { 329 com.google.protobuf.ByteString b = 330 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 331 name_ = b; 332 return b; 333 } else { 334 return (com.google.protobuf.ByteString) ref; 335 } 336 } 337 338 public static final int SHORT_NAME_FIELD_NUMBER = 492051566; 339 340 @SuppressWarnings("serial") 341 private volatile java.lang.Object shortName_ = ""; 342 /** 343 * 344 * 345 * <pre> 346 * [Output Only] The short name of the firewall policy of the association. 347 * </pre> 348 * 349 * <code>optional string short_name = 492051566;</code> 350 * 351 * @return Whether the shortName field is set. 352 */ 353 @java.lang.Override hasShortName()354 public boolean hasShortName() { 355 return ((bitField0_ & 0x00000010) != 0); 356 } 357 /** 358 * 359 * 360 * <pre> 361 * [Output Only] The short name of the firewall policy of the association. 362 * </pre> 363 * 364 * <code>optional string short_name = 492051566;</code> 365 * 366 * @return The shortName. 367 */ 368 @java.lang.Override getShortName()369 public java.lang.String getShortName() { 370 java.lang.Object ref = shortName_; 371 if (ref instanceof java.lang.String) { 372 return (java.lang.String) ref; 373 } else { 374 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 375 java.lang.String s = bs.toStringUtf8(); 376 shortName_ = s; 377 return s; 378 } 379 } 380 /** 381 * 382 * 383 * <pre> 384 * [Output Only] The short name of the firewall policy of the association. 385 * </pre> 386 * 387 * <code>optional string short_name = 492051566;</code> 388 * 389 * @return The bytes for shortName. 390 */ 391 @java.lang.Override getShortNameBytes()392 public com.google.protobuf.ByteString getShortNameBytes() { 393 java.lang.Object ref = shortName_; 394 if (ref instanceof java.lang.String) { 395 com.google.protobuf.ByteString b = 396 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 397 shortName_ = b; 398 return b; 399 } else { 400 return (com.google.protobuf.ByteString) ref; 401 } 402 } 403 404 private byte memoizedIsInitialized = -1; 405 406 @java.lang.Override isInitialized()407 public final boolean isInitialized() { 408 byte isInitialized = memoizedIsInitialized; 409 if (isInitialized == 1) return true; 410 if (isInitialized == 0) return false; 411 412 memoizedIsInitialized = 1; 413 return true; 414 } 415 416 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)417 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 418 if (((bitField0_ & 0x00000008) != 0)) { 419 com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_); 420 } 421 if (((bitField0_ & 0x00000002) != 0)) { 422 com.google.protobuf.GeneratedMessageV3.writeString(output, 4473832, displayName_); 423 } 424 if (((bitField0_ & 0x00000001) != 0)) { 425 com.google.protobuf.GeneratedMessageV3.writeString(output, 175773741, attachmentTarget_); 426 } 427 if (((bitField0_ & 0x00000004) != 0)) { 428 com.google.protobuf.GeneratedMessageV3.writeString(output, 357211849, firewallPolicyId_); 429 } 430 if (((bitField0_ & 0x00000010) != 0)) { 431 com.google.protobuf.GeneratedMessageV3.writeString(output, 492051566, shortName_); 432 } 433 getUnknownFields().writeTo(output); 434 } 435 436 @java.lang.Override getSerializedSize()437 public int getSerializedSize() { 438 int size = memoizedSize; 439 if (size != -1) return size; 440 441 size = 0; 442 if (((bitField0_ & 0x00000008) != 0)) { 443 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_); 444 } 445 if (((bitField0_ & 0x00000002) != 0)) { 446 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4473832, displayName_); 447 } 448 if (((bitField0_ & 0x00000001) != 0)) { 449 size += 450 com.google.protobuf.GeneratedMessageV3.computeStringSize(175773741, attachmentTarget_); 451 } 452 if (((bitField0_ & 0x00000004) != 0)) { 453 size += 454 com.google.protobuf.GeneratedMessageV3.computeStringSize(357211849, firewallPolicyId_); 455 } 456 if (((bitField0_ & 0x00000010) != 0)) { 457 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(492051566, shortName_); 458 } 459 size += getUnknownFields().getSerializedSize(); 460 memoizedSize = size; 461 return size; 462 } 463 464 @java.lang.Override equals(final java.lang.Object obj)465 public boolean equals(final java.lang.Object obj) { 466 if (obj == this) { 467 return true; 468 } 469 if (!(obj instanceof com.google.cloud.compute.v1.FirewallPolicyAssociation)) { 470 return super.equals(obj); 471 } 472 com.google.cloud.compute.v1.FirewallPolicyAssociation other = 473 (com.google.cloud.compute.v1.FirewallPolicyAssociation) obj; 474 475 if (hasAttachmentTarget() != other.hasAttachmentTarget()) return false; 476 if (hasAttachmentTarget()) { 477 if (!getAttachmentTarget().equals(other.getAttachmentTarget())) return false; 478 } 479 if (hasDisplayName() != other.hasDisplayName()) return false; 480 if (hasDisplayName()) { 481 if (!getDisplayName().equals(other.getDisplayName())) return false; 482 } 483 if (hasFirewallPolicyId() != other.hasFirewallPolicyId()) return false; 484 if (hasFirewallPolicyId()) { 485 if (!getFirewallPolicyId().equals(other.getFirewallPolicyId())) return false; 486 } 487 if (hasName() != other.hasName()) return false; 488 if (hasName()) { 489 if (!getName().equals(other.getName())) return false; 490 } 491 if (hasShortName() != other.hasShortName()) return false; 492 if (hasShortName()) { 493 if (!getShortName().equals(other.getShortName())) return false; 494 } 495 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 496 return true; 497 } 498 499 @java.lang.Override hashCode()500 public int hashCode() { 501 if (memoizedHashCode != 0) { 502 return memoizedHashCode; 503 } 504 int hash = 41; 505 hash = (19 * hash) + getDescriptor().hashCode(); 506 if (hasAttachmentTarget()) { 507 hash = (37 * hash) + ATTACHMENT_TARGET_FIELD_NUMBER; 508 hash = (53 * hash) + getAttachmentTarget().hashCode(); 509 } 510 if (hasDisplayName()) { 511 hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; 512 hash = (53 * hash) + getDisplayName().hashCode(); 513 } 514 if (hasFirewallPolicyId()) { 515 hash = (37 * hash) + FIREWALL_POLICY_ID_FIELD_NUMBER; 516 hash = (53 * hash) + getFirewallPolicyId().hashCode(); 517 } 518 if (hasName()) { 519 hash = (37 * hash) + NAME_FIELD_NUMBER; 520 hash = (53 * hash) + getName().hashCode(); 521 } 522 if (hasShortName()) { 523 hash = (37 * hash) + SHORT_NAME_FIELD_NUMBER; 524 hash = (53 * hash) + getShortName().hashCode(); 525 } 526 hash = (29 * hash) + getUnknownFields().hashCode(); 527 memoizedHashCode = hash; 528 return hash; 529 } 530 parseFrom( java.nio.ByteBuffer data)531 public static com.google.cloud.compute.v1.FirewallPolicyAssociation parseFrom( 532 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 533 return PARSER.parseFrom(data); 534 } 535 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)536 public static com.google.cloud.compute.v1.FirewallPolicyAssociation parseFrom( 537 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 538 throws com.google.protobuf.InvalidProtocolBufferException { 539 return PARSER.parseFrom(data, extensionRegistry); 540 } 541 parseFrom( com.google.protobuf.ByteString data)542 public static com.google.cloud.compute.v1.FirewallPolicyAssociation parseFrom( 543 com.google.protobuf.ByteString data) 544 throws com.google.protobuf.InvalidProtocolBufferException { 545 return PARSER.parseFrom(data); 546 } 547 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)548 public static com.google.cloud.compute.v1.FirewallPolicyAssociation parseFrom( 549 com.google.protobuf.ByteString data, 550 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 551 throws com.google.protobuf.InvalidProtocolBufferException { 552 return PARSER.parseFrom(data, extensionRegistry); 553 } 554 parseFrom(byte[] data)555 public static com.google.cloud.compute.v1.FirewallPolicyAssociation parseFrom(byte[] data) 556 throws com.google.protobuf.InvalidProtocolBufferException { 557 return PARSER.parseFrom(data); 558 } 559 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)560 public static com.google.cloud.compute.v1.FirewallPolicyAssociation parseFrom( 561 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 562 throws com.google.protobuf.InvalidProtocolBufferException { 563 return PARSER.parseFrom(data, extensionRegistry); 564 } 565 parseFrom( java.io.InputStream input)566 public static com.google.cloud.compute.v1.FirewallPolicyAssociation parseFrom( 567 java.io.InputStream input) throws java.io.IOException { 568 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 569 } 570 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)571 public static com.google.cloud.compute.v1.FirewallPolicyAssociation parseFrom( 572 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 573 throws java.io.IOException { 574 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 575 PARSER, input, extensionRegistry); 576 } 577 parseDelimitedFrom( java.io.InputStream input)578 public static com.google.cloud.compute.v1.FirewallPolicyAssociation parseDelimitedFrom( 579 java.io.InputStream input) throws java.io.IOException { 580 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 581 } 582 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)583 public static com.google.cloud.compute.v1.FirewallPolicyAssociation parseDelimitedFrom( 584 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 585 throws java.io.IOException { 586 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 587 PARSER, input, extensionRegistry); 588 } 589 parseFrom( com.google.protobuf.CodedInputStream input)590 public static com.google.cloud.compute.v1.FirewallPolicyAssociation parseFrom( 591 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 592 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 593 } 594 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)595 public static com.google.cloud.compute.v1.FirewallPolicyAssociation parseFrom( 596 com.google.protobuf.CodedInputStream input, 597 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 598 throws java.io.IOException { 599 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 600 PARSER, input, extensionRegistry); 601 } 602 603 @java.lang.Override newBuilderForType()604 public Builder newBuilderForType() { 605 return newBuilder(); 606 } 607 newBuilder()608 public static Builder newBuilder() { 609 return DEFAULT_INSTANCE.toBuilder(); 610 } 611 newBuilder( com.google.cloud.compute.v1.FirewallPolicyAssociation prototype)612 public static Builder newBuilder( 613 com.google.cloud.compute.v1.FirewallPolicyAssociation prototype) { 614 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 615 } 616 617 @java.lang.Override toBuilder()618 public Builder toBuilder() { 619 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 620 } 621 622 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)623 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 624 Builder builder = new Builder(parent); 625 return builder; 626 } 627 /** 628 * 629 * 630 * <pre> 631 * </pre> 632 * 633 * Protobuf type {@code google.cloud.compute.v1.FirewallPolicyAssociation} 634 */ 635 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 636 implements 637 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.FirewallPolicyAssociation) 638 com.google.cloud.compute.v1.FirewallPolicyAssociationOrBuilder { getDescriptor()639 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 640 return com.google.cloud.compute.v1.Compute 641 .internal_static_google_cloud_compute_v1_FirewallPolicyAssociation_descriptor; 642 } 643 644 @java.lang.Override 645 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()646 internalGetFieldAccessorTable() { 647 return com.google.cloud.compute.v1.Compute 648 .internal_static_google_cloud_compute_v1_FirewallPolicyAssociation_fieldAccessorTable 649 .ensureFieldAccessorsInitialized( 650 com.google.cloud.compute.v1.FirewallPolicyAssociation.class, 651 com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder.class); 652 } 653 654 // Construct using com.google.cloud.compute.v1.FirewallPolicyAssociation.newBuilder() Builder()655 private Builder() {} 656 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)657 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 658 super(parent); 659 } 660 661 @java.lang.Override clear()662 public Builder clear() { 663 super.clear(); 664 bitField0_ = 0; 665 attachmentTarget_ = ""; 666 displayName_ = ""; 667 firewallPolicyId_ = ""; 668 name_ = ""; 669 shortName_ = ""; 670 return this; 671 } 672 673 @java.lang.Override getDescriptorForType()674 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 675 return com.google.cloud.compute.v1.Compute 676 .internal_static_google_cloud_compute_v1_FirewallPolicyAssociation_descriptor; 677 } 678 679 @java.lang.Override getDefaultInstanceForType()680 public com.google.cloud.compute.v1.FirewallPolicyAssociation getDefaultInstanceForType() { 681 return com.google.cloud.compute.v1.FirewallPolicyAssociation.getDefaultInstance(); 682 } 683 684 @java.lang.Override build()685 public com.google.cloud.compute.v1.FirewallPolicyAssociation build() { 686 com.google.cloud.compute.v1.FirewallPolicyAssociation result = buildPartial(); 687 if (!result.isInitialized()) { 688 throw newUninitializedMessageException(result); 689 } 690 return result; 691 } 692 693 @java.lang.Override buildPartial()694 public com.google.cloud.compute.v1.FirewallPolicyAssociation buildPartial() { 695 com.google.cloud.compute.v1.FirewallPolicyAssociation result = 696 new com.google.cloud.compute.v1.FirewallPolicyAssociation(this); 697 if (bitField0_ != 0) { 698 buildPartial0(result); 699 } 700 onBuilt(); 701 return result; 702 } 703 buildPartial0(com.google.cloud.compute.v1.FirewallPolicyAssociation result)704 private void buildPartial0(com.google.cloud.compute.v1.FirewallPolicyAssociation result) { 705 int from_bitField0_ = bitField0_; 706 int to_bitField0_ = 0; 707 if (((from_bitField0_ & 0x00000001) != 0)) { 708 result.attachmentTarget_ = attachmentTarget_; 709 to_bitField0_ |= 0x00000001; 710 } 711 if (((from_bitField0_ & 0x00000002) != 0)) { 712 result.displayName_ = displayName_; 713 to_bitField0_ |= 0x00000002; 714 } 715 if (((from_bitField0_ & 0x00000004) != 0)) { 716 result.firewallPolicyId_ = firewallPolicyId_; 717 to_bitField0_ |= 0x00000004; 718 } 719 if (((from_bitField0_ & 0x00000008) != 0)) { 720 result.name_ = name_; 721 to_bitField0_ |= 0x00000008; 722 } 723 if (((from_bitField0_ & 0x00000010) != 0)) { 724 result.shortName_ = shortName_; 725 to_bitField0_ |= 0x00000010; 726 } 727 result.bitField0_ |= to_bitField0_; 728 } 729 730 @java.lang.Override clone()731 public Builder clone() { 732 return super.clone(); 733 } 734 735 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)736 public Builder setField( 737 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 738 return super.setField(field, value); 739 } 740 741 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)742 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 743 return super.clearField(field); 744 } 745 746 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)747 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 748 return super.clearOneof(oneof); 749 } 750 751 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)752 public Builder setRepeatedField( 753 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 754 return super.setRepeatedField(field, index, value); 755 } 756 757 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)758 public Builder addRepeatedField( 759 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 760 return super.addRepeatedField(field, value); 761 } 762 763 @java.lang.Override mergeFrom(com.google.protobuf.Message other)764 public Builder mergeFrom(com.google.protobuf.Message other) { 765 if (other instanceof com.google.cloud.compute.v1.FirewallPolicyAssociation) { 766 return mergeFrom((com.google.cloud.compute.v1.FirewallPolicyAssociation) other); 767 } else { 768 super.mergeFrom(other); 769 return this; 770 } 771 } 772 mergeFrom(com.google.cloud.compute.v1.FirewallPolicyAssociation other)773 public Builder mergeFrom(com.google.cloud.compute.v1.FirewallPolicyAssociation other) { 774 if (other == com.google.cloud.compute.v1.FirewallPolicyAssociation.getDefaultInstance()) 775 return this; 776 if (other.hasAttachmentTarget()) { 777 attachmentTarget_ = other.attachmentTarget_; 778 bitField0_ |= 0x00000001; 779 onChanged(); 780 } 781 if (other.hasDisplayName()) { 782 displayName_ = other.displayName_; 783 bitField0_ |= 0x00000002; 784 onChanged(); 785 } 786 if (other.hasFirewallPolicyId()) { 787 firewallPolicyId_ = other.firewallPolicyId_; 788 bitField0_ |= 0x00000004; 789 onChanged(); 790 } 791 if (other.hasName()) { 792 name_ = other.name_; 793 bitField0_ |= 0x00000008; 794 onChanged(); 795 } 796 if (other.hasShortName()) { 797 shortName_ = other.shortName_; 798 bitField0_ |= 0x00000010; 799 onChanged(); 800 } 801 this.mergeUnknownFields(other.getUnknownFields()); 802 onChanged(); 803 return this; 804 } 805 806 @java.lang.Override isInitialized()807 public final boolean isInitialized() { 808 return true; 809 } 810 811 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)812 public Builder mergeFrom( 813 com.google.protobuf.CodedInputStream input, 814 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 815 throws java.io.IOException { 816 if (extensionRegistry == null) { 817 throw new java.lang.NullPointerException(); 818 } 819 try { 820 boolean done = false; 821 while (!done) { 822 int tag = input.readTag(); 823 switch (tag) { 824 case 0: 825 done = true; 826 break; 827 case 26989658: 828 { 829 name_ = input.readStringRequireUtf8(); 830 bitField0_ |= 0x00000008; 831 break; 832 } // case 26989658 833 case 35790658: 834 { 835 displayName_ = input.readStringRequireUtf8(); 836 bitField0_ |= 0x00000002; 837 break; 838 } // case 35790658 839 case 1406189930: 840 { 841 attachmentTarget_ = input.readStringRequireUtf8(); 842 bitField0_ |= 0x00000001; 843 break; 844 } // case 1406189930 845 case -1437272502: 846 { 847 firewallPolicyId_ = input.readStringRequireUtf8(); 848 bitField0_ |= 0x00000004; 849 break; 850 } // case -1437272502 851 case -358554766: 852 { 853 shortName_ = input.readStringRequireUtf8(); 854 bitField0_ |= 0x00000010; 855 break; 856 } // case -358554766 857 default: 858 { 859 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 860 done = true; // was an endgroup tag 861 } 862 break; 863 } // default: 864 } // switch (tag) 865 } // while (!done) 866 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 867 throw e.unwrapIOException(); 868 } finally { 869 onChanged(); 870 } // finally 871 return this; 872 } 873 874 private int bitField0_; 875 876 private java.lang.Object attachmentTarget_ = ""; 877 /** 878 * 879 * 880 * <pre> 881 * The target that the firewall policy is attached to. 882 * </pre> 883 * 884 * <code>optional string attachment_target = 175773741;</code> 885 * 886 * @return Whether the attachmentTarget field is set. 887 */ hasAttachmentTarget()888 public boolean hasAttachmentTarget() { 889 return ((bitField0_ & 0x00000001) != 0); 890 } 891 /** 892 * 893 * 894 * <pre> 895 * The target that the firewall policy is attached to. 896 * </pre> 897 * 898 * <code>optional string attachment_target = 175773741;</code> 899 * 900 * @return The attachmentTarget. 901 */ getAttachmentTarget()902 public java.lang.String getAttachmentTarget() { 903 java.lang.Object ref = attachmentTarget_; 904 if (!(ref instanceof java.lang.String)) { 905 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 906 java.lang.String s = bs.toStringUtf8(); 907 attachmentTarget_ = s; 908 return s; 909 } else { 910 return (java.lang.String) ref; 911 } 912 } 913 /** 914 * 915 * 916 * <pre> 917 * The target that the firewall policy is attached to. 918 * </pre> 919 * 920 * <code>optional string attachment_target = 175773741;</code> 921 * 922 * @return The bytes for attachmentTarget. 923 */ getAttachmentTargetBytes()924 public com.google.protobuf.ByteString getAttachmentTargetBytes() { 925 java.lang.Object ref = attachmentTarget_; 926 if (ref instanceof String) { 927 com.google.protobuf.ByteString b = 928 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 929 attachmentTarget_ = b; 930 return b; 931 } else { 932 return (com.google.protobuf.ByteString) ref; 933 } 934 } 935 /** 936 * 937 * 938 * <pre> 939 * The target that the firewall policy is attached to. 940 * </pre> 941 * 942 * <code>optional string attachment_target = 175773741;</code> 943 * 944 * @param value The attachmentTarget to set. 945 * @return This builder for chaining. 946 */ setAttachmentTarget(java.lang.String value)947 public Builder setAttachmentTarget(java.lang.String value) { 948 if (value == null) { 949 throw new NullPointerException(); 950 } 951 attachmentTarget_ = value; 952 bitField0_ |= 0x00000001; 953 onChanged(); 954 return this; 955 } 956 /** 957 * 958 * 959 * <pre> 960 * The target that the firewall policy is attached to. 961 * </pre> 962 * 963 * <code>optional string attachment_target = 175773741;</code> 964 * 965 * @return This builder for chaining. 966 */ clearAttachmentTarget()967 public Builder clearAttachmentTarget() { 968 attachmentTarget_ = getDefaultInstance().getAttachmentTarget(); 969 bitField0_ = (bitField0_ & ~0x00000001); 970 onChanged(); 971 return this; 972 } 973 /** 974 * 975 * 976 * <pre> 977 * The target that the firewall policy is attached to. 978 * </pre> 979 * 980 * <code>optional string attachment_target = 175773741;</code> 981 * 982 * @param value The bytes for attachmentTarget to set. 983 * @return This builder for chaining. 984 */ setAttachmentTargetBytes(com.google.protobuf.ByteString value)985 public Builder setAttachmentTargetBytes(com.google.protobuf.ByteString value) { 986 if (value == null) { 987 throw new NullPointerException(); 988 } 989 checkByteStringIsUtf8(value); 990 attachmentTarget_ = value; 991 bitField0_ |= 0x00000001; 992 onChanged(); 993 return this; 994 } 995 996 private java.lang.Object displayName_ = ""; 997 /** 998 * 999 * 1000 * <pre> 1001 * [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. 1002 * </pre> 1003 * 1004 * <code>optional string display_name = 4473832;</code> 1005 * 1006 * @return Whether the displayName field is set. 1007 */ hasDisplayName()1008 public boolean hasDisplayName() { 1009 return ((bitField0_ & 0x00000002) != 0); 1010 } 1011 /** 1012 * 1013 * 1014 * <pre> 1015 * [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. 1016 * </pre> 1017 * 1018 * <code>optional string display_name = 4473832;</code> 1019 * 1020 * @return The displayName. 1021 */ getDisplayName()1022 public java.lang.String getDisplayName() { 1023 java.lang.Object ref = displayName_; 1024 if (!(ref instanceof java.lang.String)) { 1025 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1026 java.lang.String s = bs.toStringUtf8(); 1027 displayName_ = s; 1028 return s; 1029 } else { 1030 return (java.lang.String) ref; 1031 } 1032 } 1033 /** 1034 * 1035 * 1036 * <pre> 1037 * [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. 1038 * </pre> 1039 * 1040 * <code>optional string display_name = 4473832;</code> 1041 * 1042 * @return The bytes for displayName. 1043 */ getDisplayNameBytes()1044 public com.google.protobuf.ByteString getDisplayNameBytes() { 1045 java.lang.Object ref = displayName_; 1046 if (ref instanceof String) { 1047 com.google.protobuf.ByteString b = 1048 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1049 displayName_ = b; 1050 return b; 1051 } else { 1052 return (com.google.protobuf.ByteString) ref; 1053 } 1054 } 1055 /** 1056 * 1057 * 1058 * <pre> 1059 * [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. 1060 * </pre> 1061 * 1062 * <code>optional string display_name = 4473832;</code> 1063 * 1064 * @param value The displayName to set. 1065 * @return This builder for chaining. 1066 */ setDisplayName(java.lang.String value)1067 public Builder setDisplayName(java.lang.String value) { 1068 if (value == null) { 1069 throw new NullPointerException(); 1070 } 1071 displayName_ = value; 1072 bitField0_ |= 0x00000002; 1073 onChanged(); 1074 return this; 1075 } 1076 /** 1077 * 1078 * 1079 * <pre> 1080 * [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. 1081 * </pre> 1082 * 1083 * <code>optional string display_name = 4473832;</code> 1084 * 1085 * @return This builder for chaining. 1086 */ clearDisplayName()1087 public Builder clearDisplayName() { 1088 displayName_ = getDefaultInstance().getDisplayName(); 1089 bitField0_ = (bitField0_ & ~0x00000002); 1090 onChanged(); 1091 return this; 1092 } 1093 /** 1094 * 1095 * 1096 * <pre> 1097 * [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. 1098 * </pre> 1099 * 1100 * <code>optional string display_name = 4473832;</code> 1101 * 1102 * @param value The bytes for displayName to set. 1103 * @return This builder for chaining. 1104 */ setDisplayNameBytes(com.google.protobuf.ByteString value)1105 public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { 1106 if (value == null) { 1107 throw new NullPointerException(); 1108 } 1109 checkByteStringIsUtf8(value); 1110 displayName_ = value; 1111 bitField0_ |= 0x00000002; 1112 onChanged(); 1113 return this; 1114 } 1115 1116 private java.lang.Object firewallPolicyId_ = ""; 1117 /** 1118 * 1119 * 1120 * <pre> 1121 * [Output Only] The firewall policy ID of the association. 1122 * </pre> 1123 * 1124 * <code>optional string firewall_policy_id = 357211849;</code> 1125 * 1126 * @return Whether the firewallPolicyId field is set. 1127 */ hasFirewallPolicyId()1128 public boolean hasFirewallPolicyId() { 1129 return ((bitField0_ & 0x00000004) != 0); 1130 } 1131 /** 1132 * 1133 * 1134 * <pre> 1135 * [Output Only] The firewall policy ID of the association. 1136 * </pre> 1137 * 1138 * <code>optional string firewall_policy_id = 357211849;</code> 1139 * 1140 * @return The firewallPolicyId. 1141 */ getFirewallPolicyId()1142 public java.lang.String getFirewallPolicyId() { 1143 java.lang.Object ref = firewallPolicyId_; 1144 if (!(ref instanceof java.lang.String)) { 1145 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1146 java.lang.String s = bs.toStringUtf8(); 1147 firewallPolicyId_ = s; 1148 return s; 1149 } else { 1150 return (java.lang.String) ref; 1151 } 1152 } 1153 /** 1154 * 1155 * 1156 * <pre> 1157 * [Output Only] The firewall policy ID of the association. 1158 * </pre> 1159 * 1160 * <code>optional string firewall_policy_id = 357211849;</code> 1161 * 1162 * @return The bytes for firewallPolicyId. 1163 */ getFirewallPolicyIdBytes()1164 public com.google.protobuf.ByteString getFirewallPolicyIdBytes() { 1165 java.lang.Object ref = firewallPolicyId_; 1166 if (ref instanceof String) { 1167 com.google.protobuf.ByteString b = 1168 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1169 firewallPolicyId_ = b; 1170 return b; 1171 } else { 1172 return (com.google.protobuf.ByteString) ref; 1173 } 1174 } 1175 /** 1176 * 1177 * 1178 * <pre> 1179 * [Output Only] The firewall policy ID of the association. 1180 * </pre> 1181 * 1182 * <code>optional string firewall_policy_id = 357211849;</code> 1183 * 1184 * @param value The firewallPolicyId to set. 1185 * @return This builder for chaining. 1186 */ setFirewallPolicyId(java.lang.String value)1187 public Builder setFirewallPolicyId(java.lang.String value) { 1188 if (value == null) { 1189 throw new NullPointerException(); 1190 } 1191 firewallPolicyId_ = value; 1192 bitField0_ |= 0x00000004; 1193 onChanged(); 1194 return this; 1195 } 1196 /** 1197 * 1198 * 1199 * <pre> 1200 * [Output Only] The firewall policy ID of the association. 1201 * </pre> 1202 * 1203 * <code>optional string firewall_policy_id = 357211849;</code> 1204 * 1205 * @return This builder for chaining. 1206 */ clearFirewallPolicyId()1207 public Builder clearFirewallPolicyId() { 1208 firewallPolicyId_ = getDefaultInstance().getFirewallPolicyId(); 1209 bitField0_ = (bitField0_ & ~0x00000004); 1210 onChanged(); 1211 return this; 1212 } 1213 /** 1214 * 1215 * 1216 * <pre> 1217 * [Output Only] The firewall policy ID of the association. 1218 * </pre> 1219 * 1220 * <code>optional string firewall_policy_id = 357211849;</code> 1221 * 1222 * @param value The bytes for firewallPolicyId to set. 1223 * @return This builder for chaining. 1224 */ setFirewallPolicyIdBytes(com.google.protobuf.ByteString value)1225 public Builder setFirewallPolicyIdBytes(com.google.protobuf.ByteString value) { 1226 if (value == null) { 1227 throw new NullPointerException(); 1228 } 1229 checkByteStringIsUtf8(value); 1230 firewallPolicyId_ = value; 1231 bitField0_ |= 0x00000004; 1232 onChanged(); 1233 return this; 1234 } 1235 1236 private java.lang.Object name_ = ""; 1237 /** 1238 * 1239 * 1240 * <pre> 1241 * The name for an association. 1242 * </pre> 1243 * 1244 * <code>optional string name = 3373707;</code> 1245 * 1246 * @return Whether the name field is set. 1247 */ hasName()1248 public boolean hasName() { 1249 return ((bitField0_ & 0x00000008) != 0); 1250 } 1251 /** 1252 * 1253 * 1254 * <pre> 1255 * The name for an association. 1256 * </pre> 1257 * 1258 * <code>optional string name = 3373707;</code> 1259 * 1260 * @return The name. 1261 */ getName()1262 public java.lang.String getName() { 1263 java.lang.Object ref = name_; 1264 if (!(ref instanceof java.lang.String)) { 1265 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1266 java.lang.String s = bs.toStringUtf8(); 1267 name_ = s; 1268 return s; 1269 } else { 1270 return (java.lang.String) ref; 1271 } 1272 } 1273 /** 1274 * 1275 * 1276 * <pre> 1277 * The name for an association. 1278 * </pre> 1279 * 1280 * <code>optional string name = 3373707;</code> 1281 * 1282 * @return The bytes for name. 1283 */ getNameBytes()1284 public com.google.protobuf.ByteString getNameBytes() { 1285 java.lang.Object ref = name_; 1286 if (ref instanceof String) { 1287 com.google.protobuf.ByteString b = 1288 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1289 name_ = b; 1290 return b; 1291 } else { 1292 return (com.google.protobuf.ByteString) ref; 1293 } 1294 } 1295 /** 1296 * 1297 * 1298 * <pre> 1299 * The name for an association. 1300 * </pre> 1301 * 1302 * <code>optional string name = 3373707;</code> 1303 * 1304 * @param value The name to set. 1305 * @return This builder for chaining. 1306 */ setName(java.lang.String value)1307 public Builder setName(java.lang.String value) { 1308 if (value == null) { 1309 throw new NullPointerException(); 1310 } 1311 name_ = value; 1312 bitField0_ |= 0x00000008; 1313 onChanged(); 1314 return this; 1315 } 1316 /** 1317 * 1318 * 1319 * <pre> 1320 * The name for an association. 1321 * </pre> 1322 * 1323 * <code>optional string name = 3373707;</code> 1324 * 1325 * @return This builder for chaining. 1326 */ clearName()1327 public Builder clearName() { 1328 name_ = getDefaultInstance().getName(); 1329 bitField0_ = (bitField0_ & ~0x00000008); 1330 onChanged(); 1331 return this; 1332 } 1333 /** 1334 * 1335 * 1336 * <pre> 1337 * The name for an association. 1338 * </pre> 1339 * 1340 * <code>optional string name = 3373707;</code> 1341 * 1342 * @param value The bytes for name to set. 1343 * @return This builder for chaining. 1344 */ setNameBytes(com.google.protobuf.ByteString value)1345 public Builder setNameBytes(com.google.protobuf.ByteString value) { 1346 if (value == null) { 1347 throw new NullPointerException(); 1348 } 1349 checkByteStringIsUtf8(value); 1350 name_ = value; 1351 bitField0_ |= 0x00000008; 1352 onChanged(); 1353 return this; 1354 } 1355 1356 private java.lang.Object shortName_ = ""; 1357 /** 1358 * 1359 * 1360 * <pre> 1361 * [Output Only] The short name of the firewall policy of the association. 1362 * </pre> 1363 * 1364 * <code>optional string short_name = 492051566;</code> 1365 * 1366 * @return Whether the shortName field is set. 1367 */ hasShortName()1368 public boolean hasShortName() { 1369 return ((bitField0_ & 0x00000010) != 0); 1370 } 1371 /** 1372 * 1373 * 1374 * <pre> 1375 * [Output Only] The short name of the firewall policy of the association. 1376 * </pre> 1377 * 1378 * <code>optional string short_name = 492051566;</code> 1379 * 1380 * @return The shortName. 1381 */ getShortName()1382 public java.lang.String getShortName() { 1383 java.lang.Object ref = shortName_; 1384 if (!(ref instanceof java.lang.String)) { 1385 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1386 java.lang.String s = bs.toStringUtf8(); 1387 shortName_ = s; 1388 return s; 1389 } else { 1390 return (java.lang.String) ref; 1391 } 1392 } 1393 /** 1394 * 1395 * 1396 * <pre> 1397 * [Output Only] The short name of the firewall policy of the association. 1398 * </pre> 1399 * 1400 * <code>optional string short_name = 492051566;</code> 1401 * 1402 * @return The bytes for shortName. 1403 */ getShortNameBytes()1404 public com.google.protobuf.ByteString getShortNameBytes() { 1405 java.lang.Object ref = shortName_; 1406 if (ref instanceof String) { 1407 com.google.protobuf.ByteString b = 1408 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1409 shortName_ = b; 1410 return b; 1411 } else { 1412 return (com.google.protobuf.ByteString) ref; 1413 } 1414 } 1415 /** 1416 * 1417 * 1418 * <pre> 1419 * [Output Only] The short name of the firewall policy of the association. 1420 * </pre> 1421 * 1422 * <code>optional string short_name = 492051566;</code> 1423 * 1424 * @param value The shortName to set. 1425 * @return This builder for chaining. 1426 */ setShortName(java.lang.String value)1427 public Builder setShortName(java.lang.String value) { 1428 if (value == null) { 1429 throw new NullPointerException(); 1430 } 1431 shortName_ = value; 1432 bitField0_ |= 0x00000010; 1433 onChanged(); 1434 return this; 1435 } 1436 /** 1437 * 1438 * 1439 * <pre> 1440 * [Output Only] The short name of the firewall policy of the association. 1441 * </pre> 1442 * 1443 * <code>optional string short_name = 492051566;</code> 1444 * 1445 * @return This builder for chaining. 1446 */ clearShortName()1447 public Builder clearShortName() { 1448 shortName_ = getDefaultInstance().getShortName(); 1449 bitField0_ = (bitField0_ & ~0x00000010); 1450 onChanged(); 1451 return this; 1452 } 1453 /** 1454 * 1455 * 1456 * <pre> 1457 * [Output Only] The short name of the firewall policy of the association. 1458 * </pre> 1459 * 1460 * <code>optional string short_name = 492051566;</code> 1461 * 1462 * @param value The bytes for shortName to set. 1463 * @return This builder for chaining. 1464 */ setShortNameBytes(com.google.protobuf.ByteString value)1465 public Builder setShortNameBytes(com.google.protobuf.ByteString value) { 1466 if (value == null) { 1467 throw new NullPointerException(); 1468 } 1469 checkByteStringIsUtf8(value); 1470 shortName_ = value; 1471 bitField0_ |= 0x00000010; 1472 onChanged(); 1473 return this; 1474 } 1475 1476 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1477 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1478 return super.setUnknownFields(unknownFields); 1479 } 1480 1481 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1482 public final Builder mergeUnknownFields( 1483 final com.google.protobuf.UnknownFieldSet unknownFields) { 1484 return super.mergeUnknownFields(unknownFields); 1485 } 1486 1487 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.FirewallPolicyAssociation) 1488 } 1489 1490 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.FirewallPolicyAssociation) 1491 private static final com.google.cloud.compute.v1.FirewallPolicyAssociation DEFAULT_INSTANCE; 1492 1493 static { 1494 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.FirewallPolicyAssociation(); 1495 } 1496 getDefaultInstance()1497 public static com.google.cloud.compute.v1.FirewallPolicyAssociation getDefaultInstance() { 1498 return DEFAULT_INSTANCE; 1499 } 1500 1501 private static final com.google.protobuf.Parser<FirewallPolicyAssociation> PARSER = 1502 new com.google.protobuf.AbstractParser<FirewallPolicyAssociation>() { 1503 @java.lang.Override 1504 public FirewallPolicyAssociation parsePartialFrom( 1505 com.google.protobuf.CodedInputStream input, 1506 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1507 throws com.google.protobuf.InvalidProtocolBufferException { 1508 Builder builder = newBuilder(); 1509 try { 1510 builder.mergeFrom(input, extensionRegistry); 1511 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1512 throw e.setUnfinishedMessage(builder.buildPartial()); 1513 } catch (com.google.protobuf.UninitializedMessageException e) { 1514 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1515 } catch (java.io.IOException e) { 1516 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1517 .setUnfinishedMessage(builder.buildPartial()); 1518 } 1519 return builder.buildPartial(); 1520 } 1521 }; 1522 parser()1523 public static com.google.protobuf.Parser<FirewallPolicyAssociation> parser() { 1524 return PARSER; 1525 } 1526 1527 @java.lang.Override getParserForType()1528 public com.google.protobuf.Parser<FirewallPolicyAssociation> getParserForType() { 1529 return PARSER; 1530 } 1531 1532 @java.lang.Override getDefaultInstanceForType()1533 public com.google.cloud.compute.v1.FirewallPolicyAssociation getDefaultInstanceForType() { 1534 return DEFAULT_INSTANCE; 1535 } 1536 } 1537