Class: Google::Apis::YoutubePartnerV1::MediaRequestInfo

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/youtube_partner_v1/classes.rb,
generated/google/apis/youtube_partner_v1/representations.rb,
generated/google/apis/youtube_partner_v1/representations.rb

Overview

Extra information added to operations that support Scotty media requests.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MediaRequestInfo

Returns a new instance of MediaRequestInfo.



2301
2302
2303
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2301

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#current_bytesFixnum

The number of current bytes uploaded or downloaded. Corresponds to the JSON property currentBytes

Returns:

  • (Fixnum)


2262
2263
2264
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2262

def current_bytes
  @current_bytes
end

#custom_dataString

Data to be copied to backend requests. Custom data is returned to Scotty in the agent_state field, which Scotty will then provide in subsequent upload notifications. Corresponds to the JSON property customData

Returns:

  • (String)


2269
2270
2271
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2269

def custom_data
  @custom_data
end

#diff_object_versionString

Set if the http request info is diff encoded. The value of this field is the version number of the base revision. This is corresponding to Apiary's mediaDiffObjectVersion (//depot/google3/java/com/google/api/server/media/ variable/DiffObjectVersionVariable.java). See go/esf-scotty-diff-upload for more information. Corresponds to the JSON property diffObjectVersion

Returns:

  • (String)


2278
2279
2280
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2278

def diff_object_version
  @diff_object_version
end

#notification_typeString

The type of notification received from Scotty. Corresponds to the JSON property notificationType

Returns:

  • (String)


2283
2284
2285
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2283

def notification_type
  @notification_type
end

#request_idString

The Scotty request ID. Corresponds to the JSON property requestId

Returns:

  • (String)


2288
2289
2290
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2288

def request_id
  @request_id
end

#total_bytesFixnum

The total size of the file. Corresponds to the JSON property totalBytes

Returns:

  • (Fixnum)


2293
2294
2295
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2293

def total_bytes
  @total_bytes
end

#total_bytes_is_estimatedBoolean Also known as: total_bytes_is_estimated?

Whether the total bytes field contains an estimated data. Corresponds to the JSON property totalBytesIsEstimated

Returns:

  • (Boolean)


2298
2299
2300
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2298

def total_bytes_is_estimated
  @total_bytes_is_estimated
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2306
2307
2308
2309
2310
2311
2312
2313
2314
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 2306

def update!(**args)
  @current_bytes = args[:current_bytes] if args.key?(:current_bytes)
  @custom_data = args[:custom_data] if args.key?(:custom_data)
  @diff_object_version = args[:diff_object_version] if args.key?(:diff_object_version)
  @notification_type = args[:notification_type] if args.key?(:notification_type)
  @request_id = args[:request_id] if args.key?(:request_id)
  @total_bytes = args[:total_bytes] if args.key?(:total_bytes)
  @total_bytes_is_estimated = args[:total_bytes_is_estimated] if args.key?(:total_bytes_is_estimated)
end