All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.protobuf.DurationKt.kt Maven / Gradle / Ivy

Go to download

Kotlin core Protocol Buffers library. Protocol Buffers are a way of encoding structured data in an efficient yet extensible format.

There is a newer version: 4.29.2
Show newest version
// 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.seconds
      @JvmName("setSeconds")
      set(value) {
        _builder.seconds = 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.nanos
      @JvmName("setNanos")
      set(value) {
        _builder.nanos = value
      }
    /**
     * `int32 nanos = 2 [json_name = "nanos"];`
     */
    public fun clearNanos() {
      _builder.clearNanos()
    }
  }
}
@kotlin.jvm.JvmSynthetic
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()





© 2015 - 2024 Weber Informatics LLC | Privacy Policy