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

com.google.bytestream.WriteRequestKt.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("-initializewriteRequest")
public inline fun writeRequest(block: com.google.bytestream.WriteRequestKt.Dsl.() -> kotlin.Unit): com.google.bytestream.ByteStreamProto.WriteRequest =
  com.google.bytestream.WriteRequestKt.Dsl._create(com.google.bytestream.ByteStreamProto.WriteRequest.newBuilder()).apply { block() }._build()
/**
 * ```
 * Request object for ByteStream.Write.
 * ```
 *
 * Protobuf type `google.bytestream.WriteRequest`
 */
public object WriteRequestKt {
  @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.WriteRequest.Builder
  ) {
    public companion object {
      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _create(builder: com.google.bytestream.ByteStreamProto.WriteRequest.Builder): Dsl = Dsl(builder)
    }

    @kotlin.jvm.JvmSynthetic
    @kotlin.PublishedApi
    internal fun _build(): com.google.bytestream.ByteStreamProto.WriteRequest = _builder.build()

    /**
     * ```
     * The name of the resource to write. This **must** be set on the first
     * `WriteRequest` of each `Write()` action. If it is set on subsequent calls,
     * it **must** match the value of the first request.
     * ```
     *
     * `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 write. This **must** be set on the first
     * `WriteRequest` of each `Write()` action. If it is set on subsequent calls,
     * it **must** match the value of the first request.
     * ```
     *
     * `string resource_name = 1;`
     */
    public fun clearResourceName() {
      _builder.clearResourceName()
    }

    /**
     * ```
     * The offset from the beginning of the resource at which the data should be
     * written. It is required on all `WriteRequest`s.
     *
     * In the first `WriteRequest` of a `Write()` action, it indicates
     * the initial offset for the `Write()` call. The value **must** be equal to
     * the `committed_size` that a call to `QueryWriteStatus()` would return.
     *
     * On subsequent calls, this value **must** be set and **must** be equal to
     * the sum of the first `write_offset` and the sizes of all `data` bundles
     * sent previously on this stream.
     *
     * An incorrect value will cause an error.
     * ```
     *
     * `int64 write_offset = 2;`
     */
    public var writeOffset: kotlin.Long
      @JvmName("getWriteOffset")
      get() = _builder.getWriteOffset()
      @JvmName("setWriteOffset")
      set(value) {
        _builder.setWriteOffset(value)
      }
    /**
     * ```
     * The offset from the beginning of the resource at which the data should be
     * written. It is required on all `WriteRequest`s.
     *
     * In the first `WriteRequest` of a `Write()` action, it indicates
     * the initial offset for the `Write()` call. The value **must** be equal to
     * the `committed_size` that a call to `QueryWriteStatus()` would return.
     *
     * On subsequent calls, this value **must** be set and **must** be equal to
     * the sum of the first `write_offset` and the sizes of all `data` bundles
     * sent previously on this stream.
     *
     * An incorrect value will cause an error.
     * ```
     *
     * `int64 write_offset = 2;`
     */
    public fun clearWriteOffset() {
      _builder.clearWriteOffset()
    }

    /**
     * ```
     * If `true`, this indicates that the write is complete. Sending any
     * `WriteRequest`s subsequent to one in which `finish_write` is `true` will
     * cause an error.
     * ```
     *
     * `bool finish_write = 3;`
     */
    public var finishWrite: kotlin.Boolean
      @JvmName("getFinishWrite")
      get() = _builder.getFinishWrite()
      @JvmName("setFinishWrite")
      set(value) {
        _builder.setFinishWrite(value)
      }
    /**
     * ```
     * If `true`, this indicates that the write is complete. Sending any
     * `WriteRequest`s subsequent to one in which `finish_write` is `true` will
     * cause an error.
     * ```
     *
     * `bool finish_write = 3;`
     */
    public fun clearFinishWrite() {
      _builder.clearFinishWrite()
    }

    /**
     * ```
     * A portion of the data for the resource. The client **may** leave `data`
     * empty for any given `WriteRequest`. This enables the client to inform the
     * service that the request is still live while it is running an operation to
     * generate more data.
     * ```
     *
     * `bytes data = 10;`
     */
    public var data: com.google.protobuf.ByteString
      @JvmName("getData")
      get() = _builder.getData()
      @JvmName("setData")
      set(value) {
        _builder.setData(value)
      }
    /**
     * ```
     * A portion of the data for the resource. The client **may** leave `data`
     * empty for any given `WriteRequest`. This enables the client to inform the
     * service that the request is still live while it is running an operation to
     * generate more data.
     * ```
     *
     * `bytes data = 10;`
     */
    public fun clearData() {
      _builder.clearData()
    }
  }
}
@kotlin.jvm.JvmSynthetic
public inline fun com.google.bytestream.ByteStreamProto.WriteRequest.copy(block: `com.google.bytestream`.WriteRequestKt.Dsl.() -> kotlin.Unit): com.google.bytestream.ByteStreamProto.WriteRequest =
  `com.google.bytestream`.WriteRequestKt.Dsl._create(this.toBuilder()).apply { block() }._build()





© 2015 - 2024 Weber Informatics LLC | Privacy Policy