/*
Copyright The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/


// This file was autogenerated by go-to-protobuf. Do not edit it manually!

syntax = "proto2";

package k8s.io.metrics.pkg.apis.custom_metrics.v1beta2;

import "k8s.io/api/core/v1/generated.proto";
import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";

// Package-wide variables from generator "generated".
option go_package = "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2";

// MetricIdentifier identifies a metric by name and, optionally, selector
message MetricIdentifier {
  // name is the name of the given metric
  optional string name = 1;

  // selector represents the label selector that could be used to select
  // this metric, and will generally just be the selector passed in to
  // the query used to fetch this metric.
  // When left blank, only the metric's Name will be used to gather metrics.
  // +optional
  optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
}

// MetricListOptions is used to select metrics by their label selectors
message MetricListOptions {
  // A selector to restrict the list of returned objects by their labels.
  // Defaults to everything.
  // +optional
  optional string labelSelector = 1;

  // A selector to restrict the list of returned metrics by their labels
  // +optional
  optional string metricLabelSelector = 2;
}

// MetricValue is the metric value for some object
message MetricValue {
  // a reference to the described object
  optional k8s.io.api.core.v1.ObjectReference describedObject = 1;

  optional MetricIdentifier metric = 2;

  // indicates the time at which the metrics were produced
  optional k8s.io.apimachinery.pkg.apis.meta.v1.Time timestamp = 3;

  // indicates the window ([Timestamp-Window, Timestamp]) from
  // which these metrics were calculated, when returning rate
  // metrics calculated from cumulative metrics (or zero for
  // non-calculated instantaneous metrics).
  optional int64 windowSeconds = 4;

  // the value of the metric for this
  optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 5;
}

// MetricValueList is a list of values for a given metric for some set of objects
message MetricValueList {
  optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;

  // the value of the metric across the described objects
  repeated MetricValue items = 2;
}

