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/participant.proto 18 19 package com.google.cloud.dialogflow.v2; 20 21 /** 22 * 23 * 24 * <pre> 25 * Represents a message posted into a conversation. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.dialogflow.v2.Message} 29 */ 30 public final class Message extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Message) 33 MessageOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use Message.newBuilder() to construct. Message(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private Message(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 Message()40 private Message() { 41 name_ = ""; 42 content_ = ""; 43 languageCode_ = ""; 44 participant_ = ""; 45 participantRole_ = 0; 46 } 47 48 @java.lang.Override 49 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)50 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 51 return new Message(); 52 } 53 54 @java.lang.Override getUnknownFields()55 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 56 return this.unknownFields; 57 } 58 getDescriptor()59 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 60 return com.google.cloud.dialogflow.v2.ParticipantProto 61 .internal_static_google_cloud_dialogflow_v2_Message_descriptor; 62 } 63 64 @java.lang.Override 65 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()66 internalGetFieldAccessorTable() { 67 return com.google.cloud.dialogflow.v2.ParticipantProto 68 .internal_static_google_cloud_dialogflow_v2_Message_fieldAccessorTable 69 .ensureFieldAccessorsInitialized( 70 com.google.cloud.dialogflow.v2.Message.class, 71 com.google.cloud.dialogflow.v2.Message.Builder.class); 72 } 73 74 public static final int NAME_FIELD_NUMBER = 1; 75 76 @SuppressWarnings("serial") 77 private volatile java.lang.Object name_ = ""; 78 /** 79 * 80 * 81 * <pre> 82 * Optional. The unique identifier of the message. 83 * Format: `projects/<Project ID>/locations/<Location 84 * ID>/conversations/<Conversation ID>/messages/<Message ID>`. 85 * </pre> 86 * 87 * <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 88 * 89 * @return The name. 90 */ 91 @java.lang.Override getName()92 public java.lang.String getName() { 93 java.lang.Object ref = name_; 94 if (ref instanceof java.lang.String) { 95 return (java.lang.String) ref; 96 } else { 97 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 98 java.lang.String s = bs.toStringUtf8(); 99 name_ = s; 100 return s; 101 } 102 } 103 /** 104 * 105 * 106 * <pre> 107 * Optional. The unique identifier of the message. 108 * Format: `projects/<Project ID>/locations/<Location 109 * ID>/conversations/<Conversation ID>/messages/<Message ID>`. 110 * </pre> 111 * 112 * <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 113 * 114 * @return The bytes for name. 115 */ 116 @java.lang.Override getNameBytes()117 public com.google.protobuf.ByteString getNameBytes() { 118 java.lang.Object ref = name_; 119 if (ref instanceof java.lang.String) { 120 com.google.protobuf.ByteString b = 121 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 122 name_ = b; 123 return b; 124 } else { 125 return (com.google.protobuf.ByteString) ref; 126 } 127 } 128 129 public static final int CONTENT_FIELD_NUMBER = 2; 130 131 @SuppressWarnings("serial") 132 private volatile java.lang.Object content_ = ""; 133 /** 134 * 135 * 136 * <pre> 137 * Required. The message content. 138 * </pre> 139 * 140 * <code>string content = 2 [(.google.api.field_behavior) = REQUIRED];</code> 141 * 142 * @return The content. 143 */ 144 @java.lang.Override getContent()145 public java.lang.String getContent() { 146 java.lang.Object ref = content_; 147 if (ref instanceof java.lang.String) { 148 return (java.lang.String) ref; 149 } else { 150 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 151 java.lang.String s = bs.toStringUtf8(); 152 content_ = s; 153 return s; 154 } 155 } 156 /** 157 * 158 * 159 * <pre> 160 * Required. The message content. 161 * </pre> 162 * 163 * <code>string content = 2 [(.google.api.field_behavior) = REQUIRED];</code> 164 * 165 * @return The bytes for content. 166 */ 167 @java.lang.Override getContentBytes()168 public com.google.protobuf.ByteString getContentBytes() { 169 java.lang.Object ref = content_; 170 if (ref instanceof java.lang.String) { 171 com.google.protobuf.ByteString b = 172 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 173 content_ = b; 174 return b; 175 } else { 176 return (com.google.protobuf.ByteString) ref; 177 } 178 } 179 180 public static final int LANGUAGE_CODE_FIELD_NUMBER = 3; 181 182 @SuppressWarnings("serial") 183 private volatile java.lang.Object languageCode_ = ""; 184 /** 185 * 186 * 187 * <pre> 188 * Optional. The message language. 189 * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) 190 * language tag. Example: "en-US". 191 * </pre> 192 * 193 * <code>string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 194 * 195 * @return The languageCode. 196 */ 197 @java.lang.Override getLanguageCode()198 public java.lang.String getLanguageCode() { 199 java.lang.Object ref = languageCode_; 200 if (ref instanceof java.lang.String) { 201 return (java.lang.String) ref; 202 } else { 203 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 204 java.lang.String s = bs.toStringUtf8(); 205 languageCode_ = s; 206 return s; 207 } 208 } 209 /** 210 * 211 * 212 * <pre> 213 * Optional. The message language. 214 * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) 215 * language tag. Example: "en-US". 216 * </pre> 217 * 218 * <code>string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 219 * 220 * @return The bytes for languageCode. 221 */ 222 @java.lang.Override getLanguageCodeBytes()223 public com.google.protobuf.ByteString getLanguageCodeBytes() { 224 java.lang.Object ref = languageCode_; 225 if (ref instanceof java.lang.String) { 226 com.google.protobuf.ByteString b = 227 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 228 languageCode_ = b; 229 return b; 230 } else { 231 return (com.google.protobuf.ByteString) ref; 232 } 233 } 234 235 public static final int PARTICIPANT_FIELD_NUMBER = 4; 236 237 @SuppressWarnings("serial") 238 private volatile java.lang.Object participant_ = ""; 239 /** 240 * 241 * 242 * <pre> 243 * Output only. The participant that sends this message. 244 * </pre> 245 * 246 * <code>string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 247 * 248 * @return The participant. 249 */ 250 @java.lang.Override getParticipant()251 public java.lang.String getParticipant() { 252 java.lang.Object ref = participant_; 253 if (ref instanceof java.lang.String) { 254 return (java.lang.String) ref; 255 } else { 256 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 257 java.lang.String s = bs.toStringUtf8(); 258 participant_ = s; 259 return s; 260 } 261 } 262 /** 263 * 264 * 265 * <pre> 266 * Output only. The participant that sends this message. 267 * </pre> 268 * 269 * <code>string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 270 * 271 * @return The bytes for participant. 272 */ 273 @java.lang.Override getParticipantBytes()274 public com.google.protobuf.ByteString getParticipantBytes() { 275 java.lang.Object ref = participant_; 276 if (ref instanceof java.lang.String) { 277 com.google.protobuf.ByteString b = 278 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 279 participant_ = b; 280 return b; 281 } else { 282 return (com.google.protobuf.ByteString) ref; 283 } 284 } 285 286 public static final int PARTICIPANT_ROLE_FIELD_NUMBER = 5; 287 private int participantRole_ = 0; 288 /** 289 * 290 * 291 * <pre> 292 * Output only. The role of the participant. 293 * </pre> 294 * 295 * <code> 296 * .google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 297 * </code> 298 * 299 * @return The enum numeric value on the wire for participantRole. 300 */ 301 @java.lang.Override getParticipantRoleValue()302 public int getParticipantRoleValue() { 303 return participantRole_; 304 } 305 /** 306 * 307 * 308 * <pre> 309 * Output only. The role of the participant. 310 * </pre> 311 * 312 * <code> 313 * .google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 314 * </code> 315 * 316 * @return The participantRole. 317 */ 318 @java.lang.Override getParticipantRole()319 public com.google.cloud.dialogflow.v2.Participant.Role getParticipantRole() { 320 com.google.cloud.dialogflow.v2.Participant.Role result = 321 com.google.cloud.dialogflow.v2.Participant.Role.forNumber(participantRole_); 322 return result == null ? com.google.cloud.dialogflow.v2.Participant.Role.UNRECOGNIZED : result; 323 } 324 325 public static final int CREATE_TIME_FIELD_NUMBER = 6; 326 private com.google.protobuf.Timestamp createTime_; 327 /** 328 * 329 * 330 * <pre> 331 * Output only. The time when the message was created in Contact Center AI. 332 * </pre> 333 * 334 * <code>.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 335 * </code> 336 * 337 * @return Whether the createTime field is set. 338 */ 339 @java.lang.Override hasCreateTime()340 public boolean hasCreateTime() { 341 return createTime_ != null; 342 } 343 /** 344 * 345 * 346 * <pre> 347 * Output only. The time when the message was created in Contact Center AI. 348 * </pre> 349 * 350 * <code>.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 351 * </code> 352 * 353 * @return The createTime. 354 */ 355 @java.lang.Override getCreateTime()356 public com.google.protobuf.Timestamp getCreateTime() { 357 return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; 358 } 359 /** 360 * 361 * 362 * <pre> 363 * Output only. The time when the message was created in Contact Center AI. 364 * </pre> 365 * 366 * <code>.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 367 * </code> 368 */ 369 @java.lang.Override getCreateTimeOrBuilder()370 public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { 371 return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; 372 } 373 374 public static final int SEND_TIME_FIELD_NUMBER = 9; 375 private com.google.protobuf.Timestamp sendTime_; 376 /** 377 * 378 * 379 * <pre> 380 * Optional. The time when the message was sent. 381 * </pre> 382 * 383 * <code>.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; 384 * </code> 385 * 386 * @return Whether the sendTime field is set. 387 */ 388 @java.lang.Override hasSendTime()389 public boolean hasSendTime() { 390 return sendTime_ != null; 391 } 392 /** 393 * 394 * 395 * <pre> 396 * Optional. The time when the message was sent. 397 * </pre> 398 * 399 * <code>.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; 400 * </code> 401 * 402 * @return The sendTime. 403 */ 404 @java.lang.Override getSendTime()405 public com.google.protobuf.Timestamp getSendTime() { 406 return sendTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sendTime_; 407 } 408 /** 409 * 410 * 411 * <pre> 412 * Optional. The time when the message was sent. 413 * </pre> 414 * 415 * <code>.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; 416 * </code> 417 */ 418 @java.lang.Override getSendTimeOrBuilder()419 public com.google.protobuf.TimestampOrBuilder getSendTimeOrBuilder() { 420 return sendTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sendTime_; 421 } 422 423 public static final int MESSAGE_ANNOTATION_FIELD_NUMBER = 7; 424 private com.google.cloud.dialogflow.v2.MessageAnnotation messageAnnotation_; 425 /** 426 * 427 * 428 * <pre> 429 * Output only. The annotation for the message. 430 * </pre> 431 * 432 * <code> 433 * .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 434 * </code> 435 * 436 * @return Whether the messageAnnotation field is set. 437 */ 438 @java.lang.Override hasMessageAnnotation()439 public boolean hasMessageAnnotation() { 440 return messageAnnotation_ != null; 441 } 442 /** 443 * 444 * 445 * <pre> 446 * Output only. The annotation for the message. 447 * </pre> 448 * 449 * <code> 450 * .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 451 * </code> 452 * 453 * @return The messageAnnotation. 454 */ 455 @java.lang.Override getMessageAnnotation()456 public com.google.cloud.dialogflow.v2.MessageAnnotation getMessageAnnotation() { 457 return messageAnnotation_ == null 458 ? com.google.cloud.dialogflow.v2.MessageAnnotation.getDefaultInstance() 459 : messageAnnotation_; 460 } 461 /** 462 * 463 * 464 * <pre> 465 * Output only. The annotation for the message. 466 * </pre> 467 * 468 * <code> 469 * .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 470 * </code> 471 */ 472 @java.lang.Override getMessageAnnotationOrBuilder()473 public com.google.cloud.dialogflow.v2.MessageAnnotationOrBuilder getMessageAnnotationOrBuilder() { 474 return messageAnnotation_ == null 475 ? com.google.cloud.dialogflow.v2.MessageAnnotation.getDefaultInstance() 476 : messageAnnotation_; 477 } 478 479 public static final int SENTIMENT_ANALYSIS_FIELD_NUMBER = 8; 480 private com.google.cloud.dialogflow.v2.SentimentAnalysisResult sentimentAnalysis_; 481 /** 482 * 483 * 484 * <pre> 485 * Output only. The sentiment analysis result for the message. 486 * </pre> 487 * 488 * <code> 489 * .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 490 * </code> 491 * 492 * @return Whether the sentimentAnalysis field is set. 493 */ 494 @java.lang.Override hasSentimentAnalysis()495 public boolean hasSentimentAnalysis() { 496 return sentimentAnalysis_ != null; 497 } 498 /** 499 * 500 * 501 * <pre> 502 * Output only. The sentiment analysis result for the message. 503 * </pre> 504 * 505 * <code> 506 * .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 507 * </code> 508 * 509 * @return The sentimentAnalysis. 510 */ 511 @java.lang.Override getSentimentAnalysis()512 public com.google.cloud.dialogflow.v2.SentimentAnalysisResult getSentimentAnalysis() { 513 return sentimentAnalysis_ == null 514 ? com.google.cloud.dialogflow.v2.SentimentAnalysisResult.getDefaultInstance() 515 : sentimentAnalysis_; 516 } 517 /** 518 * 519 * 520 * <pre> 521 * Output only. The sentiment analysis result for the message. 522 * </pre> 523 * 524 * <code> 525 * .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 526 * </code> 527 */ 528 @java.lang.Override 529 public com.google.cloud.dialogflow.v2.SentimentAnalysisResultOrBuilder getSentimentAnalysisOrBuilder()530 getSentimentAnalysisOrBuilder() { 531 return sentimentAnalysis_ == null 532 ? com.google.cloud.dialogflow.v2.SentimentAnalysisResult.getDefaultInstance() 533 : sentimentAnalysis_; 534 } 535 536 private byte memoizedIsInitialized = -1; 537 538 @java.lang.Override isInitialized()539 public final boolean isInitialized() { 540 byte isInitialized = memoizedIsInitialized; 541 if (isInitialized == 1) return true; 542 if (isInitialized == 0) return false; 543 544 memoizedIsInitialized = 1; 545 return true; 546 } 547 548 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)549 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 550 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 551 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); 552 } 553 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { 554 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_); 555 } 556 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { 557 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, languageCode_); 558 } 559 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(participant_)) { 560 com.google.protobuf.GeneratedMessageV3.writeString(output, 4, participant_); 561 } 562 if (participantRole_ 563 != com.google.cloud.dialogflow.v2.Participant.Role.ROLE_UNSPECIFIED.getNumber()) { 564 output.writeEnum(5, participantRole_); 565 } 566 if (createTime_ != null) { 567 output.writeMessage(6, getCreateTime()); 568 } 569 if (messageAnnotation_ != null) { 570 output.writeMessage(7, getMessageAnnotation()); 571 } 572 if (sentimentAnalysis_ != null) { 573 output.writeMessage(8, getSentimentAnalysis()); 574 } 575 if (sendTime_ != null) { 576 output.writeMessage(9, getSendTime()); 577 } 578 getUnknownFields().writeTo(output); 579 } 580 581 @java.lang.Override getSerializedSize()582 public int getSerializedSize() { 583 int size = memoizedSize; 584 if (size != -1) return size; 585 586 size = 0; 587 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 588 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); 589 } 590 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { 591 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_); 592 } 593 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { 594 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, languageCode_); 595 } 596 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(participant_)) { 597 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, participant_); 598 } 599 if (participantRole_ 600 != com.google.cloud.dialogflow.v2.Participant.Role.ROLE_UNSPECIFIED.getNumber()) { 601 size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, participantRole_); 602 } 603 if (createTime_ != null) { 604 size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); 605 } 606 if (messageAnnotation_ != null) { 607 size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getMessageAnnotation()); 608 } 609 if (sentimentAnalysis_ != null) { 610 size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSentimentAnalysis()); 611 } 612 if (sendTime_ != null) { 613 size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getSendTime()); 614 } 615 size += getUnknownFields().getSerializedSize(); 616 memoizedSize = size; 617 return size; 618 } 619 620 @java.lang.Override equals(final java.lang.Object obj)621 public boolean equals(final java.lang.Object obj) { 622 if (obj == this) { 623 return true; 624 } 625 if (!(obj instanceof com.google.cloud.dialogflow.v2.Message)) { 626 return super.equals(obj); 627 } 628 com.google.cloud.dialogflow.v2.Message other = (com.google.cloud.dialogflow.v2.Message) obj; 629 630 if (!getName().equals(other.getName())) return false; 631 if (!getContent().equals(other.getContent())) return false; 632 if (!getLanguageCode().equals(other.getLanguageCode())) return false; 633 if (!getParticipant().equals(other.getParticipant())) return false; 634 if (participantRole_ != other.participantRole_) return false; 635 if (hasCreateTime() != other.hasCreateTime()) return false; 636 if (hasCreateTime()) { 637 if (!getCreateTime().equals(other.getCreateTime())) return false; 638 } 639 if (hasSendTime() != other.hasSendTime()) return false; 640 if (hasSendTime()) { 641 if (!getSendTime().equals(other.getSendTime())) return false; 642 } 643 if (hasMessageAnnotation() != other.hasMessageAnnotation()) return false; 644 if (hasMessageAnnotation()) { 645 if (!getMessageAnnotation().equals(other.getMessageAnnotation())) return false; 646 } 647 if (hasSentimentAnalysis() != other.hasSentimentAnalysis()) return false; 648 if (hasSentimentAnalysis()) { 649 if (!getSentimentAnalysis().equals(other.getSentimentAnalysis())) return false; 650 } 651 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 652 return true; 653 } 654 655 @java.lang.Override hashCode()656 public int hashCode() { 657 if (memoizedHashCode != 0) { 658 return memoizedHashCode; 659 } 660 int hash = 41; 661 hash = (19 * hash) + getDescriptor().hashCode(); 662 hash = (37 * hash) + NAME_FIELD_NUMBER; 663 hash = (53 * hash) + getName().hashCode(); 664 hash = (37 * hash) + CONTENT_FIELD_NUMBER; 665 hash = (53 * hash) + getContent().hashCode(); 666 hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; 667 hash = (53 * hash) + getLanguageCode().hashCode(); 668 hash = (37 * hash) + PARTICIPANT_FIELD_NUMBER; 669 hash = (53 * hash) + getParticipant().hashCode(); 670 hash = (37 * hash) + PARTICIPANT_ROLE_FIELD_NUMBER; 671 hash = (53 * hash) + participantRole_; 672 if (hasCreateTime()) { 673 hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; 674 hash = (53 * hash) + getCreateTime().hashCode(); 675 } 676 if (hasSendTime()) { 677 hash = (37 * hash) + SEND_TIME_FIELD_NUMBER; 678 hash = (53 * hash) + getSendTime().hashCode(); 679 } 680 if (hasMessageAnnotation()) { 681 hash = (37 * hash) + MESSAGE_ANNOTATION_FIELD_NUMBER; 682 hash = (53 * hash) + getMessageAnnotation().hashCode(); 683 } 684 if (hasSentimentAnalysis()) { 685 hash = (37 * hash) + SENTIMENT_ANALYSIS_FIELD_NUMBER; 686 hash = (53 * hash) + getSentimentAnalysis().hashCode(); 687 } 688 hash = (29 * hash) + getUnknownFields().hashCode(); 689 memoizedHashCode = hash; 690 return hash; 691 } 692 parseFrom(java.nio.ByteBuffer data)693 public static com.google.cloud.dialogflow.v2.Message parseFrom(java.nio.ByteBuffer data) 694 throws com.google.protobuf.InvalidProtocolBufferException { 695 return PARSER.parseFrom(data); 696 } 697 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)698 public static com.google.cloud.dialogflow.v2.Message parseFrom( 699 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 700 throws com.google.protobuf.InvalidProtocolBufferException { 701 return PARSER.parseFrom(data, extensionRegistry); 702 } 703 parseFrom( com.google.protobuf.ByteString data)704 public static com.google.cloud.dialogflow.v2.Message parseFrom( 705 com.google.protobuf.ByteString data) 706 throws com.google.protobuf.InvalidProtocolBufferException { 707 return PARSER.parseFrom(data); 708 } 709 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)710 public static com.google.cloud.dialogflow.v2.Message parseFrom( 711 com.google.protobuf.ByteString data, 712 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 713 throws com.google.protobuf.InvalidProtocolBufferException { 714 return PARSER.parseFrom(data, extensionRegistry); 715 } 716 parseFrom(byte[] data)717 public static com.google.cloud.dialogflow.v2.Message parseFrom(byte[] data) 718 throws com.google.protobuf.InvalidProtocolBufferException { 719 return PARSER.parseFrom(data); 720 } 721 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)722 public static com.google.cloud.dialogflow.v2.Message parseFrom( 723 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 724 throws com.google.protobuf.InvalidProtocolBufferException { 725 return PARSER.parseFrom(data, extensionRegistry); 726 } 727 parseFrom(java.io.InputStream input)728 public static com.google.cloud.dialogflow.v2.Message parseFrom(java.io.InputStream input) 729 throws java.io.IOException { 730 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 731 } 732 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)733 public static com.google.cloud.dialogflow.v2.Message parseFrom( 734 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 735 throws java.io.IOException { 736 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 737 PARSER, input, extensionRegistry); 738 } 739 parseDelimitedFrom(java.io.InputStream input)740 public static com.google.cloud.dialogflow.v2.Message parseDelimitedFrom(java.io.InputStream input) 741 throws java.io.IOException { 742 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 743 } 744 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)745 public static com.google.cloud.dialogflow.v2.Message parseDelimitedFrom( 746 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 747 throws java.io.IOException { 748 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 749 PARSER, input, extensionRegistry); 750 } 751 parseFrom( com.google.protobuf.CodedInputStream input)752 public static com.google.cloud.dialogflow.v2.Message parseFrom( 753 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 754 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 755 } 756 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)757 public static com.google.cloud.dialogflow.v2.Message parseFrom( 758 com.google.protobuf.CodedInputStream input, 759 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 760 throws java.io.IOException { 761 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 762 PARSER, input, extensionRegistry); 763 } 764 765 @java.lang.Override newBuilderForType()766 public Builder newBuilderForType() { 767 return newBuilder(); 768 } 769 newBuilder()770 public static Builder newBuilder() { 771 return DEFAULT_INSTANCE.toBuilder(); 772 } 773 newBuilder(com.google.cloud.dialogflow.v2.Message prototype)774 public static Builder newBuilder(com.google.cloud.dialogflow.v2.Message prototype) { 775 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 776 } 777 778 @java.lang.Override toBuilder()779 public Builder toBuilder() { 780 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 781 } 782 783 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)784 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 785 Builder builder = new Builder(parent); 786 return builder; 787 } 788 /** 789 * 790 * 791 * <pre> 792 * Represents a message posted into a conversation. 793 * </pre> 794 * 795 * Protobuf type {@code google.cloud.dialogflow.v2.Message} 796 */ 797 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 798 implements 799 // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Message) 800 com.google.cloud.dialogflow.v2.MessageOrBuilder { getDescriptor()801 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 802 return com.google.cloud.dialogflow.v2.ParticipantProto 803 .internal_static_google_cloud_dialogflow_v2_Message_descriptor; 804 } 805 806 @java.lang.Override 807 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()808 internalGetFieldAccessorTable() { 809 return com.google.cloud.dialogflow.v2.ParticipantProto 810 .internal_static_google_cloud_dialogflow_v2_Message_fieldAccessorTable 811 .ensureFieldAccessorsInitialized( 812 com.google.cloud.dialogflow.v2.Message.class, 813 com.google.cloud.dialogflow.v2.Message.Builder.class); 814 } 815 816 // Construct using com.google.cloud.dialogflow.v2.Message.newBuilder() Builder()817 private Builder() {} 818 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)819 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 820 super(parent); 821 } 822 823 @java.lang.Override clear()824 public Builder clear() { 825 super.clear(); 826 bitField0_ = 0; 827 name_ = ""; 828 content_ = ""; 829 languageCode_ = ""; 830 participant_ = ""; 831 participantRole_ = 0; 832 createTime_ = null; 833 if (createTimeBuilder_ != null) { 834 createTimeBuilder_.dispose(); 835 createTimeBuilder_ = null; 836 } 837 sendTime_ = null; 838 if (sendTimeBuilder_ != null) { 839 sendTimeBuilder_.dispose(); 840 sendTimeBuilder_ = null; 841 } 842 messageAnnotation_ = null; 843 if (messageAnnotationBuilder_ != null) { 844 messageAnnotationBuilder_.dispose(); 845 messageAnnotationBuilder_ = null; 846 } 847 sentimentAnalysis_ = null; 848 if (sentimentAnalysisBuilder_ != null) { 849 sentimentAnalysisBuilder_.dispose(); 850 sentimentAnalysisBuilder_ = null; 851 } 852 return this; 853 } 854 855 @java.lang.Override getDescriptorForType()856 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 857 return com.google.cloud.dialogflow.v2.ParticipantProto 858 .internal_static_google_cloud_dialogflow_v2_Message_descriptor; 859 } 860 861 @java.lang.Override getDefaultInstanceForType()862 public com.google.cloud.dialogflow.v2.Message getDefaultInstanceForType() { 863 return com.google.cloud.dialogflow.v2.Message.getDefaultInstance(); 864 } 865 866 @java.lang.Override build()867 public com.google.cloud.dialogflow.v2.Message build() { 868 com.google.cloud.dialogflow.v2.Message result = buildPartial(); 869 if (!result.isInitialized()) { 870 throw newUninitializedMessageException(result); 871 } 872 return result; 873 } 874 875 @java.lang.Override buildPartial()876 public com.google.cloud.dialogflow.v2.Message buildPartial() { 877 com.google.cloud.dialogflow.v2.Message result = 878 new com.google.cloud.dialogflow.v2.Message(this); 879 if (bitField0_ != 0) { 880 buildPartial0(result); 881 } 882 onBuilt(); 883 return result; 884 } 885 buildPartial0(com.google.cloud.dialogflow.v2.Message result)886 private void buildPartial0(com.google.cloud.dialogflow.v2.Message result) { 887 int from_bitField0_ = bitField0_; 888 if (((from_bitField0_ & 0x00000001) != 0)) { 889 result.name_ = name_; 890 } 891 if (((from_bitField0_ & 0x00000002) != 0)) { 892 result.content_ = content_; 893 } 894 if (((from_bitField0_ & 0x00000004) != 0)) { 895 result.languageCode_ = languageCode_; 896 } 897 if (((from_bitField0_ & 0x00000008) != 0)) { 898 result.participant_ = participant_; 899 } 900 if (((from_bitField0_ & 0x00000010) != 0)) { 901 result.participantRole_ = participantRole_; 902 } 903 if (((from_bitField0_ & 0x00000020) != 0)) { 904 result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); 905 } 906 if (((from_bitField0_ & 0x00000040) != 0)) { 907 result.sendTime_ = sendTimeBuilder_ == null ? sendTime_ : sendTimeBuilder_.build(); 908 } 909 if (((from_bitField0_ & 0x00000080) != 0)) { 910 result.messageAnnotation_ = 911 messageAnnotationBuilder_ == null 912 ? messageAnnotation_ 913 : messageAnnotationBuilder_.build(); 914 } 915 if (((from_bitField0_ & 0x00000100) != 0)) { 916 result.sentimentAnalysis_ = 917 sentimentAnalysisBuilder_ == null 918 ? sentimentAnalysis_ 919 : sentimentAnalysisBuilder_.build(); 920 } 921 } 922 923 @java.lang.Override clone()924 public Builder clone() { 925 return super.clone(); 926 } 927 928 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)929 public Builder setField( 930 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 931 return super.setField(field, value); 932 } 933 934 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)935 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 936 return super.clearField(field); 937 } 938 939 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)940 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 941 return super.clearOneof(oneof); 942 } 943 944 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)945 public Builder setRepeatedField( 946 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 947 return super.setRepeatedField(field, index, value); 948 } 949 950 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)951 public Builder addRepeatedField( 952 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 953 return super.addRepeatedField(field, value); 954 } 955 956 @java.lang.Override mergeFrom(com.google.protobuf.Message other)957 public Builder mergeFrom(com.google.protobuf.Message other) { 958 if (other instanceof com.google.cloud.dialogflow.v2.Message) { 959 return mergeFrom((com.google.cloud.dialogflow.v2.Message) other); 960 } else { 961 super.mergeFrom(other); 962 return this; 963 } 964 } 965 mergeFrom(com.google.cloud.dialogflow.v2.Message other)966 public Builder mergeFrom(com.google.cloud.dialogflow.v2.Message other) { 967 if (other == com.google.cloud.dialogflow.v2.Message.getDefaultInstance()) return this; 968 if (!other.getName().isEmpty()) { 969 name_ = other.name_; 970 bitField0_ |= 0x00000001; 971 onChanged(); 972 } 973 if (!other.getContent().isEmpty()) { 974 content_ = other.content_; 975 bitField0_ |= 0x00000002; 976 onChanged(); 977 } 978 if (!other.getLanguageCode().isEmpty()) { 979 languageCode_ = other.languageCode_; 980 bitField0_ |= 0x00000004; 981 onChanged(); 982 } 983 if (!other.getParticipant().isEmpty()) { 984 participant_ = other.participant_; 985 bitField0_ |= 0x00000008; 986 onChanged(); 987 } 988 if (other.participantRole_ != 0) { 989 setParticipantRoleValue(other.getParticipantRoleValue()); 990 } 991 if (other.hasCreateTime()) { 992 mergeCreateTime(other.getCreateTime()); 993 } 994 if (other.hasSendTime()) { 995 mergeSendTime(other.getSendTime()); 996 } 997 if (other.hasMessageAnnotation()) { 998 mergeMessageAnnotation(other.getMessageAnnotation()); 999 } 1000 if (other.hasSentimentAnalysis()) { 1001 mergeSentimentAnalysis(other.getSentimentAnalysis()); 1002 } 1003 this.mergeUnknownFields(other.getUnknownFields()); 1004 onChanged(); 1005 return this; 1006 } 1007 1008 @java.lang.Override isInitialized()1009 public final boolean isInitialized() { 1010 return true; 1011 } 1012 1013 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1014 public Builder mergeFrom( 1015 com.google.protobuf.CodedInputStream input, 1016 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1017 throws java.io.IOException { 1018 if (extensionRegistry == null) { 1019 throw new java.lang.NullPointerException(); 1020 } 1021 try { 1022 boolean done = false; 1023 while (!done) { 1024 int tag = input.readTag(); 1025 switch (tag) { 1026 case 0: 1027 done = true; 1028 break; 1029 case 10: 1030 { 1031 name_ = input.readStringRequireUtf8(); 1032 bitField0_ |= 0x00000001; 1033 break; 1034 } // case 10 1035 case 18: 1036 { 1037 content_ = input.readStringRequireUtf8(); 1038 bitField0_ |= 0x00000002; 1039 break; 1040 } // case 18 1041 case 26: 1042 { 1043 languageCode_ = input.readStringRequireUtf8(); 1044 bitField0_ |= 0x00000004; 1045 break; 1046 } // case 26 1047 case 34: 1048 { 1049 participant_ = input.readStringRequireUtf8(); 1050 bitField0_ |= 0x00000008; 1051 break; 1052 } // case 34 1053 case 40: 1054 { 1055 participantRole_ = input.readEnum(); 1056 bitField0_ |= 0x00000010; 1057 break; 1058 } // case 40 1059 case 50: 1060 { 1061 input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); 1062 bitField0_ |= 0x00000020; 1063 break; 1064 } // case 50 1065 case 58: 1066 { 1067 input.readMessage( 1068 getMessageAnnotationFieldBuilder().getBuilder(), extensionRegistry); 1069 bitField0_ |= 0x00000080; 1070 break; 1071 } // case 58 1072 case 66: 1073 { 1074 input.readMessage( 1075 getSentimentAnalysisFieldBuilder().getBuilder(), extensionRegistry); 1076 bitField0_ |= 0x00000100; 1077 break; 1078 } // case 66 1079 case 74: 1080 { 1081 input.readMessage(getSendTimeFieldBuilder().getBuilder(), extensionRegistry); 1082 bitField0_ |= 0x00000040; 1083 break; 1084 } // case 74 1085 default: 1086 { 1087 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1088 done = true; // was an endgroup tag 1089 } 1090 break; 1091 } // default: 1092 } // switch (tag) 1093 } // while (!done) 1094 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1095 throw e.unwrapIOException(); 1096 } finally { 1097 onChanged(); 1098 } // finally 1099 return this; 1100 } 1101 1102 private int bitField0_; 1103 1104 private java.lang.Object name_ = ""; 1105 /** 1106 * 1107 * 1108 * <pre> 1109 * Optional. The unique identifier of the message. 1110 * Format: `projects/<Project ID>/locations/<Location 1111 * ID>/conversations/<Conversation ID>/messages/<Message ID>`. 1112 * </pre> 1113 * 1114 * <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 1115 * 1116 * @return The name. 1117 */ getName()1118 public java.lang.String getName() { 1119 java.lang.Object ref = name_; 1120 if (!(ref instanceof java.lang.String)) { 1121 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1122 java.lang.String s = bs.toStringUtf8(); 1123 name_ = s; 1124 return s; 1125 } else { 1126 return (java.lang.String) ref; 1127 } 1128 } 1129 /** 1130 * 1131 * 1132 * <pre> 1133 * Optional. The unique identifier of the message. 1134 * Format: `projects/<Project ID>/locations/<Location 1135 * ID>/conversations/<Conversation ID>/messages/<Message ID>`. 1136 * </pre> 1137 * 1138 * <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 1139 * 1140 * @return The bytes for name. 1141 */ getNameBytes()1142 public com.google.protobuf.ByteString getNameBytes() { 1143 java.lang.Object ref = name_; 1144 if (ref instanceof String) { 1145 com.google.protobuf.ByteString b = 1146 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1147 name_ = b; 1148 return b; 1149 } else { 1150 return (com.google.protobuf.ByteString) ref; 1151 } 1152 } 1153 /** 1154 * 1155 * 1156 * <pre> 1157 * Optional. The unique identifier of the message. 1158 * Format: `projects/<Project ID>/locations/<Location 1159 * ID>/conversations/<Conversation ID>/messages/<Message ID>`. 1160 * </pre> 1161 * 1162 * <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 1163 * 1164 * @param value The name to set. 1165 * @return This builder for chaining. 1166 */ setName(java.lang.String value)1167 public Builder setName(java.lang.String value) { 1168 if (value == null) { 1169 throw new NullPointerException(); 1170 } 1171 name_ = value; 1172 bitField0_ |= 0x00000001; 1173 onChanged(); 1174 return this; 1175 } 1176 /** 1177 * 1178 * 1179 * <pre> 1180 * Optional. The unique identifier of the message. 1181 * Format: `projects/<Project ID>/locations/<Location 1182 * ID>/conversations/<Conversation ID>/messages/<Message ID>`. 1183 * </pre> 1184 * 1185 * <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 1186 * 1187 * @return This builder for chaining. 1188 */ clearName()1189 public Builder clearName() { 1190 name_ = getDefaultInstance().getName(); 1191 bitField0_ = (bitField0_ & ~0x00000001); 1192 onChanged(); 1193 return this; 1194 } 1195 /** 1196 * 1197 * 1198 * <pre> 1199 * Optional. The unique identifier of the message. 1200 * Format: `projects/<Project ID>/locations/<Location 1201 * ID>/conversations/<Conversation ID>/messages/<Message ID>`. 1202 * </pre> 1203 * 1204 * <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 1205 * 1206 * @param value The bytes for name to set. 1207 * @return This builder for chaining. 1208 */ setNameBytes(com.google.protobuf.ByteString value)1209 public Builder setNameBytes(com.google.protobuf.ByteString value) { 1210 if (value == null) { 1211 throw new NullPointerException(); 1212 } 1213 checkByteStringIsUtf8(value); 1214 name_ = value; 1215 bitField0_ |= 0x00000001; 1216 onChanged(); 1217 return this; 1218 } 1219 1220 private java.lang.Object content_ = ""; 1221 /** 1222 * 1223 * 1224 * <pre> 1225 * Required. The message content. 1226 * </pre> 1227 * 1228 * <code>string content = 2 [(.google.api.field_behavior) = REQUIRED];</code> 1229 * 1230 * @return The content. 1231 */ getContent()1232 public java.lang.String getContent() { 1233 java.lang.Object ref = content_; 1234 if (!(ref instanceof java.lang.String)) { 1235 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1236 java.lang.String s = bs.toStringUtf8(); 1237 content_ = s; 1238 return s; 1239 } else { 1240 return (java.lang.String) ref; 1241 } 1242 } 1243 /** 1244 * 1245 * 1246 * <pre> 1247 * Required. The message content. 1248 * </pre> 1249 * 1250 * <code>string content = 2 [(.google.api.field_behavior) = REQUIRED];</code> 1251 * 1252 * @return The bytes for content. 1253 */ getContentBytes()1254 public com.google.protobuf.ByteString getContentBytes() { 1255 java.lang.Object ref = content_; 1256 if (ref instanceof String) { 1257 com.google.protobuf.ByteString b = 1258 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1259 content_ = b; 1260 return b; 1261 } else { 1262 return (com.google.protobuf.ByteString) ref; 1263 } 1264 } 1265 /** 1266 * 1267 * 1268 * <pre> 1269 * Required. The message content. 1270 * </pre> 1271 * 1272 * <code>string content = 2 [(.google.api.field_behavior) = REQUIRED];</code> 1273 * 1274 * @param value The content to set. 1275 * @return This builder for chaining. 1276 */ setContent(java.lang.String value)1277 public Builder setContent(java.lang.String value) { 1278 if (value == null) { 1279 throw new NullPointerException(); 1280 } 1281 content_ = value; 1282 bitField0_ |= 0x00000002; 1283 onChanged(); 1284 return this; 1285 } 1286 /** 1287 * 1288 * 1289 * <pre> 1290 * Required. The message content. 1291 * </pre> 1292 * 1293 * <code>string content = 2 [(.google.api.field_behavior) = REQUIRED];</code> 1294 * 1295 * @return This builder for chaining. 1296 */ clearContent()1297 public Builder clearContent() { 1298 content_ = getDefaultInstance().getContent(); 1299 bitField0_ = (bitField0_ & ~0x00000002); 1300 onChanged(); 1301 return this; 1302 } 1303 /** 1304 * 1305 * 1306 * <pre> 1307 * Required. The message content. 1308 * </pre> 1309 * 1310 * <code>string content = 2 [(.google.api.field_behavior) = REQUIRED];</code> 1311 * 1312 * @param value The bytes for content to set. 1313 * @return This builder for chaining. 1314 */ setContentBytes(com.google.protobuf.ByteString value)1315 public Builder setContentBytes(com.google.protobuf.ByteString value) { 1316 if (value == null) { 1317 throw new NullPointerException(); 1318 } 1319 checkByteStringIsUtf8(value); 1320 content_ = value; 1321 bitField0_ |= 0x00000002; 1322 onChanged(); 1323 return this; 1324 } 1325 1326 private java.lang.Object languageCode_ = ""; 1327 /** 1328 * 1329 * 1330 * <pre> 1331 * Optional. The message language. 1332 * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) 1333 * language tag. Example: "en-US". 1334 * </pre> 1335 * 1336 * <code>string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1337 * 1338 * @return The languageCode. 1339 */ getLanguageCode()1340 public java.lang.String getLanguageCode() { 1341 java.lang.Object ref = languageCode_; 1342 if (!(ref instanceof java.lang.String)) { 1343 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1344 java.lang.String s = bs.toStringUtf8(); 1345 languageCode_ = s; 1346 return s; 1347 } else { 1348 return (java.lang.String) ref; 1349 } 1350 } 1351 /** 1352 * 1353 * 1354 * <pre> 1355 * Optional. The message language. 1356 * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) 1357 * language tag. Example: "en-US". 1358 * </pre> 1359 * 1360 * <code>string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1361 * 1362 * @return The bytes for languageCode. 1363 */ getLanguageCodeBytes()1364 public com.google.protobuf.ByteString getLanguageCodeBytes() { 1365 java.lang.Object ref = languageCode_; 1366 if (ref instanceof String) { 1367 com.google.protobuf.ByteString b = 1368 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1369 languageCode_ = b; 1370 return b; 1371 } else { 1372 return (com.google.protobuf.ByteString) ref; 1373 } 1374 } 1375 /** 1376 * 1377 * 1378 * <pre> 1379 * Optional. The message language. 1380 * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) 1381 * language tag. Example: "en-US". 1382 * </pre> 1383 * 1384 * <code>string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1385 * 1386 * @param value The languageCode to set. 1387 * @return This builder for chaining. 1388 */ setLanguageCode(java.lang.String value)1389 public Builder setLanguageCode(java.lang.String value) { 1390 if (value == null) { 1391 throw new NullPointerException(); 1392 } 1393 languageCode_ = value; 1394 bitField0_ |= 0x00000004; 1395 onChanged(); 1396 return this; 1397 } 1398 /** 1399 * 1400 * 1401 * <pre> 1402 * Optional. The message language. 1403 * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) 1404 * language tag. Example: "en-US". 1405 * </pre> 1406 * 1407 * <code>string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1408 * 1409 * @return This builder for chaining. 1410 */ clearLanguageCode()1411 public Builder clearLanguageCode() { 1412 languageCode_ = getDefaultInstance().getLanguageCode(); 1413 bitField0_ = (bitField0_ & ~0x00000004); 1414 onChanged(); 1415 return this; 1416 } 1417 /** 1418 * 1419 * 1420 * <pre> 1421 * Optional. The message language. 1422 * This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) 1423 * language tag. Example: "en-US". 1424 * </pre> 1425 * 1426 * <code>string language_code = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1427 * 1428 * @param value The bytes for languageCode to set. 1429 * @return This builder for chaining. 1430 */ setLanguageCodeBytes(com.google.protobuf.ByteString value)1431 public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { 1432 if (value == null) { 1433 throw new NullPointerException(); 1434 } 1435 checkByteStringIsUtf8(value); 1436 languageCode_ = value; 1437 bitField0_ |= 0x00000004; 1438 onChanged(); 1439 return this; 1440 } 1441 1442 private java.lang.Object participant_ = ""; 1443 /** 1444 * 1445 * 1446 * <pre> 1447 * Output only. The participant that sends this message. 1448 * </pre> 1449 * 1450 * <code>string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1451 * 1452 * @return The participant. 1453 */ getParticipant()1454 public java.lang.String getParticipant() { 1455 java.lang.Object ref = participant_; 1456 if (!(ref instanceof java.lang.String)) { 1457 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1458 java.lang.String s = bs.toStringUtf8(); 1459 participant_ = s; 1460 return s; 1461 } else { 1462 return (java.lang.String) ref; 1463 } 1464 } 1465 /** 1466 * 1467 * 1468 * <pre> 1469 * Output only. The participant that sends this message. 1470 * </pre> 1471 * 1472 * <code>string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1473 * 1474 * @return The bytes for participant. 1475 */ getParticipantBytes()1476 public com.google.protobuf.ByteString getParticipantBytes() { 1477 java.lang.Object ref = participant_; 1478 if (ref instanceof String) { 1479 com.google.protobuf.ByteString b = 1480 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1481 participant_ = b; 1482 return b; 1483 } else { 1484 return (com.google.protobuf.ByteString) ref; 1485 } 1486 } 1487 /** 1488 * 1489 * 1490 * <pre> 1491 * Output only. The participant that sends this message. 1492 * </pre> 1493 * 1494 * <code>string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1495 * 1496 * @param value The participant to set. 1497 * @return This builder for chaining. 1498 */ setParticipant(java.lang.String value)1499 public Builder setParticipant(java.lang.String value) { 1500 if (value == null) { 1501 throw new NullPointerException(); 1502 } 1503 participant_ = value; 1504 bitField0_ |= 0x00000008; 1505 onChanged(); 1506 return this; 1507 } 1508 /** 1509 * 1510 * 1511 * <pre> 1512 * Output only. The participant that sends this message. 1513 * </pre> 1514 * 1515 * <code>string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1516 * 1517 * @return This builder for chaining. 1518 */ clearParticipant()1519 public Builder clearParticipant() { 1520 participant_ = getDefaultInstance().getParticipant(); 1521 bitField0_ = (bitField0_ & ~0x00000008); 1522 onChanged(); 1523 return this; 1524 } 1525 /** 1526 * 1527 * 1528 * <pre> 1529 * Output only. The participant that sends this message. 1530 * </pre> 1531 * 1532 * <code>string participant = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1533 * 1534 * @param value The bytes for participant to set. 1535 * @return This builder for chaining. 1536 */ setParticipantBytes(com.google.protobuf.ByteString value)1537 public Builder setParticipantBytes(com.google.protobuf.ByteString value) { 1538 if (value == null) { 1539 throw new NullPointerException(); 1540 } 1541 checkByteStringIsUtf8(value); 1542 participant_ = value; 1543 bitField0_ |= 0x00000008; 1544 onChanged(); 1545 return this; 1546 } 1547 1548 private int participantRole_ = 0; 1549 /** 1550 * 1551 * 1552 * <pre> 1553 * Output only. The role of the participant. 1554 * </pre> 1555 * 1556 * <code> 1557 * .google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1558 * </code> 1559 * 1560 * @return The enum numeric value on the wire for participantRole. 1561 */ 1562 @java.lang.Override getParticipantRoleValue()1563 public int getParticipantRoleValue() { 1564 return participantRole_; 1565 } 1566 /** 1567 * 1568 * 1569 * <pre> 1570 * Output only. The role of the participant. 1571 * </pre> 1572 * 1573 * <code> 1574 * .google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1575 * </code> 1576 * 1577 * @param value The enum numeric value on the wire for participantRole to set. 1578 * @return This builder for chaining. 1579 */ setParticipantRoleValue(int value)1580 public Builder setParticipantRoleValue(int value) { 1581 participantRole_ = value; 1582 bitField0_ |= 0x00000010; 1583 onChanged(); 1584 return this; 1585 } 1586 /** 1587 * 1588 * 1589 * <pre> 1590 * Output only. The role of the participant. 1591 * </pre> 1592 * 1593 * <code> 1594 * .google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1595 * </code> 1596 * 1597 * @return The participantRole. 1598 */ 1599 @java.lang.Override getParticipantRole()1600 public com.google.cloud.dialogflow.v2.Participant.Role getParticipantRole() { 1601 com.google.cloud.dialogflow.v2.Participant.Role result = 1602 com.google.cloud.dialogflow.v2.Participant.Role.forNumber(participantRole_); 1603 return result == null ? com.google.cloud.dialogflow.v2.Participant.Role.UNRECOGNIZED : result; 1604 } 1605 /** 1606 * 1607 * 1608 * <pre> 1609 * Output only. The role of the participant. 1610 * </pre> 1611 * 1612 * <code> 1613 * .google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1614 * </code> 1615 * 1616 * @param value The participantRole to set. 1617 * @return This builder for chaining. 1618 */ setParticipantRole(com.google.cloud.dialogflow.v2.Participant.Role value)1619 public Builder setParticipantRole(com.google.cloud.dialogflow.v2.Participant.Role value) { 1620 if (value == null) { 1621 throw new NullPointerException(); 1622 } 1623 bitField0_ |= 0x00000010; 1624 participantRole_ = value.getNumber(); 1625 onChanged(); 1626 return this; 1627 } 1628 /** 1629 * 1630 * 1631 * <pre> 1632 * Output only. The role of the participant. 1633 * </pre> 1634 * 1635 * <code> 1636 * .google.cloud.dialogflow.v2.Participant.Role participant_role = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1637 * </code> 1638 * 1639 * @return This builder for chaining. 1640 */ clearParticipantRole()1641 public Builder clearParticipantRole() { 1642 bitField0_ = (bitField0_ & ~0x00000010); 1643 participantRole_ = 0; 1644 onChanged(); 1645 return this; 1646 } 1647 1648 private com.google.protobuf.Timestamp createTime_; 1649 private com.google.protobuf.SingleFieldBuilderV3< 1650 com.google.protobuf.Timestamp, 1651 com.google.protobuf.Timestamp.Builder, 1652 com.google.protobuf.TimestampOrBuilder> 1653 createTimeBuilder_; 1654 /** 1655 * 1656 * 1657 * <pre> 1658 * Output only. The time when the message was created in Contact Center AI. 1659 * </pre> 1660 * 1661 * <code> 1662 * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1663 * </code> 1664 * 1665 * @return Whether the createTime field is set. 1666 */ hasCreateTime()1667 public boolean hasCreateTime() { 1668 return ((bitField0_ & 0x00000020) != 0); 1669 } 1670 /** 1671 * 1672 * 1673 * <pre> 1674 * Output only. The time when the message was created in Contact Center AI. 1675 * </pre> 1676 * 1677 * <code> 1678 * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1679 * </code> 1680 * 1681 * @return The createTime. 1682 */ getCreateTime()1683 public com.google.protobuf.Timestamp getCreateTime() { 1684 if (createTimeBuilder_ == null) { 1685 return createTime_ == null 1686 ? com.google.protobuf.Timestamp.getDefaultInstance() 1687 : createTime_; 1688 } else { 1689 return createTimeBuilder_.getMessage(); 1690 } 1691 } 1692 /** 1693 * 1694 * 1695 * <pre> 1696 * Output only. The time when the message was created in Contact Center AI. 1697 * </pre> 1698 * 1699 * <code> 1700 * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1701 * </code> 1702 */ setCreateTime(com.google.protobuf.Timestamp value)1703 public Builder setCreateTime(com.google.protobuf.Timestamp value) { 1704 if (createTimeBuilder_ == null) { 1705 if (value == null) { 1706 throw new NullPointerException(); 1707 } 1708 createTime_ = value; 1709 } else { 1710 createTimeBuilder_.setMessage(value); 1711 } 1712 bitField0_ |= 0x00000020; 1713 onChanged(); 1714 return this; 1715 } 1716 /** 1717 * 1718 * 1719 * <pre> 1720 * Output only. The time when the message was created in Contact Center AI. 1721 * </pre> 1722 * 1723 * <code> 1724 * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1725 * </code> 1726 */ setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)1727 public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { 1728 if (createTimeBuilder_ == null) { 1729 createTime_ = builderForValue.build(); 1730 } else { 1731 createTimeBuilder_.setMessage(builderForValue.build()); 1732 } 1733 bitField0_ |= 0x00000020; 1734 onChanged(); 1735 return this; 1736 } 1737 /** 1738 * 1739 * 1740 * <pre> 1741 * Output only. The time when the message was created in Contact Center AI. 1742 * </pre> 1743 * 1744 * <code> 1745 * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1746 * </code> 1747 */ mergeCreateTime(com.google.protobuf.Timestamp value)1748 public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { 1749 if (createTimeBuilder_ == null) { 1750 if (((bitField0_ & 0x00000020) != 0) 1751 && createTime_ != null 1752 && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 1753 getCreateTimeBuilder().mergeFrom(value); 1754 } else { 1755 createTime_ = value; 1756 } 1757 } else { 1758 createTimeBuilder_.mergeFrom(value); 1759 } 1760 bitField0_ |= 0x00000020; 1761 onChanged(); 1762 return this; 1763 } 1764 /** 1765 * 1766 * 1767 * <pre> 1768 * Output only. The time when the message was created in Contact Center AI. 1769 * </pre> 1770 * 1771 * <code> 1772 * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1773 * </code> 1774 */ clearCreateTime()1775 public Builder clearCreateTime() { 1776 bitField0_ = (bitField0_ & ~0x00000020); 1777 createTime_ = null; 1778 if (createTimeBuilder_ != null) { 1779 createTimeBuilder_.dispose(); 1780 createTimeBuilder_ = null; 1781 } 1782 onChanged(); 1783 return this; 1784 } 1785 /** 1786 * 1787 * 1788 * <pre> 1789 * Output only. The time when the message was created in Contact Center AI. 1790 * </pre> 1791 * 1792 * <code> 1793 * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1794 * </code> 1795 */ getCreateTimeBuilder()1796 public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { 1797 bitField0_ |= 0x00000020; 1798 onChanged(); 1799 return getCreateTimeFieldBuilder().getBuilder(); 1800 } 1801 /** 1802 * 1803 * 1804 * <pre> 1805 * Output only. The time when the message was created in Contact Center AI. 1806 * </pre> 1807 * 1808 * <code> 1809 * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1810 * </code> 1811 */ getCreateTimeOrBuilder()1812 public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { 1813 if (createTimeBuilder_ != null) { 1814 return createTimeBuilder_.getMessageOrBuilder(); 1815 } else { 1816 return createTime_ == null 1817 ? com.google.protobuf.Timestamp.getDefaultInstance() 1818 : createTime_; 1819 } 1820 } 1821 /** 1822 * 1823 * 1824 * <pre> 1825 * Output only. The time when the message was created in Contact Center AI. 1826 * </pre> 1827 * 1828 * <code> 1829 * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1830 * </code> 1831 */ 1832 private com.google.protobuf.SingleFieldBuilderV3< 1833 com.google.protobuf.Timestamp, 1834 com.google.protobuf.Timestamp.Builder, 1835 com.google.protobuf.TimestampOrBuilder> getCreateTimeFieldBuilder()1836 getCreateTimeFieldBuilder() { 1837 if (createTimeBuilder_ == null) { 1838 createTimeBuilder_ = 1839 new com.google.protobuf.SingleFieldBuilderV3< 1840 com.google.protobuf.Timestamp, 1841 com.google.protobuf.Timestamp.Builder, 1842 com.google.protobuf.TimestampOrBuilder>( 1843 getCreateTime(), getParentForChildren(), isClean()); 1844 createTime_ = null; 1845 } 1846 return createTimeBuilder_; 1847 } 1848 1849 private com.google.protobuf.Timestamp sendTime_; 1850 private com.google.protobuf.SingleFieldBuilderV3< 1851 com.google.protobuf.Timestamp, 1852 com.google.protobuf.Timestamp.Builder, 1853 com.google.protobuf.TimestampOrBuilder> 1854 sendTimeBuilder_; 1855 /** 1856 * 1857 * 1858 * <pre> 1859 * Optional. The time when the message was sent. 1860 * </pre> 1861 * 1862 * <code>.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; 1863 * </code> 1864 * 1865 * @return Whether the sendTime field is set. 1866 */ hasSendTime()1867 public boolean hasSendTime() { 1868 return ((bitField0_ & 0x00000040) != 0); 1869 } 1870 /** 1871 * 1872 * 1873 * <pre> 1874 * Optional. The time when the message was sent. 1875 * </pre> 1876 * 1877 * <code>.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; 1878 * </code> 1879 * 1880 * @return The sendTime. 1881 */ getSendTime()1882 public com.google.protobuf.Timestamp getSendTime() { 1883 if (sendTimeBuilder_ == null) { 1884 return sendTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sendTime_; 1885 } else { 1886 return sendTimeBuilder_.getMessage(); 1887 } 1888 } 1889 /** 1890 * 1891 * 1892 * <pre> 1893 * Optional. The time when the message was sent. 1894 * </pre> 1895 * 1896 * <code>.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; 1897 * </code> 1898 */ setSendTime(com.google.protobuf.Timestamp value)1899 public Builder setSendTime(com.google.protobuf.Timestamp value) { 1900 if (sendTimeBuilder_ == null) { 1901 if (value == null) { 1902 throw new NullPointerException(); 1903 } 1904 sendTime_ = value; 1905 } else { 1906 sendTimeBuilder_.setMessage(value); 1907 } 1908 bitField0_ |= 0x00000040; 1909 onChanged(); 1910 return this; 1911 } 1912 /** 1913 * 1914 * 1915 * <pre> 1916 * Optional. The time when the message was sent. 1917 * </pre> 1918 * 1919 * <code>.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; 1920 * </code> 1921 */ setSendTime(com.google.protobuf.Timestamp.Builder builderForValue)1922 public Builder setSendTime(com.google.protobuf.Timestamp.Builder builderForValue) { 1923 if (sendTimeBuilder_ == null) { 1924 sendTime_ = builderForValue.build(); 1925 } else { 1926 sendTimeBuilder_.setMessage(builderForValue.build()); 1927 } 1928 bitField0_ |= 0x00000040; 1929 onChanged(); 1930 return this; 1931 } 1932 /** 1933 * 1934 * 1935 * <pre> 1936 * Optional. The time when the message was sent. 1937 * </pre> 1938 * 1939 * <code>.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; 1940 * </code> 1941 */ mergeSendTime(com.google.protobuf.Timestamp value)1942 public Builder mergeSendTime(com.google.protobuf.Timestamp value) { 1943 if (sendTimeBuilder_ == null) { 1944 if (((bitField0_ & 0x00000040) != 0) 1945 && sendTime_ != null 1946 && sendTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 1947 getSendTimeBuilder().mergeFrom(value); 1948 } else { 1949 sendTime_ = value; 1950 } 1951 } else { 1952 sendTimeBuilder_.mergeFrom(value); 1953 } 1954 bitField0_ |= 0x00000040; 1955 onChanged(); 1956 return this; 1957 } 1958 /** 1959 * 1960 * 1961 * <pre> 1962 * Optional. The time when the message was sent. 1963 * </pre> 1964 * 1965 * <code>.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; 1966 * </code> 1967 */ clearSendTime()1968 public Builder clearSendTime() { 1969 bitField0_ = (bitField0_ & ~0x00000040); 1970 sendTime_ = null; 1971 if (sendTimeBuilder_ != null) { 1972 sendTimeBuilder_.dispose(); 1973 sendTimeBuilder_ = null; 1974 } 1975 onChanged(); 1976 return this; 1977 } 1978 /** 1979 * 1980 * 1981 * <pre> 1982 * Optional. The time when the message was sent. 1983 * </pre> 1984 * 1985 * <code>.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; 1986 * </code> 1987 */ getSendTimeBuilder()1988 public com.google.protobuf.Timestamp.Builder getSendTimeBuilder() { 1989 bitField0_ |= 0x00000040; 1990 onChanged(); 1991 return getSendTimeFieldBuilder().getBuilder(); 1992 } 1993 /** 1994 * 1995 * 1996 * <pre> 1997 * Optional. The time when the message was sent. 1998 * </pre> 1999 * 2000 * <code>.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; 2001 * </code> 2002 */ getSendTimeOrBuilder()2003 public com.google.protobuf.TimestampOrBuilder getSendTimeOrBuilder() { 2004 if (sendTimeBuilder_ != null) { 2005 return sendTimeBuilder_.getMessageOrBuilder(); 2006 } else { 2007 return sendTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : sendTime_; 2008 } 2009 } 2010 /** 2011 * 2012 * 2013 * <pre> 2014 * Optional. The time when the message was sent. 2015 * </pre> 2016 * 2017 * <code>.google.protobuf.Timestamp send_time = 9 [(.google.api.field_behavior) = OPTIONAL]; 2018 * </code> 2019 */ 2020 private com.google.protobuf.SingleFieldBuilderV3< 2021 com.google.protobuf.Timestamp, 2022 com.google.protobuf.Timestamp.Builder, 2023 com.google.protobuf.TimestampOrBuilder> getSendTimeFieldBuilder()2024 getSendTimeFieldBuilder() { 2025 if (sendTimeBuilder_ == null) { 2026 sendTimeBuilder_ = 2027 new com.google.protobuf.SingleFieldBuilderV3< 2028 com.google.protobuf.Timestamp, 2029 com.google.protobuf.Timestamp.Builder, 2030 com.google.protobuf.TimestampOrBuilder>( 2031 getSendTime(), getParentForChildren(), isClean()); 2032 sendTime_ = null; 2033 } 2034 return sendTimeBuilder_; 2035 } 2036 2037 private com.google.cloud.dialogflow.v2.MessageAnnotation messageAnnotation_; 2038 private com.google.protobuf.SingleFieldBuilderV3< 2039 com.google.cloud.dialogflow.v2.MessageAnnotation, 2040 com.google.cloud.dialogflow.v2.MessageAnnotation.Builder, 2041 com.google.cloud.dialogflow.v2.MessageAnnotationOrBuilder> 2042 messageAnnotationBuilder_; 2043 /** 2044 * 2045 * 2046 * <pre> 2047 * Output only. The annotation for the message. 2048 * </pre> 2049 * 2050 * <code> 2051 * .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2052 * </code> 2053 * 2054 * @return Whether the messageAnnotation field is set. 2055 */ hasMessageAnnotation()2056 public boolean hasMessageAnnotation() { 2057 return ((bitField0_ & 0x00000080) != 0); 2058 } 2059 /** 2060 * 2061 * 2062 * <pre> 2063 * Output only. The annotation for the message. 2064 * </pre> 2065 * 2066 * <code> 2067 * .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2068 * </code> 2069 * 2070 * @return The messageAnnotation. 2071 */ getMessageAnnotation()2072 public com.google.cloud.dialogflow.v2.MessageAnnotation getMessageAnnotation() { 2073 if (messageAnnotationBuilder_ == null) { 2074 return messageAnnotation_ == null 2075 ? com.google.cloud.dialogflow.v2.MessageAnnotation.getDefaultInstance() 2076 : messageAnnotation_; 2077 } else { 2078 return messageAnnotationBuilder_.getMessage(); 2079 } 2080 } 2081 /** 2082 * 2083 * 2084 * <pre> 2085 * Output only. The annotation for the message. 2086 * </pre> 2087 * 2088 * <code> 2089 * .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2090 * </code> 2091 */ setMessageAnnotation(com.google.cloud.dialogflow.v2.MessageAnnotation value)2092 public Builder setMessageAnnotation(com.google.cloud.dialogflow.v2.MessageAnnotation value) { 2093 if (messageAnnotationBuilder_ == null) { 2094 if (value == null) { 2095 throw new NullPointerException(); 2096 } 2097 messageAnnotation_ = value; 2098 } else { 2099 messageAnnotationBuilder_.setMessage(value); 2100 } 2101 bitField0_ |= 0x00000080; 2102 onChanged(); 2103 return this; 2104 } 2105 /** 2106 * 2107 * 2108 * <pre> 2109 * Output only. The annotation for the message. 2110 * </pre> 2111 * 2112 * <code> 2113 * .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2114 * </code> 2115 */ setMessageAnnotation( com.google.cloud.dialogflow.v2.MessageAnnotation.Builder builderForValue)2116 public Builder setMessageAnnotation( 2117 com.google.cloud.dialogflow.v2.MessageAnnotation.Builder builderForValue) { 2118 if (messageAnnotationBuilder_ == null) { 2119 messageAnnotation_ = builderForValue.build(); 2120 } else { 2121 messageAnnotationBuilder_.setMessage(builderForValue.build()); 2122 } 2123 bitField0_ |= 0x00000080; 2124 onChanged(); 2125 return this; 2126 } 2127 /** 2128 * 2129 * 2130 * <pre> 2131 * Output only. The annotation for the message. 2132 * </pre> 2133 * 2134 * <code> 2135 * .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2136 * </code> 2137 */ mergeMessageAnnotation(com.google.cloud.dialogflow.v2.MessageAnnotation value)2138 public Builder mergeMessageAnnotation(com.google.cloud.dialogflow.v2.MessageAnnotation value) { 2139 if (messageAnnotationBuilder_ == null) { 2140 if (((bitField0_ & 0x00000080) != 0) 2141 && messageAnnotation_ != null 2142 && messageAnnotation_ 2143 != com.google.cloud.dialogflow.v2.MessageAnnotation.getDefaultInstance()) { 2144 getMessageAnnotationBuilder().mergeFrom(value); 2145 } else { 2146 messageAnnotation_ = value; 2147 } 2148 } else { 2149 messageAnnotationBuilder_.mergeFrom(value); 2150 } 2151 bitField0_ |= 0x00000080; 2152 onChanged(); 2153 return this; 2154 } 2155 /** 2156 * 2157 * 2158 * <pre> 2159 * Output only. The annotation for the message. 2160 * </pre> 2161 * 2162 * <code> 2163 * .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2164 * </code> 2165 */ clearMessageAnnotation()2166 public Builder clearMessageAnnotation() { 2167 bitField0_ = (bitField0_ & ~0x00000080); 2168 messageAnnotation_ = null; 2169 if (messageAnnotationBuilder_ != null) { 2170 messageAnnotationBuilder_.dispose(); 2171 messageAnnotationBuilder_ = null; 2172 } 2173 onChanged(); 2174 return this; 2175 } 2176 /** 2177 * 2178 * 2179 * <pre> 2180 * Output only. The annotation for the message. 2181 * </pre> 2182 * 2183 * <code> 2184 * .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2185 * </code> 2186 */ getMessageAnnotationBuilder()2187 public com.google.cloud.dialogflow.v2.MessageAnnotation.Builder getMessageAnnotationBuilder() { 2188 bitField0_ |= 0x00000080; 2189 onChanged(); 2190 return getMessageAnnotationFieldBuilder().getBuilder(); 2191 } 2192 /** 2193 * 2194 * 2195 * <pre> 2196 * Output only. The annotation for the message. 2197 * </pre> 2198 * 2199 * <code> 2200 * .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2201 * </code> 2202 */ 2203 public com.google.cloud.dialogflow.v2.MessageAnnotationOrBuilder getMessageAnnotationOrBuilder()2204 getMessageAnnotationOrBuilder() { 2205 if (messageAnnotationBuilder_ != null) { 2206 return messageAnnotationBuilder_.getMessageOrBuilder(); 2207 } else { 2208 return messageAnnotation_ == null 2209 ? com.google.cloud.dialogflow.v2.MessageAnnotation.getDefaultInstance() 2210 : messageAnnotation_; 2211 } 2212 } 2213 /** 2214 * 2215 * 2216 * <pre> 2217 * Output only. The annotation for the message. 2218 * </pre> 2219 * 2220 * <code> 2221 * .google.cloud.dialogflow.v2.MessageAnnotation message_annotation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2222 * </code> 2223 */ 2224 private com.google.protobuf.SingleFieldBuilderV3< 2225 com.google.cloud.dialogflow.v2.MessageAnnotation, 2226 com.google.cloud.dialogflow.v2.MessageAnnotation.Builder, 2227 com.google.cloud.dialogflow.v2.MessageAnnotationOrBuilder> getMessageAnnotationFieldBuilder()2228 getMessageAnnotationFieldBuilder() { 2229 if (messageAnnotationBuilder_ == null) { 2230 messageAnnotationBuilder_ = 2231 new com.google.protobuf.SingleFieldBuilderV3< 2232 com.google.cloud.dialogflow.v2.MessageAnnotation, 2233 com.google.cloud.dialogflow.v2.MessageAnnotation.Builder, 2234 com.google.cloud.dialogflow.v2.MessageAnnotationOrBuilder>( 2235 getMessageAnnotation(), getParentForChildren(), isClean()); 2236 messageAnnotation_ = null; 2237 } 2238 return messageAnnotationBuilder_; 2239 } 2240 2241 private com.google.cloud.dialogflow.v2.SentimentAnalysisResult sentimentAnalysis_; 2242 private com.google.protobuf.SingleFieldBuilderV3< 2243 com.google.cloud.dialogflow.v2.SentimentAnalysisResult, 2244 com.google.cloud.dialogflow.v2.SentimentAnalysisResult.Builder, 2245 com.google.cloud.dialogflow.v2.SentimentAnalysisResultOrBuilder> 2246 sentimentAnalysisBuilder_; 2247 /** 2248 * 2249 * 2250 * <pre> 2251 * Output only. The sentiment analysis result for the message. 2252 * </pre> 2253 * 2254 * <code> 2255 * .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2256 * </code> 2257 * 2258 * @return Whether the sentimentAnalysis field is set. 2259 */ hasSentimentAnalysis()2260 public boolean hasSentimentAnalysis() { 2261 return ((bitField0_ & 0x00000100) != 0); 2262 } 2263 /** 2264 * 2265 * 2266 * <pre> 2267 * Output only. The sentiment analysis result for the message. 2268 * </pre> 2269 * 2270 * <code> 2271 * .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2272 * </code> 2273 * 2274 * @return The sentimentAnalysis. 2275 */ getSentimentAnalysis()2276 public com.google.cloud.dialogflow.v2.SentimentAnalysisResult getSentimentAnalysis() { 2277 if (sentimentAnalysisBuilder_ == null) { 2278 return sentimentAnalysis_ == null 2279 ? com.google.cloud.dialogflow.v2.SentimentAnalysisResult.getDefaultInstance() 2280 : sentimentAnalysis_; 2281 } else { 2282 return sentimentAnalysisBuilder_.getMessage(); 2283 } 2284 } 2285 /** 2286 * 2287 * 2288 * <pre> 2289 * Output only. The sentiment analysis result for the message. 2290 * </pre> 2291 * 2292 * <code> 2293 * .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2294 * </code> 2295 */ setSentimentAnalysis( com.google.cloud.dialogflow.v2.SentimentAnalysisResult value)2296 public Builder setSentimentAnalysis( 2297 com.google.cloud.dialogflow.v2.SentimentAnalysisResult value) { 2298 if (sentimentAnalysisBuilder_ == null) { 2299 if (value == null) { 2300 throw new NullPointerException(); 2301 } 2302 sentimentAnalysis_ = value; 2303 } else { 2304 sentimentAnalysisBuilder_.setMessage(value); 2305 } 2306 bitField0_ |= 0x00000100; 2307 onChanged(); 2308 return this; 2309 } 2310 /** 2311 * 2312 * 2313 * <pre> 2314 * Output only. The sentiment analysis result for the message. 2315 * </pre> 2316 * 2317 * <code> 2318 * .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2319 * </code> 2320 */ setSentimentAnalysis( com.google.cloud.dialogflow.v2.SentimentAnalysisResult.Builder builderForValue)2321 public Builder setSentimentAnalysis( 2322 com.google.cloud.dialogflow.v2.SentimentAnalysisResult.Builder builderForValue) { 2323 if (sentimentAnalysisBuilder_ == null) { 2324 sentimentAnalysis_ = builderForValue.build(); 2325 } else { 2326 sentimentAnalysisBuilder_.setMessage(builderForValue.build()); 2327 } 2328 bitField0_ |= 0x00000100; 2329 onChanged(); 2330 return this; 2331 } 2332 /** 2333 * 2334 * 2335 * <pre> 2336 * Output only. The sentiment analysis result for the message. 2337 * </pre> 2338 * 2339 * <code> 2340 * .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2341 * </code> 2342 */ mergeSentimentAnalysis( com.google.cloud.dialogflow.v2.SentimentAnalysisResult value)2343 public Builder mergeSentimentAnalysis( 2344 com.google.cloud.dialogflow.v2.SentimentAnalysisResult value) { 2345 if (sentimentAnalysisBuilder_ == null) { 2346 if (((bitField0_ & 0x00000100) != 0) 2347 && sentimentAnalysis_ != null 2348 && sentimentAnalysis_ 2349 != com.google.cloud.dialogflow.v2.SentimentAnalysisResult.getDefaultInstance()) { 2350 getSentimentAnalysisBuilder().mergeFrom(value); 2351 } else { 2352 sentimentAnalysis_ = value; 2353 } 2354 } else { 2355 sentimentAnalysisBuilder_.mergeFrom(value); 2356 } 2357 bitField0_ |= 0x00000100; 2358 onChanged(); 2359 return this; 2360 } 2361 /** 2362 * 2363 * 2364 * <pre> 2365 * Output only. The sentiment analysis result for the message. 2366 * </pre> 2367 * 2368 * <code> 2369 * .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2370 * </code> 2371 */ clearSentimentAnalysis()2372 public Builder clearSentimentAnalysis() { 2373 bitField0_ = (bitField0_ & ~0x00000100); 2374 sentimentAnalysis_ = null; 2375 if (sentimentAnalysisBuilder_ != null) { 2376 sentimentAnalysisBuilder_.dispose(); 2377 sentimentAnalysisBuilder_ = null; 2378 } 2379 onChanged(); 2380 return this; 2381 } 2382 /** 2383 * 2384 * 2385 * <pre> 2386 * Output only. The sentiment analysis result for the message. 2387 * </pre> 2388 * 2389 * <code> 2390 * .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2391 * </code> 2392 */ 2393 public com.google.cloud.dialogflow.v2.SentimentAnalysisResult.Builder getSentimentAnalysisBuilder()2394 getSentimentAnalysisBuilder() { 2395 bitField0_ |= 0x00000100; 2396 onChanged(); 2397 return getSentimentAnalysisFieldBuilder().getBuilder(); 2398 } 2399 /** 2400 * 2401 * 2402 * <pre> 2403 * Output only. The sentiment analysis result for the message. 2404 * </pre> 2405 * 2406 * <code> 2407 * .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2408 * </code> 2409 */ 2410 public com.google.cloud.dialogflow.v2.SentimentAnalysisResultOrBuilder getSentimentAnalysisOrBuilder()2411 getSentimentAnalysisOrBuilder() { 2412 if (sentimentAnalysisBuilder_ != null) { 2413 return sentimentAnalysisBuilder_.getMessageOrBuilder(); 2414 } else { 2415 return sentimentAnalysis_ == null 2416 ? com.google.cloud.dialogflow.v2.SentimentAnalysisResult.getDefaultInstance() 2417 : sentimentAnalysis_; 2418 } 2419 } 2420 /** 2421 * 2422 * 2423 * <pre> 2424 * Output only. The sentiment analysis result for the message. 2425 * </pre> 2426 * 2427 * <code> 2428 * .google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2429 * </code> 2430 */ 2431 private com.google.protobuf.SingleFieldBuilderV3< 2432 com.google.cloud.dialogflow.v2.SentimentAnalysisResult, 2433 com.google.cloud.dialogflow.v2.SentimentAnalysisResult.Builder, 2434 com.google.cloud.dialogflow.v2.SentimentAnalysisResultOrBuilder> getSentimentAnalysisFieldBuilder()2435 getSentimentAnalysisFieldBuilder() { 2436 if (sentimentAnalysisBuilder_ == null) { 2437 sentimentAnalysisBuilder_ = 2438 new com.google.protobuf.SingleFieldBuilderV3< 2439 com.google.cloud.dialogflow.v2.SentimentAnalysisResult, 2440 com.google.cloud.dialogflow.v2.SentimentAnalysisResult.Builder, 2441 com.google.cloud.dialogflow.v2.SentimentAnalysisResultOrBuilder>( 2442 getSentimentAnalysis(), getParentForChildren(), isClean()); 2443 sentimentAnalysis_ = null; 2444 } 2445 return sentimentAnalysisBuilder_; 2446 } 2447 2448 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2449 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 2450 return super.setUnknownFields(unknownFields); 2451 } 2452 2453 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2454 public final Builder mergeUnknownFields( 2455 final com.google.protobuf.UnknownFieldSet unknownFields) { 2456 return super.mergeUnknownFields(unknownFields); 2457 } 2458 2459 // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Message) 2460 } 2461 2462 // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Message) 2463 private static final com.google.cloud.dialogflow.v2.Message DEFAULT_INSTANCE; 2464 2465 static { 2466 DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Message(); 2467 } 2468 getDefaultInstance()2469 public static com.google.cloud.dialogflow.v2.Message getDefaultInstance() { 2470 return DEFAULT_INSTANCE; 2471 } 2472 2473 private static final com.google.protobuf.Parser<Message> PARSER = 2474 new com.google.protobuf.AbstractParser<Message>() { 2475 @java.lang.Override 2476 public Message parsePartialFrom( 2477 com.google.protobuf.CodedInputStream input, 2478 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2479 throws com.google.protobuf.InvalidProtocolBufferException { 2480 Builder builder = newBuilder(); 2481 try { 2482 builder.mergeFrom(input, extensionRegistry); 2483 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2484 throw e.setUnfinishedMessage(builder.buildPartial()); 2485 } catch (com.google.protobuf.UninitializedMessageException e) { 2486 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2487 } catch (java.io.IOException e) { 2488 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2489 .setUnfinishedMessage(builder.buildPartial()); 2490 } 2491 return builder.buildPartial(); 2492 } 2493 }; 2494 parser()2495 public static com.google.protobuf.Parser<Message> parser() { 2496 return PARSER; 2497 } 2498 2499 @java.lang.Override getParserForType()2500 public com.google.protobuf.Parser<Message> getParserForType() { 2501 return PARSER; 2502 } 2503 2504 @java.lang.Override getDefaultInstanceForType()2505 public com.google.cloud.dialogflow.v2.Message getDefaultInstanceForType() { 2506 return DEFAULT_INSTANCE; 2507 } 2508 } 2509