Class: Google::Apis::DiscoveryV1::RestMethod::MediaUpload

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

Overview

Media upload parameters.

Defined Under Namespace

Classes: Protocols

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MediaUpload

Returns a new instance of MediaUpload.



799
800
801
# File 'generated/google/apis/discovery_v1/classes.rb', line 799

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

Instance Attribute Details

#acceptArray<String>

MIME Media Ranges for acceptable media uploads to this method. Corresponds to the JSON property accept

Returns:

  • (Array<String>)


787
788
789
# File 'generated/google/apis/discovery_v1/classes.rb', line 787

def accept
  @accept
end

#max_sizeString

Maximum size of a media upload, such as "1MB", "2GB" or "3TB". Corresponds to the JSON property maxSize

Returns:

  • (String)


792
793
794
# File 'generated/google/apis/discovery_v1/classes.rb', line 792

def max_size
  @max_size
end

#protocolsGoogle::Apis::DiscoveryV1::RestMethod::MediaUpload::Protocols

Supported upload protocols. Corresponds to the JSON property protocols



797
798
799
# File 'generated/google/apis/discovery_v1/classes.rb', line 797

def protocols
  @protocols
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



804
805
806
807
808
# File 'generated/google/apis/discovery_v1/classes.rb', line 804

def update!(**args)
  @accept = args[:accept] if args.key?(:accept)
  @max_size = args[:max_size] if args.key?(:max_size)
  @protocols = args[:protocols] if args.key?(:protocols)
end