Class Operation.Builder (2.42.0)

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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Operation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Operation.Builder
Overrides

build()

public Operation build()
Returns
Type Description
Operation

buildPartial()

public Operation buildPartial()
Returns
Type Description
Operation

clear()

public Operation.Builder clear()
Returns
Type Description
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
Type Description
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
Type Description
Operation.Builder

clearField(Descriptors.FieldDescriptor field)

public Operation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
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
Type Description
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
Type Description
Operation.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Operation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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
Type Description
Operation.Builder

clearResult()

public Operation.Builder clearResult()
Returns
Type Description
Operation.Builder

clone()

public Operation.Builder clone()
Returns
Type Description
Operation.Builder
Overrides

getDefaultInstanceForType()

public Operation getDefaultInstanceForType()
Returns
Type Description
Operation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
Status.Builder

getErrorOrBuilder()

public StatusOrBuilder getErrorOrBuilder()

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

.google.rpc.Status error = 4;

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
AnyOrBuilder

getResultCase()

public Operation.ResultCase getResultCase()
Returns
Type Description
Operation.ResultCase

hasError()

public boolean hasError()

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

.google.rpc.Status error = 4;

Returns
Type Description
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
Type Description
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
Type Description
boolean

Whether the response field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
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
Name Description
value Status
Returns
Type Description
Operation.Builder

mergeFrom(Operation other)

public Operation.Builder mergeFrom(Operation other)
Parameter
Name Description
other Operation
Returns
Type Description
Operation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Operation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Operation.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Operation.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
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
Name Description
value Any
Returns
Type Description
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
Name Description
value Any
Returns
Type Description
Operation.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Operation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value boolean

The done to set.

Returns
Type Description
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
Name Description
value Status
Returns
Type Description
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
Name Description
builderForValue Status.Builder
Returns
Type Description
Operation.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Operation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
value Any
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
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
Name Description
value String

The name to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
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
Name Description
value Any
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
Operation.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Operation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Operation.Builder
Overrides