{
  "description": "BigQueryReservationAssignment is the Schema for the BigQueryReservationAssignment 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": "BigQueryReservationAssignmentSpec defines the desired state of BigQueryReservationAssignment",
      "properties": {
        "assignee": {
          "description": "Immutable. Required. The resource which will use the reservation. E.g. `projects/myproject`, `folders/123`, or `organizations/456`.",
          "properties": {
            "folderRef": {
              "description": "Exactly one of ProjectRef or FolderRef or OrganizationRef must be specified.",
              "oneOf": [
                {
                  "not": {
                    "required": [
                      "external"
                    ]
                  },
                  "required": [
                    "name"
                  ]
                },
                {
                  "not": {
                    "anyOf": [
                      {
                        "required": [
                          "name"
                        ]
                      },
                      {
                        "required": [
                          "namespace"
                        ]
                      }
                    ]
                  },
                  "required": [
                    "external"
                  ]
                }
              ],
              "properties": {
                "external": {
                  "description": "The 'name' field of a folder, when not managed by Config Connector. This field must be set when 'name' field is not set.",
                  "type": "string"
                },
                "name": {
                  "description": "The 'name' field of a 'Folder' resource. This field must be set when 'external' field is not set.",
                  "type": "string"
                },
                "namespace": {
                  "description": "The 'namespace' field of a 'Folder' resource. If unset, the namespace is defaulted to the namespace of the referencer resource.",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "organizationRef": {
              "description": "Exactly one of ProjectRef or FolderRef or OrganizationRef must be specified.",
              "properties": {
                "external": {
                  "description": "The 'name' field of an organization, when not managed by Config Connector.",
                  "type": "string"
                }
              },
              "required": [
                "external"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "projectRef": {
              "description": "Exactly one of ProjectRef or FolderRef or OrganizationRef must be specified.",
              "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
            }
          },
          "type": "object",
          "x-kubernetes-validations": [
            {
              "message": "Exactly one of orojectRef or folderRef or organizationRef must be specified.",
              "rule": "self != null && has(self.projectRef) != has(self.folderRef) != has(self.organizationRef)"
            },
            {
              "message": "assignee field is immutable",
              "rule": "self == oldSelf"
            }
          ],
          "additionalProperties": false
        },
        "jobType": {
          "description": "Immutable. Which type of jobs will use the reservation.",
          "type": "string",
          "x-kubernetes-validations": [
            {
              "message": "jobType field is immutable",
              "rule": "self == oldSelf"
            }
          ]
        },
        "reservationRef": {
          "description": "The name of reservation to create a new assignment in, or to move the assignment to.",
          "oneOf": [
            {
              "not": {
                "required": [
                  "external"
                ]
              },
              "required": [
                "name"
              ]
            },
            {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "namespace"
                    ]
                  }
                ]
              },
              "required": [
                "external"
              ]
            }
          ],
          "properties": {
            "external": {
              "description": "A reference to an externally managed BigqueryReservation resource. Should be in the format \"projects/{{projectID}}/locations/{{location}}/reservations/{{reservationID}}\".",
              "type": "string"
            },
            "name": {
              "description": "The name of a BigqueryReservation resource.",
              "type": "string"
            },
            "namespace": {
              "description": "The namespace of a BigqueryReservation resource.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "resourceID": {
          "description": "Immutable. Optional. The BigQueryReservationAssignment ID used for resource creation or acquisition. Service-generated.Can be set only if resource acquisition . For acquisition: This field must be provided to identify the Reservation resource to acquire.",
          "type": "string"
        }
      },
      "required": [
        "assignee",
        "jobType",
        "reservationRef"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "BigQueryReservationAssignmentStatus defines the config connector machine state of BigQueryReservationAssignment",
      "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 BigqueryReservationAssignment 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": {
            "state": {
              "description": "State of the assignment.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
