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/devtools/containeranalysis/v1beta1/grafeas/grafeas.proto 18 19 package io.grafeas.v1beta1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Request to create occurrences in batch. 26 * </pre> 27 * 28 * Protobuf type {@code grafeas.v1beta1.BatchCreateOccurrencesRequest} 29 */ 30 public final class BatchCreateOccurrencesRequest extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:grafeas.v1beta1.BatchCreateOccurrencesRequest) 33 BatchCreateOccurrencesRequestOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use BatchCreateOccurrencesRequest.newBuilder() to construct. BatchCreateOccurrencesRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private BatchCreateOccurrencesRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 BatchCreateOccurrencesRequest()40 private BatchCreateOccurrencesRequest() { 41 parent_ = ""; 42 occurrences_ = java.util.Collections.emptyList(); 43 } 44 45 @java.lang.Override 46 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)47 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 48 return new BatchCreateOccurrencesRequest(); 49 } 50 51 @java.lang.Override getUnknownFields()52 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 53 return this.unknownFields; 54 } 55 BatchCreateOccurrencesRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)56 private BatchCreateOccurrencesRequest( 57 com.google.protobuf.CodedInputStream input, 58 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 59 throws com.google.protobuf.InvalidProtocolBufferException { 60 this(); 61 if (extensionRegistry == null) { 62 throw new java.lang.NullPointerException(); 63 } 64 int mutable_bitField0_ = 0; 65 com.google.protobuf.UnknownFieldSet.Builder unknownFields = 66 com.google.protobuf.UnknownFieldSet.newBuilder(); 67 try { 68 boolean done = false; 69 while (!done) { 70 int tag = input.readTag(); 71 switch (tag) { 72 case 0: 73 done = true; 74 break; 75 case 10: 76 { 77 java.lang.String s = input.readStringRequireUtf8(); 78 79 parent_ = s; 80 break; 81 } 82 case 18: 83 { 84 if (!((mutable_bitField0_ & 0x00000001) != 0)) { 85 occurrences_ = new java.util.ArrayList<io.grafeas.v1beta1.Occurrence>(); 86 mutable_bitField0_ |= 0x00000001; 87 } 88 occurrences_.add( 89 input.readMessage(io.grafeas.v1beta1.Occurrence.parser(), extensionRegistry)); 90 break; 91 } 92 default: 93 { 94 if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { 95 done = true; 96 } 97 break; 98 } 99 } 100 } 101 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 102 throw e.setUnfinishedMessage(this); 103 } catch (java.io.IOException e) { 104 throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); 105 } finally { 106 if (((mutable_bitField0_ & 0x00000001) != 0)) { 107 occurrences_ = java.util.Collections.unmodifiableList(occurrences_); 108 } 109 this.unknownFields = unknownFields.build(); 110 makeExtensionsImmutable(); 111 } 112 } 113 getDescriptor()114 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 115 return io.grafeas.v1beta1.Grafeas 116 .internal_static_grafeas_v1beta1_BatchCreateOccurrencesRequest_descriptor; 117 } 118 119 @java.lang.Override 120 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()121 internalGetFieldAccessorTable() { 122 return io.grafeas.v1beta1.Grafeas 123 .internal_static_grafeas_v1beta1_BatchCreateOccurrencesRequest_fieldAccessorTable 124 .ensureFieldAccessorsInitialized( 125 io.grafeas.v1beta1.BatchCreateOccurrencesRequest.class, 126 io.grafeas.v1beta1.BatchCreateOccurrencesRequest.Builder.class); 127 } 128 129 public static final int PARENT_FIELD_NUMBER = 1; 130 private volatile java.lang.Object parent_; 131 /** 132 * 133 * 134 * <pre> 135 * The name of the project in the form of `projects/[PROJECT_ID]`, under which 136 * the occurrences are to be created. 137 * </pre> 138 * 139 * <code>string parent = 1;</code> 140 * 141 * @return The parent. 142 */ 143 @java.lang.Override getParent()144 public java.lang.String getParent() { 145 java.lang.Object ref = parent_; 146 if (ref instanceof java.lang.String) { 147 return (java.lang.String) ref; 148 } else { 149 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 150 java.lang.String s = bs.toStringUtf8(); 151 parent_ = s; 152 return s; 153 } 154 } 155 /** 156 * 157 * 158 * <pre> 159 * The name of the project in the form of `projects/[PROJECT_ID]`, under which 160 * the occurrences are to be created. 161 * </pre> 162 * 163 * <code>string parent = 1;</code> 164 * 165 * @return The bytes for parent. 166 */ 167 @java.lang.Override getParentBytes()168 public com.google.protobuf.ByteString getParentBytes() { 169 java.lang.Object ref = parent_; 170 if (ref instanceof java.lang.String) { 171 com.google.protobuf.ByteString b = 172 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 173 parent_ = b; 174 return b; 175 } else { 176 return (com.google.protobuf.ByteString) ref; 177 } 178 } 179 180 public static final int OCCURRENCES_FIELD_NUMBER = 2; 181 private java.util.List<io.grafeas.v1beta1.Occurrence> occurrences_; 182 /** 183 * 184 * 185 * <pre> 186 * The occurrences to create. 187 * </pre> 188 * 189 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 190 */ 191 @java.lang.Override getOccurrencesList()192 public java.util.List<io.grafeas.v1beta1.Occurrence> getOccurrencesList() { 193 return occurrences_; 194 } 195 /** 196 * 197 * 198 * <pre> 199 * The occurrences to create. 200 * </pre> 201 * 202 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 203 */ 204 @java.lang.Override 205 public java.util.List<? extends io.grafeas.v1beta1.OccurrenceOrBuilder> getOccurrencesOrBuilderList()206 getOccurrencesOrBuilderList() { 207 return occurrences_; 208 } 209 /** 210 * 211 * 212 * <pre> 213 * The occurrences to create. 214 * </pre> 215 * 216 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 217 */ 218 @java.lang.Override getOccurrencesCount()219 public int getOccurrencesCount() { 220 return occurrences_.size(); 221 } 222 /** 223 * 224 * 225 * <pre> 226 * The occurrences to create. 227 * </pre> 228 * 229 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 230 */ 231 @java.lang.Override getOccurrences(int index)232 public io.grafeas.v1beta1.Occurrence getOccurrences(int index) { 233 return occurrences_.get(index); 234 } 235 /** 236 * 237 * 238 * <pre> 239 * The occurrences to create. 240 * </pre> 241 * 242 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 243 */ 244 @java.lang.Override getOccurrencesOrBuilder(int index)245 public io.grafeas.v1beta1.OccurrenceOrBuilder getOccurrencesOrBuilder(int index) { 246 return occurrences_.get(index); 247 } 248 249 private byte memoizedIsInitialized = -1; 250 251 @java.lang.Override isInitialized()252 public final boolean isInitialized() { 253 byte isInitialized = memoizedIsInitialized; 254 if (isInitialized == 1) return true; 255 if (isInitialized == 0) return false; 256 257 memoizedIsInitialized = 1; 258 return true; 259 } 260 261 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)262 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 263 if (!getParentBytes().isEmpty()) { 264 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); 265 } 266 for (int i = 0; i < occurrences_.size(); i++) { 267 output.writeMessage(2, occurrences_.get(i)); 268 } 269 unknownFields.writeTo(output); 270 } 271 272 @java.lang.Override getSerializedSize()273 public int getSerializedSize() { 274 int size = memoizedSize; 275 if (size != -1) return size; 276 277 size = 0; 278 if (!getParentBytes().isEmpty()) { 279 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); 280 } 281 for (int i = 0; i < occurrences_.size(); i++) { 282 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, occurrences_.get(i)); 283 } 284 size += unknownFields.getSerializedSize(); 285 memoizedSize = size; 286 return size; 287 } 288 289 @java.lang.Override equals(final java.lang.Object obj)290 public boolean equals(final java.lang.Object obj) { 291 if (obj == this) { 292 return true; 293 } 294 if (!(obj instanceof io.grafeas.v1beta1.BatchCreateOccurrencesRequest)) { 295 return super.equals(obj); 296 } 297 io.grafeas.v1beta1.BatchCreateOccurrencesRequest other = 298 (io.grafeas.v1beta1.BatchCreateOccurrencesRequest) obj; 299 300 if (!getParent().equals(other.getParent())) return false; 301 if (!getOccurrencesList().equals(other.getOccurrencesList())) return false; 302 if (!unknownFields.equals(other.unknownFields)) return false; 303 return true; 304 } 305 306 @java.lang.Override hashCode()307 public int hashCode() { 308 if (memoizedHashCode != 0) { 309 return memoizedHashCode; 310 } 311 int hash = 41; 312 hash = (19 * hash) + getDescriptor().hashCode(); 313 hash = (37 * hash) + PARENT_FIELD_NUMBER; 314 hash = (53 * hash) + getParent().hashCode(); 315 if (getOccurrencesCount() > 0) { 316 hash = (37 * hash) + OCCURRENCES_FIELD_NUMBER; 317 hash = (53 * hash) + getOccurrencesList().hashCode(); 318 } 319 hash = (29 * hash) + unknownFields.hashCode(); 320 memoizedHashCode = hash; 321 return hash; 322 } 323 parseFrom(java.nio.ByteBuffer data)324 public static io.grafeas.v1beta1.BatchCreateOccurrencesRequest parseFrom(java.nio.ByteBuffer data) 325 throws com.google.protobuf.InvalidProtocolBufferException { 326 return PARSER.parseFrom(data); 327 } 328 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)329 public static io.grafeas.v1beta1.BatchCreateOccurrencesRequest parseFrom( 330 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 331 throws com.google.protobuf.InvalidProtocolBufferException { 332 return PARSER.parseFrom(data, extensionRegistry); 333 } 334 parseFrom( com.google.protobuf.ByteString data)335 public static io.grafeas.v1beta1.BatchCreateOccurrencesRequest parseFrom( 336 com.google.protobuf.ByteString data) 337 throws com.google.protobuf.InvalidProtocolBufferException { 338 return PARSER.parseFrom(data); 339 } 340 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)341 public static io.grafeas.v1beta1.BatchCreateOccurrencesRequest parseFrom( 342 com.google.protobuf.ByteString data, 343 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 344 throws com.google.protobuf.InvalidProtocolBufferException { 345 return PARSER.parseFrom(data, extensionRegistry); 346 } 347 parseFrom(byte[] data)348 public static io.grafeas.v1beta1.BatchCreateOccurrencesRequest parseFrom(byte[] data) 349 throws com.google.protobuf.InvalidProtocolBufferException { 350 return PARSER.parseFrom(data); 351 } 352 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)353 public static io.grafeas.v1beta1.BatchCreateOccurrencesRequest parseFrom( 354 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 355 throws com.google.protobuf.InvalidProtocolBufferException { 356 return PARSER.parseFrom(data, extensionRegistry); 357 } 358 parseFrom( java.io.InputStream input)359 public static io.grafeas.v1beta1.BatchCreateOccurrencesRequest parseFrom( 360 java.io.InputStream input) throws java.io.IOException { 361 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 362 } 363 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)364 public static io.grafeas.v1beta1.BatchCreateOccurrencesRequest parseFrom( 365 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 366 throws java.io.IOException { 367 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 368 PARSER, input, extensionRegistry); 369 } 370 parseDelimitedFrom( java.io.InputStream input)371 public static io.grafeas.v1beta1.BatchCreateOccurrencesRequest parseDelimitedFrom( 372 java.io.InputStream input) throws java.io.IOException { 373 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 374 } 375 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)376 public static io.grafeas.v1beta1.BatchCreateOccurrencesRequest parseDelimitedFrom( 377 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 378 throws java.io.IOException { 379 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 380 PARSER, input, extensionRegistry); 381 } 382 parseFrom( com.google.protobuf.CodedInputStream input)383 public static io.grafeas.v1beta1.BatchCreateOccurrencesRequest parseFrom( 384 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 385 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 386 } 387 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)388 public static io.grafeas.v1beta1.BatchCreateOccurrencesRequest parseFrom( 389 com.google.protobuf.CodedInputStream input, 390 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 391 throws java.io.IOException { 392 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 393 PARSER, input, extensionRegistry); 394 } 395 396 @java.lang.Override newBuilderForType()397 public Builder newBuilderForType() { 398 return newBuilder(); 399 } 400 newBuilder()401 public static Builder newBuilder() { 402 return DEFAULT_INSTANCE.toBuilder(); 403 } 404 newBuilder(io.grafeas.v1beta1.BatchCreateOccurrencesRequest prototype)405 public static Builder newBuilder(io.grafeas.v1beta1.BatchCreateOccurrencesRequest prototype) { 406 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 407 } 408 409 @java.lang.Override toBuilder()410 public Builder toBuilder() { 411 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 412 } 413 414 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)415 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 416 Builder builder = new Builder(parent); 417 return builder; 418 } 419 /** 420 * 421 * 422 * <pre> 423 * Request to create occurrences in batch. 424 * </pre> 425 * 426 * Protobuf type {@code grafeas.v1beta1.BatchCreateOccurrencesRequest} 427 */ 428 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 429 implements 430 // @@protoc_insertion_point(builder_implements:grafeas.v1beta1.BatchCreateOccurrencesRequest) 431 io.grafeas.v1beta1.BatchCreateOccurrencesRequestOrBuilder { getDescriptor()432 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 433 return io.grafeas.v1beta1.Grafeas 434 .internal_static_grafeas_v1beta1_BatchCreateOccurrencesRequest_descriptor; 435 } 436 437 @java.lang.Override 438 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()439 internalGetFieldAccessorTable() { 440 return io.grafeas.v1beta1.Grafeas 441 .internal_static_grafeas_v1beta1_BatchCreateOccurrencesRequest_fieldAccessorTable 442 .ensureFieldAccessorsInitialized( 443 io.grafeas.v1beta1.BatchCreateOccurrencesRequest.class, 444 io.grafeas.v1beta1.BatchCreateOccurrencesRequest.Builder.class); 445 } 446 447 // Construct using io.grafeas.v1beta1.BatchCreateOccurrencesRequest.newBuilder() Builder()448 private Builder() { 449 maybeForceBuilderInitialization(); 450 } 451 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)452 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 453 super(parent); 454 maybeForceBuilderInitialization(); 455 } 456 maybeForceBuilderInitialization()457 private void maybeForceBuilderInitialization() { 458 if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { 459 getOccurrencesFieldBuilder(); 460 } 461 } 462 463 @java.lang.Override clear()464 public Builder clear() { 465 super.clear(); 466 parent_ = ""; 467 468 if (occurrencesBuilder_ == null) { 469 occurrences_ = java.util.Collections.emptyList(); 470 bitField0_ = (bitField0_ & ~0x00000001); 471 } else { 472 occurrencesBuilder_.clear(); 473 } 474 return this; 475 } 476 477 @java.lang.Override getDescriptorForType()478 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 479 return io.grafeas.v1beta1.Grafeas 480 .internal_static_grafeas_v1beta1_BatchCreateOccurrencesRequest_descriptor; 481 } 482 483 @java.lang.Override getDefaultInstanceForType()484 public io.grafeas.v1beta1.BatchCreateOccurrencesRequest getDefaultInstanceForType() { 485 return io.grafeas.v1beta1.BatchCreateOccurrencesRequest.getDefaultInstance(); 486 } 487 488 @java.lang.Override build()489 public io.grafeas.v1beta1.BatchCreateOccurrencesRequest build() { 490 io.grafeas.v1beta1.BatchCreateOccurrencesRequest result = buildPartial(); 491 if (!result.isInitialized()) { 492 throw newUninitializedMessageException(result); 493 } 494 return result; 495 } 496 497 @java.lang.Override buildPartial()498 public io.grafeas.v1beta1.BatchCreateOccurrencesRequest buildPartial() { 499 io.grafeas.v1beta1.BatchCreateOccurrencesRequest result = 500 new io.grafeas.v1beta1.BatchCreateOccurrencesRequest(this); 501 int from_bitField0_ = bitField0_; 502 result.parent_ = parent_; 503 if (occurrencesBuilder_ == null) { 504 if (((bitField0_ & 0x00000001) != 0)) { 505 occurrences_ = java.util.Collections.unmodifiableList(occurrences_); 506 bitField0_ = (bitField0_ & ~0x00000001); 507 } 508 result.occurrences_ = occurrences_; 509 } else { 510 result.occurrences_ = occurrencesBuilder_.build(); 511 } 512 onBuilt(); 513 return result; 514 } 515 516 @java.lang.Override clone()517 public Builder clone() { 518 return super.clone(); 519 } 520 521 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)522 public Builder setField( 523 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 524 return super.setField(field, value); 525 } 526 527 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)528 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 529 return super.clearField(field); 530 } 531 532 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)533 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 534 return super.clearOneof(oneof); 535 } 536 537 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)538 public Builder setRepeatedField( 539 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 540 return super.setRepeatedField(field, index, value); 541 } 542 543 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)544 public Builder addRepeatedField( 545 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 546 return super.addRepeatedField(field, value); 547 } 548 549 @java.lang.Override mergeFrom(com.google.protobuf.Message other)550 public Builder mergeFrom(com.google.protobuf.Message other) { 551 if (other instanceof io.grafeas.v1beta1.BatchCreateOccurrencesRequest) { 552 return mergeFrom((io.grafeas.v1beta1.BatchCreateOccurrencesRequest) other); 553 } else { 554 super.mergeFrom(other); 555 return this; 556 } 557 } 558 mergeFrom(io.grafeas.v1beta1.BatchCreateOccurrencesRequest other)559 public Builder mergeFrom(io.grafeas.v1beta1.BatchCreateOccurrencesRequest other) { 560 if (other == io.grafeas.v1beta1.BatchCreateOccurrencesRequest.getDefaultInstance()) 561 return this; 562 if (!other.getParent().isEmpty()) { 563 parent_ = other.parent_; 564 onChanged(); 565 } 566 if (occurrencesBuilder_ == null) { 567 if (!other.occurrences_.isEmpty()) { 568 if (occurrences_.isEmpty()) { 569 occurrences_ = other.occurrences_; 570 bitField0_ = (bitField0_ & ~0x00000001); 571 } else { 572 ensureOccurrencesIsMutable(); 573 occurrences_.addAll(other.occurrences_); 574 } 575 onChanged(); 576 } 577 } else { 578 if (!other.occurrences_.isEmpty()) { 579 if (occurrencesBuilder_.isEmpty()) { 580 occurrencesBuilder_.dispose(); 581 occurrencesBuilder_ = null; 582 occurrences_ = other.occurrences_; 583 bitField0_ = (bitField0_ & ~0x00000001); 584 occurrencesBuilder_ = 585 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 586 ? getOccurrencesFieldBuilder() 587 : null; 588 } else { 589 occurrencesBuilder_.addAllMessages(other.occurrences_); 590 } 591 } 592 } 593 this.mergeUnknownFields(other.unknownFields); 594 onChanged(); 595 return this; 596 } 597 598 @java.lang.Override isInitialized()599 public final boolean isInitialized() { 600 return true; 601 } 602 603 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)604 public Builder mergeFrom( 605 com.google.protobuf.CodedInputStream input, 606 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 607 throws java.io.IOException { 608 io.grafeas.v1beta1.BatchCreateOccurrencesRequest parsedMessage = null; 609 try { 610 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 611 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 612 parsedMessage = (io.grafeas.v1beta1.BatchCreateOccurrencesRequest) e.getUnfinishedMessage(); 613 throw e.unwrapIOException(); 614 } finally { 615 if (parsedMessage != null) { 616 mergeFrom(parsedMessage); 617 } 618 } 619 return this; 620 } 621 622 private int bitField0_; 623 624 private java.lang.Object parent_ = ""; 625 /** 626 * 627 * 628 * <pre> 629 * The name of the project in the form of `projects/[PROJECT_ID]`, under which 630 * the occurrences are to be created. 631 * </pre> 632 * 633 * <code>string parent = 1;</code> 634 * 635 * @return The parent. 636 */ getParent()637 public java.lang.String getParent() { 638 java.lang.Object ref = parent_; 639 if (!(ref instanceof java.lang.String)) { 640 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 641 java.lang.String s = bs.toStringUtf8(); 642 parent_ = s; 643 return s; 644 } else { 645 return (java.lang.String) ref; 646 } 647 } 648 /** 649 * 650 * 651 * <pre> 652 * The name of the project in the form of `projects/[PROJECT_ID]`, under which 653 * the occurrences are to be created. 654 * </pre> 655 * 656 * <code>string parent = 1;</code> 657 * 658 * @return The bytes for parent. 659 */ getParentBytes()660 public com.google.protobuf.ByteString getParentBytes() { 661 java.lang.Object ref = parent_; 662 if (ref instanceof String) { 663 com.google.protobuf.ByteString b = 664 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 665 parent_ = b; 666 return b; 667 } else { 668 return (com.google.protobuf.ByteString) ref; 669 } 670 } 671 /** 672 * 673 * 674 * <pre> 675 * The name of the project in the form of `projects/[PROJECT_ID]`, under which 676 * the occurrences are to be created. 677 * </pre> 678 * 679 * <code>string parent = 1;</code> 680 * 681 * @param value The parent to set. 682 * @return This builder for chaining. 683 */ setParent(java.lang.String value)684 public Builder setParent(java.lang.String value) { 685 if (value == null) { 686 throw new NullPointerException(); 687 } 688 689 parent_ = value; 690 onChanged(); 691 return this; 692 } 693 /** 694 * 695 * 696 * <pre> 697 * The name of the project in the form of `projects/[PROJECT_ID]`, under which 698 * the occurrences are to be created. 699 * </pre> 700 * 701 * <code>string parent = 1;</code> 702 * 703 * @return This builder for chaining. 704 */ clearParent()705 public Builder clearParent() { 706 707 parent_ = getDefaultInstance().getParent(); 708 onChanged(); 709 return this; 710 } 711 /** 712 * 713 * 714 * <pre> 715 * The name of the project in the form of `projects/[PROJECT_ID]`, under which 716 * the occurrences are to be created. 717 * </pre> 718 * 719 * <code>string parent = 1;</code> 720 * 721 * @param value The bytes for parent to set. 722 * @return This builder for chaining. 723 */ setParentBytes(com.google.protobuf.ByteString value)724 public Builder setParentBytes(com.google.protobuf.ByteString value) { 725 if (value == null) { 726 throw new NullPointerException(); 727 } 728 checkByteStringIsUtf8(value); 729 730 parent_ = value; 731 onChanged(); 732 return this; 733 } 734 735 private java.util.List<io.grafeas.v1beta1.Occurrence> occurrences_ = 736 java.util.Collections.emptyList(); 737 ensureOccurrencesIsMutable()738 private void ensureOccurrencesIsMutable() { 739 if (!((bitField0_ & 0x00000001) != 0)) { 740 occurrences_ = new java.util.ArrayList<io.grafeas.v1beta1.Occurrence>(occurrences_); 741 bitField0_ |= 0x00000001; 742 } 743 } 744 745 private com.google.protobuf.RepeatedFieldBuilderV3< 746 io.grafeas.v1beta1.Occurrence, 747 io.grafeas.v1beta1.Occurrence.Builder, 748 io.grafeas.v1beta1.OccurrenceOrBuilder> 749 occurrencesBuilder_; 750 751 /** 752 * 753 * 754 * <pre> 755 * The occurrences to create. 756 * </pre> 757 * 758 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 759 */ getOccurrencesList()760 public java.util.List<io.grafeas.v1beta1.Occurrence> getOccurrencesList() { 761 if (occurrencesBuilder_ == null) { 762 return java.util.Collections.unmodifiableList(occurrences_); 763 } else { 764 return occurrencesBuilder_.getMessageList(); 765 } 766 } 767 /** 768 * 769 * 770 * <pre> 771 * The occurrences to create. 772 * </pre> 773 * 774 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 775 */ getOccurrencesCount()776 public int getOccurrencesCount() { 777 if (occurrencesBuilder_ == null) { 778 return occurrences_.size(); 779 } else { 780 return occurrencesBuilder_.getCount(); 781 } 782 } 783 /** 784 * 785 * 786 * <pre> 787 * The occurrences to create. 788 * </pre> 789 * 790 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 791 */ getOccurrences(int index)792 public io.grafeas.v1beta1.Occurrence getOccurrences(int index) { 793 if (occurrencesBuilder_ == null) { 794 return occurrences_.get(index); 795 } else { 796 return occurrencesBuilder_.getMessage(index); 797 } 798 } 799 /** 800 * 801 * 802 * <pre> 803 * The occurrences to create. 804 * </pre> 805 * 806 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 807 */ setOccurrences(int index, io.grafeas.v1beta1.Occurrence value)808 public Builder setOccurrences(int index, io.grafeas.v1beta1.Occurrence value) { 809 if (occurrencesBuilder_ == null) { 810 if (value == null) { 811 throw new NullPointerException(); 812 } 813 ensureOccurrencesIsMutable(); 814 occurrences_.set(index, value); 815 onChanged(); 816 } else { 817 occurrencesBuilder_.setMessage(index, value); 818 } 819 return this; 820 } 821 /** 822 * 823 * 824 * <pre> 825 * The occurrences to create. 826 * </pre> 827 * 828 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 829 */ setOccurrences( int index, io.grafeas.v1beta1.Occurrence.Builder builderForValue)830 public Builder setOccurrences( 831 int index, io.grafeas.v1beta1.Occurrence.Builder builderForValue) { 832 if (occurrencesBuilder_ == null) { 833 ensureOccurrencesIsMutable(); 834 occurrences_.set(index, builderForValue.build()); 835 onChanged(); 836 } else { 837 occurrencesBuilder_.setMessage(index, builderForValue.build()); 838 } 839 return this; 840 } 841 /** 842 * 843 * 844 * <pre> 845 * The occurrences to create. 846 * </pre> 847 * 848 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 849 */ addOccurrences(io.grafeas.v1beta1.Occurrence value)850 public Builder addOccurrences(io.grafeas.v1beta1.Occurrence value) { 851 if (occurrencesBuilder_ == null) { 852 if (value == null) { 853 throw new NullPointerException(); 854 } 855 ensureOccurrencesIsMutable(); 856 occurrences_.add(value); 857 onChanged(); 858 } else { 859 occurrencesBuilder_.addMessage(value); 860 } 861 return this; 862 } 863 /** 864 * 865 * 866 * <pre> 867 * The occurrences to create. 868 * </pre> 869 * 870 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 871 */ addOccurrences(int index, io.grafeas.v1beta1.Occurrence value)872 public Builder addOccurrences(int index, io.grafeas.v1beta1.Occurrence value) { 873 if (occurrencesBuilder_ == null) { 874 if (value == null) { 875 throw new NullPointerException(); 876 } 877 ensureOccurrencesIsMutable(); 878 occurrences_.add(index, value); 879 onChanged(); 880 } else { 881 occurrencesBuilder_.addMessage(index, value); 882 } 883 return this; 884 } 885 /** 886 * 887 * 888 * <pre> 889 * The occurrences to create. 890 * </pre> 891 * 892 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 893 */ addOccurrences(io.grafeas.v1beta1.Occurrence.Builder builderForValue)894 public Builder addOccurrences(io.grafeas.v1beta1.Occurrence.Builder builderForValue) { 895 if (occurrencesBuilder_ == null) { 896 ensureOccurrencesIsMutable(); 897 occurrences_.add(builderForValue.build()); 898 onChanged(); 899 } else { 900 occurrencesBuilder_.addMessage(builderForValue.build()); 901 } 902 return this; 903 } 904 /** 905 * 906 * 907 * <pre> 908 * The occurrences to create. 909 * </pre> 910 * 911 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 912 */ addOccurrences( int index, io.grafeas.v1beta1.Occurrence.Builder builderForValue)913 public Builder addOccurrences( 914 int index, io.grafeas.v1beta1.Occurrence.Builder builderForValue) { 915 if (occurrencesBuilder_ == null) { 916 ensureOccurrencesIsMutable(); 917 occurrences_.add(index, builderForValue.build()); 918 onChanged(); 919 } else { 920 occurrencesBuilder_.addMessage(index, builderForValue.build()); 921 } 922 return this; 923 } 924 /** 925 * 926 * 927 * <pre> 928 * The occurrences to create. 929 * </pre> 930 * 931 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 932 */ addAllOccurrences( java.lang.Iterable<? extends io.grafeas.v1beta1.Occurrence> values)933 public Builder addAllOccurrences( 934 java.lang.Iterable<? extends io.grafeas.v1beta1.Occurrence> values) { 935 if (occurrencesBuilder_ == null) { 936 ensureOccurrencesIsMutable(); 937 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, occurrences_); 938 onChanged(); 939 } else { 940 occurrencesBuilder_.addAllMessages(values); 941 } 942 return this; 943 } 944 /** 945 * 946 * 947 * <pre> 948 * The occurrences to create. 949 * </pre> 950 * 951 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 952 */ clearOccurrences()953 public Builder clearOccurrences() { 954 if (occurrencesBuilder_ == null) { 955 occurrences_ = java.util.Collections.emptyList(); 956 bitField0_ = (bitField0_ & ~0x00000001); 957 onChanged(); 958 } else { 959 occurrencesBuilder_.clear(); 960 } 961 return this; 962 } 963 /** 964 * 965 * 966 * <pre> 967 * The occurrences to create. 968 * </pre> 969 * 970 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 971 */ removeOccurrences(int index)972 public Builder removeOccurrences(int index) { 973 if (occurrencesBuilder_ == null) { 974 ensureOccurrencesIsMutable(); 975 occurrences_.remove(index); 976 onChanged(); 977 } else { 978 occurrencesBuilder_.remove(index); 979 } 980 return this; 981 } 982 /** 983 * 984 * 985 * <pre> 986 * The occurrences to create. 987 * </pre> 988 * 989 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 990 */ getOccurrencesBuilder(int index)991 public io.grafeas.v1beta1.Occurrence.Builder getOccurrencesBuilder(int index) { 992 return getOccurrencesFieldBuilder().getBuilder(index); 993 } 994 /** 995 * 996 * 997 * <pre> 998 * The occurrences to create. 999 * </pre> 1000 * 1001 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 1002 */ getOccurrencesOrBuilder(int index)1003 public io.grafeas.v1beta1.OccurrenceOrBuilder getOccurrencesOrBuilder(int index) { 1004 if (occurrencesBuilder_ == null) { 1005 return occurrences_.get(index); 1006 } else { 1007 return occurrencesBuilder_.getMessageOrBuilder(index); 1008 } 1009 } 1010 /** 1011 * 1012 * 1013 * <pre> 1014 * The occurrences to create. 1015 * </pre> 1016 * 1017 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 1018 */ 1019 public java.util.List<? extends io.grafeas.v1beta1.OccurrenceOrBuilder> getOccurrencesOrBuilderList()1020 getOccurrencesOrBuilderList() { 1021 if (occurrencesBuilder_ != null) { 1022 return occurrencesBuilder_.getMessageOrBuilderList(); 1023 } else { 1024 return java.util.Collections.unmodifiableList(occurrences_); 1025 } 1026 } 1027 /** 1028 * 1029 * 1030 * <pre> 1031 * The occurrences to create. 1032 * </pre> 1033 * 1034 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 1035 */ addOccurrencesBuilder()1036 public io.grafeas.v1beta1.Occurrence.Builder addOccurrencesBuilder() { 1037 return getOccurrencesFieldBuilder() 1038 .addBuilder(io.grafeas.v1beta1.Occurrence.getDefaultInstance()); 1039 } 1040 /** 1041 * 1042 * 1043 * <pre> 1044 * The occurrences to create. 1045 * </pre> 1046 * 1047 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 1048 */ addOccurrencesBuilder(int index)1049 public io.grafeas.v1beta1.Occurrence.Builder addOccurrencesBuilder(int index) { 1050 return getOccurrencesFieldBuilder() 1051 .addBuilder(index, io.grafeas.v1beta1.Occurrence.getDefaultInstance()); 1052 } 1053 /** 1054 * 1055 * 1056 * <pre> 1057 * The occurrences to create. 1058 * </pre> 1059 * 1060 * <code>repeated .grafeas.v1beta1.Occurrence occurrences = 2;</code> 1061 */ getOccurrencesBuilderList()1062 public java.util.List<io.grafeas.v1beta1.Occurrence.Builder> getOccurrencesBuilderList() { 1063 return getOccurrencesFieldBuilder().getBuilderList(); 1064 } 1065 1066 private com.google.protobuf.RepeatedFieldBuilderV3< 1067 io.grafeas.v1beta1.Occurrence, 1068 io.grafeas.v1beta1.Occurrence.Builder, 1069 io.grafeas.v1beta1.OccurrenceOrBuilder> getOccurrencesFieldBuilder()1070 getOccurrencesFieldBuilder() { 1071 if (occurrencesBuilder_ == null) { 1072 occurrencesBuilder_ = 1073 new com.google.protobuf.RepeatedFieldBuilderV3< 1074 io.grafeas.v1beta1.Occurrence, 1075 io.grafeas.v1beta1.Occurrence.Builder, 1076 io.grafeas.v1beta1.OccurrenceOrBuilder>( 1077 occurrences_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); 1078 occurrences_ = null; 1079 } 1080 return occurrencesBuilder_; 1081 } 1082 1083 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1084 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1085 return super.setUnknownFields(unknownFields); 1086 } 1087 1088 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1089 public final Builder mergeUnknownFields( 1090 final com.google.protobuf.UnknownFieldSet unknownFields) { 1091 return super.mergeUnknownFields(unknownFields); 1092 } 1093 1094 // @@protoc_insertion_point(builder_scope:grafeas.v1beta1.BatchCreateOccurrencesRequest) 1095 } 1096 1097 // @@protoc_insertion_point(class_scope:grafeas.v1beta1.BatchCreateOccurrencesRequest) 1098 private static final io.grafeas.v1beta1.BatchCreateOccurrencesRequest DEFAULT_INSTANCE; 1099 1100 static { 1101 DEFAULT_INSTANCE = new io.grafeas.v1beta1.BatchCreateOccurrencesRequest(); 1102 } 1103 getDefaultInstance()1104 public static io.grafeas.v1beta1.BatchCreateOccurrencesRequest getDefaultInstance() { 1105 return DEFAULT_INSTANCE; 1106 } 1107 1108 private static final com.google.protobuf.Parser<BatchCreateOccurrencesRequest> PARSER = 1109 new com.google.protobuf.AbstractParser<BatchCreateOccurrencesRequest>() { 1110 @java.lang.Override 1111 public BatchCreateOccurrencesRequest parsePartialFrom( 1112 com.google.protobuf.CodedInputStream input, 1113 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1114 throws com.google.protobuf.InvalidProtocolBufferException { 1115 return new BatchCreateOccurrencesRequest(input, extensionRegistry); 1116 } 1117 }; 1118 parser()1119 public static com.google.protobuf.Parser<BatchCreateOccurrencesRequest> parser() { 1120 return PARSER; 1121 } 1122 1123 @java.lang.Override getParserForType()1124 public com.google.protobuf.Parser<BatchCreateOccurrencesRequest> getParserForType() { 1125 return PARSER; 1126 } 1127 1128 @java.lang.Override getDefaultInstanceForType()1129 public io.grafeas.v1beta1.BatchCreateOccurrencesRequest getDefaultInstanceForType() { 1130 return DEFAULT_INSTANCE; 1131 } 1132 } 1133