{
  "description": "CassandraTask is the Schema for the cassandrajobs 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",
        "null"
      ]
    },
    "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",
        "null"
      ]
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ]
    },
    "spec": {
      "additionalProperties": false,
      "description": "CassandraTaskSpec defines the desired state of CassandraTask",
      "properties": {
        "concurrencyPolicy": {
          "description": "Specifics if this task can be run concurrently with other active tasks. Valid values are: - \"Allow\": allows multiple Tasks to run concurrently on Cassandra cluster - \"Forbid\" (default): only a single task is executed at once The \"Allow\" property is only valid if all the other active Tasks have \"Allow\" as well.",
          "type": [
            "string",
            "null"
          ]
        },
        "datacenter": {
          "additionalProperties": false,
          "description": "Which datacenter this task is targetting. Note, this must be a datacenter which the current cass-operator can access",
          "properties": {
            "apiVersion": {
              "description": "API version of the referent.",
              "type": [
                "string",
                "null"
              ]
            },
            "fieldPath": {
              "description": "If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.",
              "type": [
                "string",
                "null"
              ]
            },
            "kind": {
              "description": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
              "type": [
                "string",
                "null"
              ]
            },
            "name": {
              "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
              "type": [
                "string",
                "null"
              ]
            },
            "namespace": {
              "description": "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
              "type": [
                "string",
                "null"
              ]
            },
            "resourceVersion": {
              "description": "Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency",
              "type": [
                "string",
                "null"
              ]
            },
            "uid": {
              "description": "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ],
          "x-kubernetes-map-type": "atomic"
        },
        "jobs": {
          "description": "Jobs defines the jobs this task will execute (and their order)",
          "items": {
            "additionalProperties": false,
            "properties": {
              "args": {
                "additionalProperties": false,
                "description": "Arguments are additional parameters for the command",
                "properties": {
                  "end_token": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "jobs": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "keyspace_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "new_tokens": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "NewTokens is a map of pod names to their newly-assigned tokens. Required for the move command, ignored otherwise. Pods referenced in this map must exist; any existing pod not referenced in this map will not be moved.",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "no_snapshot": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "no_validate": {
                    "description": "Scrub arguments",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "pod_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "rack": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "skip_corrupted": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "source_datacenter": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "split_output": {
                    "description": "Compaction arguments",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "start_token": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "tables": {
                    "items": {
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },
              "command": {
                "description": "Command defines what is run against Cassandra pods",
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "command",
              "name"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "restartPolicy": {
          "description": "RestartPolicy indicates the behavior n case of failure. Default is Never.",
          "type": [
            "string",
            "null"
          ]
        },
        "scheduledTime": {
          "description": "ScheduledTime indicates the earliest possible time this task is executed. This does not necessarily equal to the time it is actually executed (if other tasks are blocking for example). If not set, the task will be executed immediately.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "ttlSecondsAfterFinished": {
          "description": "TTLSecondsAfterFinished defines how long the completed job will kept before being cleaned up. If set to 0 the task will not be cleaned up by the cass-operator. If unset, the default time (86400s) is used.",
          "format": "int32",
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    },
    "status": {
      "additionalProperties": false,
      "description": "CassandraTaskStatus defines the observed state of CassandraJob",
      "properties": {
        "active": {
          "description": "The number of actively running pods.",
          "type": [
            "integer",
            "null"
          ]
        },
        "completionTime": {
          "description": "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "conditions": {
          "description": "The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/",
          "items": {
            "additionalProperties": false,
            "description": "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions.  For example, \n type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }",
            "properties": {
              "lastTransitionTime": {
                "description": "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "message is a human readable message indicating details about the transition. This may be an empty string.",
                "maxLength": 32768,
                "type": "string"
              },
              "observedGeneration": {
                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.",
                "format": "int64",
                "minimum": 0,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "reason": {
                "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.",
                "maxLength": 1024,
                "minLength": 1,
                "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                "type": "string"
              },
              "status": {
                "description": "status of the condition, one of True, False, Unknown.",
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": "string"
              },
              "type": {
                "description": "type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)",
                "maxLength": 316,
                "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "message",
              "reason",
              "status",
              "type"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ],
          "x-kubernetes-list-type": "atomic"
        },
        "failed": {
          "description": "The number of pods which reached phase Failed.",
          "type": [
            "integer",
            "null"
          ]
        },
        "startTime": {
          "description": "Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "succeeded": {
          "description": "The number of pods which reached phase Succeeded.",
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    }
  },
  "type": "object"
}