Class UploadResult.Builder (2.33.0)

public static final class UploadResult.Builder

Builds an instance of UploadResult See Also: UploadResult

Inheritance

java.lang.Object > UploadResult.Builder

Methods

build()

public UploadResult build()

Creates an UploadResult object.

Returns
Type Description
UploadResult UploadResult

setException(@NonNull Exception exception)

public UploadResult.Builder setException(@NonNull Exception exception)

Sets the exception produced by a failed upload operation. This field will only be populated if the Transfer was not successful or skipped See Also: UploadResult#getException()

Parameter
Name Description
exception @org.checkerframework.checker.nullness.qual.NonNull java.lang.Exception
Returns
Type Description
UploadResult.Builder

the Builder instance with the value for exception modified.

setInput(@NonNull BlobInfo input)

public UploadResult.Builder setInput(@NonNull BlobInfo input)

Sets the BlobInfo for the object request for upload. This field is required. See Also: UploadResult#getInput()

Parameter
Name Description
input @org.checkerframework.checker.nullness.qual.NonNull com.google.cloud.storage.BlobInfo
Returns
Type Description
UploadResult.Builder

the Builder instance with the value for BlobInfo modified.

setStatus(@NonNull TransferStatus status)

public UploadResult.Builder setStatus(@NonNull TransferStatus status)

Sets the Status of the Upload request. This field is required. See Also: UploadResult#getStatus(), TransferStatus

Parameter
Name Description
status @org.checkerframework.checker.nullness.qual.NonNull com.google.cloud.storage.transfermanager.TransferStatus
Returns
Type Description
UploadResult.Builder

the Builder instance with the value for status modified.

setUploadedBlob(@NonNull BlobInfo uploadedBlob)

public UploadResult.Builder setUploadedBlob(@NonNull BlobInfo uploadedBlob)

Sets the BlobInfo for the uploaded object. This field will only be populated if the Transfer was a SUCCESS.

Parameter
Name Description
uploadedBlob @org.checkerframework.checker.nullness.qual.NonNull com.google.cloud.storage.BlobInfo
Returns
Type Description
UploadResult.Builder

the Builder instance with the value for uploadedBlob modified.