{
  "description": "WorkstationCluster is the Schema for the WorkstationCluster 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": "WorkstationClusterSpec defines the desired state of WorkstationCluster",
      "properties": {
        "annotations": {
          "description": "Optional. Client-specified annotations.",
          "items": {
            "properties": {
              "key": {
                "description": "Key for the annotation.",
                "type": "string"
              },
              "value": {
                "description": "Value for the annotation.",
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "displayName": {
          "description": "Optional. Human-readable name for this workstation cluster.",
          "type": "string"
        },
        "labels": {
          "description": "Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources) that are applied to the workstation cluster and that are also propagated to the underlying Compute Engine resources.",
          "items": {
            "properties": {
              "key": {
                "description": "Key for the label.",
                "type": "string"
              },
              "value": {
                "description": "Value for the label.",
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "location": {
          "description": "The location of the cluster.",
          "type": "string"
        },
        "networkRef": {
          "description": "Immutable. Reference to the Compute Engine network in which instances associated with this workstation cluster will be created.",
          "oneOf": [
            {
              "not": {
                "required": [
                  "external"
                ]
              },
              "required": [
                "name"
              ]
            },
            {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "namespace"
                    ]
                  }
                ]
              },
              "required": [
                "external"
              ]
            }
          ],
          "properties": {
            "external": {
              "description": "The value of an externally managed ComputeNetwork resource. Should be in the format \"https://www.googleapis.com/compute/{{version}}/projects/{{projectId}}/global/networks/{{networkId}}\" or \"projects/{{projectId}}/global/networks/{{networkId}}\"",
              "type": "string"
            },
            "name": {
              "description": "The name of a ComputeNetwork resource.",
              "type": "string"
            },
            "namespace": {
              "description": "The namespace of a ComputeNetwork resource.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "privateClusterConfig": {
          "description": "Optional. Configuration for private workstation cluster.",
          "properties": {
            "allowedProjects": {
              "description": "Optional. Additional projects that are allowed to attach to the workstation cluster's service attachment. By default, the workstation cluster's project and the VPC host project (if different) are allowed.",
              "items": {
                "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
              },
              "type": "array"
            },
            "enablePrivateEndpoint": {
              "description": "Immutable. Whether Workstations endpoint is private.",
              "type": "boolean"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "projectRef": {
          "description": "Immutable. 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",
          "x-kubernetes-validations": [
            {
              "message": "ResourceID field is immutable",
              "rule": "self == oldSelf"
            }
          ],
          "additionalProperties": false
        },
        "resourceID": {
          "description": "The WorkstationCluster name. If not given, the metadata.name will be used.",
          "type": "string"
        },
        "subnetworkRef": {
          "description": "Immutable. Reference to the Compute Engine subnetwork in which instances associated with this workstation cluster will be created. Must be part of the subnetwork specified for this workstation cluster.",
          "oneOf": [
            {
              "not": {
                "required": [
                  "external"
                ]
              },
              "required": [
                "name"
              ]
            },
            {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "namespace"
                    ]
                  }
                ]
              },
              "required": [
                "external"
              ]
            }
          ],
          "properties": {
            "external": {
              "description": "The ComputeSubnetwork selflink of form \"projects/{{project}}/regions/{{region}}/subnetworks/{{name}}\", when not managed by Config Connector.",
              "type": "string"
            },
            "name": {
              "description": "The `name` field of a `ComputeSubnetwork` resource.",
              "type": "string"
            },
            "namespace": {
              "description": "The `namespace` field of a `ComputeSubnetwork` resource.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        }
      },
      "required": [
        "networkRef",
        "projectRef",
        "subnetworkRef"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "WorkstationClusterStatus defines the config connector machine state of WorkstationCluster",
      "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 WorkstationCluster 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": {
            "clusterHostname": {
              "description": "Output only. Hostname for the workstation cluster. This field will be populated only when private endpoint is enabled. To access workstations in the workstation cluster, create a new DNS zone mapping this domain name to an internal IP address and a forwarding rule mapping that address to the service attachment.",
              "type": "string"
            },
            "controlPlaneIP": {
              "description": "Output only. The private IP address of the control plane for this workstation cluster. Workstation VMs need access to this IP address to work with the service, so make sure that your firewall rules allow egress from the workstation VMs to this address.",
              "type": "string"
            },
            "createTime": {
              "description": "Output only. Time when this workstation cluster was created.",
              "type": "string"
            },
            "degraded": {
              "description": "Output only. Whether this workstation cluster is in degraded mode, in which case it may require user action to restore full functionality. Details can be found in [conditions][google.cloud.workstations.v1.WorkstationCluster.conditions].",
              "type": "boolean"
            },
            "deleteTime": {
              "description": "Output only. Time when this workstation cluster was soft-deleted.",
              "type": "string"
            },
            "etag": {
              "description": "Optional. Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.",
              "type": "string"
            },
            "gcpConditions": {
              "description": "Output only. Status conditions describing the workstation cluster's current state.",
              "items": {
                "properties": {
                  "code": {
                    "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].",
                    "format": "int32",
                    "type": "integer"
                  },
                  "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
              },
              "type": "array"
            },
            "reconciling": {
              "description": "Output only. Indicates whether this workstation cluster is currently being updated to match its intended state.",
              "type": "boolean"
            },
            "serviceAttachmentUri": {
              "description": "Output only. Service attachment URI for the workstation cluster. The service attachment is created when private endpoint is enabled. To access workstations in the workstation cluster, configure access to the managed service using [Private Service Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services).",
              "type": "string"
            },
            "uid": {
              "description": "Output only. A system-assigned unique identifier for this workstation cluster.",
              "type": "string"
            },
            "updateTime": {
              "description": "Output only. Time when this workstation cluster was most recently updated.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
