{
  "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": {
        "calendarPeriod": {
          "description": "A calendar period, semantically \"since the start of the current ``\". At this time, only `DAY`, `WEEK`, `FORTNIGHT`, and `MONTH` are supported. Possible values: CALENDAR_PERIOD_UNSPECIFIED, DAY, WEEK, FORTNIGHT, MONTH, QUARTER, HALF, YEAR",
          "type": "string"
        },
        "displayName": {
          "description": "Name used for UI elements listing this SLO.",
          "type": "string"
        },
        "goal": {
          "description": "The fraction of service that must be good in order for this objective to be met. `0 < goal <= 0.999`.",
          "format": "double",
          "type": "number"
        },
        "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 project for the resource\n\nAllowed value: The Google Cloud resource name of a `Project` resource (format: `projects/{{name}}`).",
              "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
        },
        "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"
        },
        "rollingPeriod": {
          "description": "A rolling time period, semantically \"in the past ``\". Must be an integer multiple of 1 day no larger than 30 days.",
          "type": "string"
        },
        "serviceLevelIndicator": {
          "description": "The definition of good service, used to measure and calculate the quality of the `Service`'s performance with respect to a single aspect of service quality.",
          "properties": {
            "basicSli": {
              "description": "Basic SLI on a well-known service type.",
              "properties": {
                "availability": {
                  "description": "Good service is defined to be the count of requests made to this service that return successfully.",
                  "type": "object",
                  "x-kubernetes-preserve-unknown-fields": true
                },
                "latency": {
                  "description": "Good service is defined to be the count of requests made to this service that are fast enough with respect to `latency.threshold`.",
                  "properties": {
                    "experience": {
                      "description": "A description of the experience associated with failing requests. Possible values: LATENCY_EXPERIENCE_UNSPECIFIED, DELIGHTING, SATISFYING, ANNOYING",
                      "type": "string"
                    },
                    "threshold": {
                      "description": "Good service is defined to be the count of requests made to this service that return in no more than `threshold`.",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "location": {
                  "description": "OPTIONAL: The set of locations to which this SLI is relevant. Telemetry from other locations will not be used to calculate performance for this SLI. If omitted, this SLI applies to all locations in which the Service has activity. For service types that don't support breaking down by location, setting this field will result in an error.",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "method": {
                  "description": "OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from other methods will not be used to calculate performance for this SLI. If omitted, this SLI applies to all the Service's methods. For service types that don't support breaking down by method, setting this field will result in an error.",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "operationAvailability": {
                  "description": "Good service is defined to be the count of operations performed by this service that return successfully",
                  "type": "object",
                  "x-kubernetes-preserve-unknown-fields": true
                },
                "operationLatency": {
                  "description": "Good service is defined to be the count of operations performed by this service that are fast enough with respect to `operation_latency.threshold`.",
                  "properties": {
                    "experience": {
                      "description": "A description of the experience associated with failing requests. Possible values: LATENCY_EXPERIENCE_UNSPECIFIED, DELIGHTING, SATISFYING, ANNOYING",
                      "type": "string"
                    },
                    "threshold": {
                      "description": "Good service is defined to be the count of operations that are completed in no more than `threshold`.",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "version": {
                  "description": "OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry from other API versions will not be used to calculate performance for this SLI. If omitted, this SLI applies to all API versions. For service types that don't support breaking down by version, setting this field will result in an error.",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "requestBased": {
              "description": "Request-based SLIs",
              "properties": {
                "distributionCut": {
                  "description": "`distribution_cut` is used when `good_service` is a count of values aggregated in a `Distribution` that fall into a good range. The `total_service` is the total count of all values aggregated in the `Distribution`.",
                  "properties": {
                    "distributionFilter": {
                      "description": "A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) specifying a `TimeSeries` aggregating values. Must have `ValueType = DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`.",
                      "type": "string"
                    },
                    "range": {
                      "description": "Range of values considered \"good.\" For a one-sided range, set one bound to an infinite value.",
                      "properties": {
                        "max": {
                          "description": "Range maximum.",
                          "format": "double",
                          "type": "number"
                        },
                        "min": {
                          "description": "Range minimum.",
                          "format": "double",
                          "type": "number"
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "goodTotalRatio": {
                  "description": "`good_total_ratio` is used when the ratio of `good_service` to `total_service` is computed from two `TimeSeries`.",
                  "properties": {
                    "badServiceFilter": {
                      "description": "A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) specifying a `TimeSeries` quantifying bad service, either demanded service that was not provided or demanded service that was of inadequate quality. Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = DELTA` or `MetricKind = CUMULATIVE`.",
                      "type": "string"
                    },
                    "goodServiceFilter": {
                      "description": "A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) specifying a `TimeSeries` quantifying good service provided. Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = DELTA` or `MetricKind = CUMULATIVE`.",
                      "type": "string"
                    },
                    "totalServiceFilter": {
                      "description": "A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) specifying a `TimeSeries` quantifying total demanded service. Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = DELTA` or `MetricKind = CUMULATIVE`.",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "windowsBased": {
              "description": "Windows-based SLIs",
              "properties": {
                "goodBadMetricFilter": {
                  "description": "A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) specifying a `TimeSeries` with `ValueType = BOOL`. The window is good if any `true` values appear in the window.",
                  "type": "string"
                },
                "goodTotalRatioThreshold": {
                  "description": "A window is good if its `performance` is high enough.",
                  "properties": {
                    "basicSliPerformance": {
                      "description": "`BasicSli` to evaluate to judge window quality.",
                      "properties": {
                        "availability": {
                          "description": "Good service is defined to be the count of requests made to this service that return successfully.",
                          "type": "object",
                          "x-kubernetes-preserve-unknown-fields": true
                        },
                        "latency": {
                          "description": "Good service is defined to be the count of requests made to this service that are fast enough with respect to `latency.threshold`.",
                          "properties": {
                            "experience": {
                              "description": "A description of the experience associated with failing requests. Possible values: LATENCY_EXPERIENCE_UNSPECIFIED, DELIGHTING, SATISFYING, ANNOYING",
                              "type": "string"
                            },
                            "threshold": {
                              "description": "Good service is defined to be the count of requests made to this service that return in no more than `threshold`.",
                              "type": "string"
                            }
                          },
                          "type": "object",
                          "additionalProperties": false
                        },
                        "location": {
                          "description": "OPTIONAL: The set of locations to which this SLI is relevant. Telemetry from other locations will not be used to calculate performance for this SLI. If omitted, this SLI applies to all locations in which the Service has activity. For service types that don't support breaking down by location, setting this field will result in an error.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "method": {
                          "description": "OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from other methods will not be used to calculate performance for this SLI. If omitted, this SLI applies to all the Service's methods. For service types that don't support breaking down by method, setting this field will result in an error.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "operationAvailability": {
                          "description": "Good service is defined to be the count of operations performed by this service that return successfully",
                          "type": "object",
                          "x-kubernetes-preserve-unknown-fields": true
                        },
                        "operationLatency": {
                          "description": "Good service is defined to be the count of operations performed by this service that are fast enough with respect to `operation_latency.threshold`.",
                          "properties": {
                            "experience": {
                              "description": "A description of the experience associated with failing requests. Possible values: LATENCY_EXPERIENCE_UNSPECIFIED, DELIGHTING, SATISFYING, ANNOYING",
                              "type": "string"
                            },
                            "threshold": {
                              "description": "Good service is defined to be the count of operations that are completed in no more than `threshold`.",
                              "type": "string"
                            }
                          },
                          "type": "object",
                          "additionalProperties": false
                        },
                        "version": {
                          "description": "OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry from other API versions will not be used to calculate performance for this SLI. If omitted, this SLI applies to all API versions. For service types that don't support breaking down by version, setting this field will result in an error.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    },
                    "performance": {
                      "description": "`RequestBasedSli` to evaluate to judge window quality.",
                      "properties": {
                        "distributionCut": {
                          "description": "`distribution_cut` is used when `good_service` is a count of values aggregated in a `Distribution` that fall into a good range. The `total_service` is the total count of all values aggregated in the `Distribution`.",
                          "properties": {
                            "distributionFilter": {
                              "description": "A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) specifying a `TimeSeries` aggregating values. Must have `ValueType = DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`.",
                              "type": "string"
                            },
                            "range": {
                              "description": "Range of values considered \"good.\" For a one-sided range, set one bound to an infinite value.",
                              "properties": {
                                "max": {
                                  "description": "Range maximum.",
                                  "format": "double",
                                  "type": "number"
                                },
                                "min": {
                                  "description": "Range minimum.",
                                  "format": "double",
                                  "type": "number"
                                }
                              },
                              "type": "object",
                              "additionalProperties": false
                            }
                          },
                          "type": "object",
                          "additionalProperties": false
                        },
                        "goodTotalRatio": {
                          "description": "`good_total_ratio` is used when the ratio of `good_service` to `total_service` is computed from two `TimeSeries`.",
                          "properties": {
                            "badServiceFilter": {
                              "description": "A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) specifying a `TimeSeries` quantifying bad service, either demanded service that was not provided or demanded service that was of inadequate quality. Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = DELTA` or `MetricKind = CUMULATIVE`.",
                              "type": "string"
                            },
                            "goodServiceFilter": {
                              "description": "A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) specifying a `TimeSeries` quantifying good service provided. Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = DELTA` or `MetricKind = CUMULATIVE`.",
                              "type": "string"
                            },
                            "totalServiceFilter": {
                              "description": "A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) specifying a `TimeSeries` quantifying total demanded service. Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = DELTA` or `MetricKind = CUMULATIVE`.",
                              "type": "string"
                            }
                          },
                          "type": "object",
                          "additionalProperties": false
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    },
                    "threshold": {
                      "description": "If window `performance >= threshold`, the window is counted as good.",
                      "format": "double",
                      "type": "number"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "metricMeanInRange": {
                  "description": "A window is good if the metric's value is in a good range, averaged across returned streams.",
                  "properties": {
                    "range": {
                      "description": "Range of values considered \"good.\" For a one-sided range, set one bound to an infinite value.",
                      "properties": {
                        "max": {
                          "description": "Range maximum.",
                          "format": "double",
                          "type": "number"
                        },
                        "min": {
                          "description": "Range minimum.",
                          "format": "double",
                          "type": "number"
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    },
                    "timeSeries": {
                      "description": "A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) specifying the `TimeSeries` to use for evaluating window quality.",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "metricSumInRange": {
                  "description": "A window is good if the metric's value is in a good range, summed across returned streams.",
                  "properties": {
                    "range": {
                      "description": "Range of values considered \"good.\" For a one-sided range, set one bound to an infinite value.",
                      "properties": {
                        "max": {
                          "description": "Range maximum.",
                          "format": "double",
                          "type": "number"
                        },
                        "min": {
                          "description": "Range minimum.",
                          "format": "double",
                          "type": "number"
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    },
                    "timeSeries": {
                      "description": "A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) specifying the `TimeSeries` to use for evaluating window quality.",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "windowPeriod": {
                  "description": "Duration over which window quality is evaluated. Must be an integer fraction of a day and at least `60s`.",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "serviceRef": {
          "description": "Immutable.",
          "oneOf": [
            {
              "not": {
                "required": [
                  "external"
                ]
              },
              "required": [
                "name"
              ]
            },
            {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "namespace"
                    ]
                  }
                ]
              },
              "required": [
                "external"
              ]
            }
          ],
          "properties": {
            "external": {
              "description": "The service for the resource\n\nAllowed value: The Google Cloud resource name of a `MonitoringService` resource (format: `projects/{{project}}/services/{{name}}`).",
              "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
        }
      },
      "required": [
        "goal",
        "projectRef",
        "serviceRef"
      ],
      "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"
        },
        "createTime": {
          "description": "Time stamp of the `Create` or most recent `Update` command on this `Slo`.",
          "format": "date-time",
          "type": "string"
        },
        "deleteTime": {
          "description": "Time stamp of the `Update` or `Delete` command that made this no longer a current `Slo`. This field is not populated in `ServiceLevelObjective`s returned from calls to `GetServiceLevelObjective` and `ListServiceLevelObjectives`, because it is always empty in the current version. It is populated in `ServiceLevelObjective`s representing previous versions in the output of `ListServiceLevelObjectiveVersions`. Because all old configuration versions are stored, `Update` operations mark the obsoleted version as deleted.",
          "format": "date-time",
          "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"
        },
        "serviceManagementOwned": {
          "description": "Output only. If set, this SLO is managed at the [Service Management](https://cloud.google.com/service-management/overview) level. Therefore the service yaml file is the source of truth for this SLO, and API `Update` and `Delete` operations are forbidden.",
          "type": "boolean"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
