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

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

The newest version!
//Generated by the protocol buffer compiler. DO NOT EDIT!
// source: authzed/api/v1/permission_service.proto

package com.authzed.api.v1;

@kotlin.jvm.JvmName("-initializeprecondition")
public inline fun precondition(block: com.authzed.api.v1.PreconditionKt.Dsl.() -> kotlin.Unit): com.authzed.api.v1.PermissionService.Precondition =
  com.authzed.api.v1.PreconditionKt.Dsl._create(com.authzed.api.v1.PermissionService.Precondition.newBuilder()).apply { block() }._build()
public object PreconditionKt {
  @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.PermissionService.Precondition.Builder
  ) {
    public companion object {
      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _create(builder: com.authzed.api.v1.PermissionService.Precondition.Builder): Dsl = Dsl(builder)
    }

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

    /**
     * .authzed.api.v1.Precondition.Operation operation = 1 [(.validate.rules) = { ... }
     */
    public var operation: com.authzed.api.v1.PermissionService.Precondition.Operation
      @JvmName("getOperation")
      get() = _builder.getOperation()
      @JvmName("setOperation")
      set(value) {
        _builder.setOperation(value)
      }
    /**
     * .authzed.api.v1.Precondition.Operation operation = 1 [(.validate.rules) = { ... }
     */
    public fun clearOperation() {
      _builder.clearOperation()
    }

    /**
     * .authzed.api.v1.RelationshipFilter filter = 2 [(.validate.rules) = { ... }
     */
    public var filter: com.authzed.api.v1.PermissionService.RelationshipFilter
      @JvmName("getFilter")
      get() = _builder.getFilter()
      @JvmName("setFilter")
      set(value) {
        _builder.setFilter(value)
      }
    /**
     * .authzed.api.v1.RelationshipFilter filter = 2 [(.validate.rules) = { ... }
     */
    public fun clearFilter() {
      _builder.clearFilter()
    }
    /**
     * .authzed.api.v1.RelationshipFilter filter = 2 [(.validate.rules) = { ... }
     * @return Whether the filter field is set.
     */
    public fun hasFilter(): kotlin.Boolean {
      return _builder.hasFilter()
    }
  }
}
@kotlin.jvm.JvmSynthetic
public inline fun com.authzed.api.v1.PermissionService.Precondition.copy(block: com.authzed.api.v1.PreconditionKt.Dsl.() -> kotlin.Unit): com.authzed.api.v1.PermissionService.Precondition =
  com.authzed.api.v1.PreconditionKt.Dsl._create(this.toBuilder()).apply { block() }._build()

public val com.authzed.api.v1.PermissionService.PreconditionOrBuilder.filterOrNull: com.authzed.api.v1.PermissionService.RelationshipFilter?
  get() = if (hasFilter()) getFilter() else null





© 2015 - 2025 Weber Informatics LLC | Privacy Policy