{
  "description": "BackupDRBackupPlan is the Schema for the BackupDRBackupPlan 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": "BackupDRBackupPlanSpec defines the desired state of BackupDRBackupPlan",
      "properties": {
        "backupRules": {
          "description": "Required. The backup rules for this `BackupPlan`. There must be at least one `BackupRule` message.",
          "items": {
            "properties": {
              "backupRetentionDays": {
                "description": "Required. Configures the duration for which backup data will be kept. It is\n defined in \u201cdays\u201d. The value should be greater than or equal to minimum\n enforced retention of the backup vault.\n\n Minimum value is 1 and maximum value is 36159 for custom retention\n on-demand backup.\n Minimum and maximum values are workload specific for all other rules.",
                "format": "int32",
                "type": "integer"
              },
              "ruleID": {
                "description": "Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is unique per `BackupPlan`.The `rule_id` must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /[a-z][a-z0-9-]{,62}/.",
                "type": "string"
              },
              "standardSchedule": {
                "description": "Optional. Defines a schedule that runs within the confines of a defined window of time.",
                "properties": {
                  "backupWindow": {
                    "description": "Required. A BackupWindow defines the window of day during which backup jobs\n will run. Jobs are queued at the beginning of the window and will be marked\n as `NOT_RUN` if they do not start by the end of the window.\n\n Note: running jobs will not be cancelled at the end of the window.",
                    "properties": {
                      "endHourOfDay": {
                        "description": "Required. The hour of day (1-24) when the window end for e.g. if value of\n end hour of day is 10 that mean backup window end time is 10:00.\n\n End hour of day should be greater than start hour of day.\n 0 <= start_hour_of_day < end_hour_of_day <= 24\n\n End hour of day is not include in backup window that mean if\n end_hour_of_day= 10 jobs should start before 10:00.",
                        "format": "int32",
                        "type": "integer"
                      },
                      "startHourOfDay": {
                        "description": "Required. The hour of day (0-23) when the window starts for e.g. if value of start hour of day is 6 that mean backup window start at 6:00.",
                        "format": "int32",
                        "type": "integer"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "daysOfMonth": {
                    "description": "Optional. Specifies days of months like 1, 5, or 14 on which jobs will run.\n\n Values for `days_of_month` are only applicable for `recurrence_type`,\n `MONTHLY` and `YEARLY`. A validation error will occur if other values are\n supplied.",
                    "items": {
                      "format": "int32",
                      "type": "integer"
                    },
                    "type": "array"
                  },
                  "daysOfWeek": {
                    "description": "Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs\n will run.\n\n This is required for `recurrence_type`, `WEEKLY` and is not applicable\n otherwise. A validation error will occur if a value is supplied and\n `recurrence_type` is not `WEEKLY`.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "hourlyFrequency": {
                    "description": "Optional. Specifies frequency for hourly backups. A hourly frequency of 2\n means jobs will run every 2 hours from start time till end time defined.\n\n This is required for `recurrence_type`, `HOURLY` and is not applicable\n otherwise. A validation error will occur if a value is supplied and\n `recurrence_type` is not `HOURLY`.\n\n Value of hourly frequency should be between 4 and 23.\n\n Reason for limit : We found that there is bandwidth limitation of 3GB/S for\n GMI while taking a backup and 5GB/S while doing a restore. Given the amount\n of parallel backups and restore we are targeting, this will potentially\n take the backup time to mins and hours (in worst case scenario).",
                    "format": "int32",
                    "type": "integer"
                  },
                  "months": {
                    "description": "Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on\n which jobs will run.\n\n This field is only applicable when `recurrence_type` is `YEARLY`. A\n validation error will occur if other values are supplied.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "recurrenceType": {
                    "description": "Required. Specifies the `RecurrenceType` for the schedule.",
                    "type": "string"
                  },
                  "timeZone": {
                    "description": "Required. The time zone to be used when interpreting the schedule. The value of this field must be a time zone name from the IANA tz database. See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the list of valid timezone names. For e.g., Europe/Paris.",
                    "type": "string"
                  },
                  "weekDayOfMonth": {
                    "description": "Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST\n MONDAY, on which jobs will run. This will be specified by two fields in\n `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week,\n e.g. `LAST`.\n\n This field is only applicable for `recurrence_type`, `MONTHLY` and\n `YEARLY`. A validation error will occur if other values are supplied.",
                    "properties": {
                      "dayOfWeek": {
                        "description": "Required. Specifies the day of the week.",
                        "type": "string"
                      },
                      "weekOfMonth": {
                        "description": "Required. Specifies the week of the month.",
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  }
                },
                "type": "object",
                "additionalProperties": false
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "backupVaultRef": {
          "description": "Required. Resource name of backup vault which will be used as storage location for backups.",
          "oneOf": [
            {
              "not": {
                "required": [
                  "external"
                ]
              },
              "required": [
                "name"
              ]
            },
            {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "namespace"
                    ]
                  }
                ]
              },
              "required": [
                "external"
              ]
            }
          ],
          "properties": {
            "external": {
              "description": "A reference to an externally managed BackupDRBackupVault resource. Should be in the format \"projects/{{projectID}}/locations/{{location}}/backupVaults/{{backupvaultID}}\".",
              "type": "string"
            },
            "name": {
              "description": "The name of a BackupDRBackupVault resource.",
              "type": "string"
            },
            "namespace": {
              "description": "The namespace of a BackupDRBackupVault resource.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "description": {
          "description": "Optional. The description of the `BackupPlan` resource.\n\n The description allows for additional details about `BackupPlan` and its\n use cases to be provided. An example description is the following:  \"This\n is a backup plan that performs a daily backup at 6pm and retains data for 3\n months\". The description must be at most 2048 characters.",
          "type": "string"
        },
        "location": {
          "description": "Immutable.",
          "type": "string",
          "x-kubernetes-validations": [
            {
              "message": "Location field is immutable",
              "rule": "self == oldSelf"
            }
          ]
        },
        "projectRef": {
          "description": "The Project that this resource belongs to.",
          "oneOf": [
            {
              "not": {
                "required": [
                  "external"
                ]
              },
              "required": [
                "name"
              ]
            },
            {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "namespace"
                    ]
                  }
                ]
              },
              "required": [
                "external"
              ]
            }
          ],
          "properties": {
            "external": {
              "description": "The `projectID` field of a project, when not managed by Config Connector.",
              "type": "string"
            },
            "kind": {
              "description": "The kind of the Project resource; optional but must be `Project` if provided.",
              "type": "string"
            },
            "name": {
              "description": "The `name` field of a `Project` resource.",
              "type": "string"
            },
            "namespace": {
              "description": "The `namespace` field of a `Project` resource.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "resourceID": {
          "description": "The BackupDRBackupPlan name. If not given, the metadata.name will be used.",
          "type": "string"
        },
        "resourceType": {
          "description": "Required. The resource type to which the `BackupPlan` will be applied. Examples include, \"compute.googleapis.com/Instance\", \"sqladmin.googleapis.com/Instance\", or \"alloydb.googleapis.com/Cluster\".",
          "type": "string"
        }
      },
      "required": [
        "backupVaultRef",
        "location",
        "projectRef"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "BackupDRBackupPlanStatus defines the config connector machine state of BackupDRBackupPlan",
      "properties": {
        "conditions": {
          "description": "Conditions represent the latest available observations of the object's current state.",
          "items": {
            "properties": {
              "lastTransitionTime": {
                "description": "Last time the condition transitioned from one status to another.",
                "type": "string"
              },
              "message": {
                "description": "Human-readable message indicating details about last transition.",
                "type": "string"
              },
              "reason": {
                "description": "Unique, one-word, CamelCase reason for the condition's last transition.",
                "type": "string"
              },
              "status": {
                "description": "Status is the status of the condition. Can be True, False, Unknown.",
                "type": "string"
              },
              "type": {
                "description": "Type is the type of the condition.",
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "externalRef": {
          "description": "A unique specifier for the BackupDRBackupPlan resource in GCP.",
          "type": "string"
        },
        "observedGeneration": {
          "description": "ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource.",
          "format": "int64",
          "type": "integer"
        },
        "observedState": {
          "description": "ObservedState is the state of the resource as most recently observed in GCP.",
          "properties": {
            "backupVaultServiceAccount": {
              "description": "Output only. The Google Cloud Platform Service Account to be used by the BackupVault for taking backups. Specify the email address of the Backup Vault Service Account.",
              "type": "string"
            },
            "createTime": {
              "description": "Output only. When the `BackupPlan` was created.",
              "type": "string"
            },
            "state": {
              "description": "Output only. The `State` for the `BackupPlan`.",
              "type": "string"
            },
            "updateTime": {
              "description": "Output only. When the `BackupPlan` was last updated.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
