build.bazel.remote.execution.v2.RequestMetadataKt.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("-initializerequestMetadata")
public inline fun requestMetadata(block: build.bazel.remote.execution.v2.RequestMetadataKt.Dsl.() -> kotlin.Unit): build.bazel.remote.execution.v2.RequestMetadata =
build.bazel.remote.execution.v2.RequestMetadataKt.Dsl._create(build.bazel.remote.execution.v2.RequestMetadata.newBuilder()).apply { block() }._build()
/**
* ```
* An optional Metadata to attach to any RPC request to tell the server about an
* external context of the request. The server may use this for logging or other
* purposes. To use it, the client attaches the header to the call using the
* canonical proto serialization:
*
* * name: `build.bazel.remote.execution.v2.requestmetadata-bin`
* * contents: the base64 encoded binary `RequestMetadata` message.
* Note: the gRPC library serializes binary headers encoded in base 64 by
* default (https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests).
* Therefore, if the gRPC library is used to pass/retrieve this
* metadata, the user may ignore the base64 encoding and assume it is simply
* serialized as a binary message.
* ```
*
* Protobuf type `build.bazel.remote.execution.v2.RequestMetadata`
*/
public object RequestMetadataKt {
@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.RequestMetadata.Builder
) {
public companion object {
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _create(builder: build.bazel.remote.execution.v2.RequestMetadata.Builder): Dsl = Dsl(builder)
}
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _build(): build.bazel.remote.execution.v2.RequestMetadata = _builder.build()
/**
* ```
* The details for the tool invoking the requests.
* ```
*
* `.build.bazel.remote.execution.v2.ToolDetails tool_details = 1;`
*/
public var toolDetails: build.bazel.remote.execution.v2.ToolDetails
@JvmName("getToolDetails")
get() = _builder.getToolDetails()
@JvmName("setToolDetails")
set(value) {
_builder.setToolDetails(value)
}
/**
* ```
* The details for the tool invoking the requests.
* ```
*
* `.build.bazel.remote.execution.v2.ToolDetails tool_details = 1;`
*/
public fun clearToolDetails() {
_builder.clearToolDetails()
}
/**
* ```
* The details for the tool invoking the requests.
* ```
*
* `.build.bazel.remote.execution.v2.ToolDetails tool_details = 1;`
* @return Whether the toolDetails field is set.
*/
public fun hasToolDetails(): kotlin.Boolean {
return _builder.hasToolDetails()
}
/**
* ```
* An identifier that ties multiple requests to the same action.
* For example, multiple requests to the CAS, Action Cache, and Execution
* API are used in order to compile foo.cc.
* ```
*
* `string action_id = 2;`
*/
public var actionId: kotlin.String
@JvmName("getActionId")
get() = _builder.getActionId()
@JvmName("setActionId")
set(value) {
_builder.setActionId(value)
}
/**
* ```
* An identifier that ties multiple requests to the same action.
* For example, multiple requests to the CAS, Action Cache, and Execution
* API are used in order to compile foo.cc.
* ```
*
* `string action_id = 2;`
*/
public fun clearActionId() {
_builder.clearActionId()
}
/**
* ```
* An identifier that ties multiple actions together to a final result.
* For example, multiple actions are required to build and run foo_test.
* ```
*
* `string tool_invocation_id = 3;`
*/
public var toolInvocationId: kotlin.String
@JvmName("getToolInvocationId")
get() = _builder.getToolInvocationId()
@JvmName("setToolInvocationId")
set(value) {
_builder.setToolInvocationId(value)
}
/**
* ```
* An identifier that ties multiple actions together to a final result.
* For example, multiple actions are required to build and run foo_test.
* ```
*
* `string tool_invocation_id = 3;`
*/
public fun clearToolInvocationId() {
_builder.clearToolInvocationId()
}
/**
* ```
* An identifier to tie multiple tool invocations together. For example,
* runs of foo_test, bar_test and baz_test on a post-submit of a given patch.
* ```
*
* `string correlated_invocations_id = 4;`
*/
public var correlatedInvocationsId: kotlin.String
@JvmName("getCorrelatedInvocationsId")
get() = _builder.getCorrelatedInvocationsId()
@JvmName("setCorrelatedInvocationsId")
set(value) {
_builder.setCorrelatedInvocationsId(value)
}
/**
* ```
* An identifier to tie multiple tool invocations together. For example,
* runs of foo_test, bar_test and baz_test on a post-submit of a given patch.
* ```
*
* `string correlated_invocations_id = 4;`
*/
public fun clearCorrelatedInvocationsId() {
_builder.clearCorrelatedInvocationsId()
}
}
}
@kotlin.jvm.JvmSynthetic
public inline fun build.bazel.remote.execution.v2.RequestMetadata.copy(block: `build.bazel.remote.execution.v2`.RequestMetadataKt.Dsl.() -> kotlin.Unit): build.bazel.remote.execution.v2.RequestMetadata =
`build.bazel.remote.execution.v2`.RequestMetadataKt.Dsl._create(this.toBuilder()).apply { block() }._build()
public val build.bazel.remote.execution.v2.RequestMetadataOrBuilder.toolDetailsOrNull: build.bazel.remote.execution.v2.ToolDetails?
get() = if (hasToolDetails()) getToolDetails() else null