Class: Google::Apis::YoutubePartnerV1::ContentTypeInfo

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

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ContentTypeInfo

Returns a new instance of ContentTypeInfo.



1450
1451
1452
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 1450

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

Instance Attribute Details

#best_guessString

Scotty's best guess of what the content type of the file is. Corresponds to the JSON property bestGuess

Returns:

  • (String)


1423
1424
1425
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 1423

def best_guess
  @best_guess
end

#from_bytesString

The content type of the file derived by looking at specific bytes (i.e. "magic bytes") of the actual file. Corresponds to the JSON property fromBytes

Returns:

  • (String)


1429
1430
1431
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 1429

def from_bytes
  @from_bytes
end

#from_file_nameString

The content type of the file derived from the file extension of the original file name used by the client. Corresponds to the JSON property fromFileName

Returns:

  • (String)


1435
1436
1437
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 1435

def from_file_name
  @from_file_name
end

#from_headerString

The content type of the file as specified in the request headers, multipart headers, or RUPIO start request. Corresponds to the JSON property fromHeader

Returns:

  • (String)


1441
1442
1443
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 1441

def from_header
  @from_header
end

#from_url_pathString

The content type of the file derived from the file extension of the URL path. The URL path is assumed to represent a file name (which is typically only true for agents that are providing a REST API). Corresponds to the JSON property fromUrlPath

Returns:

  • (String)


1448
1449
1450
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 1448

def from_url_path
  @from_url_path
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1455
1456
1457
1458
1459
1460
1461
# File 'generated/google/apis/youtube_partner_v1/classes.rb', line 1455

def update!(**args)
  @best_guess = args[:best_guess] if args.key?(:best_guess)
  @from_bytes = args[:from_bytes] if args.key?(:from_bytes)
  @from_file_name = args[:from_file_name] if args.key?(:from_file_name)
  @from_header = args[:from_header] if args.key?(:from_header)
  @from_url_path = args[:from_url_path] if args.key?(:from_url_path)
end