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