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

build.bazel.remote.execution.v2.ActionKt.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("-initializeaction")
public inline fun action(block: build.bazel.remote.execution.v2.ActionKt.Dsl.() -> kotlin.Unit): build.bazel.remote.execution.v2.Action =
  build.bazel.remote.execution.v2.ActionKt.Dsl._create(build.bazel.remote.execution.v2.Action.newBuilder()).apply { block() }._build()
/**
 * ```
 * An `Action` captures all the information about an execution which is required
 * to reproduce it.
 *
 * `Action`s are the core component of the [Execution] service. A single
 * `Action` represents a repeatable action that can be performed by the
 * execution service. `Action`s can be succinctly identified by the digest of
 * their wire format encoding and, once an `Action` has been executed, will be
 * cached in the action cache. Future requests can then use the cached result
 * rather than needing to run afresh.
 *
 * When a server completes execution of an
 * [Action][build.bazel.remote.execution.v2.Action], it MAY choose to
 * cache the [result][build.bazel.remote.execution.v2.ActionResult] in
 * the [ActionCache][build.bazel.remote.execution.v2.ActionCache] unless
 * `do_not_cache` is `true`. Clients SHOULD expect the server to do so. By
 * default, future calls to
 * [Execute][build.bazel.remote.execution.v2.Execution.Execute] the same
 * `Action` will also serve their results from the cache. Clients must take care
 * to understand the caching behaviour. Ideally, all `Action`s will be
 * reproducible so that serving a result from cache is always desirable and
 * correct.
 * ```
 *
 * Protobuf type `build.bazel.remote.execution.v2.Action`
 */
public object ActionKt {
  @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.Action.Builder
  ) {
    public companion object {
      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _create(builder: build.bazel.remote.execution.v2.Action.Builder): Dsl = Dsl(builder)
    }

    @kotlin.jvm.JvmSynthetic
    @kotlin.PublishedApi
    internal fun _build(): build.bazel.remote.execution.v2.Action = _builder.build()

    /**
     * ```
     * The digest of the [Command][build.bazel.remote.execution.v2.Command]
     * to run, which MUST be present in the
     * [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage].
     * ```
     *
     * `.build.bazel.remote.execution.v2.Digest command_digest = 1;`
     */
    public var commandDigest: build.bazel.remote.execution.v2.Digest
      @JvmName("getCommandDigest")
      get() = _builder.getCommandDigest()
      @JvmName("setCommandDigest")
      set(value) {
        _builder.setCommandDigest(value)
      }
    /**
     * ```
     * The digest of the [Command][build.bazel.remote.execution.v2.Command]
     * to run, which MUST be present in the
     * [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage].
     * ```
     *
     * `.build.bazel.remote.execution.v2.Digest command_digest = 1;`
     */
    public fun clearCommandDigest() {
      _builder.clearCommandDigest()
    }
    /**
     * ```
     * The digest of the [Command][build.bazel.remote.execution.v2.Command]
     * to run, which MUST be present in the
     * [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage].
     * ```
     *
     * `.build.bazel.remote.execution.v2.Digest command_digest = 1;`
     * @return Whether the commandDigest field is set.
     */
    public fun hasCommandDigest(): kotlin.Boolean {
      return _builder.hasCommandDigest()
    }

    /**
     * ```
     * The digest of the root
     * [Directory][build.bazel.remote.execution.v2.Directory] for the input
     * files. The files in the directory tree are available in the correct
     * location on the build machine before the command is executed. The root
     * directory, as well as every subdirectory and content blob referred to, MUST
     * be in the
     * [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage].
     * ```
     *
     * `.build.bazel.remote.execution.v2.Digest input_root_digest = 2;`
     */
    public var inputRootDigest: build.bazel.remote.execution.v2.Digest
      @JvmName("getInputRootDigest")
      get() = _builder.getInputRootDigest()
      @JvmName("setInputRootDigest")
      set(value) {
        _builder.setInputRootDigest(value)
      }
    /**
     * ```
     * The digest of the root
     * [Directory][build.bazel.remote.execution.v2.Directory] for the input
     * files. The files in the directory tree are available in the correct
     * location on the build machine before the command is executed. The root
     * directory, as well as every subdirectory and content blob referred to, MUST
     * be in the
     * [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage].
     * ```
     *
     * `.build.bazel.remote.execution.v2.Digest input_root_digest = 2;`
     */
    public fun clearInputRootDigest() {
      _builder.clearInputRootDigest()
    }
    /**
     * ```
     * The digest of the root
     * [Directory][build.bazel.remote.execution.v2.Directory] for the input
     * files. The files in the directory tree are available in the correct
     * location on the build machine before the command is executed. The root
     * directory, as well as every subdirectory and content blob referred to, MUST
     * be in the
     * [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage].
     * ```
     *
     * `.build.bazel.remote.execution.v2.Digest input_root_digest = 2;`
     * @return Whether the inputRootDigest field is set.
     */
    public fun hasInputRootDigest(): kotlin.Boolean {
      return _builder.hasInputRootDigest()
    }

    /**
     * ```
     * A timeout after which the execution should be killed. If the timeout is
     * absent, then the client is specifying that the execution should continue
     * as long as the server will let it. The server SHOULD impose a timeout if
     * the client does not specify one, however, if the client does specify a
     * timeout that is longer than the server's maximum timeout, the server MUST
     * reject the request.
     *
     * The timeout is a part of the
     * [Action][build.bazel.remote.execution.v2.Action] message, and
     * therefore two `Actions` with different timeouts are different, even if they
     * are otherwise identical. This is because, if they were not, running an
     * `Action` with a lower timeout than is required might result in a cache hit
     * from an execution run with a longer timeout, hiding the fact that the
     * timeout is too short. By encoding it directly in the `Action`, a lower
     * timeout will result in a cache miss and the execution timeout will fail
     * immediately, rather than whenever the cache entry gets evicted.
     * ```
     *
     * `.google.protobuf.Duration timeout = 6;`
     */
    public var timeout: com.google.protobuf.Duration
      @JvmName("getTimeout")
      get() = _builder.getTimeout()
      @JvmName("setTimeout")
      set(value) {
        _builder.setTimeout(value)
      }
    /**
     * ```
     * A timeout after which the execution should be killed. If the timeout is
     * absent, then the client is specifying that the execution should continue
     * as long as the server will let it. The server SHOULD impose a timeout if
     * the client does not specify one, however, if the client does specify a
     * timeout that is longer than the server's maximum timeout, the server MUST
     * reject the request.
     *
     * The timeout is a part of the
     * [Action][build.bazel.remote.execution.v2.Action] message, and
     * therefore two `Actions` with different timeouts are different, even if they
     * are otherwise identical. This is because, if they were not, running an
     * `Action` with a lower timeout than is required might result in a cache hit
     * from an execution run with a longer timeout, hiding the fact that the
     * timeout is too short. By encoding it directly in the `Action`, a lower
     * timeout will result in a cache miss and the execution timeout will fail
     * immediately, rather than whenever the cache entry gets evicted.
     * ```
     *
     * `.google.protobuf.Duration timeout = 6;`
     */
    public fun clearTimeout() {
      _builder.clearTimeout()
    }
    /**
     * ```
     * A timeout after which the execution should be killed. If the timeout is
     * absent, then the client is specifying that the execution should continue
     * as long as the server will let it. The server SHOULD impose a timeout if
     * the client does not specify one, however, if the client does specify a
     * timeout that is longer than the server's maximum timeout, the server MUST
     * reject the request.
     *
     * The timeout is a part of the
     * [Action][build.bazel.remote.execution.v2.Action] message, and
     * therefore two `Actions` with different timeouts are different, even if they
     * are otherwise identical. This is because, if they were not, running an
     * `Action` with a lower timeout than is required might result in a cache hit
     * from an execution run with a longer timeout, hiding the fact that the
     * timeout is too short. By encoding it directly in the `Action`, a lower
     * timeout will result in a cache miss and the execution timeout will fail
     * immediately, rather than whenever the cache entry gets evicted.
     * ```
     *
     * `.google.protobuf.Duration timeout = 6;`
     * @return Whether the timeout field is set.
     */
    public fun hasTimeout(): kotlin.Boolean {
      return _builder.hasTimeout()
    }

    /**
     * ```
     * If true, then the `Action`'s result cannot be cached, and in-flight
     * requests for the same `Action` may not be merged.
     * ```
     *
     * `bool do_not_cache = 7;`
     */
    public var doNotCache: kotlin.Boolean
      @JvmName("getDoNotCache")
      get() = _builder.getDoNotCache()
      @JvmName("setDoNotCache")
      set(value) {
        _builder.setDoNotCache(value)
      }
    /**
     * ```
     * If true, then the `Action`'s result cannot be cached, and in-flight
     * requests for the same `Action` may not be merged.
     * ```
     *
     * `bool do_not_cache = 7;`
     */
    public fun clearDoNotCache() {
      _builder.clearDoNotCache()
    }

    /**
     * ```
     * An optional additional salt value used to place this `Action` into a
     * separate cache namespace from other instances having the same field
     * contents. This salt typically comes from operational configuration
     * specific to sources such as repo and service configuration,
     * and allows disowning an entire set of ActionResults that might have been
     * poisoned by buggy software or tool failures.
     * ```
     *
     * `bytes salt = 9;`
     */
    public var salt: com.google.protobuf.ByteString
      @JvmName("getSalt")
      get() = _builder.getSalt()
      @JvmName("setSalt")
      set(value) {
        _builder.setSalt(value)
      }
    /**
     * ```
     * An optional additional salt value used to place this `Action` into a
     * separate cache namespace from other instances having the same field
     * contents. This salt typically comes from operational configuration
     * specific to sources such as repo and service configuration,
     * and allows disowning an entire set of ActionResults that might have been
     * poisoned by buggy software or tool failures.
     * ```
     *
     * `bytes salt = 9;`
     */
    public fun clearSalt() {
      _builder.clearSalt()
    }

    /**
     * ```
     * The optional platform requirements for the execution environment. The
     * server MAY choose to execute the action on any worker satisfying the
     * requirements, so the client SHOULD ensure that running the action on any
     * such worker will have the same result.  A detailed lexicon for this can be
     * found in the accompanying platform.md.
     * New in version 2.2: clients SHOULD set these platform properties as well
     * as those in the [Command][build.bazel.remote.execution.v2.Command]. Servers
     * SHOULD prefer those set here.
     * ```
     *
     * `.build.bazel.remote.execution.v2.Platform platform = 10;`
     */
    public var platform: build.bazel.remote.execution.v2.Platform
      @JvmName("getPlatform")
      get() = _builder.getPlatform()
      @JvmName("setPlatform")
      set(value) {
        _builder.setPlatform(value)
      }
    /**
     * ```
     * The optional platform requirements for the execution environment. The
     * server MAY choose to execute the action on any worker satisfying the
     * requirements, so the client SHOULD ensure that running the action on any
     * such worker will have the same result.  A detailed lexicon for this can be
     * found in the accompanying platform.md.
     * New in version 2.2: clients SHOULD set these platform properties as well
     * as those in the [Command][build.bazel.remote.execution.v2.Command]. Servers
     * SHOULD prefer those set here.
     * ```
     *
     * `.build.bazel.remote.execution.v2.Platform platform = 10;`
     */
    public fun clearPlatform() {
      _builder.clearPlatform()
    }
    /**
     * ```
     * The optional platform requirements for the execution environment. The
     * server MAY choose to execute the action on any worker satisfying the
     * requirements, so the client SHOULD ensure that running the action on any
     * such worker will have the same result.  A detailed lexicon for this can be
     * found in the accompanying platform.md.
     * New in version 2.2: clients SHOULD set these platform properties as well
     * as those in the [Command][build.bazel.remote.execution.v2.Command]. Servers
     * SHOULD prefer those set here.
     * ```
     *
     * `.build.bazel.remote.execution.v2.Platform platform = 10;`
     * @return Whether the platform field is set.
     */
    public fun hasPlatform(): kotlin.Boolean {
      return _builder.hasPlatform()
    }
  }
}
@kotlin.jvm.JvmSynthetic
public inline fun build.bazel.remote.execution.v2.Action.copy(block: `build.bazel.remote.execution.v2`.ActionKt.Dsl.() -> kotlin.Unit): build.bazel.remote.execution.v2.Action =
  `build.bazel.remote.execution.v2`.ActionKt.Dsl._create(this.toBuilder()).apply { block() }._build()

public val build.bazel.remote.execution.v2.ActionOrBuilder.commandDigestOrNull: build.bazel.remote.execution.v2.Digest?
  get() = if (hasCommandDigest()) getCommandDigest() else null

public val build.bazel.remote.execution.v2.ActionOrBuilder.inputRootDigestOrNull: build.bazel.remote.execution.v2.Digest?
  get() = if (hasInputRootDigest()) getInputRootDigest() else null

public val build.bazel.remote.execution.v2.ActionOrBuilder.timeoutOrNull: com.google.protobuf.Duration?
  get() = if (hasTimeout()) getTimeout() else null

public val build.bazel.remote.execution.v2.ActionOrBuilder.platformOrNull: build.bazel.remote.execution.v2.Platform?
  get() = if (hasPlatform()) getPlatform() else null





© 2015 - 2024 Weber Informatics LLC | Privacy Policy