![JAR search and dependency download from the Maven repository](/logo.png)
com.google.api.MetricDescriptorKt.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of remote-cache Show documentation
Show all versions of remote-cache Show documentation
Bitrise remote cache implementation for Gradle
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/metric.proto
// Generated files should ignore deprecation warnings
@file:Suppress("DEPRECATION")
package com.google.api;
@kotlin.jvm.JvmName("-initializemetricDescriptor")
public inline fun metricDescriptor(block: com.google.api.MetricDescriptorKt.Dsl.() -> kotlin.Unit): com.google.api.MetricDescriptor =
com.google.api.MetricDescriptorKt.Dsl._create(com.google.api.MetricDescriptor.newBuilder()).apply { block() }._build()
/**
* ```
* Defines a metric type and its schema. Once a metric descriptor is created,
* deleting or altering it stops data collection and makes the metric type's
* existing data unusable.
* ```
*
* Protobuf type `google.api.MetricDescriptor`
*/
public object MetricDescriptorKt {
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
@com.google.protobuf.kotlin.ProtoDslMarker
public class Dsl private constructor(
private val _builder: com.google.api.MetricDescriptor.Builder
) {
public companion object {
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _create(builder: com.google.api.MetricDescriptor.Builder): Dsl = Dsl(builder)
}
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _build(): com.google.api.MetricDescriptor = _builder.build()
/**
* ```
* The resource name of the metric descriptor.
* ```
*
* `string name = 1;`
*/
public var name: kotlin.String
@JvmName("getName")
get() = _builder.getName()
@JvmName("setName")
set(value) {
_builder.setName(value)
}
/**
* ```
* The resource name of the metric descriptor.
* ```
*
* `string name = 1;`
*/
public fun clearName() {
_builder.clearName()
}
/**
* ```
* The metric type, including its DNS name prefix. The type is not
* URL-encoded. All user-defined custom metric types have the DNS name
* `custom.googleapis.com`. Metric types should use a natural hierarchical
* grouping. For example:
*
* "custom.googleapis.com/invoice/paid/amount"
* "appengine.googleapis.com/http/server/response_latencies"
* ```
*
* `string type = 8;`
*/
public var type: kotlin.String
@JvmName("getType")
get() = _builder.getType()
@JvmName("setType")
set(value) {
_builder.setType(value)
}
/**
* ```
* The metric type, including its DNS name prefix. The type is not
* URL-encoded. All user-defined custom metric types have the DNS name
* `custom.googleapis.com`. Metric types should use a natural hierarchical
* grouping. For example:
*
* "custom.googleapis.com/invoice/paid/amount"
* "appengine.googleapis.com/http/server/response_latencies"
* ```
*
* `string type = 8;`
*/
public fun clearType() {
_builder.clearType()
}
/**
* An uninstantiable, behaviorless type to represent the field in
* generics.
*/
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
public class LabelsProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
/**
* ```
* The set of labels that can be used to describe a specific
* instance of this metric type. For example, the
* `appengine.googleapis.com/http/server/response_latencies` metric
* type has a label for the HTTP response code, `response_code`, so
* you can look at latencies for successful responses or just
* for responses that failed.
* ```
*
* `repeated .google.api.LabelDescriptor labels = 2;`
*/
public val labels: com.google.protobuf.kotlin.DslList
@kotlin.jvm.JvmSynthetic
get() = com.google.protobuf.kotlin.DslList(
_builder.getLabelsList()
)
/**
* ```
* The set of labels that can be used to describe a specific
* instance of this metric type. For example, the
* `appengine.googleapis.com/http/server/response_latencies` metric
* type has a label for the HTTP response code, `response_code`, so
* you can look at latencies for successful responses or just
* for responses that failed.
* ```
*
* `repeated .google.api.LabelDescriptor labels = 2;`
* @param value The labels to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("addLabels")
public fun com.google.protobuf.kotlin.DslList.add(value: com.google.api.LabelDescriptor) {
_builder.addLabels(value)
}
/**
* ```
* The set of labels that can be used to describe a specific
* instance of this metric type. For example, the
* `appengine.googleapis.com/http/server/response_latencies` metric
* type has a label for the HTTP response code, `response_code`, so
* you can look at latencies for successful responses or just
* for responses that failed.
* ```
*
* `repeated .google.api.LabelDescriptor labels = 2;`
* @param value The labels to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("plusAssignLabels")
@Suppress("NOTHING_TO_INLINE")
public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.google.api.LabelDescriptor) {
add(value)
}
/**
* ```
* The set of labels that can be used to describe a specific
* instance of this metric type. For example, the
* `appengine.googleapis.com/http/server/response_latencies` metric
* type has a label for the HTTP response code, `response_code`, so
* you can look at latencies for successful responses or just
* for responses that failed.
* ```
*
* `repeated .google.api.LabelDescriptor labels = 2;`
* @param values The labels to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("addAllLabels")
public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
_builder.addAllLabels(values)
}
/**
* ```
* The set of labels that can be used to describe a specific
* instance of this metric type. For example, the
* `appengine.googleapis.com/http/server/response_latencies` metric
* type has a label for the HTTP response code, `response_code`, so
* you can look at latencies for successful responses or just
* for responses that failed.
* ```
*
* `repeated .google.api.LabelDescriptor labels = 2;`
* @param values The labels to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("plusAssignAllLabels")
@Suppress("NOTHING_TO_INLINE")
public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
addAll(values)
}
/**
* ```
* The set of labels that can be used to describe a specific
* instance of this metric type. For example, the
* `appengine.googleapis.com/http/server/response_latencies` metric
* type has a label for the HTTP response code, `response_code`, so
* you can look at latencies for successful responses or just
* for responses that failed.
* ```
*
* `repeated .google.api.LabelDescriptor labels = 2;`
* @param index The index to set the value at.
* @param value The labels to set.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("setLabels")
public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.google.api.LabelDescriptor) {
_builder.setLabels(index, value)
}
/**
* ```
* The set of labels that can be used to describe a specific
* instance of this metric type. For example, the
* `appengine.googleapis.com/http/server/response_latencies` metric
* type has a label for the HTTP response code, `response_code`, so
* you can look at latencies for successful responses or just
* for responses that failed.
* ```
*
* `repeated .google.api.LabelDescriptor labels = 2;`
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("clearLabels")
public fun com.google.protobuf.kotlin.DslList.clear() {
_builder.clearLabels()
}
/**
* ```
* Whether the metric records instantaneous values, changes to a value, etc.
* Some combinations of `metric_kind` and `value_type` might not be supported.
* ```
*
* `.google.api.MetricDescriptor.MetricKind metric_kind = 3;`
*/
public var metricKind: com.google.api.MetricDescriptor.MetricKind
@JvmName("getMetricKind")
get() = _builder.getMetricKind()
@JvmName("setMetricKind")
set(value) {
_builder.setMetricKind(value)
}
public var metricKindValue: kotlin.Int
@JvmName("getMetricKindValue")
get() = _builder.getMetricKindValue()
@JvmName("setMetricKindValue")
set(value) {
_builder.setMetricKindValue(value)
}
/**
* ```
* Whether the metric records instantaneous values, changes to a value, etc.
* Some combinations of `metric_kind` and `value_type` might not be supported.
* ```
*
* `.google.api.MetricDescriptor.MetricKind metric_kind = 3;`
*/
public fun clearMetricKind() {
_builder.clearMetricKind()
}
/**
* ```
* Whether the measurement is an integer, a floating-point number, etc.
* Some combinations of `metric_kind` and `value_type` might not be supported.
* ```
*
* `.google.api.MetricDescriptor.ValueType value_type = 4;`
*/
public var valueType: com.google.api.MetricDescriptor.ValueType
@JvmName("getValueType")
get() = _builder.getValueType()
@JvmName("setValueType")
set(value) {
_builder.setValueType(value)
}
public var valueTypeValue: kotlin.Int
@JvmName("getValueTypeValue")
get() = _builder.getValueTypeValue()
@JvmName("setValueTypeValue")
set(value) {
_builder.setValueTypeValue(value)
}
/**
* ```
* Whether the measurement is an integer, a floating-point number, etc.
* Some combinations of `metric_kind` and `value_type` might not be supported.
* ```
*
* `.google.api.MetricDescriptor.ValueType value_type = 4;`
*/
public fun clearValueType() {
_builder.clearValueType()
}
/**
* ```
* The unit in which the metric value is reported. It is only applicable
* if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
* supported units are a subset of [The Unified Code for Units of
* Measure](http://unitsofmeasure.org/ucum.html) standard:
*
* **Basic units (UNIT)**
*
* * `bit` bit
* * `By` byte
* * `s` second
* * `min` minute
* * `h` hour
* * `d` day
*
* **Prefixes (PREFIX)**
*
* * `k` kilo (10**3)
* * `M` mega (10**6)
* * `G` giga (10**9)
* * `T` tera (10**12)
* * `P` peta (10**15)
* * `E` exa (10**18)
* * `Z` zetta (10**21)
* * `Y` yotta (10**24)
* * `m` milli (10**-3)
* * `u` micro (10**-6)
* * `n` nano (10**-9)
* * `p` pico (10**-12)
* * `f` femto (10**-15)
* * `a` atto (10**-18)
* * `z` zepto (10**-21)
* * `y` yocto (10**-24)
* * `Ki` kibi (2**10)
* * `Mi` mebi (2**20)
* * `Gi` gibi (2**30)
* * `Ti` tebi (2**40)
*
* **Grammar**
*
* The grammar also includes these connectors:
*
* * `/` division (as an infix operator, e.g. `1/s`).
* * `.` multiplication (as an infix operator, e.g. `GBy.d`)
*
* The grammar for a unit is as follows:
*
* Expression = Component { "." Component } { "/" Component } ;
*
* Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
* | Annotation
* | "1"
* ;
*
* Annotation = "{" NAME "}" ;
*
* Notes:
*
* * `Annotation` is just a comment if it follows a `UNIT` and is
* equivalent to `1` if it is used alone. For examples,
* `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
* * `NAME` is a sequence of non-blank printable ASCII characters not
* containing '{' or '}'.
* * `1` represents dimensionless value 1, such as in `1/s`.
* * `%` represents dimensionless value 1/100, and annotates values giving
* a percentage.
* ```
*
* `string unit = 5;`
*/
public var unit: kotlin.String
@JvmName("getUnit")
get() = _builder.getUnit()
@JvmName("setUnit")
set(value) {
_builder.setUnit(value)
}
/**
* ```
* The unit in which the metric value is reported. It is only applicable
* if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
* supported units are a subset of [The Unified Code for Units of
* Measure](http://unitsofmeasure.org/ucum.html) standard:
*
* **Basic units (UNIT)**
*
* * `bit` bit
* * `By` byte
* * `s` second
* * `min` minute
* * `h` hour
* * `d` day
*
* **Prefixes (PREFIX)**
*
* * `k` kilo (10**3)
* * `M` mega (10**6)
* * `G` giga (10**9)
* * `T` tera (10**12)
* * `P` peta (10**15)
* * `E` exa (10**18)
* * `Z` zetta (10**21)
* * `Y` yotta (10**24)
* * `m` milli (10**-3)
* * `u` micro (10**-6)
* * `n` nano (10**-9)
* * `p` pico (10**-12)
* * `f` femto (10**-15)
* * `a` atto (10**-18)
* * `z` zepto (10**-21)
* * `y` yocto (10**-24)
* * `Ki` kibi (2**10)
* * `Mi` mebi (2**20)
* * `Gi` gibi (2**30)
* * `Ti` tebi (2**40)
*
* **Grammar**
*
* The grammar also includes these connectors:
*
* * `/` division (as an infix operator, e.g. `1/s`).
* * `.` multiplication (as an infix operator, e.g. `GBy.d`)
*
* The grammar for a unit is as follows:
*
* Expression = Component { "." Component } { "/" Component } ;
*
* Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
* | Annotation
* | "1"
* ;
*
* Annotation = "{" NAME "}" ;
*
* Notes:
*
* * `Annotation` is just a comment if it follows a `UNIT` and is
* equivalent to `1` if it is used alone. For examples,
* `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
* * `NAME` is a sequence of non-blank printable ASCII characters not
* containing '{' or '}'.
* * `1` represents dimensionless value 1, such as in `1/s`.
* * `%` represents dimensionless value 1/100, and annotates values giving
* a percentage.
* ```
*
* `string unit = 5;`
*/
public fun clearUnit() {
_builder.clearUnit()
}
/**
* ```
* A detailed description of the metric, which can be used in documentation.
* ```
*
* `string description = 6;`
*/
public var description: kotlin.String
@JvmName("getDescription")
get() = _builder.getDescription()
@JvmName("setDescription")
set(value) {
_builder.setDescription(value)
}
/**
* ```
* A detailed description of the metric, which can be used in documentation.
* ```
*
* `string description = 6;`
*/
public fun clearDescription() {
_builder.clearDescription()
}
/**
* ```
* A concise name for the metric, which can be displayed in user interfaces.
* Use sentence case without an ending period, for example "Request count".
* This field is optional but it is recommended to be set for any metrics
* associated with user-visible concepts, such as Quota.
* ```
*
* `string display_name = 7;`
*/
public var displayName: kotlin.String
@JvmName("getDisplayName")
get() = _builder.getDisplayName()
@JvmName("setDisplayName")
set(value) {
_builder.setDisplayName(value)
}
/**
* ```
* A concise name for the metric, which can be displayed in user interfaces.
* Use sentence case without an ending period, for example "Request count".
* This field is optional but it is recommended to be set for any metrics
* associated with user-visible concepts, such as Quota.
* ```
*
* `string display_name = 7;`
*/
public fun clearDisplayName() {
_builder.clearDisplayName()
}
}
}
@kotlin.jvm.JvmSynthetic
public inline fun com.google.api.MetricDescriptor.copy(block: `com.google.api`.MetricDescriptorKt.Dsl.() -> kotlin.Unit): com.google.api.MetricDescriptor =
`com.google.api`.MetricDescriptorKt.Dsl._create(this.toBuilder()).apply { block() }._build()
© 2015 - 2025 Weber Informatics LLC | Privacy Policy