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