diff --git a/protos/google/cloud/dialogflow/v2beta1/audio_config.proto b/protos/google/cloud/dialogflow/v2beta1/audio_config.proto index 1c19b4b0..5ab72f6e 100644 --- a/protos/google/cloud/dialogflow/v2beta1/audio_config.proto +++ b/protos/google/cloud/dialogflow/v2beta1/audio_config.proto @@ -31,6 +31,36 @@ option java_outer_classname = "AudioConfigProto"; option java_package = "com.google.cloud.dialogflow.v2beta1"; option objc_class_prefix = "DF"; +// Hints for the speech recognizer to help with recognition in a specific +// conversation state. +message SpeechContext { + // Optional. A list of strings containing words and phrases that the speech + // recognizer should recognize with higher likelihood. + // + // This list can be used to: + // + // * improve accuracy for words and phrases you expect the user to say, + // e.g. typical commands for your Dialogflow agent + // * add additional words to the speech recognizer vocabulary + // * ... + // + // See the [Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/quotas) for usage + // limits. + repeated string phrases = 1; + + // Optional. Boost for this context compared to other contexts: + // + // * If the boost is positive, Dialogflow will increase the probability that + // the phrases in this context are recognized over similar sounding phrases. + // * If the boost is unspecified or non-positive, Dialogflow will not apply + // any boost. + // + // Dialogflow recommends that you use boosts in the range (0, 20] and that you + // find a value that fits your use case with binary search. + float boost = 2; +} + // Audio encoding of the audio content sent in the conversational query request. // Refer to the // [Cloud Speech API @@ -80,36 +110,6 @@ enum AudioEncoding { AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; } -// Hints for the speech recognizer to help with recognition in a specific -// conversation state. -message SpeechContext { - // Optional. A list of strings containing words and phrases that the speech - // recognizer should recognize with higher likelihood. - // - // This list can be used to: - // - // * improve accuracy for words and phrases you expect the user to say, - // e.g. typical commands for your Dialogflow agent - // * add additional words to the speech recognizer vocabulary - // * ... - // - // See the [Cloud Speech - // documentation](https://cloud.google.com/speech-to-text/quotas) for usage - // limits. - repeated string phrases = 1; - - // Optional. Boost for this context compared to other contexts: - // - // * If the boost is positive, Dialogflow will increase the probability that - // the phrases in this context are recognized over similar sounding phrases. - // * If the boost is unspecified or non-positive, Dialogflow will not apply - // any boost. - // - // Dialogflow recommends that you use boosts in the range (0, 20] and that you - // find a value that fits your use case with binary search. - float boost = 2; -} - // Information for a word recognized by the speech recognizer. message SpeechWordInfo { // The word this info is for. diff --git a/protos/google/cloud/dialogflow/v2beta1/conversation.proto b/protos/google/cloud/dialogflow/v2beta1/conversation.proto index 6c2fdf6d..3736a95c 100644 --- a/protos/google/cloud/dialogflow/v2beta1/conversation.proto +++ b/protos/google/cloud/dialogflow/v2beta1/conversation.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dialogflow/v2beta1/audio_config.proto"; import "google/cloud/dialogflow/v2beta1/gcs.proto"; import "google/cloud/dialogflow/v2beta1/participant.proto"; import "google/cloud/dialogflow/v2beta1/session.proto"; diff --git a/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto b/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto index e6fef0d9..df4b3e20 100644 --- a/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto +++ b/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto @@ -248,6 +248,9 @@ message HumanAgentAssistantConfig { // Configs of custom conversation model. ConversationModelConfig conversation_model_config = 7; + + // Configs for processing conversation. + ConversationProcessConfig conversation_process_config = 8; } // Detail human agent assistant config. @@ -388,6 +391,13 @@ message HumanAgentAssistantConfig { }]; } + // Config to process conversation. + message ConversationProcessConfig { + // Number of recent non-small-talk sentences to use as context for article + // and FAQ suggestion + int32 recent_sentences_count = 2; + } + // Configuration for analyses to run on each conversation message. message MessageAnalysisConfig { // Enable entity extraction in conversation messages on [agent assist diff --git a/protos/google/cloud/dialogflow/v2beta1/participant.proto b/protos/google/cloud/dialogflow/v2beta1/participant.proto index b53c8b26..e833810a 100644 --- a/protos/google/cloud/dialogflow/v2beta1/participant.proto +++ b/protos/google/cloud/dialogflow/v2beta1/participant.proto @@ -718,7 +718,9 @@ message SmartReplyAnswer { // The name of answer record, in the format of // "projects//locations//answerRecords/" - string answer_record = 3; + string answer_record = 3 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/AnswerRecord" + }]; } // One response of different type of suggestion response which is used in @@ -891,7 +893,9 @@ message SuggestSmartRepliesResponse { // // Format: `projects//locations//conversations//messages/`. - string latest_message = 2; + string latest_message = 2 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Message" + }]; // Number of messages prior to and including // [latest_message][google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.latest_message] to compile the diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 7689c001..74d1dbd3 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -27698,18 +27698,6 @@ export namespace google { } } - /** AudioEncoding enum. */ - enum AudioEncoding { - AUDIO_ENCODING_UNSPECIFIED = 0, - AUDIO_ENCODING_LINEAR_16 = 1, - AUDIO_ENCODING_FLAC = 2, - AUDIO_ENCODING_MULAW = 3, - AUDIO_ENCODING_AMR = 4, - AUDIO_ENCODING_AMR_WB = 5, - AUDIO_ENCODING_OGG_OPUS = 6, - AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7 - } - /** Properties of a SpeechContext. */ interface ISpeechContext { @@ -27806,6 +27794,18 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** AudioEncoding enum. */ + enum AudioEncoding { + AUDIO_ENCODING_UNSPECIFIED = 0, + AUDIO_ENCODING_LINEAR_16 = 1, + AUDIO_ENCODING_FLAC = 2, + AUDIO_ENCODING_MULAW = 3, + AUDIO_ENCODING_AMR = 4, + AUDIO_ENCODING_AMR_WB = 5, + AUDIO_ENCODING_OGG_OPUS = 6, + AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7 + } + /** Properties of a SpeechWordInfo. */ interface ISpeechWordInfo { @@ -48548,6 +48548,9 @@ export namespace google { /** SuggestionFeatureConfig conversationModelConfig */ conversationModelConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig|null); + + /** SuggestionFeatureConfig conversationProcessConfig */ + conversationProcessConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig|null); } /** Represents a SuggestionFeatureConfig. */ @@ -48574,6 +48577,9 @@ export namespace google { /** SuggestionFeatureConfig conversationModelConfig. */ public conversationModelConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig|null); + /** SuggestionFeatureConfig conversationProcessConfig. */ + public conversationProcessConfig?: (google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig|null); + /** * Creates a new SuggestionFeatureConfig instance using the specified properties. * @param [properties] Properties to set @@ -49329,6 +49335,96 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a ConversationProcessConfig. */ + interface IConversationProcessConfig { + + /** ConversationProcessConfig recentSentencesCount */ + recentSentencesCount?: (number|null); + } + + /** Represents a ConversationProcessConfig. */ + class ConversationProcessConfig implements IConversationProcessConfig { + + /** + * Constructs a new ConversationProcessConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig); + + /** ConversationProcessConfig recentSentencesCount. */ + public recentSentencesCount: number; + + /** + * Creates a new ConversationProcessConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationProcessConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig; + + /** + * Encodes the specified ConversationProcessConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. + * @param message ConversationProcessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationProcessConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. + * @param message ConversationProcessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationProcessConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationProcessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig; + + /** + * Decodes a ConversationProcessConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationProcessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig; + + /** + * Verifies a ConversationProcessConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConversationProcessConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationProcessConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig; + + /** + * Creates a plain object from a ConversationProcessConfig message. Also converts values to other types if specified. + * @param message ConversationProcessConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationProcessConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a MessageAnalysisConfig. */ interface IMessageAnalysisConfig { diff --git a/protos/protos.js b/protos/protos.js index 54c961c3..9deda183 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -65665,32 +65665,6 @@ return EnvironmentHistory; })(); - /** - * AudioEncoding enum. - * @name google.cloud.dialogflow.v2beta1.AudioEncoding - * @enum {number} - * @property {number} AUDIO_ENCODING_UNSPECIFIED=0 AUDIO_ENCODING_UNSPECIFIED value - * @property {number} AUDIO_ENCODING_LINEAR_16=1 AUDIO_ENCODING_LINEAR_16 value - * @property {number} AUDIO_ENCODING_FLAC=2 AUDIO_ENCODING_FLAC value - * @property {number} AUDIO_ENCODING_MULAW=3 AUDIO_ENCODING_MULAW value - * @property {number} AUDIO_ENCODING_AMR=4 AUDIO_ENCODING_AMR value - * @property {number} AUDIO_ENCODING_AMR_WB=5 AUDIO_ENCODING_AMR_WB value - * @property {number} AUDIO_ENCODING_OGG_OPUS=6 AUDIO_ENCODING_OGG_OPUS value - * @property {number} AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE=7 AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE value - */ - v2beta1.AudioEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUDIO_ENCODING_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUDIO_ENCODING_LINEAR_16"] = 1; - values[valuesById[2] = "AUDIO_ENCODING_FLAC"] = 2; - values[valuesById[3] = "AUDIO_ENCODING_MULAW"] = 3; - values[valuesById[4] = "AUDIO_ENCODING_AMR"] = 4; - values[valuesById[5] = "AUDIO_ENCODING_AMR_WB"] = 5; - values[valuesById[6] = "AUDIO_ENCODING_OGG_OPUS"] = 6; - values[valuesById[7] = "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE"] = 7; - return values; - })(); - v2beta1.SpeechContext = (function() { /** @@ -65917,6 +65891,32 @@ return SpeechContext; })(); + /** + * AudioEncoding enum. + * @name google.cloud.dialogflow.v2beta1.AudioEncoding + * @enum {number} + * @property {number} AUDIO_ENCODING_UNSPECIFIED=0 AUDIO_ENCODING_UNSPECIFIED value + * @property {number} AUDIO_ENCODING_LINEAR_16=1 AUDIO_ENCODING_LINEAR_16 value + * @property {number} AUDIO_ENCODING_FLAC=2 AUDIO_ENCODING_FLAC value + * @property {number} AUDIO_ENCODING_MULAW=3 AUDIO_ENCODING_MULAW value + * @property {number} AUDIO_ENCODING_AMR=4 AUDIO_ENCODING_AMR value + * @property {number} AUDIO_ENCODING_AMR_WB=5 AUDIO_ENCODING_AMR_WB value + * @property {number} AUDIO_ENCODING_OGG_OPUS=6 AUDIO_ENCODING_OGG_OPUS value + * @property {number} AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE=7 AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE value + */ + v2beta1.AudioEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUDIO_ENCODING_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUDIO_ENCODING_LINEAR_16"] = 1; + values[valuesById[2] = "AUDIO_ENCODING_FLAC"] = 2; + values[valuesById[3] = "AUDIO_ENCODING_MULAW"] = 3; + values[valuesById[4] = "AUDIO_ENCODING_AMR"] = 4; + values[valuesById[5] = "AUDIO_ENCODING_AMR_WB"] = 5; + values[valuesById[6] = "AUDIO_ENCODING_OGG_OPUS"] = 6; + values[valuesById[7] = "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE"] = 7; + return values; + })(); + v2beta1.SpeechWordInfo = (function() { /** @@ -116470,6 +116470,7 @@ * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionTriggerSettings|null} [suggestionTriggerSettings] SuggestionFeatureConfig suggestionTriggerSettings * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ISuggestionQueryConfig|null} [queryConfig] SuggestionFeatureConfig queryConfig * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationModelConfig|null} [conversationModelConfig] SuggestionFeatureConfig conversationModelConfig + * @property {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig|null} [conversationProcessConfig] SuggestionFeatureConfig conversationProcessConfig */ /** @@ -116527,6 +116528,14 @@ */ SuggestionFeatureConfig.prototype.conversationModelConfig = null; + /** + * SuggestionFeatureConfig conversationProcessConfig. + * @member {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig|null|undefined} conversationProcessConfig + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @instance + */ + SuggestionFeatureConfig.prototype.conversationProcessConfig = null; + /** * Creates a new SuggestionFeatureConfig instance using the specified properties. * @function create @@ -116559,6 +116568,8 @@ $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.encode(message.queryConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.conversationModelConfig != null && Object.hasOwnProperty.call(message, "conversationModelConfig")) $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.encode(message.conversationModelConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.conversationProcessConfig != null && Object.hasOwnProperty.call(message, "conversationProcessConfig")) + $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.encode(message.conversationProcessConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.suggestionTriggerSettings != null && Object.hasOwnProperty.call(message, "suggestionTriggerSettings")) $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.encode(message.suggestionTriggerSettings, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; @@ -116610,6 +116621,9 @@ case 7: message.conversationModelConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.decode(reader, reader.uint32()); break; + case 8: + message.conversationProcessConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -116668,6 +116682,11 @@ if (error) return "conversationModelConfig." + error; } + if (message.conversationProcessConfig != null && message.hasOwnProperty("conversationProcessConfig")) { + var error = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.verify(message.conversationProcessConfig); + if (error) + return "conversationProcessConfig." + error; + } return null; }; @@ -116705,6 +116724,11 @@ throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.conversationModelConfig: object expected"); message.conversationModelConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.fromObject(object.conversationModelConfig); } + if (object.conversationProcessConfig != null) { + if (typeof object.conversationProcessConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionFeatureConfig.conversationProcessConfig: object expected"); + message.conversationProcessConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.fromObject(object.conversationProcessConfig); + } return message; }; @@ -116726,6 +116750,7 @@ object.suggestionFeature = null; object.queryConfig = null; object.conversationModelConfig = null; + object.conversationProcessConfig = null; object.suggestionTriggerSettings = null; } if (message.enableEventBasedSuggestion != null && message.hasOwnProperty("enableEventBasedSuggestion")) @@ -116736,6 +116761,8 @@ object.queryConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionQueryConfig.toObject(message.queryConfig, options); if (message.conversationModelConfig != null && message.hasOwnProperty("conversationModelConfig")) object.conversationModelConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.toObject(message.conversationModelConfig, options); + if (message.conversationProcessConfig != null && message.hasOwnProperty("conversationProcessConfig")) + object.conversationProcessConfig = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.toObject(message.conversationProcessConfig, options); if (message.suggestionTriggerSettings != null && message.hasOwnProperty("suggestionTriggerSettings")) object.suggestionTriggerSettings = $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionTriggerSettings.toObject(message.suggestionTriggerSettings, options); return object; @@ -118350,6 +118377,193 @@ return ConversationModelConfig; })(); + HumanAgentAssistantConfig.ConversationProcessConfig = (function() { + + /** + * Properties of a ConversationProcessConfig. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @interface IConversationProcessConfig + * @property {number|null} [recentSentencesCount] ConversationProcessConfig recentSentencesCount + */ + + /** + * Constructs a new ConversationProcessConfig. + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig + * @classdesc Represents a ConversationProcessConfig. + * @implements IConversationProcessConfig + * @constructor + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig=} [properties] Properties to set + */ + function ConversationProcessConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationProcessConfig recentSentencesCount. + * @member {number} recentSentencesCount + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @instance + */ + ConversationProcessConfig.prototype.recentSentencesCount = 0; + + /** + * Creates a new ConversationProcessConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig instance + */ + ConversationProcessConfig.create = function create(properties) { + return new ConversationProcessConfig(properties); + }; + + /** + * Encodes the specified ConversationProcessConfig message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig} message ConversationProcessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationProcessConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recentSentencesCount != null && Object.hasOwnProperty.call(message, "recentSentencesCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.recentSentencesCount); + return writer; + }; + + /** + * Encodes the specified ConversationProcessConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.IConversationProcessConfig} message ConversationProcessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationProcessConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationProcessConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationProcessConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.recentSentencesCount = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationProcessConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationProcessConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationProcessConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationProcessConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recentSentencesCount != null && message.hasOwnProperty("recentSentencesCount")) + if (!$util.isInteger(message.recentSentencesCount)) + return "recentSentencesCount: integer expected"; + return null; + }; + + /** + * Creates a ConversationProcessConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig + */ + ConversationProcessConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig(); + if (object.recentSentencesCount != null) + message.recentSentencesCount = object.recentSentencesCount | 0; + return message; + }; + + /** + * Creates a plain object from a ConversationProcessConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig} message ConversationProcessConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationProcessConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.recentSentencesCount = 0; + if (message.recentSentencesCount != null && message.hasOwnProperty("recentSentencesCount")) + object.recentSentencesCount = message.recentSentencesCount; + return object; + }; + + /** + * Converts this ConversationProcessConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationProcessConfig + * @instance + * @returns {Object.} JSON object + */ + ConversationProcessConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConversationProcessConfig; + })(); + HumanAgentAssistantConfig.MessageAnalysisConfig = (function() { /** diff --git a/protos/protos.json b/protos/protos.json index 53d80ded..7b369f53 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -8794,18 +8794,6 @@ } } }, - "AudioEncoding": { - "values": { - "AUDIO_ENCODING_UNSPECIFIED": 0, - "AUDIO_ENCODING_LINEAR_16": 1, - "AUDIO_ENCODING_FLAC": 2, - "AUDIO_ENCODING_MULAW": 3, - "AUDIO_ENCODING_AMR": 4, - "AUDIO_ENCODING_AMR_WB": 5, - "AUDIO_ENCODING_OGG_OPUS": 6, - "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": 7 - } - }, "SpeechContext": { "fields": { "phrases": { @@ -8819,6 +8807,18 @@ } } }, + "AudioEncoding": { + "values": { + "AUDIO_ENCODING_UNSPECIFIED": 0, + "AUDIO_ENCODING_LINEAR_16": 1, + "AUDIO_ENCODING_FLAC": 2, + "AUDIO_ENCODING_MULAW": 3, + "AUDIO_ENCODING_AMR": 4, + "AUDIO_ENCODING_AMR_WB": 5, + "AUDIO_ENCODING_OGG_OPUS": 6, + "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": 7 + } + }, "SpeechWordInfo": { "fields": { "word": { @@ -10259,7 +10259,10 @@ }, "answerRecord": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/AnswerRecord" + } } } }, @@ -10431,7 +10434,10 @@ }, "latestMessage": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Message" + } }, "contextSize": { "type": "int32", @@ -14771,6 +14777,10 @@ "conversationModelConfig": { "type": "ConversationModelConfig", "id": 7 + }, + "conversationProcessConfig": { + "type": "ConversationProcessConfig", + "id": 8 } } }, @@ -14891,6 +14901,14 @@ } } }, + "ConversationProcessConfig": { + "fields": { + "recentSentencesCount": { + "type": "int32", + "id": 2 + } + } + }, "MessageAnalysisConfig": { "fields": { "enableEntityExtraction": { diff --git a/src/v2beta1/agents_client.ts b/src/v2beta1/agents_client.ts index 025363ef..70a639ad 100644 --- a/src/v2beta1/agents_client.ts +++ b/src/v2beta1/agents_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v2beta1/answer_records_client.ts b/src/v2beta1/answer_records_client.ts index 045cbe32..68b9fca6 100644 --- a/src/v2beta1/answer_records_client.ts +++ b/src/v2beta1/answer_records_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v2beta1/contexts_client.ts b/src/v2beta1/contexts_client.ts index 48be4e98..adbde24f 100644 --- a/src/v2beta1/contexts_client.ts +++ b/src/v2beta1/contexts_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v2beta1/conversation_profiles_client.ts b/src/v2beta1/conversation_profiles_client.ts index 743d03f2..9b68c2a4 100644 --- a/src/v2beta1/conversation_profiles_client.ts +++ b/src/v2beta1/conversation_profiles_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v2beta1/conversations_client.ts b/src/v2beta1/conversations_client.ts index 08c70f20..d1fec73f 100644 --- a/src/v2beta1/conversations_client.ts +++ b/src/v2beta1/conversations_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v2beta1/documents_client.ts b/src/v2beta1/documents_client.ts index 4937a355..f5b16e6c 100644 --- a/src/v2beta1/documents_client.ts +++ b/src/v2beta1/documents_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v2beta1/entity_types_client.ts b/src/v2beta1/entity_types_client.ts index fd09e927..6e0c0d47 100644 --- a/src/v2beta1/entity_types_client.ts +++ b/src/v2beta1/entity_types_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v2beta1/environments_client.ts b/src/v2beta1/environments_client.ts index ba509504..8d73b4b8 100644 --- a/src/v2beta1/environments_client.ts +++ b/src/v2beta1/environments_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v2beta1/fulfillments_client.ts b/src/v2beta1/fulfillments_client.ts index 8ac73596..c3e73526 100644 --- a/src/v2beta1/fulfillments_client.ts +++ b/src/v2beta1/fulfillments_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v2beta1/index.ts b/src/v2beta1/index.ts index 7214e5d9..d11d0540 100644 --- a/src/v2beta1/index.ts +++ b/src/v2beta1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v2beta1/intents_client.ts b/src/v2beta1/intents_client.ts index 4f79cb90..604d8ff5 100644 --- a/src/v2beta1/intents_client.ts +++ b/src/v2beta1/intents_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v2beta1/knowledge_bases_client.ts b/src/v2beta1/knowledge_bases_client.ts index e0e912da..666fc33a 100644 --- a/src/v2beta1/knowledge_bases_client.ts +++ b/src/v2beta1/knowledge_bases_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v2beta1/participants_client.ts b/src/v2beta1/participants_client.ts index e483813a..de8aea0c 100644 --- a/src/v2beta1/participants_client.ts +++ b/src/v2beta1/participants_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v2beta1/session_entity_types_client.ts b/src/v2beta1/session_entity_types_client.ts index 490cd67e..1da6a4ca 100644 --- a/src/v2beta1/session_entity_types_client.ts +++ b/src/v2beta1/session_entity_types_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v2beta1/sessions_client.ts b/src/v2beta1/sessions_client.ts index d69acaed..51d1deae 100644 --- a/src/v2beta1/sessions_client.ts +++ b/src/v2beta1/sessions_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v2beta1/versions_client.ts b/src/v2beta1/versions_client.ts index 9f2278ed..be852606 100644 --- a/src/v2beta1/versions_client.ts +++ b/src/v2beta1/versions_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_agents_v2beta1.ts b/test/gapic_agents_v2beta1.ts index 07fc5980..cdd05469 100644 --- a/test/gapic_agents_v2beta1.ts +++ b/test/gapic_agents_v2beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_answer_records_v2beta1.ts b/test/gapic_answer_records_v2beta1.ts index 51cdb21c..7f89599a 100644 --- a/test/gapic_answer_records_v2beta1.ts +++ b/test/gapic_answer_records_v2beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_contexts_v2beta1.ts b/test/gapic_contexts_v2beta1.ts index 8fc4e7f6..b2713a4e 100644 --- a/test/gapic_contexts_v2beta1.ts +++ b/test/gapic_contexts_v2beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_conversation_profiles_v2beta1.ts b/test/gapic_conversation_profiles_v2beta1.ts index b16ceea2..6a8818b7 100644 --- a/test/gapic_conversation_profiles_v2beta1.ts +++ b/test/gapic_conversation_profiles_v2beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_conversations_v2beta1.ts b/test/gapic_conversations_v2beta1.ts index 45ccb60f..256cc416 100644 --- a/test/gapic_conversations_v2beta1.ts +++ b/test/gapic_conversations_v2beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_documents_v2beta1.ts b/test/gapic_documents_v2beta1.ts index d6392b9b..41e1c02c 100644 --- a/test/gapic_documents_v2beta1.ts +++ b/test/gapic_documents_v2beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_entity_types_v2beta1.ts b/test/gapic_entity_types_v2beta1.ts index b38c1584..eaeb30ef 100644 --- a/test/gapic_entity_types_v2beta1.ts +++ b/test/gapic_entity_types_v2beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_environments_v2beta1.ts b/test/gapic_environments_v2beta1.ts index dfe9b332..240698d1 100644 --- a/test/gapic_environments_v2beta1.ts +++ b/test/gapic_environments_v2beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_fulfillments_v2beta1.ts b/test/gapic_fulfillments_v2beta1.ts index 28da3990..bd7ba741 100644 --- a/test/gapic_fulfillments_v2beta1.ts +++ b/test/gapic_fulfillments_v2beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_intents_v2beta1.ts b/test/gapic_intents_v2beta1.ts index d9a486d0..d3eb5935 100644 --- a/test/gapic_intents_v2beta1.ts +++ b/test/gapic_intents_v2beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_knowledge_bases_v2beta1.ts b/test/gapic_knowledge_bases_v2beta1.ts index a7f11e91..8e66ac75 100644 --- a/test/gapic_knowledge_bases_v2beta1.ts +++ b/test/gapic_knowledge_bases_v2beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_participants_v2beta1.ts b/test/gapic_participants_v2beta1.ts index 9c5da78f..924fa8dd 100644 --- a/test/gapic_participants_v2beta1.ts +++ b/test/gapic_participants_v2beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_session_entity_types_v2beta1.ts b/test/gapic_session_entity_types_v2beta1.ts index a0a745ce..246bc848 100644 --- a/test/gapic_session_entity_types_v2beta1.ts +++ b/test/gapic_session_entity_types_v2beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_sessions_v2beta1.ts b/test/gapic_sessions_v2beta1.ts index 06aed114..d7dce320 100644 --- a/test/gapic_sessions_v2beta1.ts +++ b/test/gapic_sessions_v2beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_versions_v2beta1.ts b/test/gapic_versions_v2beta1.ts index e7c090e2..ed652b33 100644 --- a/test/gapic_versions_v2beta1.ts +++ b/test/gapic_versions_v2beta1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.