com.google.bytestream.ReadRequestKt.kt Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/bytestream/bytestream.proto
// Generated files should ignore deprecation warnings
@file:Suppress("DEPRECATION")
package com.google.bytestream;
@kotlin.jvm.JvmName("-initializereadRequest")
public inline fun readRequest(block: com.google.bytestream.ReadRequestKt.Dsl.() -> kotlin.Unit): com.google.bytestream.ByteStreamProto.ReadRequest =
com.google.bytestream.ReadRequestKt.Dsl._create(com.google.bytestream.ByteStreamProto.ReadRequest.newBuilder()).apply { block() }._build()
/**
* ```
* Request object for ByteStream.Read.
* ```
*
* Protobuf type `google.bytestream.ReadRequest`
*/
public object ReadRequestKt {
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
@com.google.protobuf.kotlin.ProtoDslMarker
public class Dsl private constructor(
private val _builder: com.google.bytestream.ByteStreamProto.ReadRequest.Builder
) {
public companion object {
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _create(builder: com.google.bytestream.ByteStreamProto.ReadRequest.Builder): Dsl = Dsl(builder)
}
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _build(): com.google.bytestream.ByteStreamProto.ReadRequest = _builder.build()
/**
* ```
* The name of the resource to read.
* ```
*
* `string resource_name = 1;`
*/
public var resourceName: kotlin.String
@JvmName("getResourceName")
get() = _builder.getResourceName()
@JvmName("setResourceName")
set(value) {
_builder.setResourceName(value)
}
/**
* ```
* The name of the resource to read.
* ```
*
* `string resource_name = 1;`
*/
public fun clearResourceName() {
_builder.clearResourceName()
}
/**
* ```
* The offset for the first byte to return in the read, relative to the start
* of the resource.
*
* A `read_offset` that is negative or greater than the size of the resource
* will cause an `OUT_OF_RANGE` error.
* ```
*
* `int64 read_offset = 2;`
*/
public var readOffset: kotlin.Long
@JvmName("getReadOffset")
get() = _builder.getReadOffset()
@JvmName("setReadOffset")
set(value) {
_builder.setReadOffset(value)
}
/**
* ```
* The offset for the first byte to return in the read, relative to the start
* of the resource.
*
* A `read_offset` that is negative or greater than the size of the resource
* will cause an `OUT_OF_RANGE` error.
* ```
*
* `int64 read_offset = 2;`
*/
public fun clearReadOffset() {
_builder.clearReadOffset()
}
/**
* ```
* The maximum number of `data` bytes the server is allowed to return in the
* sum of all `ReadResponse` messages. A `read_limit` of zero indicates that
* there is no limit, and a negative `read_limit` will cause an error.
*
* If the stream returns fewer bytes than allowed by the `read_limit` and no
* error occurred, the stream includes all data from the `read_offset` to the
* end of the resource.
* ```
*
* `int64 read_limit = 3;`
*/
public var readLimit: kotlin.Long
@JvmName("getReadLimit")
get() = _builder.getReadLimit()
@JvmName("setReadLimit")
set(value) {
_builder.setReadLimit(value)
}
/**
* ```
* The maximum number of `data` bytes the server is allowed to return in the
* sum of all `ReadResponse` messages. A `read_limit` of zero indicates that
* there is no limit, and a negative `read_limit` will cause an error.
*
* If the stream returns fewer bytes than allowed by the `read_limit` and no
* error occurred, the stream includes all data from the `read_offset` to the
* end of the resource.
* ```
*
* `int64 read_limit = 3;`
*/
public fun clearReadLimit() {
_builder.clearReadLimit()
}
}
}
@kotlin.jvm.JvmSynthetic
public inline fun com.google.bytestream.ByteStreamProto.ReadRequest.copy(block: `com.google.bytestream`.ReadRequestKt.Dsl.() -> kotlin.Unit): com.google.bytestream.ByteStreamProto.ReadRequest =
`com.google.bytestream`.ReadRequestKt.Dsl._create(this.toBuilder()).apply { block() }._build()