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