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 conversation participant (human agent, virtual agent, end-user). 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.dialogflow.v2.Participant} 29 */ 30 public final class Participant extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Participant) 33 ParticipantOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use Participant.newBuilder() to construct. Participant(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private Participant(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 Participant()40 private Participant() { 41 name_ = ""; 42 role_ = 0; 43 sipRecordingMediaLabel_ = ""; 44 obfuscatedExternalUserId_ = ""; 45 } 46 47 @java.lang.Override 48 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)49 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 50 return new Participant(); 51 } 52 53 @java.lang.Override getUnknownFields()54 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 55 return this.unknownFields; 56 } 57 getDescriptor()58 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 59 return com.google.cloud.dialogflow.v2.ParticipantProto 60 .internal_static_google_cloud_dialogflow_v2_Participant_descriptor; 61 } 62 63 @SuppressWarnings({"rawtypes"}) 64 @java.lang.Override internalGetMapField(int number)65 protected com.google.protobuf.MapField internalGetMapField(int number) { 66 switch (number) { 67 case 8: 68 return internalGetDocumentsMetadataFilters(); 69 default: 70 throw new RuntimeException("Invalid map field number: " + number); 71 } 72 } 73 74 @java.lang.Override 75 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()76 internalGetFieldAccessorTable() { 77 return com.google.cloud.dialogflow.v2.ParticipantProto 78 .internal_static_google_cloud_dialogflow_v2_Participant_fieldAccessorTable 79 .ensureFieldAccessorsInitialized( 80 com.google.cloud.dialogflow.v2.Participant.class, 81 com.google.cloud.dialogflow.v2.Participant.Builder.class); 82 } 83 84 /** 85 * 86 * 87 * <pre> 88 * Enumeration of the roles a participant can play in a conversation. 89 * </pre> 90 * 91 * Protobuf enum {@code google.cloud.dialogflow.v2.Participant.Role} 92 */ 93 public enum Role implements com.google.protobuf.ProtocolMessageEnum { 94 /** 95 * 96 * 97 * <pre> 98 * Participant role not set. 99 * </pre> 100 * 101 * <code>ROLE_UNSPECIFIED = 0;</code> 102 */ 103 ROLE_UNSPECIFIED(0), 104 /** 105 * 106 * 107 * <pre> 108 * Participant is a human agent. 109 * </pre> 110 * 111 * <code>HUMAN_AGENT = 1;</code> 112 */ 113 HUMAN_AGENT(1), 114 /** 115 * 116 * 117 * <pre> 118 * Participant is an automated agent, such as a Dialogflow agent. 119 * </pre> 120 * 121 * <code>AUTOMATED_AGENT = 2;</code> 122 */ 123 AUTOMATED_AGENT(2), 124 /** 125 * 126 * 127 * <pre> 128 * Participant is an end user that has called or chatted with 129 * Dialogflow services. 130 * </pre> 131 * 132 * <code>END_USER = 3;</code> 133 */ 134 END_USER(3), 135 UNRECOGNIZED(-1), 136 ; 137 138 /** 139 * 140 * 141 * <pre> 142 * Participant role not set. 143 * </pre> 144 * 145 * <code>ROLE_UNSPECIFIED = 0;</code> 146 */ 147 public static final int ROLE_UNSPECIFIED_VALUE = 0; 148 /** 149 * 150 * 151 * <pre> 152 * Participant is a human agent. 153 * </pre> 154 * 155 * <code>HUMAN_AGENT = 1;</code> 156 */ 157 public static final int HUMAN_AGENT_VALUE = 1; 158 /** 159 * 160 * 161 * <pre> 162 * Participant is an automated agent, such as a Dialogflow agent. 163 * </pre> 164 * 165 * <code>AUTOMATED_AGENT = 2;</code> 166 */ 167 public static final int AUTOMATED_AGENT_VALUE = 2; 168 /** 169 * 170 * 171 * <pre> 172 * Participant is an end user that has called or chatted with 173 * Dialogflow services. 174 * </pre> 175 * 176 * <code>END_USER = 3;</code> 177 */ 178 public static final int END_USER_VALUE = 3; 179 getNumber()180 public final int getNumber() { 181 if (this == UNRECOGNIZED) { 182 throw new java.lang.IllegalArgumentException( 183 "Can't get the number of an unknown enum value."); 184 } 185 return value; 186 } 187 188 /** 189 * @param value The numeric wire value of the corresponding enum entry. 190 * @return The enum associated with the given numeric wire value. 191 * @deprecated Use {@link #forNumber(int)} instead. 192 */ 193 @java.lang.Deprecated valueOf(int value)194 public static Role valueOf(int value) { 195 return forNumber(value); 196 } 197 198 /** 199 * @param value The numeric wire value of the corresponding enum entry. 200 * @return The enum associated with the given numeric wire value. 201 */ forNumber(int value)202 public static Role forNumber(int value) { 203 switch (value) { 204 case 0: 205 return ROLE_UNSPECIFIED; 206 case 1: 207 return HUMAN_AGENT; 208 case 2: 209 return AUTOMATED_AGENT; 210 case 3: 211 return END_USER; 212 default: 213 return null; 214 } 215 } 216 internalGetValueMap()217 public static com.google.protobuf.Internal.EnumLiteMap<Role> internalGetValueMap() { 218 return internalValueMap; 219 } 220 221 private static final com.google.protobuf.Internal.EnumLiteMap<Role> internalValueMap = 222 new com.google.protobuf.Internal.EnumLiteMap<Role>() { 223 public Role findValueByNumber(int number) { 224 return Role.forNumber(number); 225 } 226 }; 227 getValueDescriptor()228 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 229 if (this == UNRECOGNIZED) { 230 throw new java.lang.IllegalStateException( 231 "Can't get the descriptor of an unrecognized enum value."); 232 } 233 return getDescriptor().getValues().get(ordinal()); 234 } 235 getDescriptorForType()236 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 237 return getDescriptor(); 238 } 239 getDescriptor()240 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 241 return com.google.cloud.dialogflow.v2.Participant.getDescriptor().getEnumTypes().get(0); 242 } 243 244 private static final Role[] VALUES = values(); 245 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)246 public static Role valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 247 if (desc.getType() != getDescriptor()) { 248 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 249 } 250 if (desc.getIndex() == -1) { 251 return UNRECOGNIZED; 252 } 253 return VALUES[desc.getIndex()]; 254 } 255 256 private final int value; 257 Role(int value)258 private Role(int value) { 259 this.value = value; 260 } 261 262 // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2.Participant.Role) 263 } 264 265 public static final int NAME_FIELD_NUMBER = 1; 266 267 @SuppressWarnings("serial") 268 private volatile java.lang.Object name_ = ""; 269 /** 270 * 271 * 272 * <pre> 273 * Optional. The unique identifier of this participant. 274 * Format: `projects/<Project ID>/locations/<Location 275 * ID>/conversations/<Conversation ID>/participants/<Participant ID>`. 276 * </pre> 277 * 278 * <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 279 * 280 * @return The name. 281 */ 282 @java.lang.Override getName()283 public java.lang.String getName() { 284 java.lang.Object ref = name_; 285 if (ref instanceof java.lang.String) { 286 return (java.lang.String) ref; 287 } else { 288 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 289 java.lang.String s = bs.toStringUtf8(); 290 name_ = s; 291 return s; 292 } 293 } 294 /** 295 * 296 * 297 * <pre> 298 * Optional. The unique identifier of this participant. 299 * Format: `projects/<Project ID>/locations/<Location 300 * ID>/conversations/<Conversation ID>/participants/<Participant ID>`. 301 * </pre> 302 * 303 * <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 304 * 305 * @return The bytes for name. 306 */ 307 @java.lang.Override getNameBytes()308 public com.google.protobuf.ByteString getNameBytes() { 309 java.lang.Object ref = name_; 310 if (ref instanceof java.lang.String) { 311 com.google.protobuf.ByteString b = 312 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 313 name_ = b; 314 return b; 315 } else { 316 return (com.google.protobuf.ByteString) ref; 317 } 318 } 319 320 public static final int ROLE_FIELD_NUMBER = 2; 321 private int role_ = 0; 322 /** 323 * 324 * 325 * <pre> 326 * Immutable. The role this participant plays in the conversation. This field 327 * must be set during participant creation and is then immutable. 328 * </pre> 329 * 330 * <code> 331 * .google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE]; 332 * </code> 333 * 334 * @return The enum numeric value on the wire for role. 335 */ 336 @java.lang.Override getRoleValue()337 public int getRoleValue() { 338 return role_; 339 } 340 /** 341 * 342 * 343 * <pre> 344 * Immutable. The role this participant plays in the conversation. This field 345 * must be set during participant creation and is then immutable. 346 * </pre> 347 * 348 * <code> 349 * .google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE]; 350 * </code> 351 * 352 * @return The role. 353 */ 354 @java.lang.Override getRole()355 public com.google.cloud.dialogflow.v2.Participant.Role getRole() { 356 com.google.cloud.dialogflow.v2.Participant.Role result = 357 com.google.cloud.dialogflow.v2.Participant.Role.forNumber(role_); 358 return result == null ? com.google.cloud.dialogflow.v2.Participant.Role.UNRECOGNIZED : result; 359 } 360 361 public static final int SIP_RECORDING_MEDIA_LABEL_FIELD_NUMBER = 6; 362 363 @SuppressWarnings("serial") 364 private volatile java.lang.Object sipRecordingMediaLabel_ = ""; 365 /** 366 * 367 * 368 * <pre> 369 * Optional. Label applied to streams representing this participant in SIPREC 370 * XML metadata and SDP. This is used to assign transcriptions from that 371 * media stream to this participant. This field can be updated. 372 * </pre> 373 * 374 * <code>string sip_recording_media_label = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 375 * 376 * @return The sipRecordingMediaLabel. 377 */ 378 @java.lang.Override getSipRecordingMediaLabel()379 public java.lang.String getSipRecordingMediaLabel() { 380 java.lang.Object ref = sipRecordingMediaLabel_; 381 if (ref instanceof java.lang.String) { 382 return (java.lang.String) ref; 383 } else { 384 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 385 java.lang.String s = bs.toStringUtf8(); 386 sipRecordingMediaLabel_ = s; 387 return s; 388 } 389 } 390 /** 391 * 392 * 393 * <pre> 394 * Optional. Label applied to streams representing this participant in SIPREC 395 * XML metadata and SDP. This is used to assign transcriptions from that 396 * media stream to this participant. This field can be updated. 397 * </pre> 398 * 399 * <code>string sip_recording_media_label = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 400 * 401 * @return The bytes for sipRecordingMediaLabel. 402 */ 403 @java.lang.Override getSipRecordingMediaLabelBytes()404 public com.google.protobuf.ByteString getSipRecordingMediaLabelBytes() { 405 java.lang.Object ref = sipRecordingMediaLabel_; 406 if (ref instanceof java.lang.String) { 407 com.google.protobuf.ByteString b = 408 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 409 sipRecordingMediaLabel_ = b; 410 return b; 411 } else { 412 return (com.google.protobuf.ByteString) ref; 413 } 414 } 415 416 public static final int OBFUSCATED_EXTERNAL_USER_ID_FIELD_NUMBER = 7; 417 418 @SuppressWarnings("serial") 419 private volatile java.lang.Object obfuscatedExternalUserId_ = ""; 420 /** 421 * 422 * 423 * <pre> 424 * Optional. Obfuscated user id that should be associated with the created 425 * participant. 426 * You can specify a user id as follows: 427 * 1. If you set this field in 428 * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] 429 * or 430 * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], 431 * Dialogflow adds the obfuscated user id with the participant. 432 * 2. If you set this field in 433 * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] 434 * or 435 * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], 436 * Dialogflow will update 437 * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. 438 * Dialogflow returns an error if you try to add a user id for a 439 * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] 440 * participant. 441 * Dialogflow uses this user id for billing and measurement purposes. For 442 * example, Dialogflow determines whether a user in one conversation returned 443 * in a later conversation. 444 * Note: 445 * * Please never pass raw user ids to Dialogflow. Always obfuscate your user 446 * id first. 447 * * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a 448 * hash function like SHA-512. 449 * * The length of the user id must be <= 256 characters. 450 * </pre> 451 * 452 * <code>string obfuscated_external_user_id = 7 [(.google.api.field_behavior) = OPTIONAL];</code> 453 * 454 * @return The obfuscatedExternalUserId. 455 */ 456 @java.lang.Override getObfuscatedExternalUserId()457 public java.lang.String getObfuscatedExternalUserId() { 458 java.lang.Object ref = obfuscatedExternalUserId_; 459 if (ref instanceof java.lang.String) { 460 return (java.lang.String) ref; 461 } else { 462 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 463 java.lang.String s = bs.toStringUtf8(); 464 obfuscatedExternalUserId_ = s; 465 return s; 466 } 467 } 468 /** 469 * 470 * 471 * <pre> 472 * Optional. Obfuscated user id that should be associated with the created 473 * participant. 474 * You can specify a user id as follows: 475 * 1. If you set this field in 476 * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] 477 * or 478 * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], 479 * Dialogflow adds the obfuscated user id with the participant. 480 * 2. If you set this field in 481 * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] 482 * or 483 * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], 484 * Dialogflow will update 485 * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. 486 * Dialogflow returns an error if you try to add a user id for a 487 * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] 488 * participant. 489 * Dialogflow uses this user id for billing and measurement purposes. For 490 * example, Dialogflow determines whether a user in one conversation returned 491 * in a later conversation. 492 * Note: 493 * * Please never pass raw user ids to Dialogflow. Always obfuscate your user 494 * id first. 495 * * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a 496 * hash function like SHA-512. 497 * * The length of the user id must be <= 256 characters. 498 * </pre> 499 * 500 * <code>string obfuscated_external_user_id = 7 [(.google.api.field_behavior) = OPTIONAL];</code> 501 * 502 * @return The bytes for obfuscatedExternalUserId. 503 */ 504 @java.lang.Override getObfuscatedExternalUserIdBytes()505 public com.google.protobuf.ByteString getObfuscatedExternalUserIdBytes() { 506 java.lang.Object ref = obfuscatedExternalUserId_; 507 if (ref instanceof java.lang.String) { 508 com.google.protobuf.ByteString b = 509 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 510 obfuscatedExternalUserId_ = b; 511 return b; 512 } else { 513 return (com.google.protobuf.ByteString) ref; 514 } 515 } 516 517 public static final int DOCUMENTS_METADATA_FILTERS_FIELD_NUMBER = 8; 518 519 private static final class DocumentsMetadataFiltersDefaultEntryHolder { 520 static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry = 521 com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance( 522 com.google.cloud.dialogflow.v2.ParticipantProto 523 .internal_static_google_cloud_dialogflow_v2_Participant_DocumentsMetadataFiltersEntry_descriptor, 524 com.google.protobuf.WireFormat.FieldType.STRING, 525 "", 526 com.google.protobuf.WireFormat.FieldType.STRING, 527 ""); 528 } 529 530 @SuppressWarnings("serial") 531 private com.google.protobuf.MapField<java.lang.String, java.lang.String> 532 documentsMetadataFilters_; 533 534 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetDocumentsMetadataFilters()535 internalGetDocumentsMetadataFilters() { 536 if (documentsMetadataFilters_ == null) { 537 return com.google.protobuf.MapField.emptyMapField( 538 DocumentsMetadataFiltersDefaultEntryHolder.defaultEntry); 539 } 540 return documentsMetadataFilters_; 541 } 542 getDocumentsMetadataFiltersCount()543 public int getDocumentsMetadataFiltersCount() { 544 return internalGetDocumentsMetadataFilters().getMap().size(); 545 } 546 /** 547 * 548 * 549 * <pre> 550 * Optional. Key-value filters on the metadata of documents returned by 551 * article suggestion. If specified, article suggestion only returns suggested 552 * documents that match all filters in their 553 * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple 554 * values for a metadata key should be concatenated by comma. For example, 555 * filters to match all documents that have 'US' or 'CA' in their market 556 * metadata values and 'agent' in their user metadata values will be 557 * ``` 558 * documents_metadata_filters { 559 * key: "market" 560 * value: "US,CA" 561 * } 562 * documents_metadata_filters { 563 * key: "user" 564 * value: "agent" 565 * } 566 * ``` 567 * </pre> 568 * 569 * <code> 570 * map<string, string> documents_metadata_filters = 8 [(.google.api.field_behavior) = OPTIONAL]; 571 * </code> 572 */ 573 @java.lang.Override containsDocumentsMetadataFilters(java.lang.String key)574 public boolean containsDocumentsMetadataFilters(java.lang.String key) { 575 if (key == null) { 576 throw new NullPointerException("map key"); 577 } 578 return internalGetDocumentsMetadataFilters().getMap().containsKey(key); 579 } 580 /** Use {@link #getDocumentsMetadataFiltersMap()} instead. */ 581 @java.lang.Override 582 @java.lang.Deprecated getDocumentsMetadataFilters()583 public java.util.Map<java.lang.String, java.lang.String> getDocumentsMetadataFilters() { 584 return getDocumentsMetadataFiltersMap(); 585 } 586 /** 587 * 588 * 589 * <pre> 590 * Optional. Key-value filters on the metadata of documents returned by 591 * article suggestion. If specified, article suggestion only returns suggested 592 * documents that match all filters in their 593 * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple 594 * values for a metadata key should be concatenated by comma. For example, 595 * filters to match all documents that have 'US' or 'CA' in their market 596 * metadata values and 'agent' in their user metadata values will be 597 * ``` 598 * documents_metadata_filters { 599 * key: "market" 600 * value: "US,CA" 601 * } 602 * documents_metadata_filters { 603 * key: "user" 604 * value: "agent" 605 * } 606 * ``` 607 * </pre> 608 * 609 * <code> 610 * map<string, string> documents_metadata_filters = 8 [(.google.api.field_behavior) = OPTIONAL]; 611 * </code> 612 */ 613 @java.lang.Override getDocumentsMetadataFiltersMap()614 public java.util.Map<java.lang.String, java.lang.String> getDocumentsMetadataFiltersMap() { 615 return internalGetDocumentsMetadataFilters().getMap(); 616 } 617 /** 618 * 619 * 620 * <pre> 621 * Optional. Key-value filters on the metadata of documents returned by 622 * article suggestion. If specified, article suggestion only returns suggested 623 * documents that match all filters in their 624 * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple 625 * values for a metadata key should be concatenated by comma. For example, 626 * filters to match all documents that have 'US' or 'CA' in their market 627 * metadata values and 'agent' in their user metadata values will be 628 * ``` 629 * documents_metadata_filters { 630 * key: "market" 631 * value: "US,CA" 632 * } 633 * documents_metadata_filters { 634 * key: "user" 635 * value: "agent" 636 * } 637 * ``` 638 * </pre> 639 * 640 * <code> 641 * map<string, string> documents_metadata_filters = 8 [(.google.api.field_behavior) = OPTIONAL]; 642 * </code> 643 */ 644 @java.lang.Override getDocumentsMetadataFiltersOrDefault( java.lang.String key, java.lang.String defaultValue)645 public /* nullable */ java.lang.String getDocumentsMetadataFiltersOrDefault( 646 java.lang.String key, 647 /* nullable */ 648 java.lang.String defaultValue) { 649 if (key == null) { 650 throw new NullPointerException("map key"); 651 } 652 java.util.Map<java.lang.String, java.lang.String> map = 653 internalGetDocumentsMetadataFilters().getMap(); 654 return map.containsKey(key) ? map.get(key) : defaultValue; 655 } 656 /** 657 * 658 * 659 * <pre> 660 * Optional. Key-value filters on the metadata of documents returned by 661 * article suggestion. If specified, article suggestion only returns suggested 662 * documents that match all filters in their 663 * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple 664 * values for a metadata key should be concatenated by comma. For example, 665 * filters to match all documents that have 'US' or 'CA' in their market 666 * metadata values and 'agent' in their user metadata values will be 667 * ``` 668 * documents_metadata_filters { 669 * key: "market" 670 * value: "US,CA" 671 * } 672 * documents_metadata_filters { 673 * key: "user" 674 * value: "agent" 675 * } 676 * ``` 677 * </pre> 678 * 679 * <code> 680 * map<string, string> documents_metadata_filters = 8 [(.google.api.field_behavior) = OPTIONAL]; 681 * </code> 682 */ 683 @java.lang.Override getDocumentsMetadataFiltersOrThrow(java.lang.String key)684 public java.lang.String getDocumentsMetadataFiltersOrThrow(java.lang.String key) { 685 if (key == null) { 686 throw new NullPointerException("map key"); 687 } 688 java.util.Map<java.lang.String, java.lang.String> map = 689 internalGetDocumentsMetadataFilters().getMap(); 690 if (!map.containsKey(key)) { 691 throw new java.lang.IllegalArgumentException(); 692 } 693 return map.get(key); 694 } 695 696 private byte memoizedIsInitialized = -1; 697 698 @java.lang.Override isInitialized()699 public final boolean isInitialized() { 700 byte isInitialized = memoizedIsInitialized; 701 if (isInitialized == 1) return true; 702 if (isInitialized == 0) return false; 703 704 memoizedIsInitialized = 1; 705 return true; 706 } 707 708 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)709 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 710 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 711 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); 712 } 713 if (role_ != com.google.cloud.dialogflow.v2.Participant.Role.ROLE_UNSPECIFIED.getNumber()) { 714 output.writeEnum(2, role_); 715 } 716 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sipRecordingMediaLabel_)) { 717 com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sipRecordingMediaLabel_); 718 } 719 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(obfuscatedExternalUserId_)) { 720 com.google.protobuf.GeneratedMessageV3.writeString(output, 7, obfuscatedExternalUserId_); 721 } 722 com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( 723 output, 724 internalGetDocumentsMetadataFilters(), 725 DocumentsMetadataFiltersDefaultEntryHolder.defaultEntry, 726 8); 727 getUnknownFields().writeTo(output); 728 } 729 730 @java.lang.Override getSerializedSize()731 public int getSerializedSize() { 732 int size = memoizedSize; 733 if (size != -1) return size; 734 735 size = 0; 736 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 737 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); 738 } 739 if (role_ != com.google.cloud.dialogflow.v2.Participant.Role.ROLE_UNSPECIFIED.getNumber()) { 740 size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, role_); 741 } 742 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sipRecordingMediaLabel_)) { 743 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sipRecordingMediaLabel_); 744 } 745 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(obfuscatedExternalUserId_)) { 746 size += 747 com.google.protobuf.GeneratedMessageV3.computeStringSize(7, obfuscatedExternalUserId_); 748 } 749 for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : 750 internalGetDocumentsMetadataFilters().getMap().entrySet()) { 751 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> documentsMetadataFilters__ = 752 DocumentsMetadataFiltersDefaultEntryHolder.defaultEntry 753 .newBuilderForType() 754 .setKey(entry.getKey()) 755 .setValue(entry.getValue()) 756 .build(); 757 size += 758 com.google.protobuf.CodedOutputStream.computeMessageSize(8, documentsMetadataFilters__); 759 } 760 size += getUnknownFields().getSerializedSize(); 761 memoizedSize = size; 762 return size; 763 } 764 765 @java.lang.Override equals(final java.lang.Object obj)766 public boolean equals(final java.lang.Object obj) { 767 if (obj == this) { 768 return true; 769 } 770 if (!(obj instanceof com.google.cloud.dialogflow.v2.Participant)) { 771 return super.equals(obj); 772 } 773 com.google.cloud.dialogflow.v2.Participant other = 774 (com.google.cloud.dialogflow.v2.Participant) obj; 775 776 if (!getName().equals(other.getName())) return false; 777 if (role_ != other.role_) return false; 778 if (!getSipRecordingMediaLabel().equals(other.getSipRecordingMediaLabel())) return false; 779 if (!getObfuscatedExternalUserId().equals(other.getObfuscatedExternalUserId())) return false; 780 if (!internalGetDocumentsMetadataFilters().equals(other.internalGetDocumentsMetadataFilters())) 781 return false; 782 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 783 return true; 784 } 785 786 @java.lang.Override hashCode()787 public int hashCode() { 788 if (memoizedHashCode != 0) { 789 return memoizedHashCode; 790 } 791 int hash = 41; 792 hash = (19 * hash) + getDescriptor().hashCode(); 793 hash = (37 * hash) + NAME_FIELD_NUMBER; 794 hash = (53 * hash) + getName().hashCode(); 795 hash = (37 * hash) + ROLE_FIELD_NUMBER; 796 hash = (53 * hash) + role_; 797 hash = (37 * hash) + SIP_RECORDING_MEDIA_LABEL_FIELD_NUMBER; 798 hash = (53 * hash) + getSipRecordingMediaLabel().hashCode(); 799 hash = (37 * hash) + OBFUSCATED_EXTERNAL_USER_ID_FIELD_NUMBER; 800 hash = (53 * hash) + getObfuscatedExternalUserId().hashCode(); 801 if (!internalGetDocumentsMetadataFilters().getMap().isEmpty()) { 802 hash = (37 * hash) + DOCUMENTS_METADATA_FILTERS_FIELD_NUMBER; 803 hash = (53 * hash) + internalGetDocumentsMetadataFilters().hashCode(); 804 } 805 hash = (29 * hash) + getUnknownFields().hashCode(); 806 memoizedHashCode = hash; 807 return hash; 808 } 809 parseFrom(java.nio.ByteBuffer data)810 public static com.google.cloud.dialogflow.v2.Participant parseFrom(java.nio.ByteBuffer data) 811 throws com.google.protobuf.InvalidProtocolBufferException { 812 return PARSER.parseFrom(data); 813 } 814 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)815 public static com.google.cloud.dialogflow.v2.Participant parseFrom( 816 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 817 throws com.google.protobuf.InvalidProtocolBufferException { 818 return PARSER.parseFrom(data, extensionRegistry); 819 } 820 parseFrom( com.google.protobuf.ByteString data)821 public static com.google.cloud.dialogflow.v2.Participant parseFrom( 822 com.google.protobuf.ByteString data) 823 throws com.google.protobuf.InvalidProtocolBufferException { 824 return PARSER.parseFrom(data); 825 } 826 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)827 public static com.google.cloud.dialogflow.v2.Participant parseFrom( 828 com.google.protobuf.ByteString data, 829 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 830 throws com.google.protobuf.InvalidProtocolBufferException { 831 return PARSER.parseFrom(data, extensionRegistry); 832 } 833 parseFrom(byte[] data)834 public static com.google.cloud.dialogflow.v2.Participant parseFrom(byte[] data) 835 throws com.google.protobuf.InvalidProtocolBufferException { 836 return PARSER.parseFrom(data); 837 } 838 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)839 public static com.google.cloud.dialogflow.v2.Participant parseFrom( 840 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 841 throws com.google.protobuf.InvalidProtocolBufferException { 842 return PARSER.parseFrom(data, extensionRegistry); 843 } 844 parseFrom(java.io.InputStream input)845 public static com.google.cloud.dialogflow.v2.Participant parseFrom(java.io.InputStream input) 846 throws java.io.IOException { 847 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 848 } 849 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)850 public static com.google.cloud.dialogflow.v2.Participant parseFrom( 851 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 852 throws java.io.IOException { 853 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 854 PARSER, input, extensionRegistry); 855 } 856 parseDelimitedFrom( java.io.InputStream input)857 public static com.google.cloud.dialogflow.v2.Participant parseDelimitedFrom( 858 java.io.InputStream input) throws java.io.IOException { 859 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 860 } 861 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)862 public static com.google.cloud.dialogflow.v2.Participant parseDelimitedFrom( 863 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 864 throws java.io.IOException { 865 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 866 PARSER, input, extensionRegistry); 867 } 868 parseFrom( com.google.protobuf.CodedInputStream input)869 public static com.google.cloud.dialogflow.v2.Participant parseFrom( 870 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 871 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 872 } 873 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)874 public static com.google.cloud.dialogflow.v2.Participant parseFrom( 875 com.google.protobuf.CodedInputStream input, 876 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 877 throws java.io.IOException { 878 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 879 PARSER, input, extensionRegistry); 880 } 881 882 @java.lang.Override newBuilderForType()883 public Builder newBuilderForType() { 884 return newBuilder(); 885 } 886 newBuilder()887 public static Builder newBuilder() { 888 return DEFAULT_INSTANCE.toBuilder(); 889 } 890 newBuilder(com.google.cloud.dialogflow.v2.Participant prototype)891 public static Builder newBuilder(com.google.cloud.dialogflow.v2.Participant prototype) { 892 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 893 } 894 895 @java.lang.Override toBuilder()896 public Builder toBuilder() { 897 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 898 } 899 900 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)901 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 902 Builder builder = new Builder(parent); 903 return builder; 904 } 905 /** 906 * 907 * 908 * <pre> 909 * Represents a conversation participant (human agent, virtual agent, end-user). 910 * </pre> 911 * 912 * Protobuf type {@code google.cloud.dialogflow.v2.Participant} 913 */ 914 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 915 implements 916 // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Participant) 917 com.google.cloud.dialogflow.v2.ParticipantOrBuilder { getDescriptor()918 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 919 return com.google.cloud.dialogflow.v2.ParticipantProto 920 .internal_static_google_cloud_dialogflow_v2_Participant_descriptor; 921 } 922 923 @SuppressWarnings({"rawtypes"}) internalGetMapField(int number)924 protected com.google.protobuf.MapField internalGetMapField(int number) { 925 switch (number) { 926 case 8: 927 return internalGetDocumentsMetadataFilters(); 928 default: 929 throw new RuntimeException("Invalid map field number: " + number); 930 } 931 } 932 933 @SuppressWarnings({"rawtypes"}) internalGetMutableMapField(int number)934 protected com.google.protobuf.MapField internalGetMutableMapField(int number) { 935 switch (number) { 936 case 8: 937 return internalGetMutableDocumentsMetadataFilters(); 938 default: 939 throw new RuntimeException("Invalid map field number: " + number); 940 } 941 } 942 943 @java.lang.Override 944 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()945 internalGetFieldAccessorTable() { 946 return com.google.cloud.dialogflow.v2.ParticipantProto 947 .internal_static_google_cloud_dialogflow_v2_Participant_fieldAccessorTable 948 .ensureFieldAccessorsInitialized( 949 com.google.cloud.dialogflow.v2.Participant.class, 950 com.google.cloud.dialogflow.v2.Participant.Builder.class); 951 } 952 953 // Construct using com.google.cloud.dialogflow.v2.Participant.newBuilder() Builder()954 private Builder() {} 955 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)956 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 957 super(parent); 958 } 959 960 @java.lang.Override clear()961 public Builder clear() { 962 super.clear(); 963 bitField0_ = 0; 964 name_ = ""; 965 role_ = 0; 966 sipRecordingMediaLabel_ = ""; 967 obfuscatedExternalUserId_ = ""; 968 internalGetMutableDocumentsMetadataFilters().clear(); 969 return this; 970 } 971 972 @java.lang.Override getDescriptorForType()973 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 974 return com.google.cloud.dialogflow.v2.ParticipantProto 975 .internal_static_google_cloud_dialogflow_v2_Participant_descriptor; 976 } 977 978 @java.lang.Override getDefaultInstanceForType()979 public com.google.cloud.dialogflow.v2.Participant getDefaultInstanceForType() { 980 return com.google.cloud.dialogflow.v2.Participant.getDefaultInstance(); 981 } 982 983 @java.lang.Override build()984 public com.google.cloud.dialogflow.v2.Participant build() { 985 com.google.cloud.dialogflow.v2.Participant result = buildPartial(); 986 if (!result.isInitialized()) { 987 throw newUninitializedMessageException(result); 988 } 989 return result; 990 } 991 992 @java.lang.Override buildPartial()993 public com.google.cloud.dialogflow.v2.Participant buildPartial() { 994 com.google.cloud.dialogflow.v2.Participant result = 995 new com.google.cloud.dialogflow.v2.Participant(this); 996 if (bitField0_ != 0) { 997 buildPartial0(result); 998 } 999 onBuilt(); 1000 return result; 1001 } 1002 buildPartial0(com.google.cloud.dialogflow.v2.Participant result)1003 private void buildPartial0(com.google.cloud.dialogflow.v2.Participant result) { 1004 int from_bitField0_ = bitField0_; 1005 if (((from_bitField0_ & 0x00000001) != 0)) { 1006 result.name_ = name_; 1007 } 1008 if (((from_bitField0_ & 0x00000002) != 0)) { 1009 result.role_ = role_; 1010 } 1011 if (((from_bitField0_ & 0x00000004) != 0)) { 1012 result.sipRecordingMediaLabel_ = sipRecordingMediaLabel_; 1013 } 1014 if (((from_bitField0_ & 0x00000008) != 0)) { 1015 result.obfuscatedExternalUserId_ = obfuscatedExternalUserId_; 1016 } 1017 if (((from_bitField0_ & 0x00000010) != 0)) { 1018 result.documentsMetadataFilters_ = internalGetDocumentsMetadataFilters(); 1019 result.documentsMetadataFilters_.makeImmutable(); 1020 } 1021 } 1022 1023 @java.lang.Override clone()1024 public Builder clone() { 1025 return super.clone(); 1026 } 1027 1028 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1029 public Builder setField( 1030 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1031 return super.setField(field, value); 1032 } 1033 1034 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1035 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1036 return super.clearField(field); 1037 } 1038 1039 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1040 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1041 return super.clearOneof(oneof); 1042 } 1043 1044 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1045 public Builder setRepeatedField( 1046 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1047 return super.setRepeatedField(field, index, value); 1048 } 1049 1050 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1051 public Builder addRepeatedField( 1052 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1053 return super.addRepeatedField(field, value); 1054 } 1055 1056 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1057 public Builder mergeFrom(com.google.protobuf.Message other) { 1058 if (other instanceof com.google.cloud.dialogflow.v2.Participant) { 1059 return mergeFrom((com.google.cloud.dialogflow.v2.Participant) other); 1060 } else { 1061 super.mergeFrom(other); 1062 return this; 1063 } 1064 } 1065 mergeFrom(com.google.cloud.dialogflow.v2.Participant other)1066 public Builder mergeFrom(com.google.cloud.dialogflow.v2.Participant other) { 1067 if (other == com.google.cloud.dialogflow.v2.Participant.getDefaultInstance()) return this; 1068 if (!other.getName().isEmpty()) { 1069 name_ = other.name_; 1070 bitField0_ |= 0x00000001; 1071 onChanged(); 1072 } 1073 if (other.role_ != 0) { 1074 setRoleValue(other.getRoleValue()); 1075 } 1076 if (!other.getSipRecordingMediaLabel().isEmpty()) { 1077 sipRecordingMediaLabel_ = other.sipRecordingMediaLabel_; 1078 bitField0_ |= 0x00000004; 1079 onChanged(); 1080 } 1081 if (!other.getObfuscatedExternalUserId().isEmpty()) { 1082 obfuscatedExternalUserId_ = other.obfuscatedExternalUserId_; 1083 bitField0_ |= 0x00000008; 1084 onChanged(); 1085 } 1086 internalGetMutableDocumentsMetadataFilters() 1087 .mergeFrom(other.internalGetDocumentsMetadataFilters()); 1088 bitField0_ |= 0x00000010; 1089 this.mergeUnknownFields(other.getUnknownFields()); 1090 onChanged(); 1091 return this; 1092 } 1093 1094 @java.lang.Override isInitialized()1095 public final boolean isInitialized() { 1096 return true; 1097 } 1098 1099 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1100 public Builder mergeFrom( 1101 com.google.protobuf.CodedInputStream input, 1102 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1103 throws java.io.IOException { 1104 if (extensionRegistry == null) { 1105 throw new java.lang.NullPointerException(); 1106 } 1107 try { 1108 boolean done = false; 1109 while (!done) { 1110 int tag = input.readTag(); 1111 switch (tag) { 1112 case 0: 1113 done = true; 1114 break; 1115 case 10: 1116 { 1117 name_ = input.readStringRequireUtf8(); 1118 bitField0_ |= 0x00000001; 1119 break; 1120 } // case 10 1121 case 16: 1122 { 1123 role_ = input.readEnum(); 1124 bitField0_ |= 0x00000002; 1125 break; 1126 } // case 16 1127 case 50: 1128 { 1129 sipRecordingMediaLabel_ = input.readStringRequireUtf8(); 1130 bitField0_ |= 0x00000004; 1131 break; 1132 } // case 50 1133 case 58: 1134 { 1135 obfuscatedExternalUserId_ = input.readStringRequireUtf8(); 1136 bitField0_ |= 0x00000008; 1137 break; 1138 } // case 58 1139 case 66: 1140 { 1141 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> 1142 documentsMetadataFilters__ = 1143 input.readMessage( 1144 DocumentsMetadataFiltersDefaultEntryHolder.defaultEntry 1145 .getParserForType(), 1146 extensionRegistry); 1147 internalGetMutableDocumentsMetadataFilters() 1148 .getMutableMap() 1149 .put( 1150 documentsMetadataFilters__.getKey(), documentsMetadataFilters__.getValue()); 1151 bitField0_ |= 0x00000010; 1152 break; 1153 } // case 66 1154 default: 1155 { 1156 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1157 done = true; // was an endgroup tag 1158 } 1159 break; 1160 } // default: 1161 } // switch (tag) 1162 } // while (!done) 1163 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1164 throw e.unwrapIOException(); 1165 } finally { 1166 onChanged(); 1167 } // finally 1168 return this; 1169 } 1170 1171 private int bitField0_; 1172 1173 private java.lang.Object name_ = ""; 1174 /** 1175 * 1176 * 1177 * <pre> 1178 * Optional. The unique identifier of this participant. 1179 * Format: `projects/<Project ID>/locations/<Location 1180 * ID>/conversations/<Conversation ID>/participants/<Participant ID>`. 1181 * </pre> 1182 * 1183 * <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 1184 * 1185 * @return The name. 1186 */ getName()1187 public java.lang.String getName() { 1188 java.lang.Object ref = name_; 1189 if (!(ref instanceof java.lang.String)) { 1190 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1191 java.lang.String s = bs.toStringUtf8(); 1192 name_ = s; 1193 return s; 1194 } else { 1195 return (java.lang.String) ref; 1196 } 1197 } 1198 /** 1199 * 1200 * 1201 * <pre> 1202 * Optional. The unique identifier of this participant. 1203 * Format: `projects/<Project ID>/locations/<Location 1204 * ID>/conversations/<Conversation ID>/participants/<Participant ID>`. 1205 * </pre> 1206 * 1207 * <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 1208 * 1209 * @return The bytes for name. 1210 */ getNameBytes()1211 public com.google.protobuf.ByteString getNameBytes() { 1212 java.lang.Object ref = name_; 1213 if (ref instanceof String) { 1214 com.google.protobuf.ByteString b = 1215 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1216 name_ = b; 1217 return b; 1218 } else { 1219 return (com.google.protobuf.ByteString) ref; 1220 } 1221 } 1222 /** 1223 * 1224 * 1225 * <pre> 1226 * Optional. The unique identifier of this participant. 1227 * Format: `projects/<Project ID>/locations/<Location 1228 * ID>/conversations/<Conversation ID>/participants/<Participant ID>`. 1229 * </pre> 1230 * 1231 * <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 1232 * 1233 * @param value The name to set. 1234 * @return This builder for chaining. 1235 */ setName(java.lang.String value)1236 public Builder setName(java.lang.String value) { 1237 if (value == null) { 1238 throw new NullPointerException(); 1239 } 1240 name_ = value; 1241 bitField0_ |= 0x00000001; 1242 onChanged(); 1243 return this; 1244 } 1245 /** 1246 * 1247 * 1248 * <pre> 1249 * Optional. The unique identifier of this participant. 1250 * Format: `projects/<Project ID>/locations/<Location 1251 * ID>/conversations/<Conversation ID>/participants/<Participant ID>`. 1252 * </pre> 1253 * 1254 * <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 1255 * 1256 * @return This builder for chaining. 1257 */ clearName()1258 public Builder clearName() { 1259 name_ = getDefaultInstance().getName(); 1260 bitField0_ = (bitField0_ & ~0x00000001); 1261 onChanged(); 1262 return this; 1263 } 1264 /** 1265 * 1266 * 1267 * <pre> 1268 * Optional. The unique identifier of this participant. 1269 * Format: `projects/<Project ID>/locations/<Location 1270 * ID>/conversations/<Conversation ID>/participants/<Participant ID>`. 1271 * </pre> 1272 * 1273 * <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code> 1274 * 1275 * @param value The bytes for name to set. 1276 * @return This builder for chaining. 1277 */ setNameBytes(com.google.protobuf.ByteString value)1278 public Builder setNameBytes(com.google.protobuf.ByteString value) { 1279 if (value == null) { 1280 throw new NullPointerException(); 1281 } 1282 checkByteStringIsUtf8(value); 1283 name_ = value; 1284 bitField0_ |= 0x00000001; 1285 onChanged(); 1286 return this; 1287 } 1288 1289 private int role_ = 0; 1290 /** 1291 * 1292 * 1293 * <pre> 1294 * Immutable. The role this participant plays in the conversation. This field 1295 * must be set during participant creation and is then immutable. 1296 * </pre> 1297 * 1298 * <code> 1299 * .google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE]; 1300 * </code> 1301 * 1302 * @return The enum numeric value on the wire for role. 1303 */ 1304 @java.lang.Override getRoleValue()1305 public int getRoleValue() { 1306 return role_; 1307 } 1308 /** 1309 * 1310 * 1311 * <pre> 1312 * Immutable. The role this participant plays in the conversation. This field 1313 * must be set during participant creation and is then immutable. 1314 * </pre> 1315 * 1316 * <code> 1317 * .google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE]; 1318 * </code> 1319 * 1320 * @param value The enum numeric value on the wire for role to set. 1321 * @return This builder for chaining. 1322 */ setRoleValue(int value)1323 public Builder setRoleValue(int value) { 1324 role_ = value; 1325 bitField0_ |= 0x00000002; 1326 onChanged(); 1327 return this; 1328 } 1329 /** 1330 * 1331 * 1332 * <pre> 1333 * Immutable. The role this participant plays in the conversation. This field 1334 * must be set during participant creation and is then immutable. 1335 * </pre> 1336 * 1337 * <code> 1338 * .google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE]; 1339 * </code> 1340 * 1341 * @return The role. 1342 */ 1343 @java.lang.Override getRole()1344 public com.google.cloud.dialogflow.v2.Participant.Role getRole() { 1345 com.google.cloud.dialogflow.v2.Participant.Role result = 1346 com.google.cloud.dialogflow.v2.Participant.Role.forNumber(role_); 1347 return result == null ? com.google.cloud.dialogflow.v2.Participant.Role.UNRECOGNIZED : result; 1348 } 1349 /** 1350 * 1351 * 1352 * <pre> 1353 * Immutable. The role this participant plays in the conversation. This field 1354 * must be set during participant creation and is then immutable. 1355 * </pre> 1356 * 1357 * <code> 1358 * .google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE]; 1359 * </code> 1360 * 1361 * @param value The role to set. 1362 * @return This builder for chaining. 1363 */ setRole(com.google.cloud.dialogflow.v2.Participant.Role value)1364 public Builder setRole(com.google.cloud.dialogflow.v2.Participant.Role value) { 1365 if (value == null) { 1366 throw new NullPointerException(); 1367 } 1368 bitField0_ |= 0x00000002; 1369 role_ = value.getNumber(); 1370 onChanged(); 1371 return this; 1372 } 1373 /** 1374 * 1375 * 1376 * <pre> 1377 * Immutable. The role this participant plays in the conversation. This field 1378 * must be set during participant creation and is then immutable. 1379 * </pre> 1380 * 1381 * <code> 1382 * .google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE]; 1383 * </code> 1384 * 1385 * @return This builder for chaining. 1386 */ clearRole()1387 public Builder clearRole() { 1388 bitField0_ = (bitField0_ & ~0x00000002); 1389 role_ = 0; 1390 onChanged(); 1391 return this; 1392 } 1393 1394 private java.lang.Object sipRecordingMediaLabel_ = ""; 1395 /** 1396 * 1397 * 1398 * <pre> 1399 * Optional. Label applied to streams representing this participant in SIPREC 1400 * XML metadata and SDP. This is used to assign transcriptions from that 1401 * media stream to this participant. This field can be updated. 1402 * </pre> 1403 * 1404 * <code>string sip_recording_media_label = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 1405 * 1406 * @return The sipRecordingMediaLabel. 1407 */ getSipRecordingMediaLabel()1408 public java.lang.String getSipRecordingMediaLabel() { 1409 java.lang.Object ref = sipRecordingMediaLabel_; 1410 if (!(ref instanceof java.lang.String)) { 1411 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1412 java.lang.String s = bs.toStringUtf8(); 1413 sipRecordingMediaLabel_ = s; 1414 return s; 1415 } else { 1416 return (java.lang.String) ref; 1417 } 1418 } 1419 /** 1420 * 1421 * 1422 * <pre> 1423 * Optional. Label applied to streams representing this participant in SIPREC 1424 * XML metadata and SDP. This is used to assign transcriptions from that 1425 * media stream to this participant. This field can be updated. 1426 * </pre> 1427 * 1428 * <code>string sip_recording_media_label = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 1429 * 1430 * @return The bytes for sipRecordingMediaLabel. 1431 */ getSipRecordingMediaLabelBytes()1432 public com.google.protobuf.ByteString getSipRecordingMediaLabelBytes() { 1433 java.lang.Object ref = sipRecordingMediaLabel_; 1434 if (ref instanceof String) { 1435 com.google.protobuf.ByteString b = 1436 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1437 sipRecordingMediaLabel_ = b; 1438 return b; 1439 } else { 1440 return (com.google.protobuf.ByteString) ref; 1441 } 1442 } 1443 /** 1444 * 1445 * 1446 * <pre> 1447 * Optional. Label applied to streams representing this participant in SIPREC 1448 * XML metadata and SDP. This is used to assign transcriptions from that 1449 * media stream to this participant. This field can be updated. 1450 * </pre> 1451 * 1452 * <code>string sip_recording_media_label = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 1453 * 1454 * @param value The sipRecordingMediaLabel to set. 1455 * @return This builder for chaining. 1456 */ setSipRecordingMediaLabel(java.lang.String value)1457 public Builder setSipRecordingMediaLabel(java.lang.String value) { 1458 if (value == null) { 1459 throw new NullPointerException(); 1460 } 1461 sipRecordingMediaLabel_ = value; 1462 bitField0_ |= 0x00000004; 1463 onChanged(); 1464 return this; 1465 } 1466 /** 1467 * 1468 * 1469 * <pre> 1470 * Optional. Label applied to streams representing this participant in SIPREC 1471 * XML metadata and SDP. This is used to assign transcriptions from that 1472 * media stream to this participant. This field can be updated. 1473 * </pre> 1474 * 1475 * <code>string sip_recording_media_label = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 1476 * 1477 * @return This builder for chaining. 1478 */ clearSipRecordingMediaLabel()1479 public Builder clearSipRecordingMediaLabel() { 1480 sipRecordingMediaLabel_ = getDefaultInstance().getSipRecordingMediaLabel(); 1481 bitField0_ = (bitField0_ & ~0x00000004); 1482 onChanged(); 1483 return this; 1484 } 1485 /** 1486 * 1487 * 1488 * <pre> 1489 * Optional. Label applied to streams representing this participant in SIPREC 1490 * XML metadata and SDP. This is used to assign transcriptions from that 1491 * media stream to this participant. This field can be updated. 1492 * </pre> 1493 * 1494 * <code>string sip_recording_media_label = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 1495 * 1496 * @param value The bytes for sipRecordingMediaLabel to set. 1497 * @return This builder for chaining. 1498 */ setSipRecordingMediaLabelBytes(com.google.protobuf.ByteString value)1499 public Builder setSipRecordingMediaLabelBytes(com.google.protobuf.ByteString value) { 1500 if (value == null) { 1501 throw new NullPointerException(); 1502 } 1503 checkByteStringIsUtf8(value); 1504 sipRecordingMediaLabel_ = value; 1505 bitField0_ |= 0x00000004; 1506 onChanged(); 1507 return this; 1508 } 1509 1510 private java.lang.Object obfuscatedExternalUserId_ = ""; 1511 /** 1512 * 1513 * 1514 * <pre> 1515 * Optional. Obfuscated user id that should be associated with the created 1516 * participant. 1517 * You can specify a user id as follows: 1518 * 1. If you set this field in 1519 * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] 1520 * or 1521 * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], 1522 * Dialogflow adds the obfuscated user id with the participant. 1523 * 2. If you set this field in 1524 * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] 1525 * or 1526 * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], 1527 * Dialogflow will update 1528 * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. 1529 * Dialogflow returns an error if you try to add a user id for a 1530 * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] 1531 * participant. 1532 * Dialogflow uses this user id for billing and measurement purposes. For 1533 * example, Dialogflow determines whether a user in one conversation returned 1534 * in a later conversation. 1535 * Note: 1536 * * Please never pass raw user ids to Dialogflow. Always obfuscate your user 1537 * id first. 1538 * * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a 1539 * hash function like SHA-512. 1540 * * The length of the user id must be <= 256 characters. 1541 * </pre> 1542 * 1543 * <code>string obfuscated_external_user_id = 7 [(.google.api.field_behavior) = OPTIONAL]; 1544 * </code> 1545 * 1546 * @return The obfuscatedExternalUserId. 1547 */ getObfuscatedExternalUserId()1548 public java.lang.String getObfuscatedExternalUserId() { 1549 java.lang.Object ref = obfuscatedExternalUserId_; 1550 if (!(ref instanceof java.lang.String)) { 1551 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1552 java.lang.String s = bs.toStringUtf8(); 1553 obfuscatedExternalUserId_ = s; 1554 return s; 1555 } else { 1556 return (java.lang.String) ref; 1557 } 1558 } 1559 /** 1560 * 1561 * 1562 * <pre> 1563 * Optional. Obfuscated user id that should be associated with the created 1564 * participant. 1565 * You can specify a user id as follows: 1566 * 1. If you set this field in 1567 * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] 1568 * or 1569 * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], 1570 * Dialogflow adds the obfuscated user id with the participant. 1571 * 2. If you set this field in 1572 * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] 1573 * or 1574 * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], 1575 * Dialogflow will update 1576 * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. 1577 * Dialogflow returns an error if you try to add a user id for a 1578 * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] 1579 * participant. 1580 * Dialogflow uses this user id for billing and measurement purposes. For 1581 * example, Dialogflow determines whether a user in one conversation returned 1582 * in a later conversation. 1583 * Note: 1584 * * Please never pass raw user ids to Dialogflow. Always obfuscate your user 1585 * id first. 1586 * * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a 1587 * hash function like SHA-512. 1588 * * The length of the user id must be <= 256 characters. 1589 * </pre> 1590 * 1591 * <code>string obfuscated_external_user_id = 7 [(.google.api.field_behavior) = OPTIONAL]; 1592 * </code> 1593 * 1594 * @return The bytes for obfuscatedExternalUserId. 1595 */ getObfuscatedExternalUserIdBytes()1596 public com.google.protobuf.ByteString getObfuscatedExternalUserIdBytes() { 1597 java.lang.Object ref = obfuscatedExternalUserId_; 1598 if (ref instanceof String) { 1599 com.google.protobuf.ByteString b = 1600 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1601 obfuscatedExternalUserId_ = b; 1602 return b; 1603 } else { 1604 return (com.google.protobuf.ByteString) ref; 1605 } 1606 } 1607 /** 1608 * 1609 * 1610 * <pre> 1611 * Optional. Obfuscated user id that should be associated with the created 1612 * participant. 1613 * You can specify a user id as follows: 1614 * 1. If you set this field in 1615 * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] 1616 * or 1617 * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], 1618 * Dialogflow adds the obfuscated user id with the participant. 1619 * 2. If you set this field in 1620 * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] 1621 * or 1622 * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], 1623 * Dialogflow will update 1624 * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. 1625 * Dialogflow returns an error if you try to add a user id for a 1626 * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] 1627 * participant. 1628 * Dialogflow uses this user id for billing and measurement purposes. For 1629 * example, Dialogflow determines whether a user in one conversation returned 1630 * in a later conversation. 1631 * Note: 1632 * * Please never pass raw user ids to Dialogflow. Always obfuscate your user 1633 * id first. 1634 * * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a 1635 * hash function like SHA-512. 1636 * * The length of the user id must be <= 256 characters. 1637 * </pre> 1638 * 1639 * <code>string obfuscated_external_user_id = 7 [(.google.api.field_behavior) = OPTIONAL]; 1640 * </code> 1641 * 1642 * @param value The obfuscatedExternalUserId to set. 1643 * @return This builder for chaining. 1644 */ setObfuscatedExternalUserId(java.lang.String value)1645 public Builder setObfuscatedExternalUserId(java.lang.String value) { 1646 if (value == null) { 1647 throw new NullPointerException(); 1648 } 1649 obfuscatedExternalUserId_ = value; 1650 bitField0_ |= 0x00000008; 1651 onChanged(); 1652 return this; 1653 } 1654 /** 1655 * 1656 * 1657 * <pre> 1658 * Optional. Obfuscated user id that should be associated with the created 1659 * participant. 1660 * You can specify a user id as follows: 1661 * 1. If you set this field in 1662 * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] 1663 * or 1664 * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], 1665 * Dialogflow adds the obfuscated user id with the participant. 1666 * 2. If you set this field in 1667 * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] 1668 * or 1669 * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], 1670 * Dialogflow will update 1671 * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. 1672 * Dialogflow returns an error if you try to add a user id for a 1673 * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] 1674 * participant. 1675 * Dialogflow uses this user id for billing and measurement purposes. For 1676 * example, Dialogflow determines whether a user in one conversation returned 1677 * in a later conversation. 1678 * Note: 1679 * * Please never pass raw user ids to Dialogflow. Always obfuscate your user 1680 * id first. 1681 * * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a 1682 * hash function like SHA-512. 1683 * * The length of the user id must be <= 256 characters. 1684 * </pre> 1685 * 1686 * <code>string obfuscated_external_user_id = 7 [(.google.api.field_behavior) = OPTIONAL]; 1687 * </code> 1688 * 1689 * @return This builder for chaining. 1690 */ clearObfuscatedExternalUserId()1691 public Builder clearObfuscatedExternalUserId() { 1692 obfuscatedExternalUserId_ = getDefaultInstance().getObfuscatedExternalUserId(); 1693 bitField0_ = (bitField0_ & ~0x00000008); 1694 onChanged(); 1695 return this; 1696 } 1697 /** 1698 * 1699 * 1700 * <pre> 1701 * Optional. Obfuscated user id that should be associated with the created 1702 * participant. 1703 * You can specify a user id as follows: 1704 * 1. If you set this field in 1705 * [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] 1706 * or 1707 * [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], 1708 * Dialogflow adds the obfuscated user id with the participant. 1709 * 2. If you set this field in 1710 * [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] 1711 * or 1712 * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], 1713 * Dialogflow will update 1714 * [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id]. 1715 * Dialogflow returns an error if you try to add a user id for a 1716 * non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] 1717 * participant. 1718 * Dialogflow uses this user id for billing and measurement purposes. For 1719 * example, Dialogflow determines whether a user in one conversation returned 1720 * in a later conversation. 1721 * Note: 1722 * * Please never pass raw user ids to Dialogflow. Always obfuscate your user 1723 * id first. 1724 * * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a 1725 * hash function like SHA-512. 1726 * * The length of the user id must be <= 256 characters. 1727 * </pre> 1728 * 1729 * <code>string obfuscated_external_user_id = 7 [(.google.api.field_behavior) = OPTIONAL]; 1730 * </code> 1731 * 1732 * @param value The bytes for obfuscatedExternalUserId to set. 1733 * @return This builder for chaining. 1734 */ setObfuscatedExternalUserIdBytes(com.google.protobuf.ByteString value)1735 public Builder setObfuscatedExternalUserIdBytes(com.google.protobuf.ByteString value) { 1736 if (value == null) { 1737 throw new NullPointerException(); 1738 } 1739 checkByteStringIsUtf8(value); 1740 obfuscatedExternalUserId_ = value; 1741 bitField0_ |= 0x00000008; 1742 onChanged(); 1743 return this; 1744 } 1745 1746 private com.google.protobuf.MapField<java.lang.String, java.lang.String> 1747 documentsMetadataFilters_; 1748 1749 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetDocumentsMetadataFilters()1750 internalGetDocumentsMetadataFilters() { 1751 if (documentsMetadataFilters_ == null) { 1752 return com.google.protobuf.MapField.emptyMapField( 1753 DocumentsMetadataFiltersDefaultEntryHolder.defaultEntry); 1754 } 1755 return documentsMetadataFilters_; 1756 } 1757 1758 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableDocumentsMetadataFilters()1759 internalGetMutableDocumentsMetadataFilters() { 1760 if (documentsMetadataFilters_ == null) { 1761 documentsMetadataFilters_ = 1762 com.google.protobuf.MapField.newMapField( 1763 DocumentsMetadataFiltersDefaultEntryHolder.defaultEntry); 1764 } 1765 if (!documentsMetadataFilters_.isMutable()) { 1766 documentsMetadataFilters_ = documentsMetadataFilters_.copy(); 1767 } 1768 bitField0_ |= 0x00000010; 1769 onChanged(); 1770 return documentsMetadataFilters_; 1771 } 1772 getDocumentsMetadataFiltersCount()1773 public int getDocumentsMetadataFiltersCount() { 1774 return internalGetDocumentsMetadataFilters().getMap().size(); 1775 } 1776 /** 1777 * 1778 * 1779 * <pre> 1780 * Optional. Key-value filters on the metadata of documents returned by 1781 * article suggestion. If specified, article suggestion only returns suggested 1782 * documents that match all filters in their 1783 * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple 1784 * values for a metadata key should be concatenated by comma. For example, 1785 * filters to match all documents that have 'US' or 'CA' in their market 1786 * metadata values and 'agent' in their user metadata values will be 1787 * ``` 1788 * documents_metadata_filters { 1789 * key: "market" 1790 * value: "US,CA" 1791 * } 1792 * documents_metadata_filters { 1793 * key: "user" 1794 * value: "agent" 1795 * } 1796 * ``` 1797 * </pre> 1798 * 1799 * <code> 1800 * map<string, string> documents_metadata_filters = 8 [(.google.api.field_behavior) = OPTIONAL]; 1801 * </code> 1802 */ 1803 @java.lang.Override containsDocumentsMetadataFilters(java.lang.String key)1804 public boolean containsDocumentsMetadataFilters(java.lang.String key) { 1805 if (key == null) { 1806 throw new NullPointerException("map key"); 1807 } 1808 return internalGetDocumentsMetadataFilters().getMap().containsKey(key); 1809 } 1810 /** Use {@link #getDocumentsMetadataFiltersMap()} instead. */ 1811 @java.lang.Override 1812 @java.lang.Deprecated getDocumentsMetadataFilters()1813 public java.util.Map<java.lang.String, java.lang.String> getDocumentsMetadataFilters() { 1814 return getDocumentsMetadataFiltersMap(); 1815 } 1816 /** 1817 * 1818 * 1819 * <pre> 1820 * Optional. Key-value filters on the metadata of documents returned by 1821 * article suggestion. If specified, article suggestion only returns suggested 1822 * documents that match all filters in their 1823 * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple 1824 * values for a metadata key should be concatenated by comma. For example, 1825 * filters to match all documents that have 'US' or 'CA' in their market 1826 * metadata values and 'agent' in their user metadata values will be 1827 * ``` 1828 * documents_metadata_filters { 1829 * key: "market" 1830 * value: "US,CA" 1831 * } 1832 * documents_metadata_filters { 1833 * key: "user" 1834 * value: "agent" 1835 * } 1836 * ``` 1837 * </pre> 1838 * 1839 * <code> 1840 * map<string, string> documents_metadata_filters = 8 [(.google.api.field_behavior) = OPTIONAL]; 1841 * </code> 1842 */ 1843 @java.lang.Override getDocumentsMetadataFiltersMap()1844 public java.util.Map<java.lang.String, java.lang.String> getDocumentsMetadataFiltersMap() { 1845 return internalGetDocumentsMetadataFilters().getMap(); 1846 } 1847 /** 1848 * 1849 * 1850 * <pre> 1851 * Optional. Key-value filters on the metadata of documents returned by 1852 * article suggestion. If specified, article suggestion only returns suggested 1853 * documents that match all filters in their 1854 * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple 1855 * values for a metadata key should be concatenated by comma. For example, 1856 * filters to match all documents that have 'US' or 'CA' in their market 1857 * metadata values and 'agent' in their user metadata values will be 1858 * ``` 1859 * documents_metadata_filters { 1860 * key: "market" 1861 * value: "US,CA" 1862 * } 1863 * documents_metadata_filters { 1864 * key: "user" 1865 * value: "agent" 1866 * } 1867 * ``` 1868 * </pre> 1869 * 1870 * <code> 1871 * map<string, string> documents_metadata_filters = 8 [(.google.api.field_behavior) = OPTIONAL]; 1872 * </code> 1873 */ 1874 @java.lang.Override getDocumentsMetadataFiltersOrDefault( java.lang.String key, java.lang.String defaultValue)1875 public /* nullable */ java.lang.String getDocumentsMetadataFiltersOrDefault( 1876 java.lang.String key, 1877 /* nullable */ 1878 java.lang.String defaultValue) { 1879 if (key == null) { 1880 throw new NullPointerException("map key"); 1881 } 1882 java.util.Map<java.lang.String, java.lang.String> map = 1883 internalGetDocumentsMetadataFilters().getMap(); 1884 return map.containsKey(key) ? map.get(key) : defaultValue; 1885 } 1886 /** 1887 * 1888 * 1889 * <pre> 1890 * Optional. Key-value filters on the metadata of documents returned by 1891 * article suggestion. If specified, article suggestion only returns suggested 1892 * documents that match all filters in their 1893 * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple 1894 * values for a metadata key should be concatenated by comma. For example, 1895 * filters to match all documents that have 'US' or 'CA' in their market 1896 * metadata values and 'agent' in their user metadata values will be 1897 * ``` 1898 * documents_metadata_filters { 1899 * key: "market" 1900 * value: "US,CA" 1901 * } 1902 * documents_metadata_filters { 1903 * key: "user" 1904 * value: "agent" 1905 * } 1906 * ``` 1907 * </pre> 1908 * 1909 * <code> 1910 * map<string, string> documents_metadata_filters = 8 [(.google.api.field_behavior) = OPTIONAL]; 1911 * </code> 1912 */ 1913 @java.lang.Override getDocumentsMetadataFiltersOrThrow(java.lang.String key)1914 public java.lang.String getDocumentsMetadataFiltersOrThrow(java.lang.String key) { 1915 if (key == null) { 1916 throw new NullPointerException("map key"); 1917 } 1918 java.util.Map<java.lang.String, java.lang.String> map = 1919 internalGetDocumentsMetadataFilters().getMap(); 1920 if (!map.containsKey(key)) { 1921 throw new java.lang.IllegalArgumentException(); 1922 } 1923 return map.get(key); 1924 } 1925 clearDocumentsMetadataFilters()1926 public Builder clearDocumentsMetadataFilters() { 1927 bitField0_ = (bitField0_ & ~0x00000010); 1928 internalGetMutableDocumentsMetadataFilters().getMutableMap().clear(); 1929 return this; 1930 } 1931 /** 1932 * 1933 * 1934 * <pre> 1935 * Optional. Key-value filters on the metadata of documents returned by 1936 * article suggestion. If specified, article suggestion only returns suggested 1937 * documents that match all filters in their 1938 * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple 1939 * values for a metadata key should be concatenated by comma. For example, 1940 * filters to match all documents that have 'US' or 'CA' in their market 1941 * metadata values and 'agent' in their user metadata values will be 1942 * ``` 1943 * documents_metadata_filters { 1944 * key: "market" 1945 * value: "US,CA" 1946 * } 1947 * documents_metadata_filters { 1948 * key: "user" 1949 * value: "agent" 1950 * } 1951 * ``` 1952 * </pre> 1953 * 1954 * <code> 1955 * map<string, string> documents_metadata_filters = 8 [(.google.api.field_behavior) = OPTIONAL]; 1956 * </code> 1957 */ removeDocumentsMetadataFilters(java.lang.String key)1958 public Builder removeDocumentsMetadataFilters(java.lang.String key) { 1959 if (key == null) { 1960 throw new NullPointerException("map key"); 1961 } 1962 internalGetMutableDocumentsMetadataFilters().getMutableMap().remove(key); 1963 return this; 1964 } 1965 /** Use alternate mutation accessors instead. */ 1966 @java.lang.Deprecated getMutableDocumentsMetadataFilters()1967 public java.util.Map<java.lang.String, java.lang.String> getMutableDocumentsMetadataFilters() { 1968 bitField0_ |= 0x00000010; 1969 return internalGetMutableDocumentsMetadataFilters().getMutableMap(); 1970 } 1971 /** 1972 * 1973 * 1974 * <pre> 1975 * Optional. Key-value filters on the metadata of documents returned by 1976 * article suggestion. If specified, article suggestion only returns suggested 1977 * documents that match all filters in their 1978 * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple 1979 * values for a metadata key should be concatenated by comma. For example, 1980 * filters to match all documents that have 'US' or 'CA' in their market 1981 * metadata values and 'agent' in their user metadata values will be 1982 * ``` 1983 * documents_metadata_filters { 1984 * key: "market" 1985 * value: "US,CA" 1986 * } 1987 * documents_metadata_filters { 1988 * key: "user" 1989 * value: "agent" 1990 * } 1991 * ``` 1992 * </pre> 1993 * 1994 * <code> 1995 * map<string, string> documents_metadata_filters = 8 [(.google.api.field_behavior) = OPTIONAL]; 1996 * </code> 1997 */ putDocumentsMetadataFilters(java.lang.String key, java.lang.String value)1998 public Builder putDocumentsMetadataFilters(java.lang.String key, java.lang.String value) { 1999 if (key == null) { 2000 throw new NullPointerException("map key"); 2001 } 2002 if (value == null) { 2003 throw new NullPointerException("map value"); 2004 } 2005 internalGetMutableDocumentsMetadataFilters().getMutableMap().put(key, value); 2006 bitField0_ |= 0x00000010; 2007 return this; 2008 } 2009 /** 2010 * 2011 * 2012 * <pre> 2013 * Optional. Key-value filters on the metadata of documents returned by 2014 * article suggestion. If specified, article suggestion only returns suggested 2015 * documents that match all filters in their 2016 * [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple 2017 * values for a metadata key should be concatenated by comma. For example, 2018 * filters to match all documents that have 'US' or 'CA' in their market 2019 * metadata values and 'agent' in their user metadata values will be 2020 * ``` 2021 * documents_metadata_filters { 2022 * key: "market" 2023 * value: "US,CA" 2024 * } 2025 * documents_metadata_filters { 2026 * key: "user" 2027 * value: "agent" 2028 * } 2029 * ``` 2030 * </pre> 2031 * 2032 * <code> 2033 * map<string, string> documents_metadata_filters = 8 [(.google.api.field_behavior) = OPTIONAL]; 2034 * </code> 2035 */ putAllDocumentsMetadataFilters( java.util.Map<java.lang.String, java.lang.String> values)2036 public Builder putAllDocumentsMetadataFilters( 2037 java.util.Map<java.lang.String, java.lang.String> values) { 2038 internalGetMutableDocumentsMetadataFilters().getMutableMap().putAll(values); 2039 bitField0_ |= 0x00000010; 2040 return this; 2041 } 2042 2043 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2044 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 2045 return super.setUnknownFields(unknownFields); 2046 } 2047 2048 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2049 public final Builder mergeUnknownFields( 2050 final com.google.protobuf.UnknownFieldSet unknownFields) { 2051 return super.mergeUnknownFields(unknownFields); 2052 } 2053 2054 // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Participant) 2055 } 2056 2057 // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Participant) 2058 private static final com.google.cloud.dialogflow.v2.Participant DEFAULT_INSTANCE; 2059 2060 static { 2061 DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Participant(); 2062 } 2063 getDefaultInstance()2064 public static com.google.cloud.dialogflow.v2.Participant getDefaultInstance() { 2065 return DEFAULT_INSTANCE; 2066 } 2067 2068 private static final com.google.protobuf.Parser<Participant> PARSER = 2069 new com.google.protobuf.AbstractParser<Participant>() { 2070 @java.lang.Override 2071 public Participant parsePartialFrom( 2072 com.google.protobuf.CodedInputStream input, 2073 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2074 throws com.google.protobuf.InvalidProtocolBufferException { 2075 Builder builder = newBuilder(); 2076 try { 2077 builder.mergeFrom(input, extensionRegistry); 2078 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2079 throw e.setUnfinishedMessage(builder.buildPartial()); 2080 } catch (com.google.protobuf.UninitializedMessageException e) { 2081 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2082 } catch (java.io.IOException e) { 2083 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2084 .setUnfinishedMessage(builder.buildPartial()); 2085 } 2086 return builder.buildPartial(); 2087 } 2088 }; 2089 parser()2090 public static com.google.protobuf.Parser<Participant> parser() { 2091 return PARSER; 2092 } 2093 2094 @java.lang.Override getParserForType()2095 public com.google.protobuf.Parser<Participant> getParserForType() { 2096 return PARSER; 2097 } 2098 2099 @java.lang.Override getDefaultInstanceForType()2100 public com.google.cloud.dialogflow.v2.Participant getDefaultInstanceForType() { 2101 return DEFAULT_INSTANCE; 2102 } 2103 } 2104