Class Operation.Builder (2.10.0)

Stay organized with collections Save and categorize content based on your preferences.
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
TypeDescription
Descriptor

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

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