{
  "description": "Workflow is the Schema for the Workflows API.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "WorkflowSpec defines the desired state of Workflow.",
      "properties": {
        "hardwareMap": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "A mapping of template devices to hadware mac addresses",
          "type": "object"
        },
        "hardwareRef": {
          "description": "Name of the Hardware associated with this workflow.",
          "type": "string"
        },
        "templateRef": {
          "description": "Name of the Template associated with this workflow.",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "WorkflowStatus defines the observed state of Workflow.",
      "properties": {
        "globalTimeout": {
          "description": "GlobalTimeout represents the max execution time",
          "format": "int64",
          "type": "integer"
        },
        "state": {
          "description": "State is the state of the workflow in Tinkerbell.",
          "type": "string"
        },
        "tasks": {
          "description": "Tasks are the tasks to be completed",
          "items": {
            "description": "Task represents a series of actions to be completed by a worker.",
            "properties": {
              "actions": {
                "items": {
                  "description": "Action represents a workflow action.",
                  "properties": {
                    "command": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "environment": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    "image": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "pid": {
                      "type": "string"
                    },
                    "seconds": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "startedAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "timeout": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "volumes": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "environment": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "name": {
                "type": "string"
              },
              "volumes": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "worker": {
                "type": "string"
              }
            },
            "required": [
              "actions",
              "name",
              "worker"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
