{
  "description": "BackupDRBackupPlanAssociation is the Schema for the BackupDRBackupPlanAssociation 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": "BackupDRBackupPlanAssociationSpec defines the desired state of BackupDRBackupPlanAssociation",
      "properties": {
        "backupPlanRef": {
          "description": "Required. The backup plan which needs to be applied on workload.",
          "oneOf": [
            {
              "not": {
                "required": [
                  "external"
                ]
              },
              "required": [
                "name"
              ]
            },
            {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "namespace"
                    ]
                  }
                ]
              },
              "required": [
                "external"
              ]
            }
          ],
          "properties": {
            "external": {
              "description": "A reference to an externally managed BackupDRBackupPlan resource. Should be in the format \"projects/{{projectID}}/locations/{{location}}/backupplans/{{backupplanID}}\".",
              "type": "string"
            },
            "name": {
              "description": "The name of a BackupDRBackupPlan resource.",
              "type": "string"
            },
            "namespace": {
              "description": "The namespace of a BackupDRBackupPlan resource.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "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
        },
        "resource": {
          "description": "Required. Immutable. Resource name of workload on which backupplan is applied",
          "properties": {
            "computeInstanceRef": {
              "description": "InstanceRef defines the resource reference to ComputeInstance, which \"External\" field holds the GCP identifier for the KRM object.",
              "oneOf": [
                {
                  "not": {
                    "required": [
                      "external"
                    ]
                  },
                  "required": [
                    "name"
                  ]
                },
                {
                  "not": {
                    "anyOf": [
                      {
                        "required": [
                          "name"
                        ]
                      },
                      {
                        "required": [
                          "namespace"
                        ]
                      }
                    ]
                  },
                  "required": [
                    "external"
                  ]
                }
              ],
              "properties": {
                "external": {
                  "description": "A reference to an externally managed ComputeInstance resource. Should be in the format \"projects/{{projectID}}/locations/{{location}}/instances/{{instanceID}}\".",
                  "type": "string"
                },
                "name": {
                  "description": "The name of a ComputeInstance resource.",
                  "type": "string"
                },
                "namespace": {
                  "description": "The namespace of a ComputeInstance resource.",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "resourceID": {
          "description": "The BackupDRBackupPlanAssociation name. If not given, the metadata.name will be used.",
          "type": "string"
        },
        "resourceType": {
          "description": "Required. Immutable. Resource type of workload on which backupplan is applied",
          "type": "string"
        }
      },
      "required": [
        "backupPlanRef",
        "location",
        "projectRef",
        "resource",
        "resourceType"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "BackupDRBackupPlanAssociationStatus defines the config connector machine state of BackupDRBackupPlanAssociation",
      "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 BackupDRBackupPlanAssociation 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": {
            "createTime": {
              "description": "Output only. The time when the instance was created.",
              "type": "string"
            },
            "dataSource": {
              "description": "Output only. Resource name of data source which will be used as storage location for backups taken. Format : projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}",
              "type": "string"
            },
            "rulesConfigInfo": {
              "description": "Output only. The config info related to backup rules.",
              "items": {
                "properties": {
                  "lastBackupError": {
                    "description": "Output only. google.rpc.Status object to store the last backup error.",
                    "properties": {
                      "code": {
                        "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].",
                        "format": "int32",
                        "type": "integer"
                      },
                      "details": {
                        "description": "A list of messages that carry the error details.  There is a common set of message types for APIs to use.",
                        "items": {
                          "properties": {
                            "typeURL": {
                              "description": "A URL/resource name that uniquely identifies the type of the serialized\n protocol buffer message. This string must contain at least\n one \"/\" character. The last segment of the URL's path must represent\n the fully qualified name of the type (as in\n `path/google.protobuf.Duration`). The name should be in a canonical form\n (e.g., leading \".\" is not accepted).\n\n In practice, teams usually precompile into the binary all types that they\n expect it to use in the context of Any. However, for URLs which use the\n scheme `http`, `https`, or no scheme, one can optionally set up a type\n server that maps type URLs to message definitions as follows:\n\n * If no scheme is provided, `https` is assumed.\n * An HTTP GET on the URL must yield a [google.protobuf.Type][]\n   value in binary format, or produce an error.\n * Applications are allowed to cache lookup results based on the\n   URL, or have them precompiled into a binary to avoid any\n   lookup. Therefore, binary compatibility needs to be preserved\n   on changes to types. (Use versioned type names to manage\n   breaking changes.)\n\n Note: this functionality is not currently available in the official\n protobuf release, and it is not used for type URLs beginning with\n type.googleapis.com.\n\n Schemes other than `http`, `https` (or the empty scheme) might be\n used with implementation specific semantics.",
                              "type": "string"
                            },
                            "value": {
                              "description": "Must be a valid serialized protocol buffer of the above specified type.",
                              "format": "byte",
                              "type": "string"
                            }
                          },
                          "type": "object",
                          "additionalProperties": false
                        },
                        "type": "array"
                      },
                      "message": {
                        "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.",
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "lastBackupState": {
                    "description": "Output only. The last backup state for rule.",
                    "type": "string"
                  },
                  "lastSuccessfulBackupConsistencyTime": {
                    "description": "Output only. The point in time when the last successful backup was captured from the source.",
                    "type": "string"
                  },
                  "ruleID": {
                    "description": "Output only. Backup Rule id fetched from backup plan.",
                    "type": "string"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            },
            "state": {
              "description": "Output only. The BackupPlanAssociation resource state.",
              "type": "string"
            },
            "updateTime": {
              "description": "Output only. The time when the instance was updated.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
