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

build.bazel.remote.execution.v2.DirectoryKt.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("-initializedirectory")
public inline fun directory(block: build.bazel.remote.execution.v2.DirectoryKt.Dsl.() -> kotlin.Unit): build.bazel.remote.execution.v2.Directory =
  build.bazel.remote.execution.v2.DirectoryKt.Dsl._create(build.bazel.remote.execution.v2.Directory.newBuilder()).apply { block() }._build()
/**
 * ```
 * A `Directory` represents a directory node in a file tree, containing zero or
 * more children [FileNodes][build.bazel.remote.execution.v2.FileNode],
 * [DirectoryNodes][build.bazel.remote.execution.v2.DirectoryNode] and
 * [SymlinkNodes][build.bazel.remote.execution.v2.SymlinkNode].
 * Each `Node` contains its name in the directory, either the digest of its
 * content (either a file blob or a `Directory` proto) or a symlink target, as
 * well as possibly some metadata about the file or directory.
 *
 * In order to ensure that two equivalent directory trees hash to the same
 * value, the following restrictions MUST be obeyed when constructing a
 * a `Directory`:
 *
 * * Every child in the directory must have a path of exactly one segment.
 *   Multiple levels of directory hierarchy may not be collapsed.
 * * Each child in the directory must have a unique path segment (file name).
 *   Note that while the API itself is case-sensitive, the environment where
 *   the Action is executed may or may not be case-sensitive. That is, it is
 *   legal to call the API with a Directory that has both "Foo" and "foo" as
 *   children, but the Action may be rejected by the remote system upon
 *   execution.
 * * The files, directories and symlinks in the directory must each be sorted
 *   in lexicographical order by path. The path strings must be sorted by code
 *   point, equivalently, by UTF-8 bytes.
 * * The [NodeProperties][build.bazel.remote.execution.v2.NodeProperty] of files,
 *   directories, and symlinks must be sorted in lexicographical order by
 *   property name.
 *
 * A `Directory` that obeys the restrictions is said to be in canonical form.
 *
 * As an example, the following could be used for a file named `bar` and a
 * directory named `foo` with an executable file named `baz` (hashes shortened
 * for readability):
 *
 * ```json
 * // (Directory proto)
 * {
 *   files: [
 *     {
 *       name: "bar",
 *       digest: {
 *         hash: "4a73bc9d03...",
 *         size: 65534
 *       },
 *       node_properties: [
 *         {
 *           "name": "MTime",
 *           "value": "2017-01-15T01:30:15.01Z"
 *         }
 *       ]
 *     }
 *   ],
 *   directories: [
 *     {
 *       name: "foo",
 *       digest: {
 *         hash: "4cf2eda940...",
 *         size: 43
 *       }
 *     }
 *   ]
 * }
 *
 * // (Directory proto with hash "4cf2eda940..." and size 43)
 * {
 *   files: [
 *     {
 *       name: "baz",
 *       digest: {
 *         hash: "b2c941073e...",
 *         size: 1294,
 *       },
 *       is_executable: true
 *     }
 *   ]
 * }
 * ```
 * ```
 *
 * Protobuf type `build.bazel.remote.execution.v2.Directory`
 */
public object DirectoryKt {
  @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.Directory.Builder
  ) {
    public companion object {
      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _create(builder: build.bazel.remote.execution.v2.Directory.Builder): Dsl = Dsl(builder)
    }

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

    /**
     * An uninstantiable, behaviorless type to represent the field in
     * generics.
     */
    @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
    public class FilesProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
    /**
     * ```
     * The files in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.FileNode files = 1;`
     */
     public val files: com.google.protobuf.kotlin.DslList
      @kotlin.jvm.JvmSynthetic
      get() = com.google.protobuf.kotlin.DslList(
        _builder.getFilesList()
      )
    /**
     * ```
     * The files in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.FileNode files = 1;`
     * @param value The files to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addFiles")
    public fun com.google.protobuf.kotlin.DslList.add(value: build.bazel.remote.execution.v2.FileNode) {
      _builder.addFiles(value)
    }
    /**
     * ```
     * The files in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.FileNode files = 1;`
     * @param value The files to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignFiles")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: build.bazel.remote.execution.v2.FileNode) {
      add(value)
    }
    /**
     * ```
     * The files in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.FileNode files = 1;`
     * @param values The files to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addAllFiles")
    public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
      _builder.addAllFiles(values)
    }
    /**
     * ```
     * The files in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.FileNode files = 1;`
     * @param values The files to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignAllFiles")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
      addAll(values)
    }
    /**
     * ```
     * The files in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.FileNode files = 1;`
     * @param index The index to set the value at.
     * @param value The files to set.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("setFiles")
    public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: build.bazel.remote.execution.v2.FileNode) {
      _builder.setFiles(index, value)
    }
    /**
     * ```
     * The files in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.FileNode files = 1;`
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("clearFiles")
    public fun com.google.protobuf.kotlin.DslList.clear() {
      _builder.clearFiles()
    }


    /**
     * An uninstantiable, behaviorless type to represent the field in
     * generics.
     */
    @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
    public class DirectoriesProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
    /**
     * ```
     * The subdirectories in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.DirectoryNode directories = 2;`
     */
     public val directories: com.google.protobuf.kotlin.DslList
      @kotlin.jvm.JvmSynthetic
      get() = com.google.protobuf.kotlin.DslList(
        _builder.getDirectoriesList()
      )
    /**
     * ```
     * The subdirectories in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.DirectoryNode directories = 2;`
     * @param value The directories to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addDirectories")
    public fun com.google.protobuf.kotlin.DslList.add(value: build.bazel.remote.execution.v2.DirectoryNode) {
      _builder.addDirectories(value)
    }
    /**
     * ```
     * The subdirectories in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.DirectoryNode directories = 2;`
     * @param value The directories to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignDirectories")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: build.bazel.remote.execution.v2.DirectoryNode) {
      add(value)
    }
    /**
     * ```
     * The subdirectories in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.DirectoryNode directories = 2;`
     * @param values The directories to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addAllDirectories")
    public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
      _builder.addAllDirectories(values)
    }
    /**
     * ```
     * The subdirectories in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.DirectoryNode directories = 2;`
     * @param values The directories to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignAllDirectories")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
      addAll(values)
    }
    /**
     * ```
     * The subdirectories in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.DirectoryNode directories = 2;`
     * @param index The index to set the value at.
     * @param value The directories to set.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("setDirectories")
    public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: build.bazel.remote.execution.v2.DirectoryNode) {
      _builder.setDirectories(index, value)
    }
    /**
     * ```
     * The subdirectories in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.DirectoryNode directories = 2;`
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("clearDirectories")
    public fun com.google.protobuf.kotlin.DslList.clear() {
      _builder.clearDirectories()
    }


    /**
     * An uninstantiable, behaviorless type to represent the field in
     * generics.
     */
    @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
    public class SymlinksProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
    /**
     * ```
     * The symlinks in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.SymlinkNode symlinks = 3;`
     */
     public val symlinks: com.google.protobuf.kotlin.DslList
      @kotlin.jvm.JvmSynthetic
      get() = com.google.protobuf.kotlin.DslList(
        _builder.getSymlinksList()
      )
    /**
     * ```
     * The symlinks in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.SymlinkNode symlinks = 3;`
     * @param value The symlinks to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addSymlinks")
    public fun com.google.protobuf.kotlin.DslList.add(value: build.bazel.remote.execution.v2.SymlinkNode) {
      _builder.addSymlinks(value)
    }
    /**
     * ```
     * The symlinks in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.SymlinkNode symlinks = 3;`
     * @param value The symlinks to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignSymlinks")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: build.bazel.remote.execution.v2.SymlinkNode) {
      add(value)
    }
    /**
     * ```
     * The symlinks in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.SymlinkNode symlinks = 3;`
     * @param values The symlinks to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addAllSymlinks")
    public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
      _builder.addAllSymlinks(values)
    }
    /**
     * ```
     * The symlinks in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.SymlinkNode symlinks = 3;`
     * @param values The symlinks to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignAllSymlinks")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
      addAll(values)
    }
    /**
     * ```
     * The symlinks in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.SymlinkNode symlinks = 3;`
     * @param index The index to set the value at.
     * @param value The symlinks to set.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("setSymlinks")
    public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: build.bazel.remote.execution.v2.SymlinkNode) {
      _builder.setSymlinks(index, value)
    }
    /**
     * ```
     * The symlinks in the directory.
     * ```
     *
     * `repeated .build.bazel.remote.execution.v2.SymlinkNode symlinks = 3;`
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("clearSymlinks")
    public fun com.google.protobuf.kotlin.DslList.clear() {
      _builder.clearSymlinks()
    }


    /**
     * `.build.bazel.remote.execution.v2.NodeProperties node_properties = 5;`
     */
    public var nodeProperties: build.bazel.remote.execution.v2.NodeProperties
      @JvmName("getNodeProperties")
      get() = _builder.getNodeProperties()
      @JvmName("setNodeProperties")
      set(value) {
        _builder.setNodeProperties(value)
      }
    /**
     * `.build.bazel.remote.execution.v2.NodeProperties node_properties = 5;`
     */
    public fun clearNodeProperties() {
      _builder.clearNodeProperties()
    }
    /**
     * `.build.bazel.remote.execution.v2.NodeProperties node_properties = 5;`
     * @return Whether the nodeProperties field is set.
     */
    public fun hasNodeProperties(): kotlin.Boolean {
      return _builder.hasNodeProperties()
    }
  }
}
@kotlin.jvm.JvmSynthetic
public inline fun build.bazel.remote.execution.v2.Directory.copy(block: `build.bazel.remote.execution.v2`.DirectoryKt.Dsl.() -> kotlin.Unit): build.bazel.remote.execution.v2.Directory =
  `build.bazel.remote.execution.v2`.DirectoryKt.Dsl._create(this.toBuilder()).apply { block() }._build()

public val build.bazel.remote.execution.v2.DirectoryOrBuilder.nodePropertiesOrNull: build.bazel.remote.execution.v2.NodeProperties?
  get() = if (hasNodeProperties()) getNodeProperties() else null





© 2015 - 2024 Weber Informatics LLC | Privacy Policy