Class RestoreObjectRequest.Builder (2.37.0)

public static final class RestoreObjectRequest.Builder extends GeneratedMessageV3.Builder<RestoreObjectRequest.Builder> implements RestoreObjectRequestOrBuilder

Message for restoring an object. bucket, object, and generation must be set.

Protobuf type google.storage.v2.RestoreObjectRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public RestoreObjectRequest build()
Returns
Type Description
RestoreObjectRequest

buildPartial()

public RestoreObjectRequest buildPartial()
Returns
Type Description
RestoreObjectRequest

clear()

public RestoreObjectRequest.Builder clear()
Returns
Type Description
RestoreObjectRequest.Builder
Overrides

clearBucket()

public RestoreObjectRequest.Builder clearBucket()

Required. Name of the bucket in which the object resides.

string bucket = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
RestoreObjectRequest.Builder

This builder for chaining.

clearCommonObjectRequestParams()

public RestoreObjectRequest.Builder clearCommonObjectRequestParams()

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 8;

Returns
Type Description
RestoreObjectRequest.Builder

clearCopySourceAcl()

public RestoreObjectRequest.Builder clearCopySourceAcl()

If false or unset, the bucket's default object ACL will be used. If true, copy the source object's access controls. Return an error if bucket has UBLA enabled.

optional bool copy_source_acl = 9;

Returns
Type Description
RestoreObjectRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public RestoreObjectRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
RestoreObjectRequest.Builder
Overrides

clearGeneration()

public RestoreObjectRequest.Builder clearGeneration()

Required. The specific revision of the object to restore.

int64 generation = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
RestoreObjectRequest.Builder

This builder for chaining.

clearIfGenerationMatch()

public RestoreObjectRequest.Builder clearIfGenerationMatch()

Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.

optional int64 if_generation_match = 4;

Returns
Type Description
RestoreObjectRequest.Builder

This builder for chaining.

clearIfGenerationNotMatch()

public RestoreObjectRequest.Builder clearIfGenerationNotMatch()

Makes the operation conditional on whether the object's live generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

optional int64 if_generation_not_match = 5;

Returns
Type Description
RestoreObjectRequest.Builder

This builder for chaining.

clearIfMetagenerationMatch()

public RestoreObjectRequest.Builder clearIfMetagenerationMatch()

Makes the operation conditional on whether the object's current metageneration matches the given value.

optional int64 if_metageneration_match = 6;

Returns
Type Description
RestoreObjectRequest.Builder

This builder for chaining.

clearIfMetagenerationNotMatch()

public RestoreObjectRequest.Builder clearIfMetagenerationNotMatch()

Makes the operation conditional on whether the object's current metageneration does not match the given value.

optional int64 if_metageneration_not_match = 7;

Returns
Type Description
RestoreObjectRequest.Builder

This builder for chaining.

clearObject()

public RestoreObjectRequest.Builder clearObject()

Required. The name of the object to restore.

string object = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
RestoreObjectRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public RestoreObjectRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
RestoreObjectRequest.Builder
Overrides

clone()

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

getBucket()

public String getBucket()

Required. Name of the bucket in which the object resides.

string bucket = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The bucket.

getBucketBytes()

public ByteString getBucketBytes()

Required. Name of the bucket in which the object resides.

string bucket = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for bucket.

getCommonObjectRequestParams()

public CommonObjectRequestParams getCommonObjectRequestParams()

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 8;

Returns
Type Description
CommonObjectRequestParams

The commonObjectRequestParams.

getCommonObjectRequestParamsBuilder()

public CommonObjectRequestParams.Builder getCommonObjectRequestParamsBuilder()

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 8;

Returns
Type Description
CommonObjectRequestParams.Builder

getCommonObjectRequestParamsOrBuilder()

public CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder()

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 8;

Returns
Type Description
CommonObjectRequestParamsOrBuilder

getCopySourceAcl()

public boolean getCopySourceAcl()

If false or unset, the bucket's default object ACL will be used. If true, copy the source object's access controls. Return an error if bucket has UBLA enabled.

optional bool copy_source_acl = 9;

Returns
Type Description
boolean

The copySourceAcl.

getDefaultInstanceForType()

public RestoreObjectRequest getDefaultInstanceForType()
Returns
Type Description
RestoreObjectRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getGeneration()

public long getGeneration()

Required. The specific revision of the object to restore.

int64 generation = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
long

The generation.

getIfGenerationMatch()

public long getIfGenerationMatch()

Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.

optional int64 if_generation_match = 4;

Returns
Type Description
long

The ifGenerationMatch.

getIfGenerationNotMatch()

public long getIfGenerationNotMatch()

Makes the operation conditional on whether the object's live generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

optional int64 if_generation_not_match = 5;

Returns
Type Description
long

The ifGenerationNotMatch.

getIfMetagenerationMatch()

public long getIfMetagenerationMatch()

Makes the operation conditional on whether the object's current metageneration matches the given value.

optional int64 if_metageneration_match = 6;

Returns
Type Description
long

The ifMetagenerationMatch.

getIfMetagenerationNotMatch()

public long getIfMetagenerationNotMatch()

Makes the operation conditional on whether the object's current metageneration does not match the given value.

optional int64 if_metageneration_not_match = 7;

Returns
Type Description
long

The ifMetagenerationNotMatch.

getObject()

public String getObject()

Required. The name of the object to restore.

string object = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The object.

getObjectBytes()

public ByteString getObjectBytes()

Required. The name of the object to restore.

string object = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for object.

hasCommonObjectRequestParams()

public boolean hasCommonObjectRequestParams()

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 8;

Returns
Type Description
boolean

Whether the commonObjectRequestParams field is set.

hasCopySourceAcl()

public boolean hasCopySourceAcl()

If false or unset, the bucket's default object ACL will be used. If true, copy the source object's access controls. Return an error if bucket has UBLA enabled.

optional bool copy_source_acl = 9;

Returns
Type Description
boolean

Whether the copySourceAcl field is set.

hasIfGenerationMatch()

public boolean hasIfGenerationMatch()

Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.

optional int64 if_generation_match = 4;

Returns
Type Description
boolean

Whether the ifGenerationMatch field is set.

hasIfGenerationNotMatch()

public boolean hasIfGenerationNotMatch()

Makes the operation conditional on whether the object's live generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

optional int64 if_generation_not_match = 5;

Returns
Type Description
boolean

Whether the ifGenerationNotMatch field is set.

hasIfMetagenerationMatch()

public boolean hasIfMetagenerationMatch()

Makes the operation conditional on whether the object's current metageneration matches the given value.

optional int64 if_metageneration_match = 6;

Returns
Type Description
boolean

Whether the ifMetagenerationMatch field is set.

hasIfMetagenerationNotMatch()

public boolean hasIfMetagenerationNotMatch()

Makes the operation conditional on whether the object's current metageneration does not match the given value.

optional int64 if_metageneration_not_match = 7;

Returns
Type Description
boolean

Whether the ifMetagenerationNotMatch field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCommonObjectRequestParams(CommonObjectRequestParams value)

public RestoreObjectRequest.Builder mergeCommonObjectRequestParams(CommonObjectRequestParams value)

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 8;

Parameter
Name Description
value CommonObjectRequestParams
Returns
Type Description
RestoreObjectRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public RestoreObjectRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
RestoreObjectRequest.Builder
Overrides

mergeFrom(RestoreObjectRequest other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final RestoreObjectRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
RestoreObjectRequest.Builder
Overrides

setBucket(String value)

public RestoreObjectRequest.Builder setBucket(String value)

Required. Name of the bucket in which the object resides.

string bucket = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The bucket to set.

Returns
Type Description
RestoreObjectRequest.Builder

This builder for chaining.

setBucketBytes(ByteString value)

public RestoreObjectRequest.Builder setBucketBytes(ByteString value)

Required. Name of the bucket in which the object resides.

string bucket = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for bucket to set.

Returns
Type Description
RestoreObjectRequest.Builder

This builder for chaining.

setCommonObjectRequestParams(CommonObjectRequestParams value)

public RestoreObjectRequest.Builder setCommonObjectRequestParams(CommonObjectRequestParams value)

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 8;

Parameter
Name Description
value CommonObjectRequestParams
Returns
Type Description
RestoreObjectRequest.Builder

setCommonObjectRequestParams(CommonObjectRequestParams.Builder builderForValue)

public RestoreObjectRequest.Builder setCommonObjectRequestParams(CommonObjectRequestParams.Builder builderForValue)

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 8;

Parameter
Name Description
builderForValue CommonObjectRequestParams.Builder
Returns
Type Description
RestoreObjectRequest.Builder

setCopySourceAcl(boolean value)

public RestoreObjectRequest.Builder setCopySourceAcl(boolean value)

If false or unset, the bucket's default object ACL will be used. If true, copy the source object's access controls. Return an error if bucket has UBLA enabled.

optional bool copy_source_acl = 9;

Parameter
Name Description
value boolean

The copySourceAcl to set.

Returns
Type Description
RestoreObjectRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setGeneration(long value)

public RestoreObjectRequest.Builder setGeneration(long value)

Required. The specific revision of the object to restore.

int64 generation = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value long

The generation to set.

Returns
Type Description
RestoreObjectRequest.Builder

This builder for chaining.

setIfGenerationMatch(long value)

public RestoreObjectRequest.Builder setIfGenerationMatch(long value)

Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.

optional int64 if_generation_match = 4;

Parameter
Name Description
value long

The ifGenerationMatch to set.

Returns
Type Description
RestoreObjectRequest.Builder

This builder for chaining.

setIfGenerationNotMatch(long value)

public RestoreObjectRequest.Builder setIfGenerationNotMatch(long value)

Makes the operation conditional on whether the object's live generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

optional int64 if_generation_not_match = 5;

Parameter
Name Description
value long

The ifGenerationNotMatch to set.

Returns
Type Description
RestoreObjectRequest.Builder

This builder for chaining.

setIfMetagenerationMatch(long value)

public RestoreObjectRequest.Builder setIfMetagenerationMatch(long value)

Makes the operation conditional on whether the object's current metageneration matches the given value.

optional int64 if_metageneration_match = 6;

Parameter
Name Description
value long

The ifMetagenerationMatch to set.

Returns
Type Description
RestoreObjectRequest.Builder

This builder for chaining.

setIfMetagenerationNotMatch(long value)

public RestoreObjectRequest.Builder setIfMetagenerationNotMatch(long value)

Makes the operation conditional on whether the object's current metageneration does not match the given value.

optional int64 if_metageneration_not_match = 7;

Parameter
Name Description
value long

The ifMetagenerationNotMatch to set.

Returns
Type Description
RestoreObjectRequest.Builder

This builder for chaining.

setObject(String value)

public RestoreObjectRequest.Builder setObject(String value)

Required. The name of the object to restore.

string object = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The object to set.

Returns
Type Description
RestoreObjectRequest.Builder

This builder for chaining.

setObjectBytes(ByteString value)

public RestoreObjectRequest.Builder setObjectBytes(ByteString value)

Required. The name of the object to restore.

string object = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for object to set.

Returns
Type Description
RestoreObjectRequest.Builder

This builder for chaining.

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

public RestoreObjectRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
RestoreObjectRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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