
// This file was autogenerated by go-to-protobuf. Do not edit it manually!

syntax = 'proto2';

package github.com.openshift.origin.pkg.template.api.v1;

import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
import "k8s.io/kubernetes/pkg/runtime/generated.proto";
import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";

// Package-wide variables from generator "generated".
option go_package = "v1";

// Parameter defines a name/value variable that is to be processed during
// the Template to Config transformation.
message Parameter {
  // Name must be set and it can be referenced in Template
  // Items using ${PARAMETER_NAME}. Required.
  optional string name = 1;

  // Optional: The name that will show in UI instead of parameter 'Name'
  optional string displayName = 2;

  // Description of a parameter. Optional.
  optional string description = 3;

  // Value holds the Parameter data. If specified, the generator will be
  // ignored. The value replaces all occurrences of the Parameter ${Name}
  // expression during the Template to Config transformation. Optional.
  optional string value = 4;

  // generate specifies the generator to be used to generate random string
  // from an input value specified by From field. The result string is
  // stored into Value field. If empty, no generator is being used, leaving
  // the result Value untouched. Optional.
  // 
  // The only supported generator is "expression", which accepts a "from"
  // value in the form of a simple regular expression containing the
  // range expression "[a-zA-Z0-9]", and the length expression "a{length}".
  // 
  // Examples:
  // 
  // from             | value
  // -----------------------------
  // "test[0-9]{1}x"  | "test7x"
  // "[0-1]{8}"       | "01001100"
  // "0x[A-F0-9]{4}"  | "0xB3AF"
  // "[a-zA-Z0-9]{8}" | "hW4yQU5i"
  optional string generate = 5;

  // From is an input value for the generator. Optional.
  optional string from = 6;

  // Optional: Indicates the parameter must have a value.  Defaults to false.
  optional bool required = 7;
}

// Template contains the inputs needed to produce a Config.
message Template {
  // Standard object's metadata.
  optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;

  // message is an optional instructional message that will
  // be displayed when this template is instantiated.
  // This field should inform the user how to utilize the newly created resources.
  // Parameter substitution will be performed on the message before being
  // displayed so that generated credentials and other parameters can be
  // included in the output.
  optional string message = 2;

  // objects is an array of resources to include in this template.
  // If a namespace value is hardcoded in the object, it will be removed
  // during template instantiation, however if the namespace value
  // is, or contains, a ${PARAMETER_REFERENCE}, the resolved
  // value after parameter substitution will be respected and the object
  // will be created in that namespace.
  repeated k8s.io.kubernetes.pkg.runtime.RawExtension objects = 3;

  // parameters is an optional array of Parameters used during the
  // Template to Config transformation.
  repeated Parameter parameters = 4;

  // labels is a optional set of labels that are applied to every
  // object during the Template to Config transformation.
  map<string, string> labels = 5;
}

// TemplateList is a list of Template objects.
message TemplateList {
  // Standard object's metadata.
  optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;

  // Items is a list of templates
  repeated Template items = 2;
}

