mirror of
https://github.com/mii443/prometheus-android-exporter.git
synced 2025-08-22 15:15:35 +00:00
generate protobuf code in kotlin
This commit is contained in:
@ -0,0 +1,62 @@
|
||||
//Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: remote-write.proto
|
||||
|
||||
package protogen;
|
||||
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
public inline fun label(block: protogen.LabelKt.Dsl.() -> kotlin.Unit): protogen.RemoteWrite.Label =
|
||||
protogen.LabelKt.Dsl._create(protogen.RemoteWrite.Label.newBuilder()).apply { block() }._build()
|
||||
public object LabelKt {
|
||||
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
|
||||
@com.google.protobuf.kotlin.ProtoDslMarker
|
||||
public class Dsl private constructor(
|
||||
private val _builder: protogen.RemoteWrite.Label.Builder
|
||||
) {
|
||||
public companion object {
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.PublishedApi
|
||||
internal fun _create(builder: protogen.RemoteWrite.Label.Builder): Dsl = Dsl(builder)
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.PublishedApi
|
||||
internal fun _build(): protogen.RemoteWrite.Label = _builder.build()
|
||||
|
||||
/**
|
||||
* <code>string name = 1;</code>
|
||||
*/
|
||||
public var name: kotlin.String
|
||||
@JvmName("getName")
|
||||
get() = _builder.getName()
|
||||
@JvmName("setName")
|
||||
set(value) {
|
||||
_builder.setName(value)
|
||||
}
|
||||
/**
|
||||
* <code>string name = 1;</code>
|
||||
*/
|
||||
public fun clearName() {
|
||||
_builder.clearName()
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>string value = 2;</code>
|
||||
*/
|
||||
public var value: kotlin.String
|
||||
@JvmName("getValue")
|
||||
get() = _builder.getValue()
|
||||
@JvmName("setValue")
|
||||
set(value) {
|
||||
_builder.setValue(value)
|
||||
}
|
||||
/**
|
||||
* <code>string value = 2;</code>
|
||||
*/
|
||||
public fun clearValue() {
|
||||
_builder.clearValue()
|
||||
}
|
||||
}
|
||||
}
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
public inline fun protogen.RemoteWrite.Label.copy(block: protogen.LabelKt.Dsl.() -> kotlin.Unit): protogen.RemoteWrite.Label =
|
||||
protogen.LabelKt.Dsl._create(this.toBuilder()).apply { block() }._build()
|
@ -0,0 +1,70 @@
|
||||
//Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: remote-write.proto
|
||||
|
||||
package protogen;
|
||||
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
public inline fun sample(block: protogen.SampleKt.Dsl.() -> kotlin.Unit): protogen.RemoteWrite.Sample =
|
||||
protogen.SampleKt.Dsl._create(protogen.RemoteWrite.Sample.newBuilder()).apply { block() }._build()
|
||||
public object SampleKt {
|
||||
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
|
||||
@com.google.protobuf.kotlin.ProtoDslMarker
|
||||
public class Dsl private constructor(
|
||||
private val _builder: protogen.RemoteWrite.Sample.Builder
|
||||
) {
|
||||
public companion object {
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.PublishedApi
|
||||
internal fun _create(builder: protogen.RemoteWrite.Sample.Builder): Dsl = Dsl(builder)
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.PublishedApi
|
||||
internal fun _build(): protogen.RemoteWrite.Sample = _builder.build()
|
||||
|
||||
/**
|
||||
* <code>double value = 1;</code>
|
||||
*/
|
||||
public var value: kotlin.Double
|
||||
@JvmName("getValue")
|
||||
get() = _builder.getValue()
|
||||
@JvmName("setValue")
|
||||
set(value) {
|
||||
_builder.setValue(value)
|
||||
}
|
||||
/**
|
||||
* <code>double value = 1;</code>
|
||||
*/
|
||||
public fun clearValue() {
|
||||
_builder.clearValue()
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* in ms
|
||||
* </pre>
|
||||
*
|
||||
* <code>int64 timestamp = 2;</code>
|
||||
*/
|
||||
public var timestamp: kotlin.Long
|
||||
@JvmName("getTimestamp")
|
||||
get() = _builder.getTimestamp()
|
||||
@JvmName("setTimestamp")
|
||||
set(value) {
|
||||
_builder.setTimestamp(value)
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* in ms
|
||||
* </pre>
|
||||
*
|
||||
* <code>int64 timestamp = 2;</code>
|
||||
*/
|
||||
public fun clearTimestamp() {
|
||||
_builder.clearTimestamp()
|
||||
}
|
||||
}
|
||||
}
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
public inline fun protogen.RemoteWrite.Sample.copy(block: protogen.SampleKt.Dsl.() -> kotlin.Unit): protogen.RemoteWrite.Sample =
|
||||
protogen.SampleKt.Dsl._create(this.toBuilder()).apply { block() }._build()
|
@ -0,0 +1,158 @@
|
||||
//Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: remote-write.proto
|
||||
|
||||
package protogen;
|
||||
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
public inline fun timeSeries(block: protogen.TimeSeriesKt.Dsl.() -> kotlin.Unit): protogen.RemoteWrite.TimeSeries =
|
||||
protogen.TimeSeriesKt.Dsl._create(protogen.RemoteWrite.TimeSeries.newBuilder()).apply { block() }._build()
|
||||
public object TimeSeriesKt {
|
||||
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
|
||||
@com.google.protobuf.kotlin.ProtoDslMarker
|
||||
public class Dsl private constructor(
|
||||
private val _builder: protogen.RemoteWrite.TimeSeries.Builder
|
||||
) {
|
||||
public companion object {
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.PublishedApi
|
||||
internal fun _create(builder: protogen.RemoteWrite.TimeSeries.Builder): Dsl = Dsl(builder)
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.PublishedApi
|
||||
internal fun _build(): protogen.RemoteWrite.TimeSeries = _builder.build()
|
||||
|
||||
/**
|
||||
* 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()
|
||||
/**
|
||||
* <code>repeated .protogen.Label labels = 1;</code>
|
||||
*/
|
||||
public val labels: com.google.protobuf.kotlin.DslList<protogen.RemoteWrite.Label, LabelsProxy>
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
get() = com.google.protobuf.kotlin.DslList(
|
||||
_builder.getLabelsList()
|
||||
)
|
||||
/**
|
||||
* <code>repeated .protogen.Label labels = 1;</code>
|
||||
* @param value The labels to add.
|
||||
*/
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.jvm.JvmName("addLabels")
|
||||
public fun com.google.protobuf.kotlin.DslList<protogen.RemoteWrite.Label, LabelsProxy>.add(value: protogen.RemoteWrite.Label) {
|
||||
_builder.addLabels(value)
|
||||
}/**
|
||||
* <code>repeated .protogen.Label labels = 1;</code>
|
||||
* @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<protogen.RemoteWrite.Label, LabelsProxy>.plusAssign(value: protogen.RemoteWrite.Label) {
|
||||
add(value)
|
||||
}/**
|
||||
* <code>repeated .protogen.Label labels = 1;</code>
|
||||
* @param values The labels to add.
|
||||
*/
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.jvm.JvmName("addAllLabels")
|
||||
public fun com.google.protobuf.kotlin.DslList<protogen.RemoteWrite.Label, LabelsProxy>.addAll(values: kotlin.collections.Iterable<protogen.RemoteWrite.Label>) {
|
||||
_builder.addAllLabels(values)
|
||||
}/**
|
||||
* <code>repeated .protogen.Label labels = 1;</code>
|
||||
* @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<protogen.RemoteWrite.Label, LabelsProxy>.plusAssign(values: kotlin.collections.Iterable<protogen.RemoteWrite.Label>) {
|
||||
addAll(values)
|
||||
}/**
|
||||
* <code>repeated .protogen.Label labels = 1;</code>
|
||||
* @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<protogen.RemoteWrite.Label, LabelsProxy>.set(index: kotlin.Int, value: protogen.RemoteWrite.Label) {
|
||||
_builder.setLabels(index, value)
|
||||
}/**
|
||||
* <code>repeated .protogen.Label labels = 1;</code>
|
||||
*/
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.jvm.JvmName("clearLabels")
|
||||
public fun com.google.protobuf.kotlin.DslList<protogen.RemoteWrite.Label, LabelsProxy>.clear() {
|
||||
_builder.clearLabels()
|
||||
}
|
||||
/**
|
||||
* An uninstantiable, behaviorless type to represent the field in
|
||||
* generics.
|
||||
*/
|
||||
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
|
||||
public class SamplesProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
|
||||
/**
|
||||
* <code>repeated .protogen.Sample samples = 2;</code>
|
||||
*/
|
||||
public val samples: com.google.protobuf.kotlin.DslList<protogen.RemoteWrite.Sample, SamplesProxy>
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
get() = com.google.protobuf.kotlin.DslList(
|
||||
_builder.getSamplesList()
|
||||
)
|
||||
/**
|
||||
* <code>repeated .protogen.Sample samples = 2;</code>
|
||||
* @param value The samples to add.
|
||||
*/
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.jvm.JvmName("addSamples")
|
||||
public fun com.google.protobuf.kotlin.DslList<protogen.RemoteWrite.Sample, SamplesProxy>.add(value: protogen.RemoteWrite.Sample) {
|
||||
_builder.addSamples(value)
|
||||
}/**
|
||||
* <code>repeated .protogen.Sample samples = 2;</code>
|
||||
* @param value The samples to add.
|
||||
*/
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.jvm.JvmName("plusAssignSamples")
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
public inline operator fun com.google.protobuf.kotlin.DslList<protogen.RemoteWrite.Sample, SamplesProxy>.plusAssign(value: protogen.RemoteWrite.Sample) {
|
||||
add(value)
|
||||
}/**
|
||||
* <code>repeated .protogen.Sample samples = 2;</code>
|
||||
* @param values The samples to add.
|
||||
*/
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.jvm.JvmName("addAllSamples")
|
||||
public fun com.google.protobuf.kotlin.DslList<protogen.RemoteWrite.Sample, SamplesProxy>.addAll(values: kotlin.collections.Iterable<protogen.RemoteWrite.Sample>) {
|
||||
_builder.addAllSamples(values)
|
||||
}/**
|
||||
* <code>repeated .protogen.Sample samples = 2;</code>
|
||||
* @param values The samples to add.
|
||||
*/
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.jvm.JvmName("plusAssignAllSamples")
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
public inline operator fun com.google.protobuf.kotlin.DslList<protogen.RemoteWrite.Sample, SamplesProxy>.plusAssign(values: kotlin.collections.Iterable<protogen.RemoteWrite.Sample>) {
|
||||
addAll(values)
|
||||
}/**
|
||||
* <code>repeated .protogen.Sample samples = 2;</code>
|
||||
* @param index The index to set the value at.
|
||||
* @param value The samples to set.
|
||||
*/
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.jvm.JvmName("setSamples")
|
||||
public operator fun com.google.protobuf.kotlin.DslList<protogen.RemoteWrite.Sample, SamplesProxy>.set(index: kotlin.Int, value: protogen.RemoteWrite.Sample) {
|
||||
_builder.setSamples(index, value)
|
||||
}/**
|
||||
* <code>repeated .protogen.Sample samples = 2;</code>
|
||||
*/
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.jvm.JvmName("clearSamples")
|
||||
public fun com.google.protobuf.kotlin.DslList<protogen.RemoteWrite.Sample, SamplesProxy>.clear() {
|
||||
_builder.clearSamples()
|
||||
}}
|
||||
}
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
public inline fun protogen.RemoteWrite.TimeSeries.copy(block: protogen.TimeSeriesKt.Dsl.() -> kotlin.Unit): protogen.RemoteWrite.TimeSeries =
|
||||
protogen.TimeSeriesKt.Dsl._create(this.toBuilder()).apply { block() }._build()
|
@ -0,0 +1,93 @@
|
||||
//Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: remote-write.proto
|
||||
|
||||
package protogen;
|
||||
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
public inline fun writeRequest(block: protogen.WriteRequestKt.Dsl.() -> kotlin.Unit): protogen.RemoteWrite.WriteRequest =
|
||||
protogen.WriteRequestKt.Dsl._create(protogen.RemoteWrite.WriteRequest.newBuilder()).apply { block() }._build()
|
||||
public object WriteRequestKt {
|
||||
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
|
||||
@com.google.protobuf.kotlin.ProtoDslMarker
|
||||
public class Dsl private constructor(
|
||||
private val _builder: protogen.RemoteWrite.WriteRequest.Builder
|
||||
) {
|
||||
public companion object {
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.PublishedApi
|
||||
internal fun _create(builder: protogen.RemoteWrite.WriteRequest.Builder): Dsl = Dsl(builder)
|
||||
}
|
||||
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.PublishedApi
|
||||
internal fun _build(): protogen.RemoteWrite.WriteRequest = _builder.build()
|
||||
|
||||
/**
|
||||
* An uninstantiable, behaviorless type to represent the field in
|
||||
* generics.
|
||||
*/
|
||||
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
|
||||
public class TimeseriesProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
|
||||
/**
|
||||
* <code>repeated .protogen.TimeSeries timeseries = 1;</code>
|
||||
*/
|
||||
public val timeseries: com.google.protobuf.kotlin.DslList<protogen.RemoteWrite.TimeSeries, TimeseriesProxy>
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
get() = com.google.protobuf.kotlin.DslList(
|
||||
_builder.getTimeseriesList()
|
||||
)
|
||||
/**
|
||||
* <code>repeated .protogen.TimeSeries timeseries = 1;</code>
|
||||
* @param value The timeseries to add.
|
||||
*/
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.jvm.JvmName("addTimeseries")
|
||||
public fun com.google.protobuf.kotlin.DslList<protogen.RemoteWrite.TimeSeries, TimeseriesProxy>.add(value: protogen.RemoteWrite.TimeSeries) {
|
||||
_builder.addTimeseries(value)
|
||||
}/**
|
||||
* <code>repeated .protogen.TimeSeries timeseries = 1;</code>
|
||||
* @param value The timeseries to add.
|
||||
*/
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.jvm.JvmName("plusAssignTimeseries")
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
public inline operator fun com.google.protobuf.kotlin.DslList<protogen.RemoteWrite.TimeSeries, TimeseriesProxy>.plusAssign(value: protogen.RemoteWrite.TimeSeries) {
|
||||
add(value)
|
||||
}/**
|
||||
* <code>repeated .protogen.TimeSeries timeseries = 1;</code>
|
||||
* @param values The timeseries to add.
|
||||
*/
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.jvm.JvmName("addAllTimeseries")
|
||||
public fun com.google.protobuf.kotlin.DslList<protogen.RemoteWrite.TimeSeries, TimeseriesProxy>.addAll(values: kotlin.collections.Iterable<protogen.RemoteWrite.TimeSeries>) {
|
||||
_builder.addAllTimeseries(values)
|
||||
}/**
|
||||
* <code>repeated .protogen.TimeSeries timeseries = 1;</code>
|
||||
* @param values The timeseries to add.
|
||||
*/
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.jvm.JvmName("plusAssignAllTimeseries")
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
public inline operator fun com.google.protobuf.kotlin.DslList<protogen.RemoteWrite.TimeSeries, TimeseriesProxy>.plusAssign(values: kotlin.collections.Iterable<protogen.RemoteWrite.TimeSeries>) {
|
||||
addAll(values)
|
||||
}/**
|
||||
* <code>repeated .protogen.TimeSeries timeseries = 1;</code>
|
||||
* @param index The index to set the value at.
|
||||
* @param value The timeseries to set.
|
||||
*/
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.jvm.JvmName("setTimeseries")
|
||||
public operator fun com.google.protobuf.kotlin.DslList<protogen.RemoteWrite.TimeSeries, TimeseriesProxy>.set(index: kotlin.Int, value: protogen.RemoteWrite.TimeSeries) {
|
||||
_builder.setTimeseries(index, value)
|
||||
}/**
|
||||
* <code>repeated .protogen.TimeSeries timeseries = 1;</code>
|
||||
*/
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
@kotlin.jvm.JvmName("clearTimeseries")
|
||||
public fun com.google.protobuf.kotlin.DslList<protogen.RemoteWrite.TimeSeries, TimeseriesProxy>.clear() {
|
||||
_builder.clearTimeseries()
|
||||
}}
|
||||
}
|
||||
@kotlin.jvm.JvmSynthetic
|
||||
public inline fun protogen.RemoteWrite.WriteRequest.copy(block: protogen.WriteRequestKt.Dsl.() -> kotlin.Unit): protogen.RemoteWrite.WriteRequest =
|
||||
protogen.WriteRequestKt.Dsl._create(this.toBuilder()).apply { block() }._build()
|
Reference in New Issue
Block a user