{
  "properties": {
    "apiVersion": {
      "type": "string"
    },
    "kind": {
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "properties": {
        "configs": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object",
          "x-kubernetes-map-type": "granular"
        },
        "kafkaClusterRef": {
          "properties": {
            "name": {
              "type": "string"
            },
            "namespace": {
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "kafkaRest": {
          "properties": {
            "authentication": {
              "properties": {
                "basic": {
                  "properties": {
                    "debug": {
                      "type": "boolean"
                    },
                    "directoryPathInContainer": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "ignoreRoles": {
                      "type": "boolean"
                    },
                    "restrictedRoles": {
                      "items": {
                        "type": "string"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "roles": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "secretRef": {
                      "maxLength": 30,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "bearer": {
                  "properties": {
                    "directoryPathInContainer": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "secretRef": {
                      "maxLength": 30,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "oauth": {
                  "properties": {
                    "configuration": {
                      "properties": {
                        "audience": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "clientAssertion": {
                          "properties": {
                            "clientId": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "jwtTokenFile": {
                              "properties": {
                                "directoryPathInContainer": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "secretRef": {
                                  "maxLength": 30,
                                  "minLength": 1,
                                  "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                  "type": "string"
                                }
                              },
                              "type": "object",
                              "additionalProperties": false
                            },
                            "localClientAssertion": {
                              "properties": {
                                "audience": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "includeJtiClaim": {
                                  "type": "boolean"
                                },
                                "includeNbfClaim": {
                                  "type": "boolean"
                                },
                                "issuer": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "privateKeyFile": {
                                  "properties": {
                                    "directoryPathInContainer": {
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "encryptedPrivateKey": {
                                      "type": "boolean"
                                    },
                                    "includeAssertionTemplate": {
                                      "type": "boolean"
                                    },
                                    "secretRef": {
                                      "maxLength": 30,
                                      "minLength": 1,
                                      "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                      "type": "string"
                                    }
                                  },
                                  "type": "object",
                                  "additionalProperties": false
                                },
                                "subject": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "tokenLifetime": {
                                  "format": "int32",
                                  "type": "integer"
                                }
                              },
                              "type": "object",
                              "additionalProperties": false
                            }
                          },
                          "type": "object",
                          "additionalProperties": false
                        },
                        "expectedIssuer": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "groupsClaimName": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "jwksEndpointUri": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "loginConnectTimeoutMs": {
                          "format": "int32",
                          "type": "integer"
                        },
                        "loginReadTimeoutMs": {
                          "format": "int32",
                          "type": "integer"
                        },
                        "loginRetryBackoffMaxMs": {
                          "format": "int32",
                          "type": "integer"
                        },
                        "loginRetryBackoffMs": {
                          "format": "int32",
                          "type": "integer"
                        },
                        "scope": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "subClaimName": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "tokenEndpointUri": {
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    },
                    "directoryPathInContainer": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "secretRef": {
                      "maxLength": 30,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "configuration"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "sslClientAuthentication": {
                  "type": "boolean"
                },
                "type": {
                  "enum": [
                    "basic",
                    "bearer",
                    "mtls",
                    "oauth"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "endpoint": {
              "minLength": 1,
              "pattern": "^https?://.*",
              "type": "string"
            },
            "kafkaClusterID": {
              "minLength": 1,
              "type": "string"
            },
            "tls": {
              "properties": {
                "directoryPathInContainer": {
                  "minLength": 1,
                  "type": "string"
                },
                "jksPassword": {
                  "properties": {
                    "secretRef": {
                      "maxLength": 30,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "secretRef"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "secretRef": {
                  "maxLength": 63,
                  "minLength": 1,
                  "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "kafkaRestClassRef": {
          "properties": {
            "name": {
              "minLength": 1,
              "type": "string"
            },
            "namespace": {
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "name": {
          "maxLength": 255,
          "minLength": 1,
          "pattern": "^[a-zA-Z0-9\\._\\-]*$",
          "type": "string"
        },
        "partitionCount": {
          "format": "int32",
          "type": "integer"
        },
        "replicas": {
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "properties": {
        "appState": {
          "default": "Unknown",
          "enum": [
            "Unknown",
            "Created",
            "Failed",
            "Deleted"
          ],
          "type": "string"
        },
        "conditions": {
          "items": {
            "properties": {
              "lastProbeTime": {
                "format": "date-time",
                "type": "string"
              },
              "lastTransitionTime": {
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "kafkaCluster": {
          "type": "string"
        },
        "kafkaClusterID": {
          "type": "string"
        },
        "kafkaRestEndpoint": {
          "type": "string"
        },
        "observedGeneration": {
          "format": "int64",
          "type": "integer"
        },
        "partitionCount": {
          "format": "int32",
          "type": "integer"
        },
        "replicas": {
          "format": "int32",
          "type": "integer"
        },
        "state": {
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
