com.google.protobuf.DurationKt.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of protobuf-kotlin-lite Show documentation
Show all versions of protobuf-kotlin-lite Show documentation
Kotlin lite Protocol Buffers library. Protocol Buffers are a way of encoding structured data in an
efficient yet extensible format.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: google/protobuf/duration.proto
// Generated files should ignore deprecation warnings
@file:Suppress("DEPRECATION")
package com.google.protobuf;
@kotlin.jvm.JvmName("-initializeduration")
public inline fun duration(block: com.google.protobuf.DurationKt.Dsl.() -> kotlin.Unit): com.google.protobuf.Duration =
com.google.protobuf.DurationKt.Dsl._create(com.google.protobuf.Duration.newBuilder()).apply { block() }._build()
/**
* Protobuf type `google.protobuf.Duration`
*/
public object DurationKt {
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
@com.google.protobuf.kotlin.ProtoDslMarker
public class Dsl private constructor(
private val _builder: com.google.protobuf.Duration.Builder
) {
public companion object {
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _create(builder: com.google.protobuf.Duration.Builder): Dsl = Dsl(builder)
}
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _build(): com.google.protobuf.Duration = _builder.build()
/**
* int64 seconds = 1 [json_name = "seconds"];
*/
public var seconds: kotlin.Long
@JvmName("getSeconds")
get() = _builder.getSeconds()
@JvmName("setSeconds")
set(value) {
_builder.setSeconds(value)
}
/**
* `int64 seconds = 1 [json_name = "seconds"];`
*/
public fun clearSeconds() {
_builder.clearSeconds()
}
/**
* int32 nanos = 2 [json_name = "nanos"];
*/
public var nanos: kotlin.Int
@JvmName("getNanos")
get() = _builder.getNanos()
@JvmName("setNanos")
set(value) {
_builder.setNanos(value)
}
/**
* `int32 nanos = 2 [json_name = "nanos"];`
*/
public fun clearNanos() {
_builder.clearNanos()
}
}
}
public inline fun com.google.protobuf.Duration.copy(block: `com.google.protobuf`.DurationKt.Dsl.() -> kotlin.Unit): com.google.protobuf.Duration =
`com.google.protobuf`.DurationKt.Dsl._create(this.toBuilder()).apply { block() }._build()