public class Storage.Objects.Copy extends StorageRequest<StorageObject>
GenericData.Flags
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier | Constructor and Description |
---|---|
protected |
Storage.Objects.Copy(String sourceBucket,
String sourceObject,
String destinationBucket,
String destinationObject,
StorageObject content)
Copies a source object to a destination object.
|
Modifier and Type | Method and Description |
---|---|
HttpResponse |
executeMedia() |
void |
executeMediaAndDownloadTo(OutputStream outputStream) |
InputStream |
executeMediaAsInputStream() |
String |
getDestinationBucket()
Name of the bucket in which to store the new object.
|
String |
getDestinationObject()
Name of the new object.
|
String |
getDestinationPredefinedAcl()
Apply a predefined set of access controls to the destination object.
|
Long |
getIfGenerationMatch()
Makes the operation conditional on whether the destination object's current generation matches the
given value.
|
Long |
getIfGenerationNotMatch()
Makes the operation conditional on whether the destination object's current generation does not
match the given value.
|
Long |
getIfMetagenerationMatch()
Makes the operation conditional on whether the destination object's current metageneration matches
the given value.
|
Long |
getIfMetagenerationNotMatch()
Makes the operation conditional on whether the destination object's current metageneration does not
match the given value.
|
Long |
getIfSourceGenerationMatch()
Makes the operation conditional on whether the source object's generation matches the given value.
|
Long |
getIfSourceGenerationNotMatch()
Makes the operation conditional on whether the source object's generation does not match the given
value.
|
Long |
getIfSourceMetagenerationMatch()
Makes the operation conditional on whether the source object's current metageneration matches the
given value.
|
Long |
getIfSourceMetagenerationNotMatch()
Makes the operation conditional on whether the source object's current metageneration does not
match the given value.
|
String |
getProjection()
Set of properties to return.
|
String |
getSourceBucket()
Name of the bucket in which to find the source object.
|
Long |
getSourceGeneration()
If present, selects a specific revision of the source object (as opposed to the latest version, the
default).
|
String |
getSourceObject()
Name of the source object.
|
Storage.Objects.Copy |
set(String parameterName,
Object value) |
Storage.Objects.Copy |
setAlt(String alt)
Data format for the response.
|
Storage.Objects.Copy |
setDestinationBucket(String destinationBucket)
Name of the bucket in which to store the new object.
|
Storage.Objects.Copy |
setDestinationObject(String destinationObject)
Name of the new object.
|
Storage.Objects.Copy |
setDestinationPredefinedAcl(String destinationPredefinedAcl)
Apply a predefined set of access controls to the destination object.
|
Storage.Objects.Copy |
setFields(String fields)
Selector specifying which fields to include in a partial response.
|
Storage.Objects.Copy |
setIfGenerationMatch(Long ifGenerationMatch)
Makes the operation conditional on whether the destination object's current generation
matches the given value.
|
Storage.Objects.Copy |
setIfGenerationNotMatch(Long ifGenerationNotMatch)
Makes the operation conditional on whether the destination object's current generation does
not match the given value.
|
Storage.Objects.Copy |
setIfMetagenerationMatch(Long ifMetagenerationMatch)
Makes the operation conditional on whether the destination object's current metageneration
matches the given value.
|
Storage.Objects.Copy |
setIfMetagenerationNotMatch(Long ifMetagenerationNotMatch)
Makes the operation conditional on whether the destination object's current metageneration
does not match the given value.
|
Storage.Objects.Copy |
setIfSourceGenerationMatch(Long ifSourceGenerationMatch)
Makes the operation conditional on whether the source object's generation matches the given
value.
|
Storage.Objects.Copy |
setIfSourceGenerationNotMatch(Long ifSourceGenerationNotMatch)
Makes the operation conditional on whether the source object's generation does not match
the given value.
|
Storage.Objects.Copy |
setIfSourceMetagenerationMatch(Long ifSourceMetagenerationMatch)
Makes the operation conditional on whether the source object's current metageneration
matches the given value.
|
Storage.Objects.Copy |
setIfSourceMetagenerationNotMatch(Long ifSourceMetagenerationNotMatch)
Makes the operation conditional on whether the source object's current metageneration does
not match the given value.
|
Storage.Objects.Copy |
setKey(String key)
API key.
|
Storage.Objects.Copy |
setOauthToken(String oauthToken)
OAuth 2.0 token for the current user.
|
Storage.Objects.Copy |
setPrettyPrint(Boolean prettyPrint)
Returns response with indentations and line breaks.
|
Storage.Objects.Copy |
setProjection(String projection)
Set of properties to return.
|
Storage.Objects.Copy |
setQuotaUser(String quotaUser)
Available to use for quota purposes for server-side applications.
|
Storage.Objects.Copy |
setSourceBucket(String sourceBucket)
Name of the bucket in which to find the source object.
|
Storage.Objects.Copy |
setSourceGeneration(Long sourceGeneration)
If present, selects a specific revision of the source object (as opposed to the latest
version, the default).
|
Storage.Objects.Copy |
setSourceObject(String sourceObject)
Name of the source object.
|
Storage.Objects.Copy |
setUserIp(String userIp)
IP address of the site where the request originates.
|
getAbstractGoogleClient, getAlt, getFields, getKey, getOauthToken, getPrettyPrint, getQuotaUser, getUserIp, setDisableGZipContent, setRequestHeaders
getJsonContent, newExceptionOnError, queue
buildHttpRequest, buildHttpRequestUrl, buildHttpRequestUsingHead, checkRequiredParameter, execute, executeAndDownloadTo, executeAsInputStream, executeUnparsed, executeUsingHead, getDisableGZipContent, getHttpContent, getLastResponseHeaders, getLastStatusCode, getLastStatusMessage, getMediaHttpDownloader, getMediaHttpUploader, getRequestHeaders, getRequestMethod, getResponseClass, getUriTemplate, initializeMediaDownload, initializeMediaUpload, queue
clone, entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeys
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, toString, values
protected Storage.Objects.Copy(String sourceBucket, String sourceObject, String destinationBucket, String destinationObject, StorageObject content)
AbstractGoogleClientRequest.execute()
method to invoke the remote operation. Storage.initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)
must be
called to initialize this instance immediately after invoking the constructor.
sourceBucket
- Name of the bucket in which to find the source object.sourceObject
- Name of the source object. For information about how to URL encode object names to be path safe, see
Encoding URI Path Parts.destinationBucket
- Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket
value, if any.For information about how to URL encode object names to be path safe, see
Encoding URI Path Parts.destinationObject
- Name of the new object. Required when the object metadata is not otherwise provided. Overrides the
object metadata's name value, if any.content
- the StorageObject
public void executeMediaAndDownloadTo(OutputStream outputStream) throws IOException
executeMediaAndDownloadTo
in class AbstractGoogleClientRequest<StorageObject>
IOException
public InputStream executeMediaAsInputStream() throws IOException
executeMediaAsInputStream
in class AbstractGoogleClientRequest<StorageObject>
IOException
public HttpResponse executeMedia() throws IOException
executeMedia
in class AbstractGoogleClientRequest<StorageObject>
IOException
public Storage.Objects.Copy setAlt(String alt)
StorageRequest
setAlt
in class StorageRequest<StorageObject>
public Storage.Objects.Copy setFields(String fields)
StorageRequest
setFields
in class StorageRequest<StorageObject>
public Storage.Objects.Copy setKey(String key)
StorageRequest
setKey
in class StorageRequest<StorageObject>
public Storage.Objects.Copy setOauthToken(String oauthToken)
StorageRequest
setOauthToken
in class StorageRequest<StorageObject>
public Storage.Objects.Copy setPrettyPrint(Boolean prettyPrint)
StorageRequest
setPrettyPrint
in class StorageRequest<StorageObject>
public Storage.Objects.Copy setQuotaUser(String quotaUser)
StorageRequest
setQuotaUser
in class StorageRequest<StorageObject>
public Storage.Objects.Copy setUserIp(String userIp)
StorageRequest
setUserIp
in class StorageRequest<StorageObject>
public String getSourceBucket()
public Storage.Objects.Copy setSourceBucket(String sourceBucket)
public String getSourceObject()
public Storage.Objects.Copy setSourceObject(String sourceObject)
public String getDestinationBucket()
public Storage.Objects.Copy setDestinationBucket(String destinationBucket)
public String getDestinationObject()
public Storage.Objects.Copy setDestinationObject(String destinationObject)
public String getDestinationPredefinedAcl()
public Storage.Objects.Copy setDestinationPredefinedAcl(String destinationPredefinedAcl)
public Long getIfGenerationMatch()
public Storage.Objects.Copy setIfGenerationMatch(Long ifGenerationMatch)
public Long getIfGenerationNotMatch()
public Storage.Objects.Copy setIfGenerationNotMatch(Long ifGenerationNotMatch)
public Long getIfMetagenerationMatch()
public Storage.Objects.Copy setIfMetagenerationMatch(Long ifMetagenerationMatch)
public Long getIfMetagenerationNotMatch()
public Storage.Objects.Copy setIfMetagenerationNotMatch(Long ifMetagenerationNotMatch)
public Long getIfSourceGenerationMatch()
public Storage.Objects.Copy setIfSourceGenerationMatch(Long ifSourceGenerationMatch)
public Long getIfSourceGenerationNotMatch()
public Storage.Objects.Copy setIfSourceGenerationNotMatch(Long ifSourceGenerationNotMatch)
public Long getIfSourceMetagenerationMatch()
public Storage.Objects.Copy setIfSourceMetagenerationMatch(Long ifSourceMetagenerationMatch)
public Long getIfSourceMetagenerationNotMatch()
public Storage.Objects.Copy setIfSourceMetagenerationNotMatch(Long ifSourceMetagenerationNotMatch)
public String getProjection()
public Storage.Objects.Copy setProjection(String projection)
public Long getSourceGeneration()
public Storage.Objects.Copy setSourceGeneration(Long sourceGeneration)
public Storage.Objects.Copy set(String parameterName, Object value)
set
in class StorageRequest<StorageObject>