{
  "description": "Account is the Schema for the accounts 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": "AccountSpec defines the desired state of Account",
      "properties": {
        "email": {
          "description": "Email of the Cloudflare account",
          "type": "string"
        },
        "globalApiKey": {
          "description": "Global API key of the Cloudflare account",
          "properties": {
            "secretRef": {
              "description": "Secret name containing the API key (key must be named \"apiKey\")",
              "properties": {
                "name": {
                  "description": "Name is unique within a namespace to reference a secret resource.",
                  "type": "string"
                },
                "namespace": {
                  "description": "Namespace defines the space within which the secret name must be unique.",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "required": [
            "secretRef"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "interval": {
          "default": "5m",
          "description": "Interval to check account status",
          "type": "string"
        }
      },
      "required": [
        "email",
        "globalApiKey"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "AccountStatus defines the observed state of Account",
      "properties": {
        "message": {
          "description": "Message if the Account authentication failed",
          "type": "string"
        },
        "phase": {
          "description": "Phase of the Account",
          "enum": [
            "Active",
            "Failed"
          ],
          "type": "string"
        },
        "zones": {
          "description": "Zones contains all the zones of the Account",
          "items": {
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        }
      },
      "required": [
        "phase"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
