From 283c389cc220b9f192f15822ef2d1e38f35d6103 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 8 Mar 2022 16:19:52 -0800 Subject: [PATCH] feat: added page in TestConfig (#239) * feat: added page in TestConfig docs: clarified wording around Cloud Storage usage PiperOrigin-RevId: 433282831 Source-Link: https://github.com/googleapis/googleapis/commit/0e87dc72494d3a084b61615c784b71263a5a45ce Source-Link: https://github.com/googleapis/googleapis-gen/commit/1928631f3ee91488fe07b3d8188a52d10862453a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTkyODYzMWYzZWU5MTQ4OGZlMDdiM2Q4MTg4YTUyZDEwODYyNDUzYSJ9 --- .../google/cloud/dialogflow/cx/v3/agent.proto | 12 +++++++ .../google/cloud/dialogflow/cx/v3/flow.proto | 12 +++++++ .../cloud/dialogflow/cx/v3/test_case.proto | 31 ++++++++++++++++++- protos/protos.d.ts | 6 ++++ protos/protos.js | 25 ++++++++++++++- protos/protos.json | 7 +++++ samples/generated/v3/agents.export_agent.js | 5 +++ samples/generated/v3/agents.restore_agent.js | 5 +++ samples/generated/v3/flows.export_flow.js | 5 +++ samples/generated/v3/flows.import_flow.js | 5 +++ ...etadata.google.cloud.dialogflow.cx.v3.json | 12 +++---- .../v3/test_cases.export_test_cases.js | 5 +++ .../v3/test_cases.import_test_cases.js | 5 +++ src/v3/agents_client.ts | 12 +++++++ src/v3/flows_client.ts | 12 +++++++ src/v3/test_cases_client.ts | 12 +++++++ 16 files changed, 163 insertions(+), 8 deletions(-) diff --git a/protos/google/cloud/dialogflow/cx/v3/agent.proto b/protos/google/cloud/dialogflow/cx/v3/agent.proto index f10a4c08..49a2ae5d 100644 --- a/protos/google/cloud/dialogflow/cx/v3/agent.proto +++ b/protos/google/cloud/dialogflow/cx/v3/agent.proto @@ -348,6 +348,12 @@ message ExportAgentRequest { // export the agent to. The format of this URI must be // `gs:///`. // If left unspecified, the serialized agent is returned inline. + // + // Dialogflow performs a write operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have write permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). string agent_uri = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Environment name. If not set, draft environment is assumed. @@ -405,6 +411,12 @@ message RestoreAgentRequest { // The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI // to restore agent from. The format of this URI must be // `gs:///`. + // + // Dialogflow performs a read operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have read permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). string agent_uri = 2; // Uncompressed raw byte content for agent. diff --git a/protos/google/cloud/dialogflow/cx/v3/flow.proto b/protos/google/cloud/dialogflow/cx/v3/flow.proto index 23d1bd8d..eec27823 100644 --- a/protos/google/cloud/dialogflow/cx/v3/flow.proto +++ b/protos/google/cloud/dialogflow/cx/v3/flow.proto @@ -559,6 +559,12 @@ message ImportFlowRequest { // The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI // to import flow from. The format of this URI must be // `gs:///`. + // + // Dialogflow performs a read operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have read permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). string flow_uri = 2; // Uncompressed raw byte content for flow. @@ -595,6 +601,12 @@ message ExportFlowRequest { // export the flow to. The format of this URI must be // `gs:///`. // If left unspecified, the serialized flow is returned inline. + // + // Dialogflow performs a write operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have write permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). string flow_uri = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Whether to export flows referenced by the specified flow. diff --git a/protos/google/cloud/dialogflow/cx/v3/test_case.proto b/protos/google/cloud/dialogflow/cx/v3/test_case.proto index 65301287..1192568d 100644 --- a/protos/google/cloud/dialogflow/cx/v3/test_case.proto +++ b/protos/google/cloud/dialogflow/cx/v3/test_case.proto @@ -270,12 +270,29 @@ message TestConfig { // Session parameters to be compared when calculating differences. repeated string tracking_parameters = 1; - // Flow name. If not set, default start flow is assumed. + // Flow name to start the test case with. // Format: `projects//locations//agents//flows/`. + // + // Only one of `flow` and `page` should be set to indicate the starting point + // of the test case. If both are set, `page` takes precedence over `flow`. If + // neither is set, the test case will start with start page on the default + // start flow. string flow = 2 [(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" }]; + + // The [page][google.cloud.dialogflow.cx.v3.Page] to start the test case with. + // Format: `projects//locations//agents//flows//pages/`. + // + // Only one of `flow` and `page` should be set to indicate the starting point + // of the test case. If both are set, `page` takes precedence over `flow`. If + // neither is set, the test case will start with start page on the default + // start flow. + string page = 3 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Page" + }]; } // One interaction between a human and virtual agent. The human provides some @@ -744,6 +761,12 @@ message ImportTestCasesRequest { // The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI // to import test cases from. The format of this URI must be // `gs:///`. + // + // Dialogflow performs a read operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have read permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). string gcs_uri = 2; // Uncompressed raw byte content for test cases. @@ -806,6 +829,12 @@ message ExportTestCasesRequest { // export the test cases to. The format of this URI must be // `gs:///`. If unspecified, the serialized test // cases is returned inline. + // + // Dialogflow performs a write operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have write permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). string gcs_uri = 2; } diff --git a/protos/protos.d.ts b/protos/protos.d.ts index fb7868e2..b38b72dd 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -12305,6 +12305,9 @@ export namespace google { /** TestConfig flow */ flow?: (string|null); + + /** TestConfig page */ + page?: (string|null); } /** Represents a TestConfig. */ @@ -12322,6 +12325,9 @@ export namespace google { /** TestConfig flow. */ public flow: string; + /** TestConfig page. */ + public page: string; + /** * Creates a new TestConfig instance using the specified properties. * @param [properties] Properties to set diff --git a/protos/protos.js b/protos/protos.js index 85565c96..a54ac946 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -28579,6 +28579,7 @@ * @interface ITestConfig * @property {Array.|null} [trackingParameters] TestConfig trackingParameters * @property {string|null} [flow] TestConfig flow + * @property {string|null} [page] TestConfig page */ /** @@ -28613,6 +28614,14 @@ */ TestConfig.prototype.flow = ""; + /** + * TestConfig page. + * @member {string} page + * @memberof google.cloud.dialogflow.cx.v3.TestConfig + * @instance + */ + TestConfig.prototype.page = ""; + /** * Creates a new TestConfig instance using the specified properties. * @function create @@ -28642,6 +28651,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.trackingParameters[i]); if (message.flow != null && Object.hasOwnProperty.call(message, "flow")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.flow); + if (message.page != null && Object.hasOwnProperty.call(message, "page")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.page); return writer; }; @@ -28684,6 +28695,9 @@ case 2: message.flow = reader.string(); break; + case 3: + message.page = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -28729,6 +28743,9 @@ if (message.flow != null && message.hasOwnProperty("flow")) if (!$util.isString(message.flow)) return "flow: string expected"; + if (message.page != null && message.hasOwnProperty("page")) + if (!$util.isString(message.page)) + return "page: string expected"; return null; }; @@ -28753,6 +28770,8 @@ } if (object.flow != null) message.flow = String(object.flow); + if (object.page != null) + message.page = String(object.page); return message; }; @@ -28771,8 +28790,10 @@ var object = {}; if (options.arrays || options.defaults) object.trackingParameters = []; - if (options.defaults) + if (options.defaults) { object.flow = ""; + object.page = ""; + } if (message.trackingParameters && message.trackingParameters.length) { object.trackingParameters = []; for (var j = 0; j < message.trackingParameters.length; ++j) @@ -28780,6 +28801,8 @@ } if (message.flow != null && message.hasOwnProperty("flow")) object.flow = message.flow; + if (message.page != null && message.hasOwnProperty("page")) + object.page = message.page; return object; }; diff --git a/protos/protos.json b/protos/protos.json index a65cd430..a0d2d154 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -3517,6 +3517,13 @@ "options": { "(google.api.resource_reference).type": "dialogflow.googleapis.com/Flow" } + }, + "page": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Page" + } } } }, diff --git a/samples/generated/v3/agents.export_agent.js b/samples/generated/v3/agents.export_agent.js index f844d0e3..8af1a552 100644 --- a/samples/generated/v3/agents.export_agent.js +++ b/samples/generated/v3/agents.export_agent.js @@ -35,6 +35,11 @@ function main(name) { * export the agent to. The format of this URI must be * `gs:///`. * If left unspecified, the serialized agent is returned inline. + * Dialogflow performs a write operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have write permissions for the object. For more information, see + * Dialogflow access + * control (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). */ // const agentUri = 'abc123' /** diff --git a/samples/generated/v3/agents.restore_agent.js b/samples/generated/v3/agents.restore_agent.js index e480bfc0..841939f4 100644 --- a/samples/generated/v3/agents.restore_agent.js +++ b/samples/generated/v3/agents.restore_agent.js @@ -34,6 +34,11 @@ function main(name) { * The Google Cloud Storage (https://cloud.google.com/storage/docs/) URI * to restore agent from. The format of this URI must be * `gs:///`. + * Dialogflow performs a read operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have read permissions for the object. For more information, see + * Dialogflow access + * control (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). */ // const agentUri = 'abc123' /** diff --git a/samples/generated/v3/flows.export_flow.js b/samples/generated/v3/flows.export_flow.js index ea686538..dc6ad6cb 100644 --- a/samples/generated/v3/flows.export_flow.js +++ b/samples/generated/v3/flows.export_flow.js @@ -36,6 +36,11 @@ function main(name) { * export the flow to. The format of this URI must be * `gs:///`. * If left unspecified, the serialized flow is returned inline. + * Dialogflow performs a write operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have write permissions for the object. For more information, see + * Dialogflow access + * control (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). */ // const flowUri = 'abc123' /** diff --git a/samples/generated/v3/flows.import_flow.js b/samples/generated/v3/flows.import_flow.js index 8bfa14e2..a283e263 100644 --- a/samples/generated/v3/flows.import_flow.js +++ b/samples/generated/v3/flows.import_flow.js @@ -34,6 +34,11 @@ function main(parent) { * The Google Cloud Storage (https://cloud.google.com/storage/docs/) URI * to import flow from. The format of this URI must be * `gs:///`. + * Dialogflow performs a read operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have read permissions for the object. For more information, see + * Dialogflow access + * control (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). */ // const flowUri = 'abc123' /** diff --git a/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json b/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json index 165d405b..dfbd6972 100644 --- a/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json +++ b/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json @@ -238,7 +238,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 70, "type": "FULL" } ], @@ -286,7 +286,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 71, "type": "FULL" } ], @@ -1898,7 +1898,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 71, "type": "FULL" } ], @@ -1950,7 +1950,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 69, "type": "FULL" } ], @@ -3466,7 +3466,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 67, "type": "FULL" } ], @@ -3514,7 +3514,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 79, "type": "FULL" } ], diff --git a/samples/generated/v3/test_cases.export_test_cases.js b/samples/generated/v3/test_cases.export_test_cases.js index f6b1943e..4443f8a9 100644 --- a/samples/generated/v3/test_cases.export_test_cases.js +++ b/samples/generated/v3/test_cases.export_test_cases.js @@ -35,6 +35,11 @@ function main(parent) { * export the test cases to. The format of this URI must be * `gs:///`. If unspecified, the serialized test * cases is returned inline. + * Dialogflow performs a write operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have write permissions for the object. For more information, see + * Dialogflow access + * control (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). */ // const gcsUri = 'abc123' /** diff --git a/samples/generated/v3/test_cases.import_test_cases.js b/samples/generated/v3/test_cases.import_test_cases.js index fe177fb2..ef61a4aa 100644 --- a/samples/generated/v3/test_cases.import_test_cases.js +++ b/samples/generated/v3/test_cases.import_test_cases.js @@ -34,6 +34,11 @@ function main(parent) { * The Google Cloud Storage (https://cloud.google.com/storage/docs/) URI * to import test cases from. The format of this URI must be * `gs:///`. + * Dialogflow performs a read operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have read permissions for the object. For more information, see + * Dialogflow access + * control (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). */ // const gcsUri = 'abc123' /** diff --git a/src/v3/agents_client.ts b/src/v3/agents_client.ts index d937b242..22ce3cb1 100644 --- a/src/v3/agents_client.ts +++ b/src/v3/agents_client.ts @@ -1030,6 +1030,12 @@ export class AgentsClient { * export the agent to. The format of this URI must be * `gs:///`. * If left unspecified, the serialized agent is returned inline. + * + * Dialogflow performs a write operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have write permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). * @param {string} [request.environment] * Optional. Environment name. If not set, draft environment is assumed. * Format: `projects//locations//agents//`. + * + * Dialogflow performs a read operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have read permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). * @param {Buffer} request.agentContent * Uncompressed raw byte content for agent. * @param {google.cloud.dialogflow.cx.v3.RestoreAgentRequest.RestoreOption} request.restoreOption diff --git a/src/v3/flows_client.ts b/src/v3/flows_client.ts index 22ec2d15..4bd69f18 100644 --- a/src/v3/flows_client.ts +++ b/src/v3/flows_client.ts @@ -1249,6 +1249,12 @@ export class FlowsClient { * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI * to import flow from. The format of this URI must be * `gs:///`. + * + * Dialogflow performs a read operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have read permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). * @param {Buffer} request.flowContent * Uncompressed raw byte content for flow. * @param {google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption} request.importOption @@ -1408,6 +1414,12 @@ export class FlowsClient { * export the flow to. The format of this URI must be * `gs:///`. * If left unspecified, the serialized flow is returned inline. + * + * Dialogflow performs a write operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have write permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). * @param {boolean} [request.includeReferencedFlows] * Optional. Whether to export flows referenced by the specified flow. * @param {object} [options] diff --git a/src/v3/test_cases_client.ts b/src/v3/test_cases_client.ts index 520b055b..16b87b56 100644 --- a/src/v3/test_cases_client.ts +++ b/src/v3/test_cases_client.ts @@ -1368,6 +1368,12 @@ export class TestCasesClient { * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI * to import test cases from. The format of this URI must be * `gs:///`. + * + * Dialogflow performs a read operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have read permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). * @param {Buffer} request.content * Uncompressed raw byte content for test cases. * @param {object} [options] @@ -1521,6 +1527,12 @@ export class TestCasesClient { * export the test cases to. The format of this URI must be * `gs:///`. If unspecified, the serialized test * cases is returned inline. + * + * Dialogflow performs a write operation for the Cloud Storage object + * on the caller's behalf, so your request authentication must + * have write permissions for the object. For more information, see + * [Dialogflow access + * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). * @param {google.cloud.dialogflow.cx.v3.ExportTestCasesRequest.DataFormat} request.dataFormat * The data format of the exported test cases. If not specified, `BLOB` is * assumed.