Package com.google.cloud.storage
Class Storage.CopyRequest.Builder
java.lang.Object
com.google.cloud.storage.Storage.CopyRequest.Builder
- Enclosing class:
- Storage.CopyRequest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates aCopyRequest
object.setMegabytesCopiedPerChunk
(Long megabytesCopiedPerChunk) Sets the maximum number of megabytes to copy for each RPC call.Sets the blob to copy given aBlobId
.Sets the blob to copy given bucket and blob name.setSourceOptions
(Storage.BlobSourceOption... options) Sets blob's source options.setSourceOptions
(Iterable<Storage.BlobSourceOption> options) Sets blob's source options.Sets the copy target.setTarget
(BlobId targetId, Storage.BlobTargetOption... options) Sets the copy target.setTarget
(BlobId targetId, Iterable<Storage.BlobTargetOption> options) Sets the copy target and target options.setTarget
(BlobInfo target, Storage.BlobTargetOption... options) Sets the copy target and target options.setTarget
(BlobInfo target, Iterable<Storage.BlobTargetOption> options) Sets the copy target and target options.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setSource
Sets the blob to copy given bucket and blob name.- Returns:
- the builder
-
setSource
Sets the blob to copy given aBlobId
.- Returns:
- the builder
-
setSourceOptions
Sets blob's source options.- Returns:
- the builder
-
setSourceOptions
Sets blob's source options.- Returns:
- the builder
-
setTarget
Sets the copy target. Target blob information is copied from source.- Returns:
- the builder
-
setTarget
Sets the copy target. Target blob information is copied from source, except for those options specified inoptions
.- Returns:
- the builder
-
setTarget
Sets the copy target and target options.target
parameter is used to override source blob information (e.g.contentType
,contentLanguage
). Target blob information is set exactly totarget
, no information is inherited from the source blob.- Returns:
- the builder
-
setTarget
public Storage.CopyRequest.Builder setTarget(BlobInfo target, Iterable<Storage.BlobTargetOption> options) Sets the copy target and target options.target
parameter is used to override source blob information (e.g.contentType
,contentLanguage
). Target blob information is set exactly totarget
, no information is inherited from the source blob.- Returns:
- the builder
-
setTarget
public Storage.CopyRequest.Builder setTarget(BlobId targetId, Iterable<Storage.BlobTargetOption> options) Sets the copy target and target options. Target blob information is copied from source, except for those options specified inoptions
.- Returns:
- the builder
-
setMegabytesCopiedPerChunk
Sets the maximum number of megabytes to copy for each RPC call. This parameter is ignored if source and target blob share the same location and storage class as copy is made with one single RPC.- Returns:
- the builder
-
build
Creates aCopyRequest
object.
-