{
  "description": "RunsCollector scraptes HCP Terraform Run statuses from a given Agent Pool and exposes them as Prometheus-compatible metrics.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/run/remote-operations",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "properties": {
        "agentPool": {
          "description": "The Agent Pool name or ID from which the controller will collect runs.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/run/states",
          "properties": {
            "id": {
              "description": "Agent Pool ID.\nMust match pattern: `^apool-[a-zA-Z0-9]+$`",
              "pattern": "^apool-[a-zA-Z0-9]+$",
              "type": "string"
            },
            "name": {
              "description": "Agent Pool name.",
              "minLength": 1,
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "organization": {
          "description": "Organization name where the Workspace will be created.\nMore information:\n  - https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/organizations",
          "minLength": 1,
          "type": "string"
        },
        "token": {
          "description": "API Token to be used for API calls.",
          "properties": {
            "secretKeyRef": {
              "description": "Selects a key of a secret in the workspace's namespace",
              "properties": {
                "key": {
                  "description": "The key of the secret to select from.  Must be a valid secret key.",
                  "type": "string"
                },
                "name": {
                  "default": "",
                  "description": "Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
                  "type": "string"
                },
                "optional": {
                  "description": "Specify whether the Secret or its key must be defined",
                  "type": "boolean"
                }
              },
              "required": [
                "key"
              ],
              "type": "object",
              "x-kubernetes-map-type": "atomic",
              "additionalProperties": false
            }
          },
          "required": [
            "secretKeyRef"
          ],
          "type": "object",
          "additionalProperties": false
        }
      },
      "required": [
        "agentPool",
        "organization",
        "token"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "properties": {
        "agentPool": {
          "description": "The Agent Pool name or ID from which the controller will collect runs.",
          "properties": {
            "id": {
              "description": "Agent Pool ID.\nMust match pattern: `^apool-[a-zA-Z0-9]+$`",
              "pattern": "^apool-[a-zA-Z0-9]+$",
              "type": "string"
            },
            "name": {
              "description": "Agent Pool name.",
              "minLength": 1,
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "observedGeneration": {
          "description": "Real world state generation.",
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "observedGeneration"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
