{
  "description": "CloudBuildWorkerPool is the Schema for the CloudBuild WorkerPool 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": "CloudBuildWorkerPoolSpec defines the desired state of Instance",
      "properties": {
        "displayName": {
          "description": "A user-specified, human-readable name for the `WorkerPool`. If provided, this value must be 1-63 characters.",
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "privatePoolV1Config": {
          "description": "Legacy Private Pool configuration.",
          "properties": {
            "networkConfig": {
              "description": "Network configuration for the pool.",
              "properties": {
                "egressOption": {
                  "description": "Option to configure network egress for the workers.",
                  "type": "string"
                },
                "peeredNetworkIPRange": {
                  "description": "Immutable. Subnet IP range within the peered network. This is specified in CIDR notation with a slash and the subnet prefix size. You can optionally specify an IP address before the subnet prefix value. e.g. `192.168.0.0/29` would specify an IP range starting at 192.168.0.0 with a prefix size of 29 bits. `/16` would specify a prefix size of 16 bits, with an automatically determined IP within the peered VPC. If unspecified, a value of `/24` will be used.",
                  "type": "string",
                  "x-kubernetes-validations": [
                    {
                      "message": "the field is immutable",
                      "rule": "self == oldSelf"
                    }
                  ]
                },
                "peeredNetworkRef": {
                  "description": "Immutable. The network definition that the workers are peered to. If this section is left empty, the workers will be peered to `WorkerPool.project_id` on the service producer network.",
                  "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",
                  "x-kubernetes-validations": [
                    {
                      "message": "the field is immutable",
                      "rule": "self == oldSelf"
                    }
                  ],
                  "additionalProperties": false
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "workerConfig": {
              "description": "Machine configuration for the workers in the pool.",
              "properties": {
                "diskSizeGb": {
                  "description": "Size of the disk attached to the worker, in GB. See [Worker pool config file](https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema). Specify a value of up to 2000. If `0` is specified, Cloud Build will use a standard disk size.",
                  "format": "int64",
                  "type": "integer"
                },
                "machineType": {
                  "description": "Machine type of a worker, such as `e2-medium`. See [Worker pool config file](https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema). If left blank, Cloud Build will use a sensible default.",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "required": [
            "workerConfig"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "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 GCP resource identifier. If not given, the metadata.name will be used.",
          "type": "string"
        }
      },
      "required": [
        "location",
        "privatePoolV1Config",
        "projectRef"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "CloudBuildWorkerPoolStatus defines the observed state of Instance",
      "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 Config Connector specifier for the 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": "The creation timestamp of the workerpool.",
              "format": "date-time",
              "type": "string"
            },
            "etag": {
              "description": "The Checksum computed by the server, using weak indicator.",
              "type": "string"
            },
            "networkConfig": {
              "description": "Network configuration for the pool.",
              "properties": {
                "egressOption": {
                  "description": "Option to configure network egress for the workers.",
                  "type": "string"
                },
                "peeredNetwork": {
                  "description": "Immutable. The network definition that the workers are peered to. If this section is left empty, the workers will be peered to `WorkerPool.project_id` on the service producer network.",
                  "type": "string"
                },
                "peeredNetworkIPRange": {
                  "description": "Immutable. Subnet IP range within the peered network. This is specified in CIDR notation with a slash and the subnet prefix size. You can optionally specify an IP address before the subnet prefix value. e.g. `192.168.0.0/29` would specify an IP range starting at 192.168.0.0 with a prefix size of 29 bits. `/16` would specify a prefix size of 16 bits, with an automatically determined IP within the peered VPC. If unspecified, a value of `/24` will be used.",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "updateTime": {
              "description": "The last update timestamp of the workerpool.",
              "format": "date-time",
              "type": "string"
            },
            "workerConfig": {
              "description": "Machine configuration for the workers in the pool.",
              "properties": {
                "diskSizeGb": {
                  "description": "Size of the disk attached to the worker, in GB. See [Worker pool config file](https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema). Specify a value of up to 2000. If `0` is specified, Cloud Build will use a standard disk size.",
                  "format": "int64",
                  "type": "integer"
                },
                "machineType": {
                  "description": "Machine type of a worker, such as `e2-medium`. See [Worker pool config file](https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema). If left blank, Cloud Build will use a sensible default.",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "required": [
            "workerConfig"
          ],
          "type": "object",
          "additionalProperties": false
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
