{
  "description": "The AtlasBackupCompliancePolicy is a configuration that enforces specific backup and retention requirements",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "AtlasBackupCompliancePolicySpec is the specification of the desired backup compliance policy configuration.",
      "properties": {
        "authorizedEmail": {
          "description": "Email address of the user authorized to update Backup Compliance Policy settings.",
          "type": "string"
        },
        "authorizedUserFirstName": {
          "description": "First name of the user authorized to update the Backup Compliance Policy settings.",
          "type": "string"
        },
        "authorizedUserLastName": {
          "description": "Last name of the user authorized to update the Backup Compliance Policy settings.",
          "type": "string"
        },
        "copyProtectionEnabled": {
          "description": "Flag that indicates whether to prevent cluster users from deleting backups copied to other regions, even if those additional snapshot regions are removed.",
          "type": "boolean"
        },
        "encryptionAtRestEnabled": {
          "description": "Flag that indicates whether to require Encryption at Rest using Customer Key Management for all clusters with a Backup Compliance Policy.",
          "type": "boolean"
        },
        "onDemandPolicy": {
          "description": "Specifications for on-demand policy.",
          "properties": {
            "retentionUnit": {
              "description": "Scope of the backup policy item: days, weeks, or months.",
              "enum": [
                "days",
                "weeks",
                "months"
              ],
              "type": "string"
            },
            "retentionValue": {
              "description": "Value to associate with RetentionUnit.",
              "type": "integer"
            }
          },
          "required": [
            "retentionUnit",
            "retentionValue"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "overwriteBackupPolicies": {
          "description": "Flag that indicates whether to overwrite non-complying backup policies with the new data protection settings.",
          "type": "boolean"
        },
        "pointInTimeEnabled": {
          "description": "Flag that indicates whether the cluster uses Continuous Cloud Backups with a Backup Compliance Policy.",
          "type": "boolean"
        },
        "restoreWindowDays": {
          "description": "Number of previous days from which you can restore with Continuous Cloud Backup with a Backup Compliance Policy.\nThis parameter applies only to Continuous Cloud Backups with a Backup Compliance Policy.",
          "type": "integer"
        },
        "scheduledPolicyItems": {
          "description": "List that contains the specifications for one scheduled policy.",
          "items": {
            "properties": {
              "frequencyInterval": {
                "description": "Frequency of the new backup policy item specified by FrequencyType. A value of 1 specifies the first instance of the corresponding FrequencyType.\nYou can set FrequencyInterval only to 12 for NVMe clusters.",
                "enum": [
                  1,
                  2,
                  3,
                  4,
                  5,
                  6,
                  7,
                  8,
                  9,
                  10,
                  11,
                  12,
                  13,
                  14,
                  15,
                  16,
                  17,
                  18,
                  19,
                  20,
                  21,
                  22,
                  23,
                  24,
                  25,
                  26,
                  27,
                  28,
                  40
                ],
                "type": "integer"
              },
              "frequencyType": {
                "description": "Frequency associated with the backup policy item. You can specify only one each of hourly or daily backup policy items.",
                "enum": [
                  "hourly",
                  "daily",
                  "weekly",
                  "monthly",
                  "yearly"
                ],
                "type": "string"
              },
              "retentionUnit": {
                "description": "Unit of time in which MongoDB Atlas measures snapshot retention.",
                "enum": [
                  "days",
                  "weeks",
                  "months",
                  "years"
                ],
                "type": "string"
              },
              "retentionValue": {
                "description": "Duration in days, weeks, months, or years that MongoDB Cloud retains the snapshot.\nFor less frequent policy items, MongoDB Cloud requires that you specify a value greater than or equal to the value specified for more frequent policy items.",
                "type": "integer"
              }
            },
            "required": [
              "frequencyInterval",
              "frequencyType",
              "retentionUnit",
              "retentionValue"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        }
      },
      "required": [
        "authorizedEmail",
        "authorizedUserFirstName",
        "authorizedUserLastName"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "BackupCompliancePolicyStatus defines the observed state of AtlasBackupCompliancePolicy.",
      "properties": {
        "conditions": {
          "description": "Conditions is the list of statuses showing the current state of the Atlas Custom Resource",
          "items": {
            "description": "Condition describes the state of an Atlas Custom Resource at a certain point.",
            "properties": {
              "lastTransitionTime": {
                "description": "Last time the condition transitioned from one status to another.\nRepresented in ISO 8601 format.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "A message providing details about the transition.",
                "type": "string"
              },
              "reason": {
                "description": "The reason for the condition's last transition.",
                "type": "string"
              },
              "status": {
                "description": "Status of the condition; one of True, False, Unknown.",
                "type": "string"
              },
              "type": {
                "description": "Type of Atlas Custom Resource condition.",
                "type": "string"
              }
            },
            "required": [
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "observedGeneration": {
          "description": "ObservedGeneration indicates the generation of the resource specification of which the Atlas Operator is aware.\nThe Atlas Operator updates this field to the value of 'metadata.generation' as soon as it starts reconciliation of the resource.",
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "conditions"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
