kubernetes/staging/src/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/generated.proto

/*
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.v1beta1;

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/v1beta1";

// 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 a metric value for some object
message MetricValue {
  // a reference to the described object
  optional .k8s.io.api.core.v1.ObjectReference describedObject = 1;

  // the name of the metric
  optional string metricName = 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 window = 4;

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

  // 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 = 6;
}

// 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;
}