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

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/discovery_v1/classes.rb,
lib/google/apis/discovery_v1/representations.rb,
lib/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.



879
880
881
# File 'lib/google/apis/discovery_v1/classes.rb', line 879

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>)


867
868
869
# File 'lib/google/apis/discovery_v1/classes.rb', line 867

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)


872
873
874
# File 'lib/google/apis/discovery_v1/classes.rb', line 872

def max_size
  @max_size
end

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

Supported upload protocols. Corresponds to the JSON property protocols



877
878
879
# File 'lib/google/apis/discovery_v1/classes.rb', line 877

def protocols
  @protocols
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



884
885
886
887
888
# File 'lib/google/apis/discovery_v1/classes.rb', line 884

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