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

com.authzed.api.v1.WatchResponseKt.kt Maven / Gradle / Ivy

//Generated by the protocol buffer compiler. DO NOT EDIT!
// source: authzed/api/v1/watch_service.proto

package com.authzed.api.v1;

@kotlin.jvm.JvmName("-initializewatchResponse")
public inline fun watchResponse(block: com.authzed.api.v1.WatchResponseKt.Dsl.() -> kotlin.Unit): com.authzed.api.v1.WatchServiceOuterClass.WatchResponse =
  com.authzed.api.v1.WatchResponseKt.Dsl._create(com.authzed.api.v1.WatchServiceOuterClass.WatchResponse.newBuilder()).apply { block() }._build()
public object WatchResponseKt {
  @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
  @com.google.protobuf.kotlin.ProtoDslMarker
  public class Dsl private constructor(
    private val _builder: com.authzed.api.v1.WatchServiceOuterClass.WatchResponse.Builder
  ) {
    public companion object {
      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _create(builder: com.authzed.api.v1.WatchServiceOuterClass.WatchResponse.Builder): Dsl = Dsl(builder)
    }

    @kotlin.jvm.JvmSynthetic
    @kotlin.PublishedApi
    internal fun _build(): com.authzed.api.v1.WatchServiceOuterClass.WatchResponse = _builder.build()

    /**
     * An uninstantiable, behaviorless type to represent the field in
     * generics.
     */
    @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
    public class UpdatesProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
    /**
     * repeated .authzed.api.v1.RelationshipUpdate updates = 1;
     */
     public val updates: com.google.protobuf.kotlin.DslList
      @kotlin.jvm.JvmSynthetic
      get() = com.google.protobuf.kotlin.DslList(
        _builder.getUpdatesList()
      )
    /**
     * repeated .authzed.api.v1.RelationshipUpdate updates = 1;
     * @param value The updates to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addUpdates")
    public fun com.google.protobuf.kotlin.DslList.add(value: com.authzed.api.v1.Core.RelationshipUpdate) {
      _builder.addUpdates(value)
    }
    /**
     * repeated .authzed.api.v1.RelationshipUpdate updates = 1;
     * @param value The updates to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignUpdates")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.authzed.api.v1.Core.RelationshipUpdate) {
      add(value)
    }
    /**
     * repeated .authzed.api.v1.RelationshipUpdate updates = 1;
     * @param values The updates to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addAllUpdates")
    public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
      _builder.addAllUpdates(values)
    }
    /**
     * repeated .authzed.api.v1.RelationshipUpdate updates = 1;
     * @param values The updates to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignAllUpdates")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
      addAll(values)
    }
    /**
     * repeated .authzed.api.v1.RelationshipUpdate updates = 1;
     * @param index The index to set the value at.
     * @param value The updates to set.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("setUpdates")
    public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.authzed.api.v1.Core.RelationshipUpdate) {
      _builder.setUpdates(index, value)
    }
    /**
     * repeated .authzed.api.v1.RelationshipUpdate updates = 1;
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("clearUpdates")
    public fun com.google.protobuf.kotlin.DslList.clear() {
      _builder.clearUpdates()
    }


    /**
     * .authzed.api.v1.ZedToken changes_through = 2;
     */
    public var changesThrough: com.authzed.api.v1.Core.ZedToken
      @JvmName("getChangesThrough")
      get() = _builder.getChangesThrough()
      @JvmName("setChangesThrough")
      set(value) {
        _builder.setChangesThrough(value)
      }
    /**
     * .authzed.api.v1.ZedToken changes_through = 2;
     */
    public fun clearChangesThrough() {
      _builder.clearChangesThrough()
    }
    /**
     * .authzed.api.v1.ZedToken changes_through = 2;
     * @return Whether the changesThrough field is set.
     */
    public fun hasChangesThrough(): kotlin.Boolean {
      return _builder.hasChangesThrough()
    }
  }
}
@kotlin.jvm.JvmSynthetic
public inline fun com.authzed.api.v1.WatchServiceOuterClass.WatchResponse.copy(block: com.authzed.api.v1.WatchResponseKt.Dsl.() -> kotlin.Unit): com.authzed.api.v1.WatchServiceOuterClass.WatchResponse =
  com.authzed.api.v1.WatchResponseKt.Dsl._create(this.toBuilder()).apply { block() }._build()

public val com.authzed.api.v1.WatchServiceOuterClass.WatchResponseOrBuilder.changesThroughOrNull: com.authzed.api.v1.Core.ZedToken?
  get() = if (hasChangesThrough()) getChangesThrough() else null





© 2015 - 2025 Weber Informatics LLC | Privacy Policy