// Copyright 2018 The Kubeflow Authors
//
// 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";

option go_package = "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client";
package api;

import "backend/api/v1beta1/parameter.proto";
import "google/protobuf/struct.proto";

message PipelineSpec {
  // Optional input field. The ID of the pipeline user uploaded before.
  string pipeline_id = 1;

  // Optional output field. The name of the pipeline.
  // Not empty if the pipeline id is not empty.
  string pipeline_name = 5;

  // Optional input field. The marshalled raw argo JSON workflow.
  // This will be deprecated when pipeline_manifest is in use.
  string workflow_manifest = 2;

  // Optional input field. The raw pipeline JSON spec.
  string pipeline_manifest = 3;

  // The parameter user provide to inject to the pipeline JSON.
  // If a default value of a parameter exist in the JSON,
  // the value user provided here will replace. V1 only
  repeated Parameter parameters = 4;

  // The runtime config of a PipelineSpec.
  message RuntimeConfig {
    // The runtime parameters of the PipelineSpec. The parameters will be
    // used to replace the placeholders
    // at runtime.
    map<string, google.protobuf.Value> parameters = 1;

    // A path in a object store bucket which will be treated as the root
    // output directory of the pipeline. It is used by the system to
    // generate the paths of output artifacts. Ref:(https://www.kubeflow.org/docs/components/pipelines/pipeline-root/)
    string pipeline_root = 2;

  }

  // Runtime config of the pipeline. V2 only
  RuntimeConfig runtime_config = 6;
}
