Package com.google.longrunning
Class Operation.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessage.ExtendableBuilder<com.google.protobuf.GeneratedMessageV3,BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<Operation.Builder>
-
- com.google.longrunning.Operation.Builder
-
- All Implemented Interfaces:
OperationOrBuilder
,com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,java.lang.Cloneable
- Enclosing class:
- Operation
public static final class Operation.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Operation.Builder> implements OperationOrBuilder
This resource represents a long-running operation that is the result of a network API call.
Protobuf typegoogle.longrunning.Operation
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Operation.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Operation
build()
Operation
buildPartial()
Operation.Builder
clear()
Operation.Builder
clearDone()
If the value is `false`, it means the operation is still in progress.Operation.Builder
clearError()
The error result of the operation in case of failure or cancellation.Operation.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
Operation.Builder
clearMetadata()
Service-specific metadata associated with the operation.Operation.Builder
clearName()
The server-assigned name, which is only unique within the same service that originally returns it.Operation.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
Operation.Builder
clearResponse()
The normal response of the operation in case of success.Operation.Builder
clearResult()
Operation.Builder
clone()
Operation
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
boolean
getDone()
If the value is `false`, it means the operation is still in progress.Status
getError()
The error result of the operation in case of failure or cancellation.Status.Builder
getErrorBuilder()
The error result of the operation in case of failure or cancellation.StatusOrBuilder
getErrorOrBuilder()
The error result of the operation in case of failure or cancellation.com.google.protobuf.Any
getMetadata()
Service-specific metadata associated with the operation.com.google.protobuf.Any.Builder
getMetadataBuilder()
Service-specific metadata associated with the operation.com.google.protobuf.AnyOrBuilder
getMetadataOrBuilder()
Service-specific metadata associated with the operation.java.lang.String
getName()
The server-assigned name, which is only unique within the same service that originally returns it.com.google.protobuf.ByteString
getNameBytes()
The server-assigned name, which is only unique within the same service that originally returns it.com.google.protobuf.Any
getResponse()
The normal response of the operation in case of success.com.google.protobuf.Any.Builder
getResponseBuilder()
The normal response of the operation in case of success.com.google.protobuf.AnyOrBuilder
getResponseOrBuilder()
The normal response of the operation in case of success.Operation.ResultCase
getResultCase()
boolean
hasError()
The error result of the operation in case of failure or cancellation.boolean
hasMetadata()
Service-specific metadata associated with the operation.boolean
hasResponse()
The normal response of the operation in case of success.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
Operation.Builder
mergeError(Status value)
The error result of the operation in case of failure or cancellation.Operation.Builder
mergeFrom(Operation other)
Operation.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Operation.Builder
mergeFrom(com.google.protobuf.Message other)
Operation.Builder
mergeMetadata(com.google.protobuf.Any value)
Service-specific metadata associated with the operation.Operation.Builder
mergeResponse(com.google.protobuf.Any value)
The normal response of the operation in case of success.Operation.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
Operation.Builder
setDone(boolean value)
If the value is `false`, it means the operation is still in progress.Operation.Builder
setError(Status value)
The error result of the operation in case of failure or cancellation.Operation.Builder
setError(Status.Builder builderForValue)
The error result of the operation in case of failure or cancellation.Operation.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Operation.Builder
setMetadata(com.google.protobuf.Any value)
Service-specific metadata associated with the operation.Operation.Builder
setMetadata(com.google.protobuf.Any.Builder builderForValue)
Service-specific metadata associated with the operation.Operation.Builder
setName(java.lang.String value)
The server-assigned name, which is only unique within the same service that originally returns it.Operation.Builder
setNameBytes(com.google.protobuf.ByteString value)
The server-assigned name, which is only unique within the same service that originally returns it.Operation.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
Operation.Builder
setResponse(com.google.protobuf.Any value)
The normal response of the operation in case of success.Operation.Builder
setResponse(com.google.protobuf.Any.Builder builderForValue)
The normal response of the operation in case of success.Operation.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessage.ExtendableBuilder
addExtension, clearExtension, extensionsAreInitialized, getAllFields, getExtension, getExtension, getExtensionCount, getField, getFieldBuilder, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, hasExtension, hasField, mergeExtensionFields, newBuilderForField, parseUnknownField, setExtension, setExtension
-
Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
getOneofFieldDescriptor, getUnknownFields, getUnknownFieldSetBuilder, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, onBuilt, onChanged, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Overrides:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Operation.Builder>
-
clear
public Operation.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<Operation.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessage.Builder<Operation.Builder>
-
getDefaultInstanceForType
public Operation getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public Operation build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Operation buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Operation.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<Operation.Builder>
-
setField
public Operation.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Operation.Builder>
-
clearField
public Operation.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Operation.Builder>
-
clearOneof
public Operation.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<Operation.Builder>
-
setRepeatedField
public Operation.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Operation.Builder>
-
addRepeatedField
public Operation.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Operation.Builder>
-
mergeFrom
public Operation.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Operation.Builder>
-
mergeFrom
public Operation.Builder mergeFrom(Operation other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.ExtendableBuilder<com.google.protobuf.GeneratedMessageV3,Operation.Builder>
-
mergeFrom
public Operation.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Operation.Builder>
- Throws:
java.io.IOException
-
getResultCase
public Operation.ResultCase getResultCase()
- Specified by:
getResultCase
in interfaceOperationOrBuilder
-
clearResult
public Operation.Builder clearResult()
-
getName
public java.lang.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;
- Specified by:
getName
in interfaceOperationOrBuilder
- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.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;
- Specified by:
getNameBytes
in interfaceOperationOrBuilder
- Returns:
- The bytes for name.
-
setName
public Operation.Builder setName(java.lang.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;
- Parameters:
value
- The name to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
setNameBytes
public Operation.Builder setNameBytes(com.google.protobuf.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;
- Parameters:
value
- The bytes for name to set.- Returns:
- This builder for chaining.
-
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;
- Specified by:
hasMetadata
in interfaceOperationOrBuilder
- Returns:
- Whether the metadata field is set.
-
getMetadata
public com.google.protobuf.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;
- Specified by:
getMetadata
in interfaceOperationOrBuilder
- Returns:
- The metadata.
-
setMetadata
public Operation.Builder setMetadata(com.google.protobuf.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;
-
setMetadata
public Operation.Builder setMetadata(com.google.protobuf.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;
-
mergeMetadata
public Operation.Builder mergeMetadata(com.google.protobuf.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;
-
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;
-
getMetadataBuilder
public com.google.protobuf.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;
-
getMetadataOrBuilder
public com.google.protobuf.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;
- Specified by:
getMetadataOrBuilder
in interfaceOperationOrBuilder
-
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;
- Specified by:
getDone
in interfaceOperationOrBuilder
- Returns:
- The done.
-
setDone
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;
- Parameters:
value
- The done to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
hasError
public boolean hasError()
The error result of the operation in case of failure or cancellation.
.google.rpc.Status error = 4;
- Specified by:
hasError
in interfaceOperationOrBuilder
- Returns:
- Whether the error field is set.
-
getError
public Status getError()
The error result of the operation in case of failure or cancellation.
.google.rpc.Status error = 4;
- Specified by:
getError
in interfaceOperationOrBuilder
- Returns:
- The error.
-
setError
public Operation.Builder setError(Status value)
The error result of the operation in case of failure or cancellation.
.google.rpc.Status error = 4;
-
setError
public Operation.Builder setError(Status.Builder builderForValue)
The error result of the operation in case of failure or cancellation.
.google.rpc.Status error = 4;
-
mergeError
public Operation.Builder mergeError(Status value)
The error result of the operation in case of failure or cancellation.
.google.rpc.Status error = 4;
-
clearError
public Operation.Builder clearError()
The error result of the operation in case of failure or cancellation.
.google.rpc.Status error = 4;
-
getErrorBuilder
public Status.Builder getErrorBuilder()
The error result of the operation in case of failure or cancellation.
.google.rpc.Status error = 4;
-
getErrorOrBuilder
public StatusOrBuilder getErrorOrBuilder()
The error result of the operation in case of failure or cancellation.
.google.rpc.Status error = 4;
- Specified by:
getErrorOrBuilder
in interfaceOperationOrBuilder
-
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;
- Specified by:
hasResponse
in interfaceOperationOrBuilder
- Returns:
- Whether the response field is set.
-
getResponse
public com.google.protobuf.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;
- Specified by:
getResponse
in interfaceOperationOrBuilder
- Returns:
- The response.
-
setResponse
public Operation.Builder setResponse(com.google.protobuf.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;
-
setResponse
public Operation.Builder setResponse(com.google.protobuf.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;
-
mergeResponse
public Operation.Builder mergeResponse(com.google.protobuf.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;
-
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;
-
getResponseBuilder
public com.google.protobuf.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;
-
getResponseOrBuilder
public com.google.protobuf.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;
- Specified by:
getResponseOrBuilder
in interfaceOperationOrBuilder
-
setUnknownFields
public final Operation.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Operation.Builder>
-
mergeUnknownFields
public final Operation.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Operation.Builder>
-
-