{
  "description": "SpannerInstance is the Schema for the SpannerInstance 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": "SpannerInstanceSpec defines the desired state of SpannerInstance",
      "properties": {
        "autoscalingConfig": {
          "description": "Optional. The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, node_count and processing_units are treated as OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance.",
          "properties": {
            "autoscalingLimits": {
              "description": "Required. Autoscaling limits for an instance.",
              "properties": {
                "maxNodes": {
                  "description": "Maximum number of nodes allocated to the instance. If set, this number should be greater than or equal to min_nodes.",
                  "format": "int32",
                  "type": "integer"
                },
                "maxProcessingUnits": {
                  "description": "Maximum number of processing units allocated to the instance. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.",
                  "format": "int32",
                  "type": "integer"
                },
                "minNodes": {
                  "description": "Minimum number of nodes allocated to the instance. If set, this number should be greater than or equal to 1.",
                  "format": "int32",
                  "type": "integer"
                },
                "minProcessingUnits": {
                  "description": "Minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "autoscalingTargets": {
              "description": "Required. The autoscaling targets for an instance.",
              "properties": {
                "highPriorityCpuUtilizationPercent": {
                  "description": "Required. The target high priority cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 90] inclusive.",
                  "format": "int32",
                  "type": "integer"
                },
                "storageUtilizationPercent": {
                  "description": "Required. The target storage utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 100] inclusive.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "config": {
          "description": "Immutable. The name of the instance's configuration (similar but not quite the same as a region) which defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form 'regional-europe-west1' , 'us-central' etc. In order to obtain a valid list please consult the [Configuration section of the docs](https://cloud.google.com/spanner/docs/instances).",
          "type": "string",
          "x-kubernetes-validations": [
            {
              "message": "Config field is immutable",
              "rule": "self == oldSelf"
            }
          ]
        },
        "defaultBackupScheduleType": {
          "description": "Optional. Controls the default backup schedule behavior for new databases\nwithin the instance. By default, a backup schedule is created automatically\nwhen a new database is created in a new instance.\n\nNote that the `AUTOMATIC` value isn't permitted for free instances,\nas backups and backup schedules aren't supported for free instances.\n\nIn the `GetInstance` or `ListInstances` response, if the value of\n`default_backup_schedule_type` isn't set, or set to `NONE`, Spanner doesn't\ncreate a default backup schedule for new databases in the instance.",
          "type": "string"
        },
        "displayName": {
          "description": "The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.",
          "type": "string"
        },
        "edition": {
          "description": "Optional. The `Edition` of the current instance. Currently accepted values are STANDARD, ENTERPRISE, ENTERPRISE_PLUS. If edition is unspecified, it has automatically upgraded to the lowest edition that matches your usage pattern.",
          "type": "string"
        },
        "labels": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Cloud Labels are a flexible and lightweight mechanism for organizing cloud\nresources into groups that reflect a customer's organizational needs and\ndeployment strategies. Cloud Labels can be used to filter collections of\nresources. They can be used to control how resource metrics are aggregated.\nAnd they can be used as arguments to policy management rules (e.g. route,\nfirewall, load balancing, etc.).\n\n  - Label keys must be between 1 and 63 characters long and must conform to\n    the following regular expression: `[a-z][a-z0-9_-]{0,62}`.\n  - Label values must be between 0 and 63 characters long and must conform\n    to the regular expression `[a-z0-9_-]{0,63}`.\n  - No more than 64 labels can be associated with a given resource.\n\nSee https://goo.gl/xmQnxf for more information on and examples of labels.\n\nIf you plan to use labels in your own code, please note that additional\ncharacters may be allowed in the future. And so you are advised to use an\ninternal label representation, such as JSON, which doesn't rely upon\nspecific characters being disallowed.  For example, representing labels\nas the string:  name + \"_\" + value  would prove problematic if we were to\nallow \"_\" in a future release.",
          "type": "object"
        },
        "numNodes": {
          "format": "int32",
          "type": "integer"
        },
        "processingUnits": {
          "format": "int32",
          "type": "integer"
        },
        "resourceID": {
          "description": "The SpannerInstance name. If not given, the metadata.name will be used.",
          "type": "string"
        }
      },
      "required": [
        "config",
        "displayName"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "SpannerInstanceStatus defines the config connector machine state of SpannerInstance",
      "properties": {
        "conditions": {
          "description": "Conditions represent the latest available observations of the SpannerInstance'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 SpannerInstance 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": {
            "numNodes": {
              "description": "NumNodes and ProcessUnits is output fields with AutoScaler is set.",
              "format": "int32",
              "type": "integer"
            },
            "processingUnits": {
              "format": "int32",
              "type": "integer"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "state": {
          "description": "Instance status: 'CREATING' or 'READY'.",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
