build.bazel.remote.logstream.v1.LogStreamKt.kt Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: build/bazel/remote/logstream/v1/remote_logstream.proto
// Generated files should ignore deprecation warnings
@file:Suppress("DEPRECATION")
package build.bazel.remote.logstream.v1;
@kotlin.jvm.JvmName("-initializelogStream")
public inline fun logStream(block: build.bazel.remote.logstream.v1.LogStreamKt.Dsl.() -> kotlin.Unit): build.bazel.remote.logstream.v1.LogStream =
build.bazel.remote.logstream.v1.LogStreamKt.Dsl._create(build.bazel.remote.logstream.v1.LogStream.newBuilder()).apply { block() }._build()
/**
* ```
* A handle to a log (an ordered sequence of bytes).
* ```
*
* Protobuf type `build.bazel.remote.logstream.v1.LogStream`
*/
public object LogStreamKt {
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
@com.google.protobuf.kotlin.ProtoDslMarker
public class Dsl private constructor(
private val _builder: build.bazel.remote.logstream.v1.LogStream.Builder
) {
public companion object {
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _create(builder: build.bazel.remote.logstream.v1.LogStream.Builder): Dsl = Dsl(builder)
}
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _build(): build.bazel.remote.logstream.v1.LogStream = _builder.build()
/**
* ```
* Structured name of the resource in the format:
* {parent=**}/logstreams/{logstream_id}
* Example: projects/123/logstreams/456-def
* Attempting to call the Byte Stream API's `Write` RPC with a LogStream's
* `name` as the value for `ByteStream.Write.resource_name` is an error.
* ```
*
* `string name = 1;`
*/
public var name: kotlin.String
@JvmName("getName")
get() = _builder.getName()
@JvmName("setName")
set(value) {
_builder.setName(value)
}
/**
* ```
* Structured name of the resource in the format:
* {parent=**}/logstreams/{logstream_id}
* Example: projects/123/logstreams/456-def
* Attempting to call the Byte Stream API's `Write` RPC with a LogStream's
* `name` as the value for `ByteStream.Write.resource_name` is an error.
* ```
*
* `string name = 1;`
*/
public fun clearName() {
_builder.clearName()
}
/**
* ```
* Resource name to pass to `ByteStream.Write` in the format:
* {parent=**}/logstreams/{logstream_id}/{write_token}
* Example: projects/123/logstreams/456-def/789-ghi
* Attempting to call the Byte Stream API's `Read` RPC with a LogStream's
* `write_resource_name` as the value for `ByteStream.Write.resource_name`
* is an error.
*
* `write_resource_name` is separate from `name` to ensure that only the
* intended writers can write to a given LogStream. Writers must address write
* operations to the `write_resource_name`, not the `name`, and must have
* permission to write LogStreams. `write_resource_name` embeds a secret token
* and should be protected accordingly; a mishandled `write_resource_name` can
* result in unintended writers corrupting the LogStream. Therefore, the field
* should be excluded from calls to any calls which retrieve LogStream
* metadata (i.e.: `GetLogStream`).
*
* Bytes written to this resource must to be readable when `ByteStream.Read`
* is called with the `name` resource.
* Reading a write_resource_name must return an INVALID_ARGUMENT error.
* ```
*
* `string write_resource_name = 2;`
*/
public var writeResourceName: kotlin.String
@JvmName("getWriteResourceName")
get() = _builder.getWriteResourceName()
@JvmName("setWriteResourceName")
set(value) {
_builder.setWriteResourceName(value)
}
/**
* ```
* Resource name to pass to `ByteStream.Write` in the format:
* {parent=**}/logstreams/{logstream_id}/{write_token}
* Example: projects/123/logstreams/456-def/789-ghi
* Attempting to call the Byte Stream API's `Read` RPC with a LogStream's
* `write_resource_name` as the value for `ByteStream.Write.resource_name`
* is an error.
*
* `write_resource_name` is separate from `name` to ensure that only the
* intended writers can write to a given LogStream. Writers must address write
* operations to the `write_resource_name`, not the `name`, and must have
* permission to write LogStreams. `write_resource_name` embeds a secret token
* and should be protected accordingly; a mishandled `write_resource_name` can
* result in unintended writers corrupting the LogStream. Therefore, the field
* should be excluded from calls to any calls which retrieve LogStream
* metadata (i.e.: `GetLogStream`).
*
* Bytes written to this resource must to be readable when `ByteStream.Read`
* is called with the `name` resource.
* Reading a write_resource_name must return an INVALID_ARGUMENT error.
* ```
*
* `string write_resource_name = 2;`
*/
public fun clearWriteResourceName() {
_builder.clearWriteResourceName()
}
}
}
@kotlin.jvm.JvmSynthetic
public inline fun build.bazel.remote.logstream.v1.LogStream.copy(block: `build.bazel.remote.logstream.v1`.LogStreamKt.Dsl.() -> kotlin.Unit): build.bazel.remote.logstream.v1.LogStream =
`build.bazel.remote.logstream.v1`.LogStreamKt.Dsl._create(this.toBuilder()).apply { block() }._build()