build.bazel.remote.execution.v2.ExecutionPolicyKt.kt Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: build/bazel/remote/execution/v2/remote_execution.proto
// Generated files should ignore deprecation warnings
@file:Suppress("DEPRECATION")
package build.bazel.remote.execution.v2;
@kotlin.jvm.JvmName("-initializeexecutionPolicy")
public inline fun executionPolicy(block: build.bazel.remote.execution.v2.ExecutionPolicyKt.Dsl.() -> kotlin.Unit): build.bazel.remote.execution.v2.ExecutionPolicy =
build.bazel.remote.execution.v2.ExecutionPolicyKt.Dsl._create(build.bazel.remote.execution.v2.ExecutionPolicy.newBuilder()).apply { block() }._build()
/**
* ```
* An `ExecutionPolicy` can be used to control the scheduling of the action.
* ```
*
* Protobuf type `build.bazel.remote.execution.v2.ExecutionPolicy`
*/
public object ExecutionPolicyKt {
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
@com.google.protobuf.kotlin.ProtoDslMarker
public class Dsl private constructor(
private val _builder: build.bazel.remote.execution.v2.ExecutionPolicy.Builder
) {
public companion object {
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _create(builder: build.bazel.remote.execution.v2.ExecutionPolicy.Builder): Dsl = Dsl(builder)
}
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _build(): build.bazel.remote.execution.v2.ExecutionPolicy = _builder.build()
/**
* ```
* The priority (relative importance) of this action. Generally, a lower value
* means that the action should be run sooner than actions having a greater
* priority value, but the interpretation of a given value is server-
* dependent. A priority of 0 means the *default* priority. Priorities may be
* positive or negative, and such actions should run later or sooner than
* actions having the default priority, respectively. The particular semantics
* of this field is up to the server. In particular, every server will have
* their own supported range of priorities, and will decide how these map into
* scheduling policy.
* ```
*
* `int32 priority = 1;`
*/
public var priority: kotlin.Int
@JvmName("getPriority")
get() = _builder.getPriority()
@JvmName("setPriority")
set(value) {
_builder.setPriority(value)
}
/**
* ```
* The priority (relative importance) of this action. Generally, a lower value
* means that the action should be run sooner than actions having a greater
* priority value, but the interpretation of a given value is server-
* dependent. A priority of 0 means the *default* priority. Priorities may be
* positive or negative, and such actions should run later or sooner than
* actions having the default priority, respectively. The particular semantics
* of this field is up to the server. In particular, every server will have
* their own supported range of priorities, and will decide how these map into
* scheduling policy.
* ```
*
* `int32 priority = 1;`
*/
public fun clearPriority() {
_builder.clearPriority()
}
}
}
@kotlin.jvm.JvmSynthetic
public inline fun build.bazel.remote.execution.v2.ExecutionPolicy.copy(block: `build.bazel.remote.execution.v2`.ExecutionPolicyKt.Dsl.() -> kotlin.Unit): build.bazel.remote.execution.v2.ExecutionPolicy =
`build.bazel.remote.execution.v2`.ExecutionPolicyKt.Dsl._create(this.toBuilder()).apply { block() }._build()