Package com.google.bytestream
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
-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance
-
Method Summary
Modifier and TypeMethodDescriptionA portion of the data for the resource.If `true`, this indicates that the write is complete.The name of the resource to write.The offset from the beginning of the resource at which the data should be written.com.google.protobuf.ByteString
getData()
A portion of the data for the resource.boolean
If `true`, this indicates that the write is complete.The name of the resource to write.com.google.protobuf.ByteString
The name of the resource to write.long
The offset from the beginning of the resource at which the data should be written.setData
(com.google.protobuf.ByteString value) A portion of the data for the resource.setFinishWrite
(boolean value) If `true`, this indicates that the write is complete.setResourceName
(String value) The name of the resource to write.setResourceNameBytes
(com.google.protobuf.ByteString value) The name of the resource to write.setWriteOffset
(long value) The offset from the beginning of the resource at which the data should be written.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
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 interfaceByteStreamProto.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 interfaceByteStreamProto.WriteRequestOrBuilder
- Returns:
- The bytes for resourceName.
-
setResourceName
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
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 interfaceByteStreamProto.WriteRequestOrBuilder
- Returns:
- The writeOffset.
-
setWriteOffset
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
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 interfaceByteStreamProto.WriteRequestOrBuilder
- Returns:
- The finishWrite.
-
setFinishWrite
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
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 interfaceByteStreamProto.WriteRequestOrBuilder
- Returns:
- The data.
-
setData
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.
-