// SPDX-License-Identifier: AGPL-3.0-only

syntax = "proto3";

package functions;

enum Function {
  FUNCTION_UNKNOWN = 0;

  FUNCTION_ABS = 1;
  FUNCTION_ABSENT = 2;
  FUNCTION_ABSENT_OVER_TIME = 3;
  FUNCTION_ACOS = 4;
  FUNCTION_ACOSH = 5;
  FUNCTION_ASIN = 6;
  FUNCTION_ASINH = 7;
  FUNCTION_ATAN = 8;
  FUNCTION_ATANH = 9;
  FUNCTION_AVG_OVER_TIME = 10;
  FUNCTION_CEIL = 11;
  FUNCTION_CHANGES = 12;
  FUNCTION_CLAMP = 13;
  FUNCTION_CLAMP_MAX = 14;
  FUNCTION_CLAMP_MIN = 15;
  FUNCTION_COS = 16;
  FUNCTION_COSH = 17;
  FUNCTION_COUNT_OVER_TIME = 18;
  FUNCTION_DAYS_IN_MONTH = 22;
  FUNCTION_DAY_OF_MONTH = 19;
  FUNCTION_DAY_OF_WEEK = 20;
  FUNCTION_DAY_OF_YEAR = 21;
  FUNCTION_DEG = 23;
  FUNCTION_DELTA = 24;
  FUNCTION_DERIV = 25;
  FUNCTION_DOUBLE_EXPONENTIAL_SMOOTHING = 26;
  FUNCTION_EXP = 27;
  FUNCTION_FIRST_OVER_TIME = 86;
  FUNCTION_FLOOR = 28;
  FUNCTION_HISTOGRAM_AVG = 29;
  FUNCTION_HISTOGRAM_COUNT = 30;
  FUNCTION_HISTOGRAM_FRACTION = 31;
  FUNCTION_HISTOGRAM_QUANTILE = 32;
  FUNCTION_HISTOGRAM_STDDEV = 33;
  FUNCTION_HISTOGRAM_STDVAR = 34;
  FUNCTION_HISTOGRAM_SUM = 35;
  FUNCTION_HOUR = 36;
  FUNCTION_IDELTA = 37;
  FUNCTION_INCREASE = 38;
  FUNCTION_INFO = 83;
  FUNCTION_IRATE = 39;
  FUNCTION_LABEL_JOIN = 40;
  FUNCTION_LABEL_REPLACE = 41;
  FUNCTION_LAST_OVER_TIME = 42;
  FUNCTION_LIMITK = 82;
  FUNCTION_LIMIT_RATIO = 81;
  FUNCTION_LN = 43;
  FUNCTION_LOG10 = 44;
  FUNCTION_LOG2 = 45;
  FUNCTION_MAD_OVER_TIME = 80;
  FUNCTION_MAX_OVER_TIME = 46;
  FUNCTION_MINUTE = 48;
  FUNCTION_MIN_OVER_TIME = 47;
  FUNCTION_MONTH = 49;
  FUNCTION_PREDICT_LINEAR = 50;
  FUNCTION_PRESENT_OVER_TIME = 51;
  FUNCTION_QUANTILE_OVER_TIME = 52;
  FUNCTION_RAD = 53;
  FUNCTION_RATE = 54;
  FUNCTION_RESETS = 55;
  FUNCTION_ROUND = 56;
  FUNCTION_SGN = 57;
  FUNCTION_SIN = 58;
  FUNCTION_SINH = 59;
  FUNCTION_SORT = 60;
  FUNCTION_SORT_BY_LABEL = 76;
  FUNCTION_SORT_BY_LABEL_DESC = 77;
  FUNCTION_SORT_DESC = 61;
  FUNCTION_SQRT = 62;
  FUNCTION_STDDEV_OVER_TIME = 63;
  FUNCTION_STDVAR_OVER_TIME = 64;
  FUNCTION_SUM_OVER_TIME = 65;
  FUNCTION_TAN = 66;
  FUNCTION_TANH = 67;
  FUNCTION_TIMESTAMP = 68;
  FUNCTION_TS_OF_FIRST_OVER_TIME = 78;
  FUNCTION_TS_OF_LAST_OVER_TIME = 79;
  FUNCTION_TS_OF_MAX_OVER_TIME = 85;
  FUNCTION_TS_OF_MIN_OVER_TIME = 84;
  FUNCTION_VECTOR = 69;
  FUNCTION_YEAR = 70;

  FUNCTION_PI = 71;
  FUNCTION_SCALAR = 72;
  FUNCTION_TIME = 73;

  // Used by Adaptive Metrics query rewriting.
  FUNCTION_ADAPTIVE_METRICS_RESERVED_1 = 74;
  FUNCTION_ADAPTIVE_METRICS_RESERVED_2 = 75;

  FUNCTION_SHARDING_CONCAT = 87;
}
