@@ -20,6 +20,7 @@ import "google/api/annotations.proto";
2020import "google/api/client.proto" ;
2121import "google/api/field_behavior.proto" ;
2222import "google/api/resource.proto" ;
23+ import "google/cloud/ces/v1beta/agent_service.proto" ;
2324import "google/cloud/ces/v1beta/conversation.proto" ;
2425import "google/cloud/ces/v1beta/evaluation.proto" ;
2526import "google/longrunning/operations.proto" ;
@@ -354,6 +355,20 @@ service EvaluationService {
354355 };
355356 option (google.api.method_signature ) = "app" ;
356357 }
358+
359+ // Exports evaluations.
360+ rpc ExportEvaluations (ExportEvaluationsRequest )
361+ returns (google.longrunning.Operation ) {
362+ option (google.api.http ) = {
363+ post : "/v1beta/{parent=projects/*/locations/*/apps/*}/evaluations:export"
364+ body : "*"
365+ };
366+ option (google.api.method_signature ) = "parent" ;
367+ option (google.longrunning.operation_info ) = {
368+ response_type : "ExportEvaluationsResponse"
369+ metadata_type : "OperationMetadata"
370+ };
371+ }
357372}
358373
359374// Response message for
@@ -521,12 +536,27 @@ message ImportEvaluationsResponse {
521536 // The list of evaluations that were imported into the app.
522537 repeated Evaluation evaluations = 1 ;
523538
539+ // The list of evaluation results that were imported into the app.
540+ repeated EvaluationResult evaluation_results = 4 ;
541+
542+ // The list of evaluation runs that were imported into the app.
543+ repeated EvaluationRun evaluation_runs = 5 ;
544+
524545 // Optional. A list of error messages associated with evaluations that failed
525546 // to be imported.
526547 repeated string error_messages = 2 [(google.api.field_behavior ) = OPTIONAL ];
527548
528- // The number of evaluations that were not imported due to errors.
549+ // The number of evaluations that either failed to import entirely or
550+ // completed import with one or more errors.
529551 int32 import_failure_count = 3 ;
552+
553+ // The number of evaluation results that either failed to import entirely or
554+ // completed import with one or more errors.
555+ int32 evaluation_result_import_failure_count = 6 ;
556+
557+ // The number of evaluation runs that either failed to import entirely or
558+ // completed import with one or more errors.
559+ int32 evaluation_run_import_failure_count = 7 ;
530560}
531561
532562// Represents the metadata of the long-running operation for
@@ -1195,3 +1225,107 @@ message ListEvaluationExpectationsResponse {
11951225 // subsequent pages.
11961226 string next_page_token = 2 ;
11971227}
1228+
1229+ // Options for exporting CES evaluation resources.
1230+ message ExportOptions {
1231+ // The format to export the items in. Defaults to JSON if not
1232+ // specified.
1233+ enum ExportFormat {
1234+ // Unspecified format.
1235+ EXPORT_FORMAT_UNSPECIFIED = 0 ;
1236+
1237+ // JSON format.
1238+ JSON = 1 ;
1239+
1240+ // YAML format.
1241+ YAML = 2 ;
1242+ }
1243+
1244+ // Optional. The format to export the evaluation results in. Defaults to JSON
1245+ // if not specified.
1246+ ExportFormat export_format = 1 [(google.api.field_behavior ) = OPTIONAL ];
1247+
1248+ // Optional. The Google Cloud Storage URI to write the exported Evaluation
1249+ // Results to.
1250+ string gcs_uri = 2 [(google.api.field_behavior ) = OPTIONAL ];
1251+ }
1252+
1253+ // Request message for
1254+ // [EvaluationService.ExportEvaluations][google.cloud.ces.v1beta.EvaluationService.ExportEvaluations].
1255+ message ExportEvaluationsRequest {
1256+ // Required. The resource name of the app to export evaluations from.
1257+ // Format: `projects/{project}/locations/{location}/apps/{app}`
1258+ string parent = 1 [
1259+ (google.api.field_behavior ) = REQUIRED ,
1260+ (google.api.resource_reference ) = { type : "ces.googleapis.com/App" }
1261+ ];
1262+
1263+ // Required. The resource names of the evaluations to export.
1264+ repeated string names = 2 [
1265+ (google.api.field_behavior ) = REQUIRED ,
1266+ (google.api.resource_reference ) = { type : "ces.googleapis.com/Evaluation" }
1267+ ];
1268+
1269+ // Optional. The export options for the evaluations.
1270+ ExportOptions export_options = 3 [(google.api.field_behavior ) = OPTIONAL ];
1271+
1272+ // Optional. Includes evaluation results in the export. At least one of
1273+ // include_evaluation_results or include_evaluations must be set.
1274+ bool include_evaluation_results = 4 [(google.api.field_behavior ) = OPTIONAL ];
1275+
1276+ // Optional. Includes evaluations in the export. At least one of
1277+ // include_evaluation_results or include_evaluations must be set.
1278+ bool include_evaluations = 5 [(google.api.field_behavior ) = OPTIONAL ];
1279+ }
1280+
1281+ // Response message for
1282+ // [EvaluationService.ExportEvaluations][google.cloud.ces.v1beta.EvaluationService.ExportEvaluations].
1283+ message ExportEvaluationsResponse {
1284+ // The exported evaluations.
1285+ oneof evaluations {
1286+ // The content of the exported Evaluations. This will be populated if
1287+ // gcs_uri was not specified in the request.
1288+ bytes evaluations_content = 1 ;
1289+
1290+ // The Google Cloud Storage URI folder where the exported evaluations were
1291+ // written. This will be populated if gcs_uri was specified in the request.
1292+ string evaluations_uri = 2 ;
1293+ }
1294+
1295+ // Output only. A map of evaluation resource names that could not be exported,
1296+ // to the reason why they failed.
1297+ map <string , string > failed_evaluations = 3
1298+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
1299+ }
1300+
1301+ // Response message for
1302+ // [EvaluationService.ExportEvaluationResults][google.cloud.ces.v1beta.EvaluationService.ExportEvaluationResults].
1303+ message ExportEvaluationResultsResponse {
1304+ // The exported evaluation results.
1305+ oneof evaluation_results {
1306+ // The content of the exported Evaluation Results. This will be populated if
1307+ // gcs_uri was not specified in the request.
1308+ bytes evaluation_results_content = 1 ;
1309+
1310+ // The Google Cloud Storage URI folder where the exported Evaluation Results
1311+ // were written. This will be populated if gcs_uri was specified in the
1312+ // request.
1313+ string evaluation_results_uri = 2 ;
1314+ }
1315+ }
1316+
1317+ // Response message for
1318+ // [EvaluationService.ExportEvaluationRuns][google.cloud.ces.v1beta.EvaluationService.ExportEvaluationRuns].
1319+ message ExportEvaluationRunsResponse {
1320+ // The exported evaluation runs.
1321+ oneof evaluation_runs {
1322+ // The content of the exported Evaluation Runs. This will be populated if
1323+ // gcs_uri was not specified in the request.
1324+ bytes evaluation_runs_content = 1 ;
1325+
1326+ // The Google Cloud Storage URI folder where the exported Evaluation Runs
1327+ // were written. This will be populated if gcs_uri was specified in the
1328+ // request.
1329+ string evaluation_runs_uri = 2 ;
1330+ }
1331+ }
0 commit comments