Class UploadResult.Builder (2.36.1)

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
TypeDescription
UploadResultUploadResult

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
NameDescription
exception@org.checkerframework.checker.nullness.qual.NonNull java.lang.Exception
Returns
TypeDescription
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
NameDescription
input@org.checkerframework.checker.nullness.qual.NonNull com.google.cloud.storage.BlobInfo
Returns
TypeDescription
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
NameDescription
status@org.checkerframework.checker.nullness.qual.NonNull com.google.cloud.storage.transfermanager.TransferStatus
Returns
TypeDescription
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
NameDescription
uploadedBlob@org.checkerframework.checker.nullness.qual.NonNull com.google.cloud.storage.BlobInfo
Returns
TypeDescription
UploadResult.Builder

the Builder instance with the value for uploadedBlob modified.