Class ByteStreamProto.WriteRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<ByteStreamProto.WriteRequest,ByteStreamProto.WriteRequest.Builder>
com.google.bytestream.ByteStreamProto.WriteRequest.Builder
All Implemented Interfaces:
ByteStreamProto.WriteRequestOrBuilder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, Cloneable
Enclosing class:
ByteStreamProto.WriteRequest

public static final class ByteStreamProto.WriteRequest.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<ByteStreamProto.WriteRequest,ByteStreamProto.WriteRequest.Builder> implements ByteStreamProto.WriteRequestOrBuilder
 Request object for ByteStream.Write.
 
Protobuf type google.bytestream.WriteRequest
  • Method Details

    • getResourceName

      public String getResourceName()
       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 [json_name = "resourceName"];
      Specified by:
      getResourceName in interface ByteStreamProto.WriteRequestOrBuilder
      Returns:
      The resourceName.
    • getResourceNameBytes

      public com.google.protobuf.ByteString getResourceNameBytes()
       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 [json_name = "resourceName"];
      Specified by:
      getResourceNameBytes in interface ByteStreamProto.WriteRequestOrBuilder
      Returns:
      The bytes for resourceName.
    • setResourceName

      public ByteStreamProto.WriteRequest.Builder setResourceName(String 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 [json_name = "resourceName"];
      Parameters:
      value - The resourceName to set.
      Returns:
      This builder for chaining.
    • clearResourceName

      public ByteStreamProto.WriteRequest.Builder clearResourceName()
       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 [json_name = "resourceName"];
      Returns:
      This builder for chaining.
    • setResourceNameBytes

      public ByteStreamProto.WriteRequest.Builder setResourceNameBytes(com.google.protobuf.ByteString 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 [json_name = "resourceName"];
      Parameters:
      value - The bytes for resourceName to set.
      Returns:
      This builder for chaining.
    • getWriteOffset

      public long getWriteOffset()
       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 [json_name = "writeOffset"];
      Specified by:
      getWriteOffset in interface ByteStreamProto.WriteRequestOrBuilder
      Returns:
      The writeOffset.
    • setWriteOffset

      public ByteStreamProto.WriteRequest.Builder setWriteOffset(long 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 [json_name = "writeOffset"];
      Parameters:
      value - The writeOffset to set.
      Returns:
      This builder for chaining.
    • clearWriteOffset

      public ByteStreamProto.WriteRequest.Builder clearWriteOffset()
       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 [json_name = "writeOffset"];
      Returns:
      This builder for chaining.
    • getFinishWrite

      public boolean getFinishWrite()
       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 [json_name = "finishWrite"];
      Specified by:
      getFinishWrite in interface ByteStreamProto.WriteRequestOrBuilder
      Returns:
      The finishWrite.
    • setFinishWrite

      public ByteStreamProto.WriteRequest.Builder setFinishWrite(boolean 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 [json_name = "finishWrite"];
      Parameters:
      value - The finishWrite to set.
      Returns:
      This builder for chaining.
    • clearFinishWrite

      public ByteStreamProto.WriteRequest.Builder clearFinishWrite()
       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 [json_name = "finishWrite"];
      Returns:
      This builder for chaining.
    • getData

      public com.google.protobuf.ByteString getData()
       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 [json_name = "data"];
      Specified by:
      getData in interface ByteStreamProto.WriteRequestOrBuilder
      Returns:
      The data.
    • setData

      public ByteStreamProto.WriteRequest.Builder setData(com.google.protobuf.ByteString 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 [json_name = "data"];
      Parameters:
      value - The data to set.
      Returns:
      This builder for chaining.
    • clearData

       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 [json_name = "data"];
      Returns:
      This builder for chaining.