{
  "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/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/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "properties": {
        "autoscalingPolicy": {
          "description": "The configuration parameters for the autoscaling algorithm. You can\ndefine one or more of the policies for an autoscaler: cpuUtilization,\ncustomMetricUtilizations, and loadBalancingUtilization.\n\nIf none of these are specified, the default will be to autoscale based\non cpuUtilization to 0.6 or 60%.",
          "properties": {
            "cooldownPeriod": {
              "description": "The number of seconds that the autoscaler should wait before it\nstarts collecting information from a new instance. This prevents\nthe autoscaler from collecting information when the instance is\ninitializing, during which the collected usage would not be\nreliable. The default time autoscaler waits is 60 seconds.\n\nVirtual machine initialization times might vary because of\nnumerous factors. We recommend that you test how long an\ninstance may take to initialize. To do this, create an instance\nand time the startup process.",
              "type": "integer"
            },
            "cpuUtilization": {
              "description": "Defines the CPU utilization policy that allows the autoscaler to\nscale based on the average CPU utilization of a managed instance\ngroup.",
              "properties": {
                "predictiveMethod": {
                  "description": "Indicates whether predictive autoscaling based on CPU metric is enabled. Valid values are:\n\n- NONE (default). No predictive method is used. The autoscaler scales the group to meet current demand based on real-time metrics.\n\n- OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability by monitoring daily and weekly load patterns and scaling out ahead of anticipated demand.",
                  "type": "string"
                },
                "target": {
                  "description": "The target CPU utilization that the autoscaler should maintain.\nMust be a float value in the range (0, 1]. If not specified, the\ndefault is 0.6.\n\nIf the CPU level is below the target utilization, the autoscaler\nscales down the number of instances until it reaches the minimum\nnumber of instances you specified or until the average CPU of\nyour instances reaches the target utilization.\n\nIf the average CPU is above the target utilization, the autoscaler\nscales up until it reaches the maximum number of instances you\nspecified or until the average utilization reaches the target\nutilization.",
                  "type": "number"
                }
              },
              "required": [
                "target"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "loadBalancingUtilization": {
              "description": "Configuration parameters of autoscaling based on a load balancer.",
              "properties": {
                "target": {
                  "description": "Fraction of backend capacity utilization (set in HTTP(s) load\nbalancing configuration) that autoscaler should maintain. Must\nbe a positive float value. If not defined, the default is 0.8.",
                  "type": "number"
                }
              },
              "required": [
                "target"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "maxReplicas": {
              "description": "The maximum number of instances that the autoscaler can scale up\nto. This is required when creating or updating an autoscaler. The\nmaximum number of replicas should not be lower than minimal number\nof replicas.",
              "type": "integer"
            },
            "metric": {
              "description": "Configuration parameters of autoscaling based on a custom metric.",
              "items": {
                "properties": {
                  "filter": {
                    "description": "A filter string to be used as the filter string for\na Stackdriver Monitoring TimeSeries.list API call.\nThis filter is used to select a specific TimeSeries for\nthe purpose of autoscaling and to determine whether the metric\nis exporting per-instance or per-group data.\n\nYou can only use the AND operator for joining selectors.\nYou can only use direct equality comparison operator (=) without\nany functions for each selector.\nYou can specify the metric in both the filter string and in the\nmetric field. However, if specified in both places, the metric must\nbe identical.\n\nThe monitored resource type determines what kind of values are\nexpected for the metric. If it is a gce_instance, the autoscaler\nexpects the metric to include a separate TimeSeries for each\ninstance in a group. In such a case, you cannot filter on resource\nlabels.\n\nIf the resource type is any other value, the autoscaler expects\nthis metric to contain values that apply to the entire autoscaled\ninstance group and resource label filtering can be performed to\npoint autoscaler at the correct TimeSeries to scale upon.\nThis is called a per-group metric for the purpose of autoscaling.\n\nIf not specified, the type defaults to gce_instance.\n\nYou should provide a filter that is selective enough to pick just\none TimeSeries for the autoscaled group or for each of the instances\n(if you are using gce_instance resource type). If multiple\nTimeSeries are returned upon the query execution, the autoscaler\nwill sum their respective values to obtain its scaling value.",
                    "type": "string"
                  },
                  "name": {
                    "description": "The identifier (type) of the Stackdriver Monitoring metric.\nThe metric cannot have negative values.\n\nThe metric must have a value type of INT64 or DOUBLE.",
                    "type": "string"
                  },
                  "singleInstanceAssignment": {
                    "description": "If scaling is based on a per-group metric value that represents the\ntotal amount of work to be done or resource usage, set this value to\nan amount assigned for a single instance of the scaled group.\nThe autoscaler will keep the number of instances proportional to the\nvalue of this metric, the metric itself should not change value due\nto group resizing.\n\nFor example, a good metric to use with the target is\n'pubsub.googleapis.com/subscription/num_undelivered_messages'\nor a custom metric exporting the total number of requests coming to\nyour instances.\n\nA bad example would be a metric exporting an average or median\nlatency, since this value can't include a chunk assignable to a\nsingle instance, it could be better used with utilization_target\ninstead.",
                    "type": "number"
                  },
                  "target": {
                    "description": "The target value of the metric that autoscaler should\nmaintain. This must be a positive value. A utilization\nmetric scales number of virtual machines handling requests\nto increase or decrease proportionally to the metric.\n\nFor example, a good metric to use as a utilizationTarget is\nwww.googleapis.com/compute/instance/network/received_bytes_count.\nThe autoscaler will work to keep this value constant for each\nof the instances.",
                    "type": "number"
                  },
                  "type": {
                    "description": "Defines how target utilization value is expressed for a\nStackdriver Monitoring metric. Possible values: [\"GAUGE\", \"DELTA_PER_SECOND\", \"DELTA_PER_MINUTE\"].",
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            },
            "minReplicas": {
              "description": "The minimum number of replicas that the autoscaler can scale down\nto. This cannot be less than 0. If not provided, autoscaler will\nchoose a default value depending on maximum number of instances\nallowed.",
              "type": "integer"
            },
            "mode": {
              "description": "Defines operating mode for this policy.",
              "type": "string"
            },
            "scaleDownControl": {
              "description": "Defines scale down controls to reduce the risk of response latency\nand outages due to abrupt scale-in events.",
              "properties": {
                "maxScaledDownReplicas": {
                  "description": "A nested object resource.",
                  "properties": {
                    "fixed": {
                      "description": "Specifies a fixed number of VM instances. This must be a positive\ninteger.",
                      "type": "integer"
                    },
                    "percent": {
                      "description": "Specifies a percentage of instances between 0 to 100%, inclusive.\nFor example, specify 80 for 80%.",
                      "type": "integer"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "timeWindowSec": {
                  "description": "How long back autoscaling should look when computing recommendations\nto include directives regarding slower scale down, as described above.",
                  "type": "integer"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "scaleInControl": {
              "description": "Defines scale in controls to reduce the risk of response latency\nand outages due to abrupt scale-in events.",
              "properties": {
                "maxScaledInReplicas": {
                  "description": "A nested object resource.",
                  "properties": {
                    "fixed": {
                      "description": "Specifies a fixed number of VM instances. This must be a positive\ninteger.",
                      "type": "integer"
                    },
                    "percent": {
                      "description": "Specifies a percentage of instances between 0 to 100%, inclusive.\nFor example, specify 80 for 80%.",
                      "type": "integer"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "timeWindowSec": {
                  "description": "How long back autoscaling should look when computing recommendations\nto include directives regarding slower scale down, as described above.",
                  "type": "integer"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "scalingSchedules": {
              "description": "Scaling schedules defined for an autoscaler. Multiple schedules can be set on an autoscaler and they can overlap.",
              "items": {
                "properties": {
                  "description": {
                    "description": "A description of a scaling schedule.",
                    "type": "string"
                  },
                  "disabled": {
                    "description": "A boolean value that specifies if a scaling schedule can influence autoscaler recommendations. If set to true, then a scaling schedule has no effect.",
                    "type": "boolean"
                  },
                  "durationSec": {
                    "description": "The duration of time intervals (in seconds) for which this scaling schedule will be running. The minimum allowed value is 300.",
                    "type": "integer"
                  },
                  "minRequiredReplicas": {
                    "description": "Minimum number of VM instances that autoscaler will recommend in time intervals starting according to schedule.",
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "schedule": {
                    "description": "The start timestamps of time intervals when this scaling schedule should provide a scaling signal. This field uses the extended cron format (with an optional year field).",
                    "type": "string"
                  },
                  "timeZone": {
                    "description": "The time zone to be used when interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database.",
                    "type": "string"
                  }
                },
                "required": [
                  "durationSec",
                  "minRequiredReplicas",
                  "name",
                  "schedule"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            }
          },
          "required": [
            "maxReplicas",
            "minReplicas"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "description": {
          "description": "An optional description of this resource.",
          "type": "string"
        },
        "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": "Allowed value: The `name` field of a `Project` resource.",
              "type": "string"
            },
            "name": {
              "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
              "type": "string"
            },
            "namespace": {
              "description": "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "region": {
          "description": "Immutable. URL of the region where the instance group resides.",
          "type": "string"
        },
        "resourceID": {
          "description": "Immutable. Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default.",
          "type": "string"
        },
        "target": {
          "description": "URL of the managed instance group that this autoscaler will scale.",
          "type": "string"
        }
      },
      "required": [
        "autoscalingPolicy",
        "projectRef",
        "region",
        "target"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "properties": {
        "conditions": {
          "description": "Conditions represent the latest available observation of the resource'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"
        },
        "creationTimestamp": {
          "description": "Creation timestamp in RFC3339 text format.",
          "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.",
          "type": "integer"
        },
        "selfLink": {
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
