Class Operation.Builder

public static final class Operation.Builder extends GeneratedMessageV3.Builder<Operation.Builder> implements OperationOrBuilder

This resource represents a long-running operation that is the result of a network API call.

Protobuf type google.longrunning.Operation

Implements

OperationOrBuilder

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Operation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Operation.Builder
Overrides

build()

public Operation build()
Returns
TypeDescription
Operation

buildPartial()

public Operation buildPartial()
Returns
TypeDescription
Operation

clear()

public Operation.Builder clear()
Returns
TypeDescription
Operation.Builder
Overrides

clearDone()

public Operation.Builder clearDone()

If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.

bool done = 3;

Returns
TypeDescription
Operation.Builder

This builder for chaining.

clearError()

public Operation.Builder clearError()

The error result of the operation in case of failure or cancellation.

.google.rpc.Status error = 4;

Returns
TypeDescription
Operation.Builder

clearField(Descriptors.FieldDescriptor field)

public Operation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Operation.Builder
Overrides

clearMetadata()

public Operation.Builder clearMetadata()

Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.

.google.protobuf.Any metadata = 2;

Returns
TypeDescription
Operation.Builder

clearName()

public Operation.Builder clearName()

The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.

string name = 1;

Returns
TypeDescription
Operation.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Operation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Operation.Builder
Overrides

clearResponse()

public Operation.Builder clearResponse()

The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.

.google.protobuf.Any response = 5;

Returns
TypeDescription
Operation.Builder

clearResult()

public Operation.Builder clearResult()
Returns
TypeDescription
Operation.Builder

clone()

public Operation.Builder clone()
Returns
TypeDescription
Operation.Builder
Overrides

getDefaultInstanceForType()

public Operation getDefaultInstanceForType()
Returns
TypeDescription
Operation

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDone()

public boolean getDone()

If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.

bool done = 3;

Returns
TypeDescription
boolean

The done.

getError()

public Status getError()

The error result of the operation in case of failure or cancellation.

.google.rpc.Status error = 4;

Returns
TypeDescription
Status

The error.

getErrorBuilder()

public Status.Builder getErrorBuilder()

The error result of the operation in case of failure or cancellation.

.google.rpc.Status error = 4;

Returns
TypeDescription
Status.Builder

getErrorOrBuilder()

public StatusOrBuilder getErrorOrBuilder()

The error result of the operation in case of failure or cancellation.

.google.rpc.Status error = 4;

Returns
TypeDescription
StatusOrBuilder

getMetadata()

public Any getMetadata()

Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.

.google.protobuf.Any metadata = 2;

Returns
TypeDescription
Any

The metadata.

getMetadataBuilder()

public Any.Builder getMetadataBuilder()

Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.

.google.protobuf.Any metadata = 2;

Returns
TypeDescription
Builder

getMetadataOrBuilder()

public AnyOrBuilder getMetadataOrBuilder()

Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.

.google.protobuf.Any metadata = 2;

Returns
TypeDescription
AnyOrBuilder

getName()

public String getName()

The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getResponse()

public Any getResponse()

The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.

.google.protobuf.Any response = 5;

Returns
TypeDescription
Any

The response.

getResponseBuilder()

public Any.Builder getResponseBuilder()

The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.

.google.protobuf.Any response = 5;

Returns
TypeDescription
Builder

getResponseOrBuilder()

public AnyOrBuilder getResponseOrBuilder()

The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.

.google.protobuf.Any response = 5;

Returns
TypeDescription
AnyOrBuilder

getResultCase()

public Operation.ResultCase getResultCase()
Returns
TypeDescription
Operation.ResultCase

hasError()

public boolean hasError()

The error result of the operation in case of failure or cancellation.

.google.rpc.Status error = 4;

Returns
TypeDescription
boolean

Whether the error field is set.

hasMetadata()

public boolean hasMetadata()

Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.

.google.protobuf.Any metadata = 2;

Returns
TypeDescription
boolean

Whether the metadata field is set.

hasResponse()

public boolean hasResponse()

The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.

.google.protobuf.Any response = 5;

Returns
TypeDescription
boolean

Whether the response field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeError(Status value)

public Operation.Builder mergeError(Status value)

The error result of the operation in case of failure or cancellation.

.google.rpc.Status error = 4;

Parameter
NameDescription
valueStatus
Returns
TypeDescription
Operation.Builder

mergeFrom(Operation other)

public Operation.Builder mergeFrom(Operation other)
Parameter
NameDescription
otherOperation
Returns
TypeDescription
Operation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Operation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Operation.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Operation.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Operation.Builder
Overrides

mergeMetadata(Any value)

public Operation.Builder mergeMetadata(Any value)

Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.

.google.protobuf.Any metadata = 2;

Parameter
NameDescription
valueAny
Returns
TypeDescription
Operation.Builder

mergeResponse(Any value)

public Operation.Builder mergeResponse(Any value)

The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.

.google.protobuf.Any response = 5;

Parameter
NameDescription
valueAny
Returns
TypeDescription
Operation.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Operation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Operation.Builder
Overrides

setDone(boolean value)

public Operation.Builder setDone(boolean value)

If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.

bool done = 3;

Parameter
NameDescription
valueboolean

The done to set.

Returns
TypeDescription
Operation.Builder

This builder for chaining.

setError(Status value)

public Operation.Builder setError(Status value)

The error result of the operation in case of failure or cancellation.

.google.rpc.Status error = 4;

Parameter
NameDescription
valueStatus
Returns
TypeDescription
Operation.Builder

setError(Status.Builder builderForValue)

public Operation.Builder setError(Status.Builder builderForValue)

The error result of the operation in case of failure or cancellation.

.google.rpc.Status error = 4;

Parameter
NameDescription
builderForValueStatus.Builder
Returns
TypeDescription
Operation.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Operation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Operation.Builder
Overrides

setMetadata(Any value)

public Operation.Builder setMetadata(Any value)

Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.

.google.protobuf.Any metadata = 2;

Parameter
NameDescription
valueAny
Returns
TypeDescription
Operation.Builder

setMetadata(Any.Builder builderForValue)

public Operation.Builder setMetadata(Any.Builder builderForValue)

Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.

.google.protobuf.Any metadata = 2;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Operation.Builder

setName(String value)

public Operation.Builder setName(String value)

The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Operation.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Operation.Builder setNameBytes(ByteString value)

The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Operation.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Operation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Operation.Builder
Overrides

setResponse(Any value)

public Operation.Builder setResponse(Any value)

The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.

.google.protobuf.Any response = 5;

Parameter
NameDescription
valueAny
Returns
TypeDescription
Operation.Builder

setResponse(Any.Builder builderForValue)

public Operation.Builder setResponse(Any.Builder builderForValue)

The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.

.google.protobuf.Any response = 5;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Operation.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Operation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Operation.Builder
Overrides