yats-connectors.git

ref: master

yats-connector-kotlin/com/kevwe/yats/protobuf/CreateMetricRequestKt.kt


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yats-grpc.proto

package com.kevwe.yats.protobuf;

@kotlin.jvm.JvmName("-initializecreateMetricRequest")
public inline fun createMetricRequest(block: com.kevwe.yats.protobuf.CreateMetricRequestKt.Dsl.() -> kotlin.Unit): com.kevwe.yats.protobuf.CreateMetricRequest =
  com.kevwe.yats.protobuf.CreateMetricRequestKt.Dsl._create(com.kevwe.yats.protobuf.CreateMetricRequest.newBuilder()).apply { block() }._build()
public object CreateMetricRequestKt {
  @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
  @com.google.protobuf.kotlin.ProtoDslMarker
  public class Dsl private constructor(
    private val _builder: com.kevwe.yats.protobuf.CreateMetricRequest.Builder
  ) {
    public companion object {
      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _create(builder: com.kevwe.yats.protobuf.CreateMetricRequest.Builder): Dsl = Dsl(builder)
    }

    @kotlin.jvm.JvmSynthetic
    @kotlin.PublishedApi
    internal fun _build(): com.kevwe.yats.protobuf.CreateMetricRequest = _builder.build()

    /**
     * <code>.yats.Metric metric = 1;</code>
     */
    public var metric: com.kevwe.yats.protobuf.Metric
      @JvmName("getMetric")
      get() = _builder.getMetric()
      @JvmName("setMetric")
      set(value) {
        _builder.setMetric(value)
      }
    /**
     * <code>.yats.Metric metric = 1;</code>
     */
    public fun clearMetric() {
      _builder.clearMetric()
    }
    /**
     * <code>.yats.Metric metric = 1;</code>
     * @return Whether the metric field is set.
     */
    public fun hasMetric(): kotlin.Boolean {
      return _builder.hasMetric()
    }
  }
}
@kotlin.jvm.JvmSynthetic
public inline fun com.kevwe.yats.protobuf.CreateMetricRequest.copy(block: com.kevwe.yats.protobuf.CreateMetricRequestKt.Dsl.() -> kotlin.Unit): com.kevwe.yats.protobuf.CreateMetricRequest =
  com.kevwe.yats.protobuf.CreateMetricRequestKt.Dsl._create(this.toBuilder()).apply { block() }._build()

public val com.kevwe.yats.protobuf.CreateMetricRequestOrBuilder.metricOrNull: com.kevwe.yats.protobuf.Metric?
  get() = if (hasMetric()) getMetric() else null