1 /* 2 * Copyright 2019 The Grafeas Authors. All rights reserved. 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 17 // Generated by the protocol buffer compiler. DO NOT EDIT! 18 // source: grafeas/v1/compliance.proto 19 20 package io.grafeas.v1; 21 22 /** 23 * 24 * 25 * <pre> 26 * Details about files that caused a compliance check to fail. 27 * </pre> 28 * 29 * Protobuf type {@code grafeas.v1.NonCompliantFile} 30 */ 31 public final class NonCompliantFile extends com.google.protobuf.GeneratedMessageV3 32 implements 33 // @@protoc_insertion_point(message_implements:grafeas.v1.NonCompliantFile) 34 NonCompliantFileOrBuilder { 35 private static final long serialVersionUID = 0L; 36 // Use NonCompliantFile.newBuilder() to construct. NonCompliantFile(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37 private NonCompliantFile(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 38 super(builder); 39 } 40 NonCompliantFile()41 private NonCompliantFile() { 42 path_ = ""; 43 displayCommand_ = ""; 44 reason_ = ""; 45 } 46 47 @java.lang.Override 48 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)49 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 50 return new NonCompliantFile(); 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 io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_descriptor; 60 } 61 62 @java.lang.Override 63 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()64 internalGetFieldAccessorTable() { 65 return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_fieldAccessorTable 66 .ensureFieldAccessorsInitialized( 67 io.grafeas.v1.NonCompliantFile.class, io.grafeas.v1.NonCompliantFile.Builder.class); 68 } 69 70 public static final int PATH_FIELD_NUMBER = 1; 71 72 @SuppressWarnings("serial") 73 private volatile java.lang.Object path_ = ""; 74 /** 75 * 76 * 77 * <pre> 78 * Empty if `display_command` is set. 79 * </pre> 80 * 81 * <code>string path = 1;</code> 82 * 83 * @return The path. 84 */ 85 @java.lang.Override getPath()86 public java.lang.String getPath() { 87 java.lang.Object ref = path_; 88 if (ref instanceof java.lang.String) { 89 return (java.lang.String) ref; 90 } else { 91 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 92 java.lang.String s = bs.toStringUtf8(); 93 path_ = s; 94 return s; 95 } 96 } 97 /** 98 * 99 * 100 * <pre> 101 * Empty if `display_command` is set. 102 * </pre> 103 * 104 * <code>string path = 1;</code> 105 * 106 * @return The bytes for path. 107 */ 108 @java.lang.Override getPathBytes()109 public com.google.protobuf.ByteString getPathBytes() { 110 java.lang.Object ref = path_; 111 if (ref instanceof java.lang.String) { 112 com.google.protobuf.ByteString b = 113 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 114 path_ = b; 115 return b; 116 } else { 117 return (com.google.protobuf.ByteString) ref; 118 } 119 } 120 121 public static final int DISPLAY_COMMAND_FIELD_NUMBER = 2; 122 123 @SuppressWarnings("serial") 124 private volatile java.lang.Object displayCommand_ = ""; 125 /** 126 * 127 * 128 * <pre> 129 * Command to display the non-compliant files. 130 * </pre> 131 * 132 * <code>string display_command = 2;</code> 133 * 134 * @return The displayCommand. 135 */ 136 @java.lang.Override getDisplayCommand()137 public java.lang.String getDisplayCommand() { 138 java.lang.Object ref = displayCommand_; 139 if (ref instanceof java.lang.String) { 140 return (java.lang.String) ref; 141 } else { 142 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 143 java.lang.String s = bs.toStringUtf8(); 144 displayCommand_ = s; 145 return s; 146 } 147 } 148 /** 149 * 150 * 151 * <pre> 152 * Command to display the non-compliant files. 153 * </pre> 154 * 155 * <code>string display_command = 2;</code> 156 * 157 * @return The bytes for displayCommand. 158 */ 159 @java.lang.Override getDisplayCommandBytes()160 public com.google.protobuf.ByteString getDisplayCommandBytes() { 161 java.lang.Object ref = displayCommand_; 162 if (ref instanceof java.lang.String) { 163 com.google.protobuf.ByteString b = 164 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 165 displayCommand_ = b; 166 return b; 167 } else { 168 return (com.google.protobuf.ByteString) ref; 169 } 170 } 171 172 public static final int REASON_FIELD_NUMBER = 3; 173 174 @SuppressWarnings("serial") 175 private volatile java.lang.Object reason_ = ""; 176 /** 177 * 178 * 179 * <pre> 180 * Explains why a file is non compliant for a CIS check. 181 * </pre> 182 * 183 * <code>string reason = 3;</code> 184 * 185 * @return The reason. 186 */ 187 @java.lang.Override getReason()188 public java.lang.String getReason() { 189 java.lang.Object ref = reason_; 190 if (ref instanceof java.lang.String) { 191 return (java.lang.String) ref; 192 } else { 193 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 194 java.lang.String s = bs.toStringUtf8(); 195 reason_ = s; 196 return s; 197 } 198 } 199 /** 200 * 201 * 202 * <pre> 203 * Explains why a file is non compliant for a CIS check. 204 * </pre> 205 * 206 * <code>string reason = 3;</code> 207 * 208 * @return The bytes for reason. 209 */ 210 @java.lang.Override getReasonBytes()211 public com.google.protobuf.ByteString getReasonBytes() { 212 java.lang.Object ref = reason_; 213 if (ref instanceof java.lang.String) { 214 com.google.protobuf.ByteString b = 215 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 216 reason_ = b; 217 return b; 218 } else { 219 return (com.google.protobuf.ByteString) ref; 220 } 221 } 222 223 private byte memoizedIsInitialized = -1; 224 225 @java.lang.Override isInitialized()226 public final boolean isInitialized() { 227 byte isInitialized = memoizedIsInitialized; 228 if (isInitialized == 1) return true; 229 if (isInitialized == 0) return false; 230 231 memoizedIsInitialized = 1; 232 return true; 233 } 234 235 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)236 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 237 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { 238 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); 239 } 240 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayCommand_)) { 241 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayCommand_); 242 } 243 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { 244 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, reason_); 245 } 246 getUnknownFields().writeTo(output); 247 } 248 249 @java.lang.Override getSerializedSize()250 public int getSerializedSize() { 251 int size = memoizedSize; 252 if (size != -1) return size; 253 254 size = 0; 255 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { 256 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); 257 } 258 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayCommand_)) { 259 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayCommand_); 260 } 261 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { 262 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, reason_); 263 } 264 size += getUnknownFields().getSerializedSize(); 265 memoizedSize = size; 266 return size; 267 } 268 269 @java.lang.Override equals(final java.lang.Object obj)270 public boolean equals(final java.lang.Object obj) { 271 if (obj == this) { 272 return true; 273 } 274 if (!(obj instanceof io.grafeas.v1.NonCompliantFile)) { 275 return super.equals(obj); 276 } 277 io.grafeas.v1.NonCompliantFile other = (io.grafeas.v1.NonCompliantFile) obj; 278 279 if (!getPath().equals(other.getPath())) return false; 280 if (!getDisplayCommand().equals(other.getDisplayCommand())) return false; 281 if (!getReason().equals(other.getReason())) return false; 282 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 283 return true; 284 } 285 286 @java.lang.Override hashCode()287 public int hashCode() { 288 if (memoizedHashCode != 0) { 289 return memoizedHashCode; 290 } 291 int hash = 41; 292 hash = (19 * hash) + getDescriptor().hashCode(); 293 hash = (37 * hash) + PATH_FIELD_NUMBER; 294 hash = (53 * hash) + getPath().hashCode(); 295 hash = (37 * hash) + DISPLAY_COMMAND_FIELD_NUMBER; 296 hash = (53 * hash) + getDisplayCommand().hashCode(); 297 hash = (37 * hash) + REASON_FIELD_NUMBER; 298 hash = (53 * hash) + getReason().hashCode(); 299 hash = (29 * hash) + getUnknownFields().hashCode(); 300 memoizedHashCode = hash; 301 return hash; 302 } 303 parseFrom(java.nio.ByteBuffer data)304 public static io.grafeas.v1.NonCompliantFile parseFrom(java.nio.ByteBuffer data) 305 throws com.google.protobuf.InvalidProtocolBufferException { 306 return PARSER.parseFrom(data); 307 } 308 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)309 public static io.grafeas.v1.NonCompliantFile parseFrom( 310 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 311 throws com.google.protobuf.InvalidProtocolBufferException { 312 return PARSER.parseFrom(data, extensionRegistry); 313 } 314 parseFrom(com.google.protobuf.ByteString data)315 public static io.grafeas.v1.NonCompliantFile parseFrom(com.google.protobuf.ByteString data) 316 throws com.google.protobuf.InvalidProtocolBufferException { 317 return PARSER.parseFrom(data); 318 } 319 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)320 public static io.grafeas.v1.NonCompliantFile parseFrom( 321 com.google.protobuf.ByteString data, 322 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 323 throws com.google.protobuf.InvalidProtocolBufferException { 324 return PARSER.parseFrom(data, extensionRegistry); 325 } 326 parseFrom(byte[] data)327 public static io.grafeas.v1.NonCompliantFile parseFrom(byte[] data) 328 throws com.google.protobuf.InvalidProtocolBufferException { 329 return PARSER.parseFrom(data); 330 } 331 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)332 public static io.grafeas.v1.NonCompliantFile parseFrom( 333 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 334 throws com.google.protobuf.InvalidProtocolBufferException { 335 return PARSER.parseFrom(data, extensionRegistry); 336 } 337 parseFrom(java.io.InputStream input)338 public static io.grafeas.v1.NonCompliantFile parseFrom(java.io.InputStream input) 339 throws java.io.IOException { 340 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 341 } 342 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)343 public static io.grafeas.v1.NonCompliantFile parseFrom( 344 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 345 throws java.io.IOException { 346 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 347 PARSER, input, extensionRegistry); 348 } 349 parseDelimitedFrom(java.io.InputStream input)350 public static io.grafeas.v1.NonCompliantFile parseDelimitedFrom(java.io.InputStream input) 351 throws java.io.IOException { 352 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 353 } 354 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)355 public static io.grafeas.v1.NonCompliantFile parseDelimitedFrom( 356 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 357 throws java.io.IOException { 358 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 359 PARSER, input, extensionRegistry); 360 } 361 parseFrom(com.google.protobuf.CodedInputStream input)362 public static io.grafeas.v1.NonCompliantFile parseFrom(com.google.protobuf.CodedInputStream input) 363 throws java.io.IOException { 364 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 365 } 366 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)367 public static io.grafeas.v1.NonCompliantFile parseFrom( 368 com.google.protobuf.CodedInputStream input, 369 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 370 throws java.io.IOException { 371 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 372 PARSER, input, extensionRegistry); 373 } 374 375 @java.lang.Override newBuilderForType()376 public Builder newBuilderForType() { 377 return newBuilder(); 378 } 379 newBuilder()380 public static Builder newBuilder() { 381 return DEFAULT_INSTANCE.toBuilder(); 382 } 383 newBuilder(io.grafeas.v1.NonCompliantFile prototype)384 public static Builder newBuilder(io.grafeas.v1.NonCompliantFile prototype) { 385 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 386 } 387 388 @java.lang.Override toBuilder()389 public Builder toBuilder() { 390 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 391 } 392 393 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)394 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 395 Builder builder = new Builder(parent); 396 return builder; 397 } 398 /** 399 * 400 * 401 * <pre> 402 * Details about files that caused a compliance check to fail. 403 * </pre> 404 * 405 * Protobuf type {@code grafeas.v1.NonCompliantFile} 406 */ 407 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 408 implements 409 // @@protoc_insertion_point(builder_implements:grafeas.v1.NonCompliantFile) 410 io.grafeas.v1.NonCompliantFileOrBuilder { getDescriptor()411 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 412 return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_descriptor; 413 } 414 415 @java.lang.Override 416 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()417 internalGetFieldAccessorTable() { 418 return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_fieldAccessorTable 419 .ensureFieldAccessorsInitialized( 420 io.grafeas.v1.NonCompliantFile.class, io.grafeas.v1.NonCompliantFile.Builder.class); 421 } 422 423 // Construct using io.grafeas.v1.NonCompliantFile.newBuilder() Builder()424 private Builder() {} 425 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)426 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 427 super(parent); 428 } 429 430 @java.lang.Override clear()431 public Builder clear() { 432 super.clear(); 433 bitField0_ = 0; 434 path_ = ""; 435 displayCommand_ = ""; 436 reason_ = ""; 437 return this; 438 } 439 440 @java.lang.Override getDescriptorForType()441 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 442 return io.grafeas.v1.Compliance.internal_static_grafeas_v1_NonCompliantFile_descriptor; 443 } 444 445 @java.lang.Override getDefaultInstanceForType()446 public io.grafeas.v1.NonCompliantFile getDefaultInstanceForType() { 447 return io.grafeas.v1.NonCompliantFile.getDefaultInstance(); 448 } 449 450 @java.lang.Override build()451 public io.grafeas.v1.NonCompliantFile build() { 452 io.grafeas.v1.NonCompliantFile result = buildPartial(); 453 if (!result.isInitialized()) { 454 throw newUninitializedMessageException(result); 455 } 456 return result; 457 } 458 459 @java.lang.Override buildPartial()460 public io.grafeas.v1.NonCompliantFile buildPartial() { 461 io.grafeas.v1.NonCompliantFile result = new io.grafeas.v1.NonCompliantFile(this); 462 if (bitField0_ != 0) { 463 buildPartial0(result); 464 } 465 onBuilt(); 466 return result; 467 } 468 buildPartial0(io.grafeas.v1.NonCompliantFile result)469 private void buildPartial0(io.grafeas.v1.NonCompliantFile result) { 470 int from_bitField0_ = bitField0_; 471 if (((from_bitField0_ & 0x00000001) != 0)) { 472 result.path_ = path_; 473 } 474 if (((from_bitField0_ & 0x00000002) != 0)) { 475 result.displayCommand_ = displayCommand_; 476 } 477 if (((from_bitField0_ & 0x00000004) != 0)) { 478 result.reason_ = reason_; 479 } 480 } 481 482 @java.lang.Override clone()483 public Builder clone() { 484 return super.clone(); 485 } 486 487 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)488 public Builder setField( 489 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 490 return super.setField(field, value); 491 } 492 493 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)494 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 495 return super.clearField(field); 496 } 497 498 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)499 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 500 return super.clearOneof(oneof); 501 } 502 503 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)504 public Builder setRepeatedField( 505 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 506 return super.setRepeatedField(field, index, value); 507 } 508 509 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)510 public Builder addRepeatedField( 511 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 512 return super.addRepeatedField(field, value); 513 } 514 515 @java.lang.Override mergeFrom(com.google.protobuf.Message other)516 public Builder mergeFrom(com.google.protobuf.Message other) { 517 if (other instanceof io.grafeas.v1.NonCompliantFile) { 518 return mergeFrom((io.grafeas.v1.NonCompliantFile) other); 519 } else { 520 super.mergeFrom(other); 521 return this; 522 } 523 } 524 mergeFrom(io.grafeas.v1.NonCompliantFile other)525 public Builder mergeFrom(io.grafeas.v1.NonCompliantFile other) { 526 if (other == io.grafeas.v1.NonCompliantFile.getDefaultInstance()) return this; 527 if (!other.getPath().isEmpty()) { 528 path_ = other.path_; 529 bitField0_ |= 0x00000001; 530 onChanged(); 531 } 532 if (!other.getDisplayCommand().isEmpty()) { 533 displayCommand_ = other.displayCommand_; 534 bitField0_ |= 0x00000002; 535 onChanged(); 536 } 537 if (!other.getReason().isEmpty()) { 538 reason_ = other.reason_; 539 bitField0_ |= 0x00000004; 540 onChanged(); 541 } 542 this.mergeUnknownFields(other.getUnknownFields()); 543 onChanged(); 544 return this; 545 } 546 547 @java.lang.Override isInitialized()548 public final boolean isInitialized() { 549 return true; 550 } 551 552 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)553 public Builder mergeFrom( 554 com.google.protobuf.CodedInputStream input, 555 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 556 throws java.io.IOException { 557 if (extensionRegistry == null) { 558 throw new java.lang.NullPointerException(); 559 } 560 try { 561 boolean done = false; 562 while (!done) { 563 int tag = input.readTag(); 564 switch (tag) { 565 case 0: 566 done = true; 567 break; 568 case 10: 569 { 570 path_ = input.readStringRequireUtf8(); 571 bitField0_ |= 0x00000001; 572 break; 573 } // case 10 574 case 18: 575 { 576 displayCommand_ = input.readStringRequireUtf8(); 577 bitField0_ |= 0x00000002; 578 break; 579 } // case 18 580 case 26: 581 { 582 reason_ = input.readStringRequireUtf8(); 583 bitField0_ |= 0x00000004; 584 break; 585 } // case 26 586 default: 587 { 588 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 589 done = true; // was an endgroup tag 590 } 591 break; 592 } // default: 593 } // switch (tag) 594 } // while (!done) 595 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 596 throw e.unwrapIOException(); 597 } finally { 598 onChanged(); 599 } // finally 600 return this; 601 } 602 603 private int bitField0_; 604 605 private java.lang.Object path_ = ""; 606 /** 607 * 608 * 609 * <pre> 610 * Empty if `display_command` is set. 611 * </pre> 612 * 613 * <code>string path = 1;</code> 614 * 615 * @return The path. 616 */ getPath()617 public java.lang.String getPath() { 618 java.lang.Object ref = path_; 619 if (!(ref instanceof java.lang.String)) { 620 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 621 java.lang.String s = bs.toStringUtf8(); 622 path_ = s; 623 return s; 624 } else { 625 return (java.lang.String) ref; 626 } 627 } 628 /** 629 * 630 * 631 * <pre> 632 * Empty if `display_command` is set. 633 * </pre> 634 * 635 * <code>string path = 1;</code> 636 * 637 * @return The bytes for path. 638 */ getPathBytes()639 public com.google.protobuf.ByteString getPathBytes() { 640 java.lang.Object ref = path_; 641 if (ref instanceof String) { 642 com.google.protobuf.ByteString b = 643 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 644 path_ = b; 645 return b; 646 } else { 647 return (com.google.protobuf.ByteString) ref; 648 } 649 } 650 /** 651 * 652 * 653 * <pre> 654 * Empty if `display_command` is set. 655 * </pre> 656 * 657 * <code>string path = 1;</code> 658 * 659 * @param value The path to set. 660 * @return This builder for chaining. 661 */ setPath(java.lang.String value)662 public Builder setPath(java.lang.String value) { 663 if (value == null) { 664 throw new NullPointerException(); 665 } 666 path_ = value; 667 bitField0_ |= 0x00000001; 668 onChanged(); 669 return this; 670 } 671 /** 672 * 673 * 674 * <pre> 675 * Empty if `display_command` is set. 676 * </pre> 677 * 678 * <code>string path = 1;</code> 679 * 680 * @return This builder for chaining. 681 */ clearPath()682 public Builder clearPath() { 683 path_ = getDefaultInstance().getPath(); 684 bitField0_ = (bitField0_ & ~0x00000001); 685 onChanged(); 686 return this; 687 } 688 /** 689 * 690 * 691 * <pre> 692 * Empty if `display_command` is set. 693 * </pre> 694 * 695 * <code>string path = 1;</code> 696 * 697 * @param value The bytes for path to set. 698 * @return This builder for chaining. 699 */ setPathBytes(com.google.protobuf.ByteString value)700 public Builder setPathBytes(com.google.protobuf.ByteString value) { 701 if (value == null) { 702 throw new NullPointerException(); 703 } 704 checkByteStringIsUtf8(value); 705 path_ = value; 706 bitField0_ |= 0x00000001; 707 onChanged(); 708 return this; 709 } 710 711 private java.lang.Object displayCommand_ = ""; 712 /** 713 * 714 * 715 * <pre> 716 * Command to display the non-compliant files. 717 * </pre> 718 * 719 * <code>string display_command = 2;</code> 720 * 721 * @return The displayCommand. 722 */ getDisplayCommand()723 public java.lang.String getDisplayCommand() { 724 java.lang.Object ref = displayCommand_; 725 if (!(ref instanceof java.lang.String)) { 726 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 727 java.lang.String s = bs.toStringUtf8(); 728 displayCommand_ = s; 729 return s; 730 } else { 731 return (java.lang.String) ref; 732 } 733 } 734 /** 735 * 736 * 737 * <pre> 738 * Command to display the non-compliant files. 739 * </pre> 740 * 741 * <code>string display_command = 2;</code> 742 * 743 * @return The bytes for displayCommand. 744 */ getDisplayCommandBytes()745 public com.google.protobuf.ByteString getDisplayCommandBytes() { 746 java.lang.Object ref = displayCommand_; 747 if (ref instanceof String) { 748 com.google.protobuf.ByteString b = 749 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 750 displayCommand_ = b; 751 return b; 752 } else { 753 return (com.google.protobuf.ByteString) ref; 754 } 755 } 756 /** 757 * 758 * 759 * <pre> 760 * Command to display the non-compliant files. 761 * </pre> 762 * 763 * <code>string display_command = 2;</code> 764 * 765 * @param value The displayCommand to set. 766 * @return This builder for chaining. 767 */ setDisplayCommand(java.lang.String value)768 public Builder setDisplayCommand(java.lang.String value) { 769 if (value == null) { 770 throw new NullPointerException(); 771 } 772 displayCommand_ = value; 773 bitField0_ |= 0x00000002; 774 onChanged(); 775 return this; 776 } 777 /** 778 * 779 * 780 * <pre> 781 * Command to display the non-compliant files. 782 * </pre> 783 * 784 * <code>string display_command = 2;</code> 785 * 786 * @return This builder for chaining. 787 */ clearDisplayCommand()788 public Builder clearDisplayCommand() { 789 displayCommand_ = getDefaultInstance().getDisplayCommand(); 790 bitField0_ = (bitField0_ & ~0x00000002); 791 onChanged(); 792 return this; 793 } 794 /** 795 * 796 * 797 * <pre> 798 * Command to display the non-compliant files. 799 * </pre> 800 * 801 * <code>string display_command = 2;</code> 802 * 803 * @param value The bytes for displayCommand to set. 804 * @return This builder for chaining. 805 */ setDisplayCommandBytes(com.google.protobuf.ByteString value)806 public Builder setDisplayCommandBytes(com.google.protobuf.ByteString value) { 807 if (value == null) { 808 throw new NullPointerException(); 809 } 810 checkByteStringIsUtf8(value); 811 displayCommand_ = value; 812 bitField0_ |= 0x00000002; 813 onChanged(); 814 return this; 815 } 816 817 private java.lang.Object reason_ = ""; 818 /** 819 * 820 * 821 * <pre> 822 * Explains why a file is non compliant for a CIS check. 823 * </pre> 824 * 825 * <code>string reason = 3;</code> 826 * 827 * @return The reason. 828 */ getReason()829 public java.lang.String getReason() { 830 java.lang.Object ref = reason_; 831 if (!(ref instanceof java.lang.String)) { 832 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 833 java.lang.String s = bs.toStringUtf8(); 834 reason_ = s; 835 return s; 836 } else { 837 return (java.lang.String) ref; 838 } 839 } 840 /** 841 * 842 * 843 * <pre> 844 * Explains why a file is non compliant for a CIS check. 845 * </pre> 846 * 847 * <code>string reason = 3;</code> 848 * 849 * @return The bytes for reason. 850 */ getReasonBytes()851 public com.google.protobuf.ByteString getReasonBytes() { 852 java.lang.Object ref = reason_; 853 if (ref instanceof String) { 854 com.google.protobuf.ByteString b = 855 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 856 reason_ = b; 857 return b; 858 } else { 859 return (com.google.protobuf.ByteString) ref; 860 } 861 } 862 /** 863 * 864 * 865 * <pre> 866 * Explains why a file is non compliant for a CIS check. 867 * </pre> 868 * 869 * <code>string reason = 3;</code> 870 * 871 * @param value The reason to set. 872 * @return This builder for chaining. 873 */ setReason(java.lang.String value)874 public Builder setReason(java.lang.String value) { 875 if (value == null) { 876 throw new NullPointerException(); 877 } 878 reason_ = value; 879 bitField0_ |= 0x00000004; 880 onChanged(); 881 return this; 882 } 883 /** 884 * 885 * 886 * <pre> 887 * Explains why a file is non compliant for a CIS check. 888 * </pre> 889 * 890 * <code>string reason = 3;</code> 891 * 892 * @return This builder for chaining. 893 */ clearReason()894 public Builder clearReason() { 895 reason_ = getDefaultInstance().getReason(); 896 bitField0_ = (bitField0_ & ~0x00000004); 897 onChanged(); 898 return this; 899 } 900 /** 901 * 902 * 903 * <pre> 904 * Explains why a file is non compliant for a CIS check. 905 * </pre> 906 * 907 * <code>string reason = 3;</code> 908 * 909 * @param value The bytes for reason to set. 910 * @return This builder for chaining. 911 */ setReasonBytes(com.google.protobuf.ByteString value)912 public Builder setReasonBytes(com.google.protobuf.ByteString value) { 913 if (value == null) { 914 throw new NullPointerException(); 915 } 916 checkByteStringIsUtf8(value); 917 reason_ = value; 918 bitField0_ |= 0x00000004; 919 onChanged(); 920 return this; 921 } 922 923 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)924 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 925 return super.setUnknownFields(unknownFields); 926 } 927 928 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)929 public final Builder mergeUnknownFields( 930 final com.google.protobuf.UnknownFieldSet unknownFields) { 931 return super.mergeUnknownFields(unknownFields); 932 } 933 934 // @@protoc_insertion_point(builder_scope:grafeas.v1.NonCompliantFile) 935 } 936 937 // @@protoc_insertion_point(class_scope:grafeas.v1.NonCompliantFile) 938 private static final io.grafeas.v1.NonCompliantFile DEFAULT_INSTANCE; 939 940 static { 941 DEFAULT_INSTANCE = new io.grafeas.v1.NonCompliantFile(); 942 } 943 getDefaultInstance()944 public static io.grafeas.v1.NonCompliantFile getDefaultInstance() { 945 return DEFAULT_INSTANCE; 946 } 947 948 private static final com.google.protobuf.Parser<NonCompliantFile> PARSER = 949 new com.google.protobuf.AbstractParser<NonCompliantFile>() { 950 @java.lang.Override 951 public NonCompliantFile parsePartialFrom( 952 com.google.protobuf.CodedInputStream input, 953 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 954 throws com.google.protobuf.InvalidProtocolBufferException { 955 Builder builder = newBuilder(); 956 try { 957 builder.mergeFrom(input, extensionRegistry); 958 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 959 throw e.setUnfinishedMessage(builder.buildPartial()); 960 } catch (com.google.protobuf.UninitializedMessageException e) { 961 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 962 } catch (java.io.IOException e) { 963 throw new com.google.protobuf.InvalidProtocolBufferException(e) 964 .setUnfinishedMessage(builder.buildPartial()); 965 } 966 return builder.buildPartial(); 967 } 968 }; 969 parser()970 public static com.google.protobuf.Parser<NonCompliantFile> parser() { 971 return PARSER; 972 } 973 974 @java.lang.Override getParserForType()975 public com.google.protobuf.Parser<NonCompliantFile> getParserForType() { 976 return PARSER; 977 } 978 979 @java.lang.Override getDefaultInstanceForType()980 public io.grafeas.v1.NonCompliantFile getDefaultInstanceForType() { 981 return DEFAULT_INSTANCE; 982 } 983 } 984