public final class Media
extends com.google.api.client.json.GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Google Wallet API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
com.google.api.client.util.GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
Media() |
| Modifier and Type | Method and Description |
|---|---|
Media |
clone() |
byte[] |
decodeBigstoreObjectRef()
Use object_id instead.
|
byte[] |
decodeBlobRef()
Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This should be the byte
representation of a blobstore.BlobRef.
|
byte[] |
decodeCosmoBinaryReference()
A binary data reference for a media download.
|
byte[] |
decodeInline()
Media data, set if reference_type is INLINE
|
byte[] |
decodeMd5Hash()
Scotty-provided MD5 hash for an upload.
|
byte[] |
decodeMediaId()
Media id to forward to the operation GetMedia.
|
byte[] |
decodeSha1Hash()
Scotty-provided SHA1 hash for an upload.
|
byte[] |
decodeSha256Hash()
Scotty-provided SHA256 hash for an upload.
|
Media |
encodeBigstoreObjectRef(byte[] bigstoreObjectRef)
Use object_id instead.
|
Media |
encodeBlobRef(byte[] blobRef)
Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This should be the byte
representation of a blobstore.BlobRef.
|
Media |
encodeCosmoBinaryReference(byte[] cosmoBinaryReference)
A binary data reference for a media download.
|
Media |
encodeInline(byte[] inline)
Media data, set if reference_type is INLINE
|
Media |
encodeMd5Hash(byte[] md5Hash)
Scotty-provided MD5 hash for an upload.
|
Media |
encodeMediaId(byte[] mediaId)
Media id to forward to the operation GetMedia.
|
Media |
encodeSha1Hash(byte[] sha1Hash)
Scotty-provided SHA1 hash for an upload.
|
Media |
encodeSha256Hash(byte[] sha256Hash)
Scotty-provided SHA256 hash for an upload.
|
String |
getAlgorithm()
Deprecated, use one of explicit hash type fields instead.
|
String |
getBigstoreObjectRef()
Use object_id instead.
|
String |
getBlobRef()
Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This should be the byte
representation of a blobstore.BlobRef.
|
Blobstore2Info |
getBlobstore2Info()
Blobstore v2 info, set if reference_type is BLOBSTORE_REF and it refers to a v2 blob.
|
List<CompositeMedia> |
getCompositeMedia()
A composite media composed of one or more media objects, set if reference_type is
COMPOSITE_MEDIA.
|
String |
getContentType()
MIME type of the data
|
ContentTypeInfo |
getContentTypeInfo()
Extended content type information provided for Scotty uploads.
|
String |
getCosmoBinaryReference()
A binary data reference for a media download.
|
Long |
getCrc32cHash()
For Scotty Uploads: Scotty-provided hashes for uploads For Scotty Downloads: (WARNING: DO NOT
USE WITHOUT PERMISSION FROM THE SCOTTY TEAM.) A Hash provided by the agent to be used to verify
the data being downloaded.
|
DiffChecksumsResponse |
getDiffChecksumsResponse()
Set if reference_type is DIFF_CHECKSUMS_RESPONSE.
|
DiffDownloadResponse |
getDiffDownloadResponse()
Set if reference_type is DIFF_DOWNLOAD_RESPONSE.
|
DiffUploadRequest |
getDiffUploadRequest()
Set if reference_type is DIFF_UPLOAD_REQUEST.
|
DiffUploadResponse |
getDiffUploadResponse()
Set if reference_type is DIFF_UPLOAD_RESPONSE.
|
DiffVersionResponse |
getDiffVersionResponse()
Set if reference_type is DIFF_VERSION_RESPONSE.
|
DownloadParameters |
getDownloadParameters()
Parameters for a media download.
|
String |
getFilename()
Original file name
|
String |
getHash()
Deprecated, use one of explicit hash type fields instead.
|
Boolean |
getHashVerified()
For Scotty uploads only.
|
String |
getInline()
Media data, set if reference_type is INLINE
|
Boolean |
getIsPotentialRetry()
|is_potential_retry| is set false only when Scotty is certain that it has not sent the request
before.
|
Long |
getLength()
Size of the data, in bytes
|
String |
getMd5Hash()
Scotty-provided MD5 hash for an upload.
|
String |
getMediaId()
Media id to forward to the operation GetMedia.
|
ObjectId |
getObjectId()
Reference to a TI Blob, set if reference_type is BIGSTORE_REF.
|
String |
getPath()
Path to the data, set if reference_type is PATH
|
String |
getReferenceType()
Describes what the field reference contains.
|
String |
getSha1Hash()
Scotty-provided SHA1 hash for an upload.
|
String |
getSha256Hash()
Scotty-provided SHA256 hash for an upload.
|
BigInteger |
getTimestamp()
Time at which the media data was last updated, in milliseconds since UNIX epoch
|
String |
getToken()
A unique fingerprint/version id for the media data
|
Media |
set(String fieldName,
Object value) |
Media |
setAlgorithm(String algorithm)
Deprecated, use one of explicit hash type fields instead.
|
Media |
setBigstoreObjectRef(String bigstoreObjectRef)
Use object_id instead.
|
Media |
setBlobRef(String blobRef)
Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This should be the byte
representation of a blobstore.BlobRef.
|
Media |
setBlobstore2Info(Blobstore2Info blobstore2Info)
Blobstore v2 info, set if reference_type is BLOBSTORE_REF and it refers to a v2 blob.
|
Media |
setCompositeMedia(List<CompositeMedia> compositeMedia)
A composite media composed of one or more media objects, set if reference_type is
COMPOSITE_MEDIA.
|
Media |
setContentType(String contentType)
MIME type of the data
|
Media |
setContentTypeInfo(ContentTypeInfo contentTypeInfo)
Extended content type information provided for Scotty uploads.
|
Media |
setCosmoBinaryReference(String cosmoBinaryReference)
A binary data reference for a media download.
|
Media |
setCrc32cHash(Long crc32cHash)
For Scotty Uploads: Scotty-provided hashes for uploads For Scotty Downloads: (WARNING: DO NOT
USE WITHOUT PERMISSION FROM THE SCOTTY TEAM.) A Hash provided by the agent to be used to verify
the data being downloaded.
|
Media |
setDiffChecksumsResponse(DiffChecksumsResponse diffChecksumsResponse)
Set if reference_type is DIFF_CHECKSUMS_RESPONSE.
|
Media |
setDiffDownloadResponse(DiffDownloadResponse diffDownloadResponse)
Set if reference_type is DIFF_DOWNLOAD_RESPONSE.
|
Media |
setDiffUploadRequest(DiffUploadRequest diffUploadRequest)
Set if reference_type is DIFF_UPLOAD_REQUEST.
|
Media |
setDiffUploadResponse(DiffUploadResponse diffUploadResponse)
Set if reference_type is DIFF_UPLOAD_RESPONSE.
|
Media |
setDiffVersionResponse(DiffVersionResponse diffVersionResponse)
Set if reference_type is DIFF_VERSION_RESPONSE.
|
Media |
setDownloadParameters(DownloadParameters downloadParameters)
Parameters for a media download.
|
Media |
setFilename(String filename)
Original file name
|
Media |
setHash(String hash)
Deprecated, use one of explicit hash type fields instead.
|
Media |
setHashVerified(Boolean hashVerified)
For Scotty uploads only.
|
Media |
setInline(String inline)
Media data, set if reference_type is INLINE
|
Media |
setIsPotentialRetry(Boolean isPotentialRetry)
|is_potential_retry| is set false only when Scotty is certain that it has not sent the request
before.
|
Media |
setLength(Long length)
Size of the data, in bytes
|
Media |
setMd5Hash(String md5Hash)
Scotty-provided MD5 hash for an upload.
|
Media |
setMediaId(String mediaId)
Media id to forward to the operation GetMedia.
|
Media |
setObjectId(ObjectId objectId)
Reference to a TI Blob, set if reference_type is BIGSTORE_REF.
|
Media |
setPath(String path)
Path to the data, set if reference_type is PATH
|
Media |
setReferenceType(String referenceType)
Describes what the field reference contains.
|
Media |
setSha1Hash(String sha1Hash)
Scotty-provided SHA1 hash for an upload.
|
Media |
setSha256Hash(String sha256Hash)
Scotty-provided SHA256 hash for an upload.
|
Media |
setTimestamp(BigInteger timestamp)
Time at which the media data was last updated, in milliseconds since UNIX epoch
|
Media |
setToken(String token)
A unique fingerprint/version id for the media data
|
getFactory, setFactory, toPrettyString, toStringentrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, isEmpty, keySet, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic String getAlgorithm()
null for nonepublic Media setAlgorithm(String algorithm)
algorithm - algorithm or null for nonepublic String getBigstoreObjectRef()
null for nonedecodeBigstoreObjectRef()public byte[] decodeBigstoreObjectRef()
null for nonegetBigstoreObjectRef()public Media setBigstoreObjectRef(String bigstoreObjectRef)
bigstoreObjectRef - bigstoreObjectRef or null for none#encodeBigstoreObjectRef()public Media encodeBigstoreObjectRef(byte[] bigstoreObjectRef)
The value is encoded Base64 or {@code null} for none.
public String getBlobRef()
null for nonedecodeBlobRef()public byte[] decodeBlobRef()
null for nonegetBlobRef()public Media setBlobRef(String blobRef)
blobRef - blobRef or null for none#encodeBlobRef()public Media encodeBlobRef(byte[] blobRef)
The value is encoded Base64 or {@code null} for none.
public Blobstore2Info getBlobstore2Info()
null for nonepublic Media setBlobstore2Info(Blobstore2Info blobstore2Info)
blobstore2Info - blobstore2Info or null for nonepublic List<CompositeMedia> getCompositeMedia()
null for nonepublic Media setCompositeMedia(List<CompositeMedia> compositeMedia)
compositeMedia - compositeMedia or null for nonepublic String getContentType()
null for nonepublic Media setContentType(String contentType)
contentType - contentType or null for nonepublic ContentTypeInfo getContentTypeInfo()
null for nonepublic Media setContentTypeInfo(ContentTypeInfo contentTypeInfo)
contentTypeInfo - contentTypeInfo or null for nonepublic String getCosmoBinaryReference()
null for nonedecodeCosmoBinaryReference()public byte[] decodeCosmoBinaryReference()
null for nonegetCosmoBinaryReference()public Media setCosmoBinaryReference(String cosmoBinaryReference)
cosmoBinaryReference - cosmoBinaryReference or null for none#encodeCosmoBinaryReference()public Media encodeCosmoBinaryReference(byte[] cosmoBinaryReference)
The value is encoded Base64 or {@code null} for none.
public Long getCrc32cHash()
null for nonepublic Media setCrc32cHash(Long crc32cHash)
crc32cHash - crc32cHash or null for nonepublic DiffChecksumsResponse getDiffChecksumsResponse()
null for nonepublic Media setDiffChecksumsResponse(DiffChecksumsResponse diffChecksumsResponse)
diffChecksumsResponse - diffChecksumsResponse or null for nonepublic DiffDownloadResponse getDiffDownloadResponse()
null for nonepublic Media setDiffDownloadResponse(DiffDownloadResponse diffDownloadResponse)
diffDownloadResponse - diffDownloadResponse or null for nonepublic DiffUploadRequest getDiffUploadRequest()
null for nonepublic Media setDiffUploadRequest(DiffUploadRequest diffUploadRequest)
diffUploadRequest - diffUploadRequest or null for nonepublic DiffUploadResponse getDiffUploadResponse()
null for nonepublic Media setDiffUploadResponse(DiffUploadResponse diffUploadResponse)
diffUploadResponse - diffUploadResponse or null for nonepublic DiffVersionResponse getDiffVersionResponse()
null for nonepublic Media setDiffVersionResponse(DiffVersionResponse diffVersionResponse)
diffVersionResponse - diffVersionResponse or null for nonepublic DownloadParameters getDownloadParameters()
null for nonepublic Media setDownloadParameters(DownloadParameters downloadParameters)
downloadParameters - downloadParameters or null for nonepublic String getFilename()
null for nonepublic Media setFilename(String filename)
filename - filename or null for nonepublic String getHash()
null for nonepublic Media setHash(String hash)
hash - hash or null for nonepublic Boolean getHashVerified()
null for nonepublic Media setHashVerified(Boolean hashVerified)
hashVerified - hashVerified or null for nonepublic String getInline()
null for nonedecodeInline()public byte[] decodeInline()
null for nonegetInline()public Media setInline(String inline)
inline - inline or null for none#encodeInline()public Media encodeInline(byte[] inline)
The value is encoded Base64 or {@code null} for none.
public Boolean getIsPotentialRetry()
null for nonepublic Media setIsPotentialRetry(Boolean isPotentialRetry)
isPotentialRetry - isPotentialRetry or null for nonepublic Long getLength()
null for nonepublic Media setLength(Long length)
length - length or null for nonepublic String getMd5Hash()
null for nonedecodeMd5Hash()public byte[] decodeMd5Hash()
null for nonegetMd5Hash()public Media setMd5Hash(String md5Hash)
md5Hash - md5Hash or null for none#encodeMd5Hash()public Media encodeMd5Hash(byte[] md5Hash)
The value is encoded Base64 or {@code null} for none.
public String getMediaId()
null for nonedecodeMediaId()public byte[] decodeMediaId()
null for nonegetMediaId()public Media setMediaId(String mediaId)
mediaId - mediaId or null for none#encodeMediaId()public Media encodeMediaId(byte[] mediaId)
The value is encoded Base64 or {@code null} for none.
public ObjectId getObjectId()
null for nonepublic Media setObjectId(ObjectId objectId)
objectId - objectId or null for nonepublic String getPath()
null for nonepublic Media setPath(String path)
path - path or null for nonepublic String getReferenceType()
null for nonepublic Media setReferenceType(String referenceType)
referenceType - referenceType or null for nonepublic String getSha1Hash()
null for nonedecodeSha1Hash()public byte[] decodeSha1Hash()
null for nonegetSha1Hash()public Media setSha1Hash(String sha1Hash)
sha1Hash - sha1Hash or null for none#encodeSha1Hash()public Media encodeSha1Hash(byte[] sha1Hash)
The value is encoded Base64 or {@code null} for none.
public String getSha256Hash()
null for nonedecodeSha256Hash()public byte[] decodeSha256Hash()
null for nonegetSha256Hash()public Media setSha256Hash(String sha256Hash)
sha256Hash - sha256Hash or null for none#encodeSha256Hash()public Media encodeSha256Hash(byte[] sha256Hash)
The value is encoded Base64 or {@code null} for none.
public BigInteger getTimestamp()
null for nonepublic Media setTimestamp(BigInteger timestamp)
timestamp - timestamp or null for nonepublic String getToken()
null for nonepublic Media setToken(String token)
token - token or null for nonepublic Media set(String fieldName, Object value)
set in class com.google.api.client.json.GenericJsonpublic Media clone()
clone in class com.google.api.client.json.GenericJsonCopyright © 2011–2025 Google. All rights reserved.