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

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

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

    /**
     * .authzed.api.v1.Consistency consistency = 1;
     */
    public var consistency: com.authzed.api.v1.PermissionService.Consistency
      @JvmName("getConsistency")
      get() = _builder.getConsistency()
      @JvmName("setConsistency")
      set(value) {
        _builder.setConsistency(value)
      }
    /**
     * .authzed.api.v1.Consistency consistency = 1;
     */
    public fun clearConsistency() {
      _builder.clearConsistency()
    }
    /**
     * .authzed.api.v1.Consistency consistency = 1;
     * @return Whether the consistency field is set.
     */
    public fun hasConsistency(): kotlin.Boolean {
      return _builder.hasConsistency()
    }

    /**
     * 
     * resource is the resource on which to check the permission or relation.
     * 
* * .authzed.api.v1.ObjectReference resource = 2 [(.validate.rules) = { ... } */ public var resource: com.authzed.api.v1.Core.ObjectReference @JvmName("getResource") get() = _builder.getResource() @JvmName("setResource") set(value) { _builder.setResource(value) } /** *
     * resource is the resource on which to check the permission or relation.
     * 
* * .authzed.api.v1.ObjectReference resource = 2 [(.validate.rules) = { ... } */ public fun clearResource() { _builder.clearResource() } /** *
     * resource is the resource on which to check the permission or relation.
     * 
* * .authzed.api.v1.ObjectReference resource = 2 [(.validate.rules) = { ... } * @return Whether the resource field is set. */ public fun hasResource(): kotlin.Boolean { return _builder.hasResource() } /** *
     * permission is the name of the permission (or relation) on which to execute
     * the check.
     * 
* * string permission = 3 [(.validate.rules) = { ... } */ public var permission: kotlin.String @JvmName("getPermission") get() = _builder.getPermission() @JvmName("setPermission") set(value) { _builder.setPermission(value) } /** *
     * permission is the name of the permission (or relation) on which to execute
     * the check.
     * 
* * string permission = 3 [(.validate.rules) = { ... } */ public fun clearPermission() { _builder.clearPermission() } /** *
     * subject is the subject that will be checked for the permission or relation.
     * 
* * .authzed.api.v1.SubjectReference subject = 4 [(.validate.rules) = { ... } */ public var subject: com.authzed.api.v1.Core.SubjectReference @JvmName("getSubject") get() = _builder.getSubject() @JvmName("setSubject") set(value) { _builder.setSubject(value) } /** *
     * subject is the subject that will be checked for the permission or relation.
     * 
* * .authzed.api.v1.SubjectReference subject = 4 [(.validate.rules) = { ... } */ public fun clearSubject() { _builder.clearSubject() } /** *
     * subject is the subject that will be checked for the permission or relation.
     * 
* * .authzed.api.v1.SubjectReference subject = 4 [(.validate.rules) = { ... } * @return Whether the subject field is set. */ public fun hasSubject(): kotlin.Boolean { return _builder.hasSubject() } /** *
     ** context consists of named values that are injected into the caveat evaluation context *
     * 
* * .google.protobuf.Struct context = 5 [(.validate.rules) = { ... } */ public var context: com.google.protobuf.Struct @JvmName("getContext") get() = _builder.getContext() @JvmName("setContext") set(value) { _builder.setContext(value) } /** *
     ** context consists of named values that are injected into the caveat evaluation context *
     * 
* * .google.protobuf.Struct context = 5 [(.validate.rules) = { ... } */ public fun clearContext() { _builder.clearContext() } /** *
     ** context consists of named values that are injected into the caveat evaluation context *
     * 
* * .google.protobuf.Struct context = 5 [(.validate.rules) = { ... } * @return Whether the context field is set. */ public fun hasContext(): kotlin.Boolean { return _builder.hasContext() } } } @kotlin.jvm.JvmSynthetic public inline fun com.authzed.api.v1.PermissionService.CheckPermissionRequest.copy(block: com.authzed.api.v1.CheckPermissionRequestKt.Dsl.() -> kotlin.Unit): com.authzed.api.v1.PermissionService.CheckPermissionRequest = com.authzed.api.v1.CheckPermissionRequestKt.Dsl._create(this.toBuilder()).apply { block() }._build() public val com.authzed.api.v1.PermissionService.CheckPermissionRequestOrBuilder.consistencyOrNull: com.authzed.api.v1.PermissionService.Consistency? get() = if (hasConsistency()) getConsistency() else null public val com.authzed.api.v1.PermissionService.CheckPermissionRequestOrBuilder.resourceOrNull: com.authzed.api.v1.Core.ObjectReference? get() = if (hasResource()) getResource() else null public val com.authzed.api.v1.PermissionService.CheckPermissionRequestOrBuilder.subjectOrNull: com.authzed.api.v1.Core.SubjectReference? get() = if (hasSubject()) getSubject() else null public val com.authzed.api.v1.PermissionService.CheckPermissionRequestOrBuilder.contextOrNull: com.google.protobuf.Struct? get() = if (hasContext()) getContext() else null




© 2015 - 2025 Weber Informatics LLC | Privacy Policy