public class Storage.Objects.Rewrite extends StorageRequest<RewriteResponse>
GenericData.Flags
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
USER_AGENT_SUFFIX
Modifier | Constructor and Description |
---|---|
protected |
Rewrite(String sourceBucket,
String sourceObject,
String destinationBucket,
String destinationObject,
StorageObject content)
Rewrites a source object to a destination object.
|
Modifier and Type | Method and Description |
---|---|
String |
getDestinationBucket()
Name of the bucket in which to store the new object.
|
String |
getDestinationKmsKeyName()
Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-
kr/cryptoKeys/my-key, that will be used to encrypt the 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 object's current generation matches the given value.
|
Long |
getIfGenerationNotMatch()
Makes the operation conditional on whether the 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 current generation matches the given
value.
|
Long |
getIfSourceGenerationNotMatch()
Makes the operation conditional on whether the source object's current 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.
|
Long |
getMaxBytesRewrittenPerCall()
The maximum number of bytes that will be rewritten per rewrite request.
|
String |
getProjection()
Set of properties to return.
|
String |
getProvisionalUserProject()
The project to be billed for this request if the target bucket is requester-pays bucket.
|
String |
getRewriteToken()
Include this field (from the previous rewrite response) on each rewrite request after the first
one, until the rewrite response 'done' flag is true.
|
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.
|
String |
getUserProject()
The project to be billed for this request.
|
Storage.Objects.Rewrite |
set(String parameterName,
Object value) |
Storage.Objects.Rewrite |
setAlt(String alt)
Data format for the response.
|
Storage.Objects.Rewrite |
setDestinationBucket(String destinationBucket)
Name of the bucket in which to store the new object.
|
Storage.Objects.Rewrite |
setDestinationKmsKeyName(String destinationKmsKeyName)
Resource name of the Cloud KMS key, of the form projects/my-
project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the
object.
|
Storage.Objects.Rewrite |
setDestinationObject(String destinationObject)
Name of the new object.
|
Storage.Objects.Rewrite |
setDestinationPredefinedAcl(String destinationPredefinedAcl)
Apply a predefined set of access controls to the destination object.
|
Storage.Objects.Rewrite |
setFields(String fields)
Selector specifying which fields to include in a partial response.
|
Storage.Objects.Rewrite |
setIfGenerationMatch(Long ifGenerationMatch)
Makes the operation conditional on whether the object's current generation matches the
given value.
|
Storage.Objects.Rewrite |
setIfGenerationNotMatch(Long ifGenerationNotMatch)
Makes the operation conditional on whether the object's current generation does not match
the given value.
|
Storage.Objects.Rewrite |
setIfMetagenerationMatch(Long ifMetagenerationMatch)
Makes the operation conditional on whether the destination object's current metageneration
matches the given value.
|
Storage.Objects.Rewrite |
setIfMetagenerationNotMatch(Long ifMetagenerationNotMatch)
Makes the operation conditional on whether the destination object's current metageneration
does not match the given value.
|
Storage.Objects.Rewrite |
setIfSourceGenerationMatch(Long ifSourceGenerationMatch)
Makes the operation conditional on whether the source object's current generation matches
the given value.
|
Storage.Objects.Rewrite |
setIfSourceGenerationNotMatch(Long ifSourceGenerationNotMatch)
Makes the operation conditional on whether the source object's current generation does not
match the given value.
|
Storage.Objects.Rewrite |
setIfSourceMetagenerationMatch(Long ifSourceMetagenerationMatch)
Makes the operation conditional on whether the source object's current metageneration
matches the given value.
|
Storage.Objects.Rewrite |
setIfSourceMetagenerationNotMatch(Long ifSourceMetagenerationNotMatch)
Makes the operation conditional on whether the source object's current metageneration does
not match the given value.
|
Storage.Objects.Rewrite |
setKey(String key)
API key.
|
Storage.Objects.Rewrite |
setMaxBytesRewrittenPerCall(Long maxBytesRewrittenPerCall)
The maximum number of bytes that will be rewritten per rewrite request.
|
Storage.Objects.Rewrite |
setOauthToken(String oauthToken)
OAuth 2.0 token for the current user.
|
Storage.Objects.Rewrite |
setPrettyPrint(Boolean prettyPrint)
Returns response with indentations and line breaks.
|
Storage.Objects.Rewrite |
setProjection(String projection)
Set of properties to return.
|
Storage.Objects.Rewrite |
setProvisionalUserProject(String provisionalUserProject)
The project to be billed for this request if the target bucket is requester-pays bucket.
|
Storage.Objects.Rewrite |
setQuotaUser(String quotaUser)
An opaque string that represents a user for quota purposes.
|
Storage.Objects.Rewrite |
setRewriteToken(String rewriteToken)
Include this field (from the previous rewrite response) on each rewrite request after the
first one, until the rewrite response 'done' flag is true.
|
Storage.Objects.Rewrite |
setSourceBucket(String sourceBucket)
Name of the bucket in which to find the source object.
|
Storage.Objects.Rewrite |
setSourceGeneration(Long sourceGeneration)
If present, selects a specific revision of the source object (as opposed to the latest
version, the default).
|
Storage.Objects.Rewrite |
setSourceObject(String sourceObject)
Name of the source object.
|
Storage.Objects.Rewrite |
setUserIp(String userIp)
Deprecated.
|
Storage.Objects.Rewrite |
setUserProject(String userProject)
The project to be billed for this request.
|
getAbstractGoogleClient, getAlt, getFields, getKey, getOauthToken, getPrettyPrint, getQuotaUser, getUserIp, setDisableGZipContent, setRequestHeaders
getJsonContent, newExceptionOnError, queue
buildHttpRequest, buildHttpRequestUrl, buildHttpRequestUsingHead, checkRequiredParameter, execute, executeAndDownloadTo, executeAsInputStream, executeMedia, executeMediaAndDownloadTo, executeMediaAsInputStream, executeUnparsed, executeUsingHead, getDisableGZipContent, getHttpContent, getLastResponseHeaders, getLastStatusCode, getLastStatusMessage, getMediaHttpDownloader, getMediaHttpUploader, getRequestHeaders, getRequestMethod, getResponseClass, getReturnRawInputSteam, getUriTemplate, initializeMediaDownload, initializeMediaUpload, queue, setReturnRawInputStream
clone, entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys, toString
clear, containsKey, containsValue, isEmpty, keySet, size, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
protected Rewrite(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.destinationObject
- Name of the new object. Required when the object metadata is not otherwise provided. Overrides the
object metadata's name value, if any. For information about how to URL encode object names
to be path safe, see Encoding URI Path Parts.content
- the StorageObject
public Storage.Objects.Rewrite setAlt(String alt)
StorageRequest
setAlt
in class StorageRequest<RewriteResponse>
public Storage.Objects.Rewrite setFields(String fields)
StorageRequest
setFields
in class StorageRequest<RewriteResponse>
public Storage.Objects.Rewrite setKey(String key)
StorageRequest
setKey
in class StorageRequest<RewriteResponse>
public Storage.Objects.Rewrite setOauthToken(String oauthToken)
StorageRequest
setOauthToken
in class StorageRequest<RewriteResponse>
public Storage.Objects.Rewrite setPrettyPrint(Boolean prettyPrint)
StorageRequest
setPrettyPrint
in class StorageRequest<RewriteResponse>
public Storage.Objects.Rewrite setQuotaUser(String quotaUser)
StorageRequest
setQuotaUser
in class StorageRequest<RewriteResponse>
public Storage.Objects.Rewrite setUserIp(String userIp)
StorageRequest
setUserIp
in class StorageRequest<RewriteResponse>
public String getSourceBucket()
public Storage.Objects.Rewrite setSourceBucket(String sourceBucket)
public String getSourceObject()
public Storage.Objects.Rewrite setSourceObject(String sourceObject)
public String getDestinationBucket()
public Storage.Objects.Rewrite setDestinationBucket(String destinationBucket)
public String getDestinationObject()
public Storage.Objects.Rewrite setDestinationObject(String destinationObject)
public String getDestinationKmsKeyName()
public Storage.Objects.Rewrite setDestinationKmsKeyName(String destinationKmsKeyName)
public String getDestinationPredefinedAcl()
public Storage.Objects.Rewrite setDestinationPredefinedAcl(String destinationPredefinedAcl)
public Long getIfGenerationMatch()
public Storage.Objects.Rewrite setIfGenerationMatch(Long ifGenerationMatch)
public Long getIfGenerationNotMatch()
public Storage.Objects.Rewrite setIfGenerationNotMatch(Long ifGenerationNotMatch)
public Long getIfMetagenerationMatch()
public Storage.Objects.Rewrite setIfMetagenerationMatch(Long ifMetagenerationMatch)
public Long getIfMetagenerationNotMatch()
public Storage.Objects.Rewrite setIfMetagenerationNotMatch(Long ifMetagenerationNotMatch)
public Long getIfSourceGenerationMatch()
public Storage.Objects.Rewrite setIfSourceGenerationMatch(Long ifSourceGenerationMatch)
public Long getIfSourceGenerationNotMatch()
public Storage.Objects.Rewrite setIfSourceGenerationNotMatch(Long ifSourceGenerationNotMatch)
public Long getIfSourceMetagenerationMatch()
public Storage.Objects.Rewrite setIfSourceMetagenerationMatch(Long ifSourceMetagenerationMatch)
public Long getIfSourceMetagenerationNotMatch()
public Storage.Objects.Rewrite setIfSourceMetagenerationNotMatch(Long ifSourceMetagenerationNotMatch)
public Long getMaxBytesRewrittenPerCall()
public Storage.Objects.Rewrite setMaxBytesRewrittenPerCall(Long maxBytesRewrittenPerCall)
public String getProjection()
public Storage.Objects.Rewrite setProjection(String projection)
public String getProvisionalUserProject()
public Storage.Objects.Rewrite setProvisionalUserProject(String provisionalUserProject)
public String getRewriteToken()
public Storage.Objects.Rewrite setRewriteToken(String rewriteToken)
public Long getSourceGeneration()
public Storage.Objects.Rewrite setSourceGeneration(Long sourceGeneration)
public String getUserProject()
public Storage.Objects.Rewrite setUserProject(String userProject)
public Storage.Objects.Rewrite set(String parameterName, Object value)
set
in class StorageRequest<RewriteResponse>
Copyright © 2011–2021 Google. All rights reserved.