{
  "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": "The specification of the Kafka Connector.",
      "properties": {
        "alterOffsets": {
          "description": "Configuration for altering offsets.",
          "properties": {
            "fromConfigMap": {
              "description": "Reference to the ConfigMap where the new offsets are stored.",
              "properties": {
                "name": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "required": [
            "fromConfigMap"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "autoRestart": {
          "description": "Automatic restart of connector and tasks configuration.",
          "properties": {
            "enabled": {
              "description": "Whether automatic restart for failed connectors and tasks should be enabled or disabled.",
              "type": "boolean"
            },
            "maxRestarts": {
              "description": "The maximum number of connector restarts that the operator will try. If the connector remains in a failed state after reaching this limit, it must be restarted manually by the user. Defaults to an unlimited number of restarts.",
              "type": "integer"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "class": {
          "description": "The Class for the Kafka Connector.",
          "type": "string"
        },
        "config": {
          "description": "The Kafka Connector configuration. The following properties cannot be set: name, connector.class, tasks.max.",
          "type": "object",
          "x-kubernetes-preserve-unknown-fields": true
        },
        "listOffsets": {
          "description": "Configuration for listing offsets.",
          "properties": {
            "toConfigMap": {
              "description": "Reference to the ConfigMap where the list of offsets will be written to.",
              "properties": {
                "name": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "required": [
            "toConfigMap"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "pause": {
          "description": "Whether the connector should be paused. Defaults to false.",
          "type": "boolean"
        },
        "state": {
          "description": "The state the connector should be in. Defaults to running.",
          "enum": [
            "paused",
            "stopped",
            "running"
          ],
          "type": "string"
        },
        "tasksMax": {
          "description": "The maximum number of tasks for the Kafka Connector.",
          "minimum": 1,
          "type": "integer"
        },
        "version": {
          "description": "Desired version or version range to respect when starting the Kafka Connector. This is only supported when using Kafka Connect version 4.1.0 and higher.",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "The status of the Kafka Connector.",
      "properties": {
        "autoRestart": {
          "description": "The auto restart status.",
          "properties": {
            "connectorName": {
              "description": "The name of the connector being restarted.",
              "type": "string"
            },
            "count": {
              "description": "The number of times the connector or task is restarted.",
              "type": "integer"
            },
            "lastRestartTimestamp": {
              "description": "The last time the automatic restart was attempted. The required format is 'yyyy-MM-ddTHH:mm:ssZ' in the UTC time zone.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "conditions": {
          "description": "List of status conditions.",
          "items": {
            "properties": {
              "lastTransitionTime": {
                "description": "Last time the condition of a type changed from one status to another. The required format is 'yyyy-MM-ddTHH:mm:ssZ', in the UTC time zone.",
                "type": "string"
              },
              "message": {
                "description": "Human-readable message indicating details about the condition's last transition.",
                "type": "string"
              },
              "reason": {
                "description": "The reason for the condition's last transition (a single word in CamelCase).",
                "type": "string"
              },
              "status": {
                "description": "The status of the condition, either True, False or Unknown.",
                "type": "string"
              },
              "type": {
                "description": "The unique identifier of a condition, used to distinguish between other conditions in the resource.",
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "connectorStatus": {
          "description": "The connector status, as reported by the Kafka Connect REST API.",
          "type": "object",
          "x-kubernetes-preserve-unknown-fields": true
        },
        "observedGeneration": {
          "description": "The generation of the CRD that was last reconciled by the operator.",
          "type": "integer"
        },
        "tasksMax": {
          "description": "The maximum number of tasks for the Kafka Connector.",
          "type": "integer"
        },
        "topics": {
          "description": "The list of topics used by the Kafka Connector.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
