// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.ces.v1beta;

import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/ces/v1beta/agent_service.proto";
import "google/cloud/ces/v1beta/conversation.proto";
import "google/cloud/ces/v1beta/evaluation.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";

option go_package = "cloud.google.com/go/ces/apiv1beta/cespb;cespb";
option java_multiple_files = true;
option java_outer_classname = "EvaluationServiceProto";
option java_package = "com.google.cloud.ces.v1beta";

// EvaluationService exposes methods to perform evaluation for the CES app.
service EvaluationService {
  option (google.api.default_host) = "ces.googleapis.com";
  option (google.api.oauth_scopes) =
      "https://www.googleapis.com/auth/ces,"
      "https://www.googleapis.com/auth/cloud-platform";

  // Runs an evaluation of the app.
  rpc RunEvaluation(RunEvaluationRequest)
      returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1beta/{app=projects/*/locations/*/apps/*}:runEvaluation"
      body: "*"
    };
    option (google.api.method_signature) = "app";
    option (google.longrunning.operation_info) = {
      response_type: "RunEvaluationResponse"
      metadata_type: "RunEvaluationOperationMetadata"
    };
  }

  // Uploads audio for use in Golden Evaluations. Stores the audio in the Cloud
  // Storage bucket defined in
  // 'App.logging_settings.evaluation_audio_recording_config.gcs_bucket' and
  // returns a transcript.
  rpc UploadEvaluationAudio(UploadEvaluationAudioRequest)
      returns (UploadEvaluationAudioResponse) {
    option (google.api.http) = {
      post: "/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*}:uploadEvaluationAudio"
      body: "*"
    };
    option (google.api.method_signature) = "name,audio_content";
  }

  // Creates an evaluation.
  rpc CreateEvaluation(CreateEvaluationRequest) returns (Evaluation) {
    option (google.api.http) = {
      post: "/v1beta/{parent=projects/*/locations/*/apps/*}/evaluations"
      body: "evaluation"
    };
    option (google.api.method_signature) = "parent,evaluation,evaluation_id";
    option (google.api.method_signature) = "parent,evaluation";
  }

  // Creates a golden evaluation from a conversation.
  rpc GenerateEvaluation(GenerateEvaluationRequest)
      returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1beta/{conversation=projects/*/locations/*/apps/*/conversations/*}:generateEvaluation"
      body: "*"
    };
    option (google.api.method_signature) = "conversation";
    option (google.longrunning.operation_info) = {
      response_type: "Evaluation"
      metadata_type: "GenerateEvaluationOperationMetadata"
    };
  }

  // Imports evaluations into the app.
  rpc ImportEvaluations(ImportEvaluationsRequest)
      returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1beta/{parent=projects/*/locations/*/apps/*}:importEvaluations"
      body: "*"
    };
    option (google.api.method_signature) = "parent";
    option (google.longrunning.operation_info) = {
      response_type: "ImportEvaluationsResponse"
      metadata_type: "ImportEvaluationsOperationMetadata"
    };
  }

  // Creates an evaluation dataset.
  rpc CreateEvaluationDataset(CreateEvaluationDatasetRequest)
      returns (EvaluationDataset) {
    option (google.api.http) = {
      post: "/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationDatasets"
      body: "evaluation_dataset"
    };
    option (google.api.method_signature) =
        "parent,evaluation_dataset,evaluation_dataset_id";
    option (google.api.method_signature) = "parent,evaluation_dataset";
  }

  // Updates an evaluation.
  rpc UpdateEvaluation(UpdateEvaluationRequest) returns (Evaluation) {
    option (google.api.http) = {
      patch: "/v1beta/{evaluation.name=projects/*/locations/*/apps/*/evaluations/*}"
      body: "evaluation"
    };
    option (google.api.method_signature) = "evaluation,update_mask";
  }

  // Updates an evaluation dataset.
  rpc UpdateEvaluationDataset(UpdateEvaluationDatasetRequest)
      returns (EvaluationDataset) {
    option (google.api.http) = {
      patch: "/v1beta/{evaluation_dataset.name=projects/*/locations/*/apps/*/evaluationDatasets/*}"
      body: "evaluation_dataset"
    };
    option (google.api.method_signature) = "evaluation_dataset,update_mask";
  }

  // Deletes an evaluation.
  rpc DeleteEvaluation(DeleteEvaluationRequest)
      returns (google.protobuf.Empty) {
    option (google.api.http) = {
      delete: "/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Deletes an evaluation result.
  rpc DeleteEvaluationResult(DeleteEvaluationResultRequest)
      returns (google.protobuf.Empty) {
    option (google.api.http) = {
      delete: "/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*/results/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Deletes an evaluation dataset.
  rpc DeleteEvaluationDataset(DeleteEvaluationDatasetRequest)
      returns (google.protobuf.Empty) {
    option (google.api.http) = {
      delete: "/v1beta/{name=projects/*/locations/*/apps/*/evaluationDatasets/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Deletes an evaluation run.
  rpc DeleteEvaluationRun(DeleteEvaluationRunRequest)
      returns (google.longrunning.Operation) {
    option (google.api.http) = {
      delete: "/v1beta/{name=projects/*/locations/*/apps/*/evaluationRuns/*}"
    };
    option (google.api.method_signature) = "name";
    option (google.longrunning.operation_info) = {
      response_type: "google.protobuf.Empty"
      metadata_type: "DeleteEvaluationRunOperationMetadata"
    };
  }

  // Gets details of the specified evaluation.
  rpc GetEvaluation(GetEvaluationRequest) returns (Evaluation) {
    option (google.api.http) = {
      get: "/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Gets details of the specified evaluation result.
  rpc GetEvaluationResult(GetEvaluationResultRequest)
      returns (EvaluationResult) {
    option (google.api.http) = {
      get: "/v1beta/{name=projects/*/locations/*/apps/*/evaluations/*/results/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Gets details of the specified evaluation dataset.
  rpc GetEvaluationDataset(GetEvaluationDatasetRequest)
      returns (EvaluationDataset) {
    option (google.api.http) = {
      get: "/v1beta/{name=projects/*/locations/*/apps/*/evaluationDatasets/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Gets details of the specified evaluation run.
  rpc GetEvaluationRun(GetEvaluationRunRequest) returns (EvaluationRun) {
    option (google.api.http) = {
      get: "/v1beta/{name=projects/*/locations/*/apps/*/evaluationRuns/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Lists all evaluations in the given app.
  rpc ListEvaluations(ListEvaluationsRequest)
      returns (ListEvaluationsResponse) {
    option (google.api.http) = {
      get: "/v1beta/{parent=projects/*/locations/*/apps/*}/evaluations"
    };
    option (google.api.method_signature) = "parent";
  }

  // Lists all evaluation results for a given evaluation.
  rpc ListEvaluationResults(ListEvaluationResultsRequest)
      returns (ListEvaluationResultsResponse) {
    option (google.api.http) = {
      get: "/v1beta/{parent=projects/*/locations/*/apps/*/evaluations/*}/results"
    };
    option (google.api.method_signature) = "parent";
  }

  // Lists all evaluation datasets in the given app.
  rpc ListEvaluationDatasets(ListEvaluationDatasetsRequest)
      returns (ListEvaluationDatasetsResponse) {
    option (google.api.http) = {
      get: "/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationDatasets"
    };
    option (google.api.method_signature) = "parent";
  }

  // Lists all evaluation runs in the given app.
  rpc ListEvaluationRuns(ListEvaluationRunsRequest)
      returns (ListEvaluationRunsResponse) {
    option (google.api.http) = {
      get: "/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationRuns"
    };
    option (google.api.method_signature) = "parent";
  }

  // Lists all evaluation expectations in the given app.
  rpc ListEvaluationExpectations(ListEvaluationExpectationsRequest)
      returns (ListEvaluationExpectationsResponse) {
    option (google.api.http) = {
      get: "/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationExpectations"
    };
    option (google.api.method_signature) = "parent";
  }

  // Gets details of the specified evaluation expectation.
  rpc GetEvaluationExpectation(GetEvaluationExpectationRequest)
      returns (EvaluationExpectation) {
    option (google.api.http) = {
      get: "/v1beta/{name=projects/*/locations/*/apps/*/evaluationExpectations/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Creates an evaluation expectation.
  rpc CreateEvaluationExpectation(CreateEvaluationExpectationRequest)
      returns (EvaluationExpectation) {
    option (google.api.http) = {
      post: "/v1beta/{parent=projects/*/locations/*/apps/*}/evaluationExpectations"
      body: "evaluation_expectation"
    };
    option (google.api.method_signature) =
        "parent,evaluation_expectation,evaluation_expectation_id";
    option (google.api.method_signature) = "parent,evaluation_expectation";
  }

  // Updates an evaluation expectation.
  rpc UpdateEvaluationExpectation(UpdateEvaluationExpectationRequest)
      returns (EvaluationExpectation) {
    option (google.api.http) = {
      patch: "/v1beta/{evaluation_expectation.name=projects/*/locations/*/apps/*/evaluationExpectations/*}"
      body: "evaluation_expectation"
    };
    option (google.api.method_signature) = "evaluation_expectation,update_mask";
  }

  // Deletes an evaluation expectation.
  rpc DeleteEvaluationExpectation(DeleteEvaluationExpectationRequest)
      returns (google.protobuf.Empty) {
    option (google.api.http) = {
      delete: "/v1beta/{name=projects/*/locations/*/apps/*/evaluationExpectations/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Creates a scheduled evaluation run.
  rpc CreateScheduledEvaluationRun(CreateScheduledEvaluationRunRequest)
      returns (ScheduledEvaluationRun) {
    option (google.api.http) = {
      post: "/v1beta/{parent=projects/*/locations/*/apps/*}/scheduledEvaluationRuns"
      body: "scheduled_evaluation_run"
    };
    option (google.api.method_signature) =
        "parent,scheduled_evaluation_run,scheduled_evaluation_run_id";
    option (google.api.method_signature) = "parent,scheduled_evaluation_run";
  }

  // Gets details of the specified scheduled evaluation run.
  rpc GetScheduledEvaluationRun(GetScheduledEvaluationRunRequest)
      returns (ScheduledEvaluationRun) {
    option (google.api.http) = {
      get: "/v1beta/{name=projects/*/locations/*/apps/*/scheduledEvaluationRuns/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Lists all scheduled evaluation runs in the given app.
  rpc ListScheduledEvaluationRuns(ListScheduledEvaluationRunsRequest)
      returns (ListScheduledEvaluationRunsResponse) {
    option (google.api.http) = {
      get: "/v1beta/{parent=projects/*/locations/*/apps/*}/scheduledEvaluationRuns"
    };
    option (google.api.method_signature) = "parent";
  }

  // Updates a scheduled evaluation run.
  rpc UpdateScheduledEvaluationRun(UpdateScheduledEvaluationRunRequest)
      returns (ScheduledEvaluationRun) {
    option (google.api.http) = {
      patch: "/v1beta/{scheduled_evaluation_run.name=projects/*/locations/*/apps/*/scheduledEvaluationRuns/*}"
      body: "scheduled_evaluation_run"
    };
    option (google.api.method_signature) =
        "scheduled_evaluation_run,update_mask";
  }

  // Deletes a scheduled evaluation run.
  rpc DeleteScheduledEvaluationRun(DeleteScheduledEvaluationRunRequest)
      returns (google.protobuf.Empty) {
    option (google.api.http) = {
      delete: "/v1beta/{name=projects/*/locations/*/apps/*/scheduledEvaluationRuns/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Tests the voice of a persona. Also accepts a default persona.
  rpc TestPersonaVoice(TestPersonaVoiceRequest)
      returns (TestPersonaVoiceResponse) {
    option (google.api.http) = {
      post: "/v1beta/{app=projects/*/locations/*/apps/*}:testPersonaVoice"
      body: "*"
    };
    option (google.api.method_signature) = "app";
  }

  // Exports evaluations.
  rpc ExportEvaluations(ExportEvaluationsRequest)
      returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1beta/{parent=projects/*/locations/*/apps/*}/evaluations:export"
      body: "*"
    };
    option (google.api.method_signature) = "parent";
    option (google.longrunning.operation_info) = {
      response_type: "ExportEvaluationsResponse"
      metadata_type: "OperationMetadata"
    };
  }
}

// Response message for
// [EvaluationService.RunEvaluation][google.cloud.ces.v1beta.EvaluationService.RunEvaluation].
message RunEvaluationResponse {
  // The name of the evaluation run that was created.
  // Format:
  // `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluation_run}`
  string evaluation_run = 1 [(google.api.resource_reference) = {
    type: "ces.googleapis.com/EvaluationRun"
  }];
}

// Operation metadata for
// [EvaluationService.RunEvaluation][google.cloud.ces.v1beta.EvaluationService.RunEvaluation].
message RunEvaluationOperationMetadata {
  // Output only. The list of evaluations that were run.
  // Format:
  // `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}`
  repeated string evaluations = 1 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.resource_reference) = { type: "ces.googleapis.com/Evaluation" }
  ];

  // Output only. The evaluation run that was created.
  // Format:
  // `projects/{project}/locations/{location}/apps/{app}/evaluationRuns/{evaluation_run}`
  string evaluation_run = 2 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.resource_reference) = {
      type: "ces.googleapis.com/EvaluationRun"
    }
  ];

  // Output only. The time the operation was created.
  google.protobuf.Timestamp create_time = 3
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The time the operation completed.
  google.protobuf.Timestamp end_time = 4
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The verb of the operation.
  string verb = 5 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Identifies whether the user has requested cancellation of the
  // operation. Operations that have been cancelled successfully have
  // [google.longrunning.Operation.error][google.longrunning.Operation.error]
  // value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`,
  // corresponding to `Code.CANCELLED`.
  bool cancel_requested = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Operation metadata for
// [EvaluationService.GenerateEvaluation][google.cloud.ces.v1beta.EvaluationService.GenerateEvaluation].
message GenerateEvaluationOperationMetadata {}

// Operation metadata for
// [EvaluationService.DeleteEvaluationRun][google.cloud.ces.v1beta.EvaluationService.DeleteEvaluationRun].
message DeleteEvaluationRunOperationMetadata {}

// Request message for
// [EvaluationService.CreateEvaluation][google.cloud.ces.v1beta.EvaluationService.CreateEvaluation].
message CreateEvaluationRequest {
  // Required. The app to create the evaluation for.
  // Format:
  // `projects/{project}/locations/{location}/apps/{app}`
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = { type: "ces.googleapis.com/App" }
  ];

  // Optional. The ID to use for the evaluation, which will become the final
  // component of the evaluation's resource name. If not provided, a unique ID
  // will be automatically assigned for the evaluation.
  string evaluation_id = 2 [(google.api.field_behavior) = OPTIONAL];

  // Required. The evaluation to create.
  Evaluation evaluation = 3 [(google.api.field_behavior) = REQUIRED];
}

// Request message for
// [EvaluationService.GenerateEvaluation][google.cloud.ces.v1beta.EvaluationService.GenerateEvaluation].
message GenerateEvaluationRequest {
  // Required. The conversation to create the golden evaluation for.
  // Format:
  // `projects/{project}/locations/{location}/apps/{app}/conversations/{conversation}`
  string conversation = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "ces.googleapis.com/Conversation"
    }
  ];

  // Optional. Indicate the source of the conversation. If not set, all sources
  // will be searched.
  Conversation.Source source = 2
      [deprecated = true, (google.api.field_behavior) = OPTIONAL];
}

// Request message for
// [EvaluationService.ImportEvaluations][google.cloud.ces.v1beta.EvaluationService.ImportEvaluations].
message ImportEvaluationsRequest {
  // A list of conversation resource names.
  message ConversationList {
    // Optional. Conversation resource names.
    repeated string conversations = 1 [(google.api.field_behavior) = OPTIONAL];
  }

  // Configuration options for the evaluation import process.
  // These options control how the import behaves, particularly when
  // conflicts arise with existing evaluations data.
  message ImportOptions {
    // Defines the strategy for handling conflicts when an evaluation with the
    // same evaluation ID already exists in the app.
    enum ConflictResolutionStrategy {
      // The conflict resolution strategy is unspecified.
      CONFLICT_RESOLUTION_STRATEGY_UNSPECIFIED = 0;

      // Overwrite the existing evaluation with the new one.
      OVERWRITE = 1;

      // Keep the existing evaluation and skip the new one.
      SKIP = 2;

      // Keep the existing evaluation and duplicate the new one as a new
      // evaluation.
      DUPLICATE = 3;
    }

    // Optional. The strategy to use when resolving conflicts during import.
    ConflictResolutionStrategy conflict_resolution_strategy = 1
        [(google.api.field_behavior) = OPTIONAL];
  }

  // The source of the evaluations to import from.
  oneof source {
    // The conversations to import the evaluations from.
    ConversationList conversation_list = 2;

    // The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
    // from which to import evaluations. The format of this URI must be
    // `gs://<bucket-name>/<object-name>`.
    string gcs_uri = 3;

    // Raw bytes representing the csv file with the evaluations structure.
    bytes csv_content = 4;
  }

  // Required. The app to import the evaluations into.
  // Format:
  // `projects/{project}/locations/{location}/apps/{app}`
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = { type: "ces.googleapis.com/App" }
  ];

  // Optional. Options governing the import process for the evaluations.
  ImportOptions import_options = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for
// [EvaluationService.ImportEvaluations][google.cloud.ces.v1beta.EvaluationService.ImportEvaluations].
message ImportEvaluationsResponse {
  // The list of evaluations that were imported into the app.
  repeated Evaluation evaluations = 1;

  // The list of evaluation results that were imported into the app.
  repeated EvaluationResult evaluation_results = 4;

  // The list of evaluation runs that were imported into the app.
  repeated EvaluationRun evaluation_runs = 5;

  // Optional. A list of error messages associated with evaluations that failed
  // to be imported.
  repeated string error_messages = 2 [(google.api.field_behavior) = OPTIONAL];

  // The number of evaluations that either failed to import entirely or
  // completed import with one or more errors.
  int32 import_failure_count = 3;

  // The number of evaluation results that either failed to import entirely or
  // completed import with one or more errors.
  int32 evaluation_result_import_failure_count = 6;

  // The number of evaluation runs that either failed to import entirely or
  // completed import with one or more errors.
  int32 evaluation_run_import_failure_count = 7;
}

// Represents the metadata of the long-running operation for
// [EvaluationService.ImportEvaluations][google.cloud.ces.v1beta.EvaluationService.ImportEvaluations].
message ImportEvaluationsOperationMetadata {
  // Output only. The time the operation was created.
  google.protobuf.Timestamp create_time = 1
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The time the operation finished running.
  google.protobuf.Timestamp end_time = 2
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Human-readable status of the operation, if any.
  string status_message = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Request message for
// [EvaluationService.CreateEvaluationDataset][google.cloud.ces.v1beta.EvaluationService.CreateEvaluationDataset].
message CreateEvaluationDatasetRequest {
  // Required. The app to create the evaluation for.
  // Format:
  // `projects/{project}/locations/{location}/apps/{app}`
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = { type: "ces.googleapis.com/App" }
  ];

  // Optional. The ID to use for the evaluation dataset, which will become the
  // final component of the evaluation dataset's resource name. If not provided,
  // a unique ID will be automatically assigned for the evaluation.
  string evaluation_dataset_id = 2 [(google.api.field_behavior) = OPTIONAL];

  // Required. The evaluation dataset to create.
  EvaluationDataset evaluation_dataset = 3
      [(google.api.field_behavior) = REQUIRED];
}

// Request message for
// [EvaluationService.UpdateEvaluation][google.cloud.ces.v1beta.EvaluationService.UpdateEvaluation].
message UpdateEvaluationRequest {
  // Required. The evaluation to update.
  Evaluation evaluation = 1 [(google.api.field_behavior) = REQUIRED];

  // Optional. Field mask is used to control which fields get updated. If the
  // mask is not present, all fields will be updated.
  google.protobuf.FieldMask update_mask = 2
      [(google.api.field_behavior) = OPTIONAL];
}

// Request message for
// [EvaluationService.UpdateEvaluationDataset][google.cloud.ces.v1beta.EvaluationService.UpdateEvaluationDataset].
message UpdateEvaluationDatasetRequest {
  // Required. The evaluation dataset to update.
  EvaluationDataset evaluation_dataset = 1
      [(google.api.field_behavior) = REQUIRED];

  // Optional. Field mask is used to control which fields get updated. If the
  // mask is not present, all fields will be updated.
  google.protobuf.FieldMask update_mask = 2
      [(google.api.field_behavior) = OPTIONAL];
}

// Request message for
// [EvaluationService.DeleteEvaluation][google.cloud.ces.v1beta.EvaluationService.DeleteEvaluation].
message DeleteEvaluationRequest {
  // Required. The resource name of the evaluation to delete.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = { type: "ces.googleapis.com/Evaluation" }
  ];

  // Optional. Indicates whether to forcefully delete the evaluation, even if it
  // is still referenced by evaluation datasets.
  //
  // *  If `force = false`, the deletion will fail if any datasets still
  // reference the evaluation.
  // *  If `force = true`, all existing references from datasets will be removed
  // and the evaluation will be deleted.
  bool force = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The current etag of the evaluation. If an etag is not provided,
  // the deletion will overwrite any concurrent changes. If an etag is provided
  // and does not match the current etag of the evaluation, deletion will be
  // blocked and an ABORTED error will be returned.
  string etag = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for
// [EvaluationService.DeleteEvaluationResult][google.cloud.ces.v1beta.EvaluationService.DeleteEvaluationResult].
message DeleteEvaluationResultRequest {
  // Required. The resource name of the evaluation result to delete.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "ces.googleapis.com/EvaluationResult"
    }
  ];
}

// Request message for
// [EvaluationService.DeleteEvaluationDataset][google.cloud.ces.v1beta.EvaluationService.DeleteEvaluationDataset].
message DeleteEvaluationDatasetRequest {
  // Required. The resource name of the evaluation dataset to delete.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "ces.googleapis.com/EvaluationDataset"
    }
  ];

  // Optional. The current etag of the evaluation dataset. If an etag is not
  // provided, the deletion will overwrite any concurrent changes. If an etag is
  // provided and does not match the current etag of the evaluation dataset,
  // deletion will be blocked and an ABORTED error will be returned.
  string etag = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for
// [EvaluationService.DeleteEvaluationRun][google.cloud.ces.v1beta.EvaluationService.DeleteEvaluationRun].
message DeleteEvaluationRunRequest {
  // Required. The resource name of the evaluation run to delete.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "ces.googleapis.com/EvaluationRun"
    }
  ];
}

// Request message for
// [EvaluationService.GetEvaluation][google.cloud.ces.v1beta.EvaluationService.GetEvaluation].
message GetEvaluationRequest {
  // Required. The resource name of the evaluation to retrieve.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = { type: "ces.googleapis.com/Evaluation" }
  ];
}

// Request message for
// [EvaluationService.GetEvaluationResult][google.cloud.ces.v1beta.EvaluationService.GetEvaluationResult].
message GetEvaluationResultRequest {
  // Required. The resource name of the evaluation result to retrieve.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "ces.googleapis.com/EvaluationResult"
    }
  ];
}

// Request message for
// [EvaluationService.GetEvaluationDataset][google.cloud.ces.v1beta.EvaluationService.GetEvaluationDataset].
message GetEvaluationDatasetRequest {
  // Required. The resource name of the evaluation dataset to retrieve.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "ces.googleapis.com/EvaluationDataset"
    }
  ];
}

// Request message for
// [EvaluationService.GetEvaluationRun][google.cloud.ces.v1beta.EvaluationService.GetEvaluationRun].
message GetEvaluationRunRequest {
  // Required. The resource name of the evaluation run to retrieve.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "ces.googleapis.com/EvaluationRun"
    }
  ];
}

// Request message for
// [EvaluationService.ListEvaluations][google.cloud.ces.v1beta.EvaluationService.ListEvaluations].
message ListEvaluationsRequest {
  // Required. The resource name of the app to list evaluations from.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "ces.googleapis.com/Evaluation"
    }
  ];

  // Optional. Requested page size. Server may return fewer items than
  // requested. If unspecified, server will pick an appropriate default.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The
  // [next_page_token][google.cloud.ces.v1beta.ListEvaluationsResponse.next_page_token]
  // value returned from a previous list
  // [EvaluationService.ListEvaluations][google.cloud.ces.v1beta.EvaluationService.ListEvaluations]
  // call.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Deprecated: Use evaluation_filter and evaluation_run_filter
  // instead.
  string filter = 4 [deprecated = true, (google.api.field_behavior) = OPTIONAL];

  // Optional. Filter to be applied on the evaluation when listing the
  // evaluations. See https://google.aip.dev/160 for more details. Supported
  // fields: evaluation_datasets
  string evaluation_filter = 7 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Filter string for fields on the associated EvaluationRun
  // resources. See https://google.aip.dev/160 for more details. Supported
  // fields: create_time, initiated_by, app_version_display_name
  string evaluation_run_filter = 8 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Field to sort by. Only "name" and "create_time", and
  // "update_time" are supported. Time fields are ordered in descending order,
  // and the name field is ordered in ascending order. If not included,
  // "update_time" will be the default. See https://google.aip.dev/132#ordering
  // for more details.
  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Whether to include the last 10 evaluation results for each
  // evaluation in the response.
  bool last_ten_results = 6 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for
// [EvaluationService.ListEvaluationResults][google.cloud.ces.v1beta.EvaluationService.ListEvaluationResults].
message ListEvaluationResultsRequest {
  // Required. The resource name of the evaluation to list evaluation results
  // from. To filter by evaluation run, use `-` as the evaluation ID and specify
  // the evaluation run ID in the filter. For example:
  // `projects/{project}/locations/{location}/apps/{app}/evaluations/-`
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "ces.googleapis.com/EvaluationResult"
    }
  ];

  // Optional. Requested page size. Server may return fewer items than
  // requested. If unspecified, server will pick an appropriate default.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The
  // [next_page_token][google.cloud.ces.v1beta.ListEvaluationResultsResponse.next_page_token]
  // value returned from a previous list
  // [EvaluationService.ListEvaluationResults][google.cloud.ces.v1beta.EvaluationService.ListEvaluationResults]
  // call.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Filter to be applied when listing the evaluation results.
  // See https://google.aip.dev/160 for more details.
  string filter = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Field to sort by. Only "name" and "create_time", and
  // "update_time" are supported. Time fields are ordered in descending order,
  // and the name field is ordered in ascending order. If not included,
  // "update_time" will be the default. See https://google.aip.dev/132#ordering
  // for more details.
  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for
// [EvaluationService.ListEvaluationDatasets][google.cloud.ces.v1beta.EvaluationService.ListEvaluationDatasets].
message ListEvaluationDatasetsRequest {
  // Required. The resource name of the app to list evaluation datasets from.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "ces.googleapis.com/EvaluationDataset"
    }
  ];

  // Optional. Requested page size. Server may return fewer items than
  // requested. If unspecified, server will pick an appropriate default.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The
  // [next_page_token][google.cloud.ces.v1beta.ListEvaluationDatasetsResponse.next_page_token]
  // value returned from a previous list
  // [EvaluationService.ListEvaluationDatasets][google.cloud.ces.v1beta.EvaluationService.ListEvaluationDatasets]
  // call.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Filter to be applied when listing the evaluation datasets.
  // See https://google.aip.dev/160 for more details.
  string filter = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Field to sort by. Only "name" and "create_time", and
  // "update_time" are supported. Time fields are ordered in descending order,
  // and the name field is ordered in ascending order. If not included,
  // "update_time" will be the default. See https://google.aip.dev/132#ordering
  // for more details.
  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for
// [EvaluationService.ListEvaluationRuns][google.cloud.ces.v1beta.EvaluationService.ListEvaluationRuns].
message ListEvaluationRunsRequest {
  // Required. The resource name of the app to list evaluation runs from.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "ces.googleapis.com/EvaluationRun"
    }
  ];

  // Optional. Requested page size. Server may return fewer items than
  // requested. If unspecified, server will pick an appropriate default.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The
  // [next_page_token][google.cloud.ces.v1beta.ListEvaluationRunsResponse.next_page_token]
  // value returned from a previous list
  // [EvaluationService.ListEvaluationRuns][google.cloud.ces.v1beta.EvaluationService.ListEvaluationRuns]
  // call.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Filter to be applied when listing the evaluation runs.
  // See https://google.aip.dev/160 for more details.
  string filter = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Field to sort by. Only "name" and "create_time", and
  // "update_time" are supported. Time fields are ordered in descending order,
  // and the name field is ordered in ascending order. If not included,
  // "update_time" will be the default. See https://google.aip.dev/132#ordering
  // for more details.
  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for
// [EvaluationService.ListEvaluations][google.cloud.ces.v1beta.EvaluationService.ListEvaluations].
message ListEvaluationsResponse {
  // The list of evaluations.
  repeated Evaluation evaluations = 1;

  // A token that can be sent as
  // [ListEvaluationsRequest.page_token][google.cloud.ces.v1beta.ListEvaluationsRequest.page_token]
  // to retrieve the next page. Absence of this field indicates there are no
  // subsequent pages.
  string next_page_token = 2;
}

// Response message for
// [EvaluationService.ListEvaluationResults][google.cloud.ces.v1beta.EvaluationService.ListEvaluationResults].
message ListEvaluationResultsResponse {
  // The list of evaluation results.
  repeated EvaluationResult evaluation_results = 1;

  // A token that can be sent as
  // [ListEvaluationResultsRequest.page_token][google.cloud.ces.v1beta.ListEvaluationResultsRequest.page_token]
  // to retrieve the next page. Absence of this field indicates there are no
  // subsequent pages.
  string next_page_token = 2;
}

// Response message for
// [EvaluationService.ListEvaluationDatasets][google.cloud.ces.v1beta.EvaluationService.ListEvaluationDatasets].
message ListEvaluationDatasetsResponse {
  // The list of evaluation datasets.
  repeated EvaluationDataset evaluation_datasets = 1;

  // A token that can be sent as
  // [ListEvaluationDatasetsRequest.page_token][google.cloud.ces.v1beta.ListEvaluationDatasetsRequest.page_token]
  // to retrieve the next page. Absence of this field indicates there are no
  // subsequent pages.
  string next_page_token = 2;
}

// Response message for
// [EvaluationService.ListEvaluationRuns][google.cloud.ces.v1beta.EvaluationService.ListEvaluationRuns].
message ListEvaluationRunsResponse {
  // The list of evaluation runs.
  repeated EvaluationRun evaluation_runs = 1;

  // A token that can be sent as
  // [ListEvaluationRunsRequest.page_token][google.cloud.ces.v1beta.ListEvaluationRunsRequest.page_token]
  // to retrieve the next page. Absence of this field indicates there are no
  // subsequent pages.
  string next_page_token = 2;
}

// Request message for
// [EvaluationService.CreateScheduledEvaluationRun][google.cloud.ces.v1beta.EvaluationService.CreateScheduledEvaluationRun].
message CreateScheduledEvaluationRunRequest {
  // Required. The app to create the scheduled evaluation run for.
  // Format:
  // `projects/{project}/locations/{location}/apps/{app}`
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = { type: "ces.googleapis.com/App" }
  ];

  // Optional. The ID to use for the scheduled evaluation run, which will become
  // the final component of the scheduled evaluation run's resource name. If not
  // provided, a unique ID will be automatically assigned.
  string scheduled_evaluation_run_id = 2
      [(google.api.field_behavior) = OPTIONAL];

  // Required. The scheduled evaluation run to create.
  ScheduledEvaluationRun scheduled_evaluation_run = 3
      [(google.api.field_behavior) = REQUIRED];
}

// Request message for
// [EvaluationService.GetScheduledEvaluationRun][google.cloud.ces.v1beta.EvaluationService.GetScheduledEvaluationRun].
message GetScheduledEvaluationRunRequest {
  // Required. The resource name of the scheduled evaluation run to retrieve.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "ces.googleapis.com/ScheduledEvaluationRun"
    }
  ];
}

// Request message for
// [EvaluationService.ListScheduledEvaluationRuns][google.cloud.ces.v1beta.EvaluationService.ListScheduledEvaluationRuns].
message ListScheduledEvaluationRunsRequest {
  // Required. The resource name of the app to list scheduled evaluation runs
  // from.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "ces.googleapis.com/ScheduledEvaluationRun"
    }
  ];

  // Optional. Requested page size. Server may return fewer items than
  // requested. If unspecified, server will pick an appropriate default.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The
  // [next_page_token][google.cloud.ces.v1beta.ListScheduledEvaluationRunsResponse.next_page_token]
  // value returned from a previous list
  // [EvaluationService.ListScheduledEvaluationRuns][google.cloud.ces.v1beta.EvaluationService.ListScheduledEvaluationRuns]
  // call.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Filter to be applied when listing the scheduled evaluation runs.
  // See https://google.aip.dev/160 for more details.
  // Currently supports filtering by:
  // * request.evaluations:evaluation_id
  // * request.evaluation_dataset:evaluation_dataset_id
  string filter = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Field to sort by. Supported fields are:
  // "name" (ascending), "create_time" (descending), "update_time" (descending),
  // "next_scheduled_execution" (ascending), and
  // "last_completed_run.create_time" (descending).
  // If not included, "update_time" will be the default.
  // See https://google.aip.dev/132#ordering for more details.
  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for
// [EvaluationService.ListScheduledEvaluationRuns][google.cloud.ces.v1beta.EvaluationService.ListScheduledEvaluationRuns].
message ListScheduledEvaluationRunsResponse {
  // The list of scheduled evaluation runs.
  repeated ScheduledEvaluationRun scheduled_evaluation_runs = 1;

  // A token that can be sent as
  // [ListScheduledEvaluationRunsRequest.page_token][google.cloud.ces.v1beta.ListScheduledEvaluationRunsRequest.page_token]
  // to retrieve the next page. Absence of this field indicates there are no
  // subsequent pages.
  string next_page_token = 2;
}

// Request message for
// [EvaluationService.UpdateScheduledEvaluationRun][google.cloud.ces.v1beta.EvaluationService.UpdateScheduledEvaluationRun].
message UpdateScheduledEvaluationRunRequest {
  // Required. The scheduled evaluation run to update.
  ScheduledEvaluationRun scheduled_evaluation_run = 1
      [(google.api.field_behavior) = REQUIRED];

  // Optional. Field mask is used to control which fields get updated. If the
  // mask is not present, all fields will be updated.
  google.protobuf.FieldMask update_mask = 2
      [(google.api.field_behavior) = OPTIONAL];
}

// Request message for
// [EvaluationService.DeleteScheduledEvaluationRun][google.cloud.ces.v1beta.EvaluationService.DeleteScheduledEvaluationRun].
message DeleteScheduledEvaluationRunRequest {
  // Required. The resource name of the scheduled evaluation run to delete.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "ces.googleapis.com/ScheduledEvaluationRun"
    }
  ];

  // Optional. The etag of the ScheduledEvaluationRun.
  // If provided, it must match the server's etag.
  string etag = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for
// [EvaluationService.TestPersonaVoice][google.cloud.ces.v1beta.EvaluationService.TestPersonaVoice].
message TestPersonaVoiceRequest {
  // Required. the resource name of the app to test the persona voice for.
  // Format:
  // `projects/{project}/locations/{location}/apps/{app}`
  string app = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = { type: "ces.googleapis.com/App" }
  ];

  // Required. The persona ID to test the voice for. Also accepts "default".
  string persona_id = 2 [(google.api.field_behavior) = REQUIRED];

  // Required. The text to test the voice for.
  string text = 3 [(google.api.field_behavior) = REQUIRED];
}

// Request message for
// [EvaluationService.UploadEvaluationAudio][google.cloud.ces.v1beta.EvaluationService.UploadEvaluationAudio].
message UploadEvaluationAudioRequest {
  // Required. The resource name of the Evaluation for which to upload the
  // evaluation audio. Format:
  // `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}`
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = { type: "ces.googleapis.com/Evaluation" }
  ];

  // Required. The raw audio bytes.
  // The format of the audio must be single-channel LINEAR16 with a sample
  // rate of 16kHz (default InputAudioConfig).
  bytes audio_content = 2 [(google.api.field_behavior) = REQUIRED];

  // Optional. The Google Cloud Storage URI of the previously uploaded audio
  // file to be deleted. Format: `gs://<bucket-name>/<object-name>`
  string previous_audio_gcs_uri = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for
// [EvaluationService.UploadEvaluationAudio][google.cloud.ces.v1beta.EvaluationService.UploadEvaluationAudio].
message UploadEvaluationAudioResponse {
  // The Google Cloud Storage URI where the uploaded audio file is stored.
  // Format: `gs://<bucket-name>/<object-name>`
  string audio_gcs_uri = 1;

  // The transcript of the audio, generated by Cloud Speech-to-Text.
  string transcript = 2;

  // The duration of the audio.
  google.protobuf.Duration duration = 3;
}

// Response message for
// [EvaluationService.TestPersonaVoice][google.cloud.ces.v1beta.EvaluationService.TestPersonaVoice].
message TestPersonaVoiceResponse {
  // The audio data bytes of the synthesized voice.
  bytes audio = 1;
}

// Request message for
// [EvaluationService.CreateEvaluationExpectation][google.cloud.ces.v1beta.EvaluationService.CreateEvaluationExpectation].
message CreateEvaluationExpectationRequest {
  // Required. The app to create the evaluation expectation for.
  // Format:
  // `projects/{project}/locations/{location}/apps/{app}`
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = { type: "ces.googleapis.com/App" }
  ];

  // Optional. The ID to use for the evaluation expectation, which will become
  // the final component of the evaluation expectation's resource name. If not
  // provided, a unique ID will be automatically assigned for the evaluation
  // expectation.
  string evaluation_expectation_id = 2 [(google.api.field_behavior) = OPTIONAL];

  // Required. The evaluation expectation to create.
  EvaluationExpectation evaluation_expectation = 3
      [(google.api.field_behavior) = REQUIRED];
}

// Request message for
// [EvaluationService.UpdateEvaluationExpectation][google.cloud.ces.v1beta.EvaluationService.UpdateEvaluationExpectation].
message UpdateEvaluationExpectationRequest {
  // Required. The evaluation expectation to update.
  EvaluationExpectation evaluation_expectation = 1
      [(google.api.field_behavior) = REQUIRED];

  // Optional. Field mask is used to control which fields get updated. If the
  // mask is not present, all fields will be updated.
  google.protobuf.FieldMask update_mask = 2
      [(google.api.field_behavior) = OPTIONAL];
}

// Request message for
// [EvaluationService.DeleteEvaluationExpectation][google.cloud.ces.v1beta.EvaluationService.DeleteEvaluationExpectation].
message DeleteEvaluationExpectationRequest {
  // Required. The resource name of the evaluation expectation to delete.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "ces.googleapis.com/EvaluationExpectation"
    }
  ];

  // Optional. The current etag of the evaluation expectation. If an etag is not
  // provided, the deletion will overwrite any concurrent changes. If an etag is
  // provided and does not match the current etag of the evaluation expectation,
  // deletion will be blocked and an ABORTED error will be returned.
  string etag = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for
// [EvaluationService.GetEvaluationExpectation][google.cloud.ces.v1beta.EvaluationService.GetEvaluationExpectation].
message GetEvaluationExpectationRequest {
  // Required. The resource name of the evaluation expectation to retrieve.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "ces.googleapis.com/EvaluationExpectation"
    }
  ];
}

// Request message for
// [EvaluationService.ListEvaluationExpectations][google.cloud.ces.v1beta.EvaluationService.ListEvaluationExpectations].
message ListEvaluationExpectationsRequest {
  // Required. The resource name of the app to list evaluation expectations
  // from.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "ces.googleapis.com/EvaluationExpectation"
    }
  ];

  // Optional. Requested page size. Server may return fewer items than
  // requested. If unspecified, server will pick an appropriate default.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The
  // [next_page_token][google.cloud.ces.v1beta.ListEvaluationExpectationsResponse.next_page_token]
  // value returned from a previous list
  // [EvaluationService.ListEvaluationExpectations][google.cloud.ces.v1beta.EvaluationService.ListEvaluationExpectations]
  // call.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Filter to be applied when listing the evaluation expectations.
  // See https://google.aip.dev/160 for more details.
  string filter = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Field to sort by. Only "name" and "create_time", and
  // "update_time" are supported. Time fields are ordered in descending order,
  // and the name field is ordered in ascending order. If not included,
  // "update_time" will be the default. See https://google.aip.dev/132#ordering
  // for more details.
  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for
// [EvaluationService.ListEvaluationExpectations][google.cloud.ces.v1beta.EvaluationService.ListEvaluationExpectations].
message ListEvaluationExpectationsResponse {
  // The list of evaluation expectations.
  repeated EvaluationExpectation evaluation_expectations = 1;

  // A token that can be sent as
  // [ListEvaluationExpectationsRequest.page_token][google.cloud.ces.v1beta.ListEvaluationExpectationsRequest.page_token]
  // to retrieve the next page. Absence of this field indicates there are no
  // subsequent pages.
  string next_page_token = 2;
}

// Options for exporting CES evaluation resources.
message ExportOptions {
  // The format to export the items in. Defaults to JSON if not
  // specified.
  enum ExportFormat {
    // Unspecified format.
    EXPORT_FORMAT_UNSPECIFIED = 0;

    // JSON format.
    JSON = 1;

    // YAML format.
    YAML = 2;
  }

  // Optional. The format to export the evaluation results in. Defaults to JSON
  // if not specified.
  ExportFormat export_format = 1 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The Google Cloud Storage URI to write the exported Evaluation
  // Results to.
  string gcs_uri = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for
// [EvaluationService.ExportEvaluations][google.cloud.ces.v1beta.EvaluationService.ExportEvaluations].
message ExportEvaluationsRequest {
  // Required. The resource name of the app to export evaluations from.
  // Format: `projects/{project}/locations/{location}/apps/{app}`
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = { type: "ces.googleapis.com/App" }
  ];

  // Required. The resource names of the evaluations to export.
  repeated string names = 2 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = { type: "ces.googleapis.com/Evaluation" }
  ];

  // Optional. The export options for the evaluations.
  ExportOptions export_options = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Includes evaluation results in the export. At least one of
  // include_evaluation_results or include_evaluations must be set.
  bool include_evaluation_results = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Includes evaluations in the export. At least one of
  // include_evaluation_results or include_evaluations must be set.
  bool include_evaluations = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for
// [EvaluationService.ExportEvaluations][google.cloud.ces.v1beta.EvaluationService.ExportEvaluations].
message ExportEvaluationsResponse {
  // The exported evaluations.
  oneof evaluations {
    // The content of the exported Evaluations. This will be populated if
    // gcs_uri was not specified in the request.
    bytes evaluations_content = 1;

    // The Google Cloud Storage URI folder where the exported evaluations were
    // written. This will be populated if gcs_uri was specified in the request.
    string evaluations_uri = 2;
  }

  // Output only. A map of evaluation resource names that could not be exported,
  // to the reason why they failed.
  map<string, string> failed_evaluations = 3
      [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Response message for
// [EvaluationService.ExportEvaluationResults][google.cloud.ces.v1beta.EvaluationService.ExportEvaluationResults].
message ExportEvaluationResultsResponse {
  // The exported evaluation results.
  oneof evaluation_results {
    // The content of the exported Evaluation Results. This will be populated if
    // gcs_uri was not specified in the request.
    bytes evaluation_results_content = 1;

    // The Google Cloud Storage URI folder where the exported Evaluation Results
    // were written. This will be populated if gcs_uri was specified in the
    // request.
    string evaluation_results_uri = 2;
  }
}

// Response message for
// [EvaluationService.ExportEvaluationRuns][google.cloud.ces.v1beta.EvaluationService.ExportEvaluationRuns].
message ExportEvaluationRunsResponse {
  // The exported evaluation runs.
  oneof evaluation_runs {
    // The content of the exported Evaluation Runs. This will be populated if
    // gcs_uri was not specified in the request.
    bytes evaluation_runs_content = 1;

    // The Google Cloud Storage URI folder where the exported Evaluation Runs
    // were written. This will be populated if gcs_uri was specified in the
    // request.
    string evaluation_runs_uri = 2;
  }
}
