class Google::Apis::YoutubePartnerV1::Media

A reference to data stored on the filesystem, on GFS or in blobstore.

Attributes

algorithm[RW]

Deprecated, use one of explicit hash type fields instead. Algorithm used for calculating the hash. As of 2011/01/21, “MD5” is the only possible value for this field. New values may be added at any time. Corresponds to the JSON property `algorithm` @return [String]

bigstore_object_ref[RW]

Use object_id instead. Corresponds to the JSON property `bigstoreObjectRef` NOTE: Values are automatically base64 encoded/decoded in the client library. @return [String]

blob_ref[RW]

Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This should be the byte representation of a blobstore.BlobRef. Since Blobstore is deprecating v1, use blobstore2_info instead. For now, any v2 blob will also be represented in this field as v1 BlobRef. Corresponds to the JSON property `blobRef` NOTE: Values are automatically base64 encoded/decoded in the client library. @return [String]

blobstore2_info[RW]

Information to read/write to blobstore2. Corresponds to the JSON property `blobstore2Info` @return [Google::Apis::YoutubePartnerV1::Blobstore2Info]

composite_media[RW]

A composite media composed of one or more media objects, set if reference_type is COMPOSITE_MEDIA. The media length field must be set to the sum of the lengths of all composite media objects. Note: All composite media must have length specified. Corresponds to the JSON property `compositeMedia` @return [Array<Google::Apis::YoutubePartnerV1::CompositeMedia>]

content_type[RW]

MIME type of the data Corresponds to the JSON property `contentType` @return [String]

content_type_info[RW]

Detailed Content-Type information from Scotty. The Content-Type of the media will typically be filled in by the header or Scotty's best_guess, but this extended information provides the backend with more information so that it can make a better decision if needed. This is only used on media upload requests from Scotty. Corresponds to the JSON property `contentTypeInfo` @return [Google::Apis::YoutubePartnerV1::ContentTypeInfo]

cosmo_binary_reference[RW]

A binary data reference for a media download. Serves as a technology-agnostic binary reference in some Google infrastructure. This value is a serialized storage_cosmo.BinaryReference proto. Storing it as bytes is a hack to get around the fact that the cosmo proto (as well as others it includes) doesn't support JavaScript. This prevents us from including the actual type of this field. Corresponds to the JSON property `cosmoBinaryReference` NOTE: Values are automatically base64 encoded/decoded in the client library. @return [String]

crc32c_hash[RW]

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. Currently only supported for inline payloads. Further, only crc32c_hash is currently supported. Corresponds to the JSON property `crc32cHash` @return [Fixnum]

diff_checksums_response[RW]

Backend response for a Diff get checksums response. For details on the Scotty Diff protocol, visit go/scotty-diff-protocol. Corresponds to the JSON property `diffChecksumsResponse` @return [Google::Apis::YoutubePartnerV1::DiffChecksumsResponse]

diff_download_response[RW]

Backend response for a Diff download response. For details on the Scotty Diff protocol, visit go/scotty-diff-protocol. Corresponds to the JSON property `diffDownloadResponse` @return [Google::Apis::YoutubePartnerV1::DiffDownloadResponse]

diff_upload_request[RW]

A Diff upload request. For details on the Scotty Diff protocol, visit http:// go/scotty-diff-protocol. Corresponds to the JSON property `diffUploadRequest` @return [Google::Apis::YoutubePartnerV1::DiffUploadRequest]

diff_upload_response[RW]

Backend response for a Diff upload request. For details on the Scotty Diff protocol, visit go/scotty-diff-protocol. Corresponds to the JSON property `diffUploadResponse` @return [Google::Apis::YoutubePartnerV1::DiffUploadResponse]

diff_version_response[RW]

Backend response for a Diff get version response. For details on the Scotty Diff protocol, visit go/scotty-diff-protocol. Corresponds to the JSON property `diffVersionResponse` @return [Google::Apis::YoutubePartnerV1::DiffVersionResponse]

download_parameters[RW]

Parameters specific to media downloads. Corresponds to the JSON property `downloadParameters` @return [Google::Apis::YoutubePartnerV1::DownloadParameters]

filename[RW]

Original file name Corresponds to the JSON property `filename` @return [String]

hash_prop[RW]

Deprecated, use one of explicit hash type fields instead. These two hash related fields will only be populated on Scotty based media uploads and will contain the content of the hash group in the NotificationRequest: cs/# google3/uploader/service/proto/upload_listener.proto&q=class:Hash Hex encoded hash value of the uploaded media. Corresponds to the JSON property `hash` @return [String]

hash_verified[RW]

For Scotty uploads only. If a user sends a hash code and the backend has requested that Scotty verify the upload against the client hash, Scotty will perform the check on behalf of the backend and will reject it if the hashes don't match. This is set to true if Scotty performed this verification. Corresponds to the JSON property `hashVerified` @return [Boolean]

hash_verified?[RW]

For Scotty uploads only. If a user sends a hash code and the backend has requested that Scotty verify the upload against the client hash, Scotty will perform the check on behalf of the backend and will reject it if the hashes don't match. This is set to true if Scotty performed this verification. Corresponds to the JSON property `hashVerified` @return [Boolean]

inline[RW]

Media data, set if reference_type is INLINE Corresponds to the JSON property `inline` NOTE: Values are automatically base64 encoded/decoded in the client library. @return [String]

is_potential_retry[RW]

|is_potential_retry| is set false only when Scotty is certain that it has not sent the request before. When a client resumes an upload, this field must be set true in agent calls, because Scotty cannot be certain that it has never sent the request before due to potential failure in the session state persistence. Corresponds to the JSON property `isPotentialRetry` @return [Boolean]

is_potential_retry?[RW]

|is_potential_retry| is set false only when Scotty is certain that it has not sent the request before. When a client resumes an upload, this field must be set true in agent calls, because Scotty cannot be certain that it has never sent the request before due to potential failure in the session state persistence. Corresponds to the JSON property `isPotentialRetry` @return [Boolean]

length[RW]

Size of the data, in bytes Corresponds to the JSON property `length` @return [Fixnum]

md5_hash[RW]

Scotty-provided MD5 hash for an upload. Corresponds to the JSON property `md5Hash` NOTE: Values are automatically base64 encoded/decoded in the client library. @return [String]

media_id[RW]

Media id to forward to the operation GetMedia. Can be set if reference_type is GET_MEDIA. Corresponds to the JSON property `mediaId` NOTE: Values are automatically base64 encoded/decoded in the client library. @return [String]

object_id_prop[RW]

This is a copy of the tech.blob.ObjectId proto, which could not be used directly here due to transitive closure issues with JavaScript support; see b/8801763. Corresponds to the JSON property `objectId` @return [Google::Apis::YoutubePartnerV1::ObjectIdProp]

path[RW]

Path to the data, set if reference_type is PATH Corresponds to the JSON property `path` @return [String]

reference_type[RW]

Describes what the field reference contains. Corresponds to the JSON property `referenceType` @return [String]

sha1_hash[RW]

Scotty-provided SHA1 hash for an upload. Corresponds to the JSON property `sha1Hash` NOTE: Values are automatically base64 encoded/decoded in the client library. @return [String]

sha256_hash[RW]

Scotty-provided SHA256 hash for an upload. Corresponds to the JSON property `sha256Hash` NOTE: Values are automatically base64 encoded/decoded in the client library. @return [String]

timestamp[RW]

Time at which the media data was last updated, in milliseconds since UNIX epoch Corresponds to the JSON property `timestamp` @return [Fixnum]

token[RW]

A unique fingerprint/version id for the media data Corresponds to the JSON property `token` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/youtube_partner_v1/classes.rb, line 2222
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/youtube_partner_v1/classes.rb, line 2227
def update!(**args)
  @algorithm = args[:algorithm] if args.key?(:algorithm)
  @bigstore_object_ref = args[:bigstore_object_ref] if args.key?(:bigstore_object_ref)
  @blob_ref = args[:blob_ref] if args.key?(:blob_ref)
  @blobstore2_info = args[:blobstore2_info] if args.key?(:blobstore2_info)
  @composite_media = args[:composite_media] if args.key?(:composite_media)
  @content_type = args[:content_type] if args.key?(:content_type)
  @content_type_info = args[:content_type_info] if args.key?(:content_type_info)
  @cosmo_binary_reference = args[:cosmo_binary_reference] if args.key?(:cosmo_binary_reference)
  @crc32c_hash = args[:crc32c_hash] if args.key?(:crc32c_hash)
  @diff_checksums_response = args[:diff_checksums_response] if args.key?(:diff_checksums_response)
  @diff_download_response = args[:diff_download_response] if args.key?(:diff_download_response)
  @diff_upload_request = args[:diff_upload_request] if args.key?(:diff_upload_request)
  @diff_upload_response = args[:diff_upload_response] if args.key?(:diff_upload_response)
  @diff_version_response = args[:diff_version_response] if args.key?(:diff_version_response)
  @download_parameters = args[:download_parameters] if args.key?(:download_parameters)
  @filename = args[:filename] if args.key?(:filename)
  @hash_prop = args[:hash_prop] if args.key?(:hash_prop)
  @hash_verified = args[:hash_verified] if args.key?(:hash_verified)
  @inline = args[:inline] if args.key?(:inline)
  @is_potential_retry = args[:is_potential_retry] if args.key?(:is_potential_retry)
  @length = args[:length] if args.key?(:length)
  @md5_hash = args[:md5_hash] if args.key?(:md5_hash)
  @media_id = args[:media_id] if args.key?(:media_id)
  @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop)
  @path = args[:path] if args.key?(:path)
  @reference_type = args[:reference_type] if args.key?(:reference_type)
  @sha1_hash = args[:sha1_hash] if args.key?(:sha1_hash)
  @sha256_hash = args[:sha256_hash] if args.key?(:sha256_hash)
  @timestamp = args[:timestamp] if args.key?(:timestamp)
  @token = args[:token] if args.key?(:token)
end