From 361e7d9d1f596a6280f07a1ce20456195a943d7a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 7 Apr 2022 19:08:11 +0000 Subject: [PATCH] chore: remove unused imports (#246) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 439948451 Source-Link: https://github.com/googleapis/googleapis/commit/1a8770e28e2ddfe4e0d2294bf96a07809fb39246 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d1f308e5391f1ac1ad9b7886b1102b7655b43e96 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDFmMzA4ZTUzOTFmMWFjMWFkOWI3ODg2YjExMDJiNzY1NWI0M2U5NiJ9 feat: added support for locking an agent for changes feat: added data format specification for export agent PiperOrigin-RevId: 437848093 Source-Link: https://github.com/googleapis/googleapis/commit/daffb064bf5d35b76de530a9c9de6e0728c35afd Source-Link: https://github.com/googleapis/googleapis-gen/commit/b851ca5cc592a5b9c865cbe67736d67205072dce Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjg1MWNhNWNjNTkyYTViOWM4NjVjYmU2NzczNmQ2NzIwNTA3MmRjZSJ9 feat: added support for locking an agent for changes feat: added data format specification for export agent PiperOrigin-RevId: 437338899 Source-Link: https://github.com/googleapis/googleapis/commit/94287f458601246309c910b8fc5e4f8c6583fefd Source-Link: https://github.com/googleapis/googleapis-gen/commit/c0bb2ea072245b0731a9f208ae64082de073f238 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzBiYjJlYTA3MjI0NWIwNzMxYTlmMjA4YWU2NDA4MmRlMDczZjIzOCJ9 --- .../dialogflow/cx/v3/advanced_settings.proto | 2 - .../google/cloud/dialogflow/cx/v3/agent.proto | 16 ++ .../cloud/dialogflow/cx/v3/audio_config.proto | 1 - .../cloud/dialogflow/cx/v3beta1/agent.proto | 16 ++ .../cloud/dialogflow/cx/v3beta1/session.proto | 35 ++-- protos/protos.d.ts | 66 ++++-- protos/protos.js | 194 +++++++++++++++--- protos/protos.json | 74 +++++-- samples/generated/v3/agents.export_agent.js | 4 + ...etadata.google.cloud.dialogflow.cx.v3.json | 6 +- .../generated/v3beta1/agents.export_agent.js | 4 + ...ta.google.cloud.dialogflow.cx.v3beta1.json | 6 +- src/v3/agents_client.ts | 2 + src/v3beta1/agents_client.ts | 2 + 14 files changed, 350 insertions(+), 78 deletions(-) diff --git a/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto b/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto index 904faab8..3d3e6b84 100644 --- a/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto +++ b/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto @@ -16,8 +16,6 @@ syntax = "proto3"; package google.cloud.dialogflow.cx.v3; -import "google/api/field_behavior.proto"; - option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; diff --git a/protos/google/cloud/dialogflow/cx/v3/agent.proto b/protos/google/cloud/dialogflow/cx/v3/agent.proto index 49a2ae5d..27916ae8 100644 --- a/protos/google/cloud/dialogflow/cx/v3/agent.proto +++ b/protos/google/cloud/dialogflow/cx/v3/agent.proto @@ -249,6 +249,10 @@ message Agent { // requests. bool enable_spell_correction = 20; + // Indiciates whether the agent is locked for changes. If the agent is locked, + // modifications to the agent will be rejected except for [RestoreAgent][]. + bool locked = 27; + // Hierarchical advanced settings for this agent. The settings exposed at the // lower level overrides the settings exposed at the higher level. AdvancedSettings advanced_settings = 22; @@ -335,6 +339,15 @@ message DeleteAgentRequest { // The request message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3.Agents.ExportAgent]. message ExportAgentRequest { + // Data format of the exported agent. + enum DataFormat { + // Unspecified format. + DATA_FORMAT_UNSPECIFIED = 0; + + // Agent content will be exported as raw bytes. + BLOB = 1; + } + // Required. The name of the agent to export. // Format: `projects//locations//agents/`. string name = 1 [ @@ -356,6 +369,9 @@ message ExportAgentRequest { // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). string agent_uri = 2 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The data format of the exported agent. If not specified, `BLOB` is assumed. + DataFormat data_format = 3 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Environment name. If not set, draft environment is assumed. // Format: `projects//locations//agents//environments/`. diff --git a/protos/google/cloud/dialogflow/cx/v3/audio_config.proto b/protos/google/cloud/dialogflow/cx/v3/audio_config.proto index 79eea1aa..658ed80d 100644 --- a/protos/google/cloud/dialogflow/cx/v3/audio_config.proto +++ b/protos/google/cloud/dialogflow/cx/v3/audio_config.proto @@ -17,7 +17,6 @@ syntax = "proto3"; package google.cloud.dialogflow.cx.v3; import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; import "google/protobuf/duration.proto"; option cc_enable_arenas = true; diff --git a/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto b/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto index 6d11b1e7..7e1e2f10 100644 --- a/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto +++ b/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto @@ -249,6 +249,10 @@ message Agent { // requests. bool enable_spell_correction = 20; + // Indiciates whether the agent is locked for changes. If the agent is locked, + // modifications to the agent will be rejected except for [RestoreAgent][]. + bool locked = 27; + // Hierarchical advanced settings for this agent. The settings exposed at the // lower level overrides the settings exposed at the higher level. AdvancedSettings advanced_settings = 22; @@ -335,6 +339,15 @@ message DeleteAgentRequest { // The request message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent]. message ExportAgentRequest { + // Data format of the exported agent. + enum DataFormat { + // Unspecified format. + DATA_FORMAT_UNSPECIFIED = 0; + + // Agent content will be exported as raw bytes. + BLOB = 1; + } + // Required. The name of the agent to export. // Format: `projects//locations//agents/`. string name = 1 [ @@ -356,6 +369,9 @@ message ExportAgentRequest { // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). string agent_uri = 2 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The data format of the exported agent. If not specified, `BLOB` is assumed. + DataFormat data_format = 3 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Environment name. If not set, draft environment is assumed. // Format: `projects//locations//agents//environments/`. diff --git a/protos/google/cloud/dialogflow/cx/v3beta1/session.proto b/protos/google/cloud/dialogflow/cx/v3beta1/session.proto index 24ce93e2..65716909 100644 --- a/protos/google/cloud/dialogflow/cx/v3beta1/session.proto +++ b/protos/google/cloud/dialogflow/cx/v3beta1/session.proto @@ -198,26 +198,27 @@ message DetectIntentResponse { // // Multiple request messages should be sent in order: // -// 1. The first message must contain -// [session][google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest.session], -// [query_input][google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest.query_input] plus optionally -// [query_params][google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest.query_params]. If the client -// wants to receive an audio response, it should also contain -// [output_audio_config][google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest.output_audio_config]. +// 1. The first message must contain +// [session][google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest.session], +// [query_input][google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest.query_input] plus optionally +// [query_params][google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest.query_params]. If the client +// wants to receive an audio response, it should also contain +// [output_audio_config][google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest.output_audio_config]. // // 2. If [query_input][google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest.query_input] was set to -// [query_input.audio.config][google.cloud.dialogflow.cx.v3beta1.AudioInput.config], all subsequent messages -// must contain [query_input.audio.audio][google.cloud.dialogflow.cx.v3beta1.AudioInput.audio] to continue with -// Speech recognition. -// If you decide to rather detect an intent from text -// input after you already started Speech recognition, please send a message -// with [query_input.text][google.cloud.dialogflow.cx.v3beta1.QueryInput.text]. +// [query_input.audio.config][google.cloud.dialogflow.cx.v3beta1.AudioInput.config], all subsequent messages +// must contain [query_input.audio.audio][google.cloud.dialogflow.cx.v3beta1.AudioInput.audio] to continue with +// Speech recognition. +// If you decide to rather detect an intent from text +// input after you already started Speech recognition, please send a message +// with [query_input.text][google.cloud.dialogflow.cx.v3beta1.QueryInput.text]. // -// However, note that: -// * Dialogflow will bill you for the audio duration so far. -// * Dialogflow discards all Speech recognition results in favor of the input -// text. -// * Dialogflow will use the language code from the first message. +// However, note that: +// +// * Dialogflow will bill you for the audio duration so far. +// * Dialogflow discards all Speech recognition results in favor of the +// input text. +// * Dialogflow will use the language code from the first message. // // After you sent all input, you must half-close or abort the request stream. message StreamingDetectIntentRequest { diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 5ef0abea..05872fd6 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -560,6 +560,9 @@ export namespace google { /** Agent enableSpellCorrection */ enableSpellCorrection?: (boolean|null); + /** Agent locked */ + locked?: (boolean|null); + /** Agent advancedSettings */ advancedSettings?: (google.cloud.dialogflow.cx.v3.IAdvancedSettings|null); } @@ -609,6 +612,9 @@ export namespace google { /** Agent enableSpellCorrection. */ public enableSpellCorrection: boolean; + /** Agent locked. */ + public locked: boolean; + /** Agent advancedSettings. */ public advancedSettings?: (google.cloud.dialogflow.cx.v3.IAdvancedSettings|null); @@ -1262,6 +1268,9 @@ export namespace google { /** ExportAgentRequest agentUri */ agentUri?: (string|null); + /** ExportAgentRequest dataFormat */ + dataFormat?: (google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat|keyof typeof google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat|null); + /** ExportAgentRequest environment */ environment?: (string|null); } @@ -1281,6 +1290,9 @@ export namespace google { /** ExportAgentRequest agentUri. */ public agentUri: string; + /** ExportAgentRequest dataFormat. */ + public dataFormat: (google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat|keyof typeof google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat); + /** ExportAgentRequest environment. */ public environment: string; @@ -1355,6 +1367,15 @@ export namespace google { public toJSON(): { [k: string]: any }; } + namespace ExportAgentRequest { + + /** DataFormat enum. */ + enum DataFormat { + DATA_FORMAT_UNSPECIFIED = 0, + BLOB = 1 + } + } + /** Properties of an ExportAgentResponse. */ interface IExportAgentResponse { @@ -28460,6 +28481,9 @@ export namespace google { /** Agent enableSpellCorrection */ enableSpellCorrection?: (boolean|null); + /** Agent locked */ + locked?: (boolean|null); + /** Agent advancedSettings */ advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); } @@ -28509,6 +28533,9 @@ export namespace google { /** Agent enableSpellCorrection. */ public enableSpellCorrection: boolean; + /** Agent locked. */ + public locked: boolean; + /** Agent advancedSettings. */ public advancedSettings?: (google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null); @@ -29162,6 +29189,9 @@ export namespace google { /** ExportAgentRequest agentUri */ agentUri?: (string|null); + /** ExportAgentRequest dataFormat */ + dataFormat?: (google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat|keyof typeof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat|null); + /** ExportAgentRequest environment */ environment?: (string|null); } @@ -29181,6 +29211,9 @@ export namespace google { /** ExportAgentRequest agentUri. */ public agentUri: string; + /** ExportAgentRequest dataFormat. */ + public dataFormat: (google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat|keyof typeof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat); + /** ExportAgentRequest environment. */ public environment: string; @@ -29255,6 +29288,15 @@ export namespace google { public toJSON(): { [k: string]: any }; } + namespace ExportAgentRequest { + + /** DataFormat enum. */ + enum DataFormat { + DATA_FORMAT_UNSPECIFIED = 0, + BLOB = 1 + } + } + /** Properties of an ExportAgentResponse. */ interface IExportAgentResponse { @@ -55832,18 +55874,6 @@ export namespace google { /** Namespace api. */ namespace api { - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7 - } - /** Properties of a Http. */ interface IHttp { @@ -56183,6 +56213,18 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 + } + /** Properties of a ResourceDescriptor. */ interface IResourceDescriptor { diff --git a/protos/protos.js b/protos/protos.js index 383871b0..c8f34a2f 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -1014,6 +1014,7 @@ * @property {string|null} [securitySettings] Agent securitySettings * @property {boolean|null} [enableStackdriverLogging] Agent enableStackdriverLogging * @property {boolean|null} [enableSpellCorrection] Agent enableSpellCorrection + * @property {boolean|null} [locked] Agent locked * @property {google.cloud.dialogflow.cx.v3.IAdvancedSettings|null} [advancedSettings] Agent advancedSettings */ @@ -1129,6 +1130,14 @@ */ Agent.prototype.enableSpellCorrection = false; + /** + * Agent locked. + * @member {boolean} locked + * @memberof google.cloud.dialogflow.cx.v3.Agent + * @instance + */ + Agent.prototype.locked = false; + /** * Agent advancedSettings. * @member {google.cloud.dialogflow.cx.v3.IAdvancedSettings|null|undefined} advancedSettings @@ -1188,6 +1197,8 @@ writer.uint32(/* id 20, wireType 0 =*/160).bool(message.enableSpellCorrection); if (message.advancedSettings != null && Object.hasOwnProperty.call(message, "advancedSettings")) $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.encode(message.advancedSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.locked != null && Object.hasOwnProperty.call(message, "locked")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.locked); return writer; }; @@ -1260,6 +1271,9 @@ case 20: message.enableSpellCorrection = reader.bool(); break; + case 27: + message.locked = reader.bool(); + break; case 22: message.advancedSettings = $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.decode(reader, reader.uint32()); break; @@ -1340,6 +1354,9 @@ if (message.enableSpellCorrection != null && message.hasOwnProperty("enableSpellCorrection")) if (typeof message.enableSpellCorrection !== "boolean") return "enableSpellCorrection: boolean expected"; + if (message.locked != null && message.hasOwnProperty("locked")) + if (typeof message.locked !== "boolean") + return "locked: boolean expected"; if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) { var error = $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.verify(message.advancedSettings); if (error) @@ -1392,6 +1409,8 @@ message.enableStackdriverLogging = Boolean(object.enableStackdriverLogging); if (object.enableSpellCorrection != null) message.enableSpellCorrection = Boolean(object.enableSpellCorrection); + if (object.locked != null) + message.locked = Boolean(object.locked); if (object.advancedSettings != null) { if (typeof object.advancedSettings !== "object") throw TypeError(".google.cloud.dialogflow.cx.v3.Agent.advancedSettings: object expected"); @@ -1428,6 +1447,7 @@ object.enableStackdriverLogging = false; object.enableSpellCorrection = false; object.advancedSettings = null; + object.locked = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -1458,6 +1478,8 @@ object.enableSpellCorrection = message.enableSpellCorrection; if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) object.advancedSettings = $root.google.cloud.dialogflow.cx.v3.AdvancedSettings.toObject(message.advancedSettings, options); + if (message.locked != null && message.hasOwnProperty("locked")) + object.locked = message.locked; return object; }; @@ -2755,6 +2777,7 @@ * @interface IExportAgentRequest * @property {string|null} [name] ExportAgentRequest name * @property {string|null} [agentUri] ExportAgentRequest agentUri + * @property {google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat|null} [dataFormat] ExportAgentRequest dataFormat * @property {string|null} [environment] ExportAgentRequest environment */ @@ -2789,6 +2812,14 @@ */ ExportAgentRequest.prototype.agentUri = ""; + /** + * ExportAgentRequest dataFormat. + * @member {google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat} dataFormat + * @memberof google.cloud.dialogflow.cx.v3.ExportAgentRequest + * @instance + */ + ExportAgentRequest.prototype.dataFormat = 0; + /** * ExportAgentRequest environment. * @member {string} environment @@ -2825,6 +2856,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.agentUri != null && Object.hasOwnProperty.call(message, "agentUri")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.agentUri); + if (message.dataFormat != null && Object.hasOwnProperty.call(message, "dataFormat")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.dataFormat); if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.environment); return writer; @@ -2867,6 +2900,9 @@ case 2: message.agentUri = reader.string(); break; + case 3: + message.dataFormat = reader.int32(); + break; case 5: message.environment = reader.string(); break; @@ -2911,6 +2947,14 @@ if (message.agentUri != null && message.hasOwnProperty("agentUri")) if (!$util.isString(message.agentUri)) return "agentUri: string expected"; + if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) + switch (message.dataFormat) { + default: + return "dataFormat: enum value expected"; + case 0: + case 1: + break; + } if (message.environment != null && message.hasOwnProperty("environment")) if (!$util.isString(message.environment)) return "environment: string expected"; @@ -2933,6 +2977,16 @@ message.name = String(object.name); if (object.agentUri != null) message.agentUri = String(object.agentUri); + switch (object.dataFormat) { + case "DATA_FORMAT_UNSPECIFIED": + case 0: + message.dataFormat = 0; + break; + case "BLOB": + case 1: + message.dataFormat = 1; + break; + } if (object.environment != null) message.environment = String(object.environment); return message; @@ -2954,12 +3008,15 @@ if (options.defaults) { object.name = ""; object.agentUri = ""; + object.dataFormat = options.enums === String ? "DATA_FORMAT_UNSPECIFIED" : 0; object.environment = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.agentUri != null && message.hasOwnProperty("agentUri")) object.agentUri = message.agentUri; + if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) + object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat[message.dataFormat] : message.dataFormat; if (message.environment != null && message.hasOwnProperty("environment")) object.environment = message.environment; return object; @@ -2976,6 +3033,20 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * DataFormat enum. + * @name google.cloud.dialogflow.cx.v3.ExportAgentRequest.DataFormat + * @enum {number} + * @property {number} DATA_FORMAT_UNSPECIFIED=0 DATA_FORMAT_UNSPECIFIED value + * @property {number} BLOB=1 BLOB value + */ + ExportAgentRequest.DataFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "BLOB"] = 1; + return values; + })(); + return ExportAgentRequest; })(); @@ -66503,6 +66574,7 @@ * @property {string|null} [securitySettings] Agent securitySettings * @property {boolean|null} [enableStackdriverLogging] Agent enableStackdriverLogging * @property {boolean|null} [enableSpellCorrection] Agent enableSpellCorrection + * @property {boolean|null} [locked] Agent locked * @property {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null} [advancedSettings] Agent advancedSettings */ @@ -66618,6 +66690,14 @@ */ Agent.prototype.enableSpellCorrection = false; + /** + * Agent locked. + * @member {boolean} locked + * @memberof google.cloud.dialogflow.cx.v3beta1.Agent + * @instance + */ + Agent.prototype.locked = false; + /** * Agent advancedSettings. * @member {google.cloud.dialogflow.cx.v3beta1.IAdvancedSettings|null|undefined} advancedSettings @@ -66677,6 +66757,8 @@ writer.uint32(/* id 20, wireType 0 =*/160).bool(message.enableSpellCorrection); if (message.advancedSettings != null && Object.hasOwnProperty.call(message, "advancedSettings")) $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.encode(message.advancedSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.locked != null && Object.hasOwnProperty.call(message, "locked")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.locked); return writer; }; @@ -66749,6 +66831,9 @@ case 20: message.enableSpellCorrection = reader.bool(); break; + case 27: + message.locked = reader.bool(); + break; case 22: message.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.decode(reader, reader.uint32()); break; @@ -66829,6 +66914,9 @@ if (message.enableSpellCorrection != null && message.hasOwnProperty("enableSpellCorrection")) if (typeof message.enableSpellCorrection !== "boolean") return "enableSpellCorrection: boolean expected"; + if (message.locked != null && message.hasOwnProperty("locked")) + if (typeof message.locked !== "boolean") + return "locked: boolean expected"; if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) { var error = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.verify(message.advancedSettings); if (error) @@ -66881,6 +66969,8 @@ message.enableStackdriverLogging = Boolean(object.enableStackdriverLogging); if (object.enableSpellCorrection != null) message.enableSpellCorrection = Boolean(object.enableSpellCorrection); + if (object.locked != null) + message.locked = Boolean(object.locked); if (object.advancedSettings != null) { if (typeof object.advancedSettings !== "object") throw TypeError(".google.cloud.dialogflow.cx.v3beta1.Agent.advancedSettings: object expected"); @@ -66917,6 +67007,7 @@ object.enableStackdriverLogging = false; object.enableSpellCorrection = false; object.advancedSettings = null; + object.locked = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -66947,6 +67038,8 @@ object.enableSpellCorrection = message.enableSpellCorrection; if (message.advancedSettings != null && message.hasOwnProperty("advancedSettings")) object.advancedSettings = $root.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.toObject(message.advancedSettings, options); + if (message.locked != null && message.hasOwnProperty("locked")) + object.locked = message.locked; return object; }; @@ -68244,6 +68337,7 @@ * @interface IExportAgentRequest * @property {string|null} [name] ExportAgentRequest name * @property {string|null} [agentUri] ExportAgentRequest agentUri + * @property {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat|null} [dataFormat] ExportAgentRequest dataFormat * @property {string|null} [environment] ExportAgentRequest environment */ @@ -68278,6 +68372,14 @@ */ ExportAgentRequest.prototype.agentUri = ""; + /** + * ExportAgentRequest dataFormat. + * @member {google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat} dataFormat + * @memberof google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + * @instance + */ + ExportAgentRequest.prototype.dataFormat = 0; + /** * ExportAgentRequest environment. * @member {string} environment @@ -68314,6 +68416,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.agentUri != null && Object.hasOwnProperty.call(message, "agentUri")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.agentUri); + if (message.dataFormat != null && Object.hasOwnProperty.call(message, "dataFormat")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.dataFormat); if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.environment); return writer; @@ -68356,6 +68460,9 @@ case 2: message.agentUri = reader.string(); break; + case 3: + message.dataFormat = reader.int32(); + break; case 5: message.environment = reader.string(); break; @@ -68400,6 +68507,14 @@ if (message.agentUri != null && message.hasOwnProperty("agentUri")) if (!$util.isString(message.agentUri)) return "agentUri: string expected"; + if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) + switch (message.dataFormat) { + default: + return "dataFormat: enum value expected"; + case 0: + case 1: + break; + } if (message.environment != null && message.hasOwnProperty("environment")) if (!$util.isString(message.environment)) return "environment: string expected"; @@ -68422,6 +68537,16 @@ message.name = String(object.name); if (object.agentUri != null) message.agentUri = String(object.agentUri); + switch (object.dataFormat) { + case "DATA_FORMAT_UNSPECIFIED": + case 0: + message.dataFormat = 0; + break; + case "BLOB": + case 1: + message.dataFormat = 1; + break; + } if (object.environment != null) message.environment = String(object.environment); return message; @@ -68443,12 +68568,15 @@ if (options.defaults) { object.name = ""; object.agentUri = ""; + object.dataFormat = options.enums === String ? "DATA_FORMAT_UNSPECIFIED" : 0; object.environment = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.agentUri != null && message.hasOwnProperty("agentUri")) object.agentUri = message.agentUri; + if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) + object.dataFormat = options.enums === String ? $root.google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat[message.dataFormat] : message.dataFormat; if (message.environment != null && message.hasOwnProperty("environment")) object.environment = message.environment; return object; @@ -68465,6 +68593,20 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * DataFormat enum. + * @name google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat + * @enum {number} + * @property {number} DATA_FORMAT_UNSPECIFIED=0 DATA_FORMAT_UNSPECIFIED value + * @property {number} BLOB=1 BLOB value + */ + ExportAgentRequest.DataFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "BLOB"] = 1; + return values; + })(); + return ExportAgentRequest; })(); @@ -131062,32 +131204,6 @@ */ var api = {}; - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - return values; - })(); - api.Http = (function() { /** @@ -131992,6 +132108,32 @@ return CustomHttpPattern; })(); + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + api.ResourceDescriptor = (function() { /** diff --git a/protos/protos.json b/protos/protos.json index a703ad69..aa347dd4 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -310,6 +310,10 @@ "type": "bool", "id": 20 }, + "locked": { + "type": "bool", + "id": 27 + }, "advancedSettings": { "type": "AdvancedSettings", "id": 22 @@ -424,6 +428,13 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "dataFormat": { + "type": "DataFormat", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "environment": { "type": "string", "id": 5, @@ -432,6 +443,14 @@ "(google.api.resource_reference).type": "dialogflow.googleapis.com/Environment" } } + }, + "nested": { + "DataFormat": { + "values": { + "DATA_FORMAT_UNSPECIFIED": 0, + "BLOB": 1 + } + } } }, "ExportAgentResponse": { @@ -7788,6 +7807,10 @@ "type": "bool", "id": 20 }, + "locked": { + "type": "bool", + "id": 27 + }, "advancedSettings": { "type": "AdvancedSettings", "id": 22 @@ -7902,6 +7925,13 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "dataFormat": { + "type": "DataFormat", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "environment": { "type": "string", "id": 5, @@ -7910,6 +7940,14 @@ "(google.api.resource_reference).type": "dialogflow.googleapis.com/Environment" } } + }, + "nested": { + "DataFormat": { + "values": { + "DATA_FORMAT_UNSPECIFIED": 0, + "BLOB": 1 + } + } } }, "ExportAgentResponse": { @@ -14980,24 +15018,6 @@ "cc_enable_arenas": true }, "nested": { - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7 - } - }, "http": { "type": "HttpRule", "id": 72295728, @@ -15101,6 +15121,24 @@ "id": 1050, "extend": "google.protobuf.ServiceOptions" }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 + } + }, "resourceReference": { "type": "google.api.ResourceReference", "id": 1055, diff --git a/samples/generated/v3/agents.export_agent.js b/samples/generated/v3/agents.export_agent.js index 8af1a552..f028c286 100644 --- a/samples/generated/v3/agents.export_agent.js +++ b/samples/generated/v3/agents.export_agent.js @@ -42,6 +42,10 @@ function main(name) { * control (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). */ // const agentUri = 'abc123' + /** + * Optional. The data format of the exported agent. If not specified, `BLOB` is assumed. + */ + // const dataFormat = {} /** * Optional. Environment name. If not set, draft environment is assumed. * Format: `projects//locations//agents//locations//agents//locations//agents//locations//agents/