Class: Google::Apis::ServiceusageV1::MediaUpload

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

Overview

Defines the Media configuration for a service in case of an upload. Use this only for Scotty Requests. Do not use this for media support using Bytestream, add instead [][google.bytestream.RestByteStream] as an API to your configuration for Bytestream methods.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ MediaUpload

Returns a new instance of MediaUpload



2675
2676
2677
# File 'generated/google/apis/serviceusage_v1/classes.rb', line 2675

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

Instance Attribute Details

#complete_notificationBoolean Also known as: complete_notification?

A boolean that determines whether a notification for the completion of an upload should be sent to the backend. These notifications will not be seen by the client and will not consume quota. Corresponds to the JSON property completeNotification

Returns:

  • (Boolean)


2631
2632
2633
# File 'generated/google/apis/serviceusage_v1/classes.rb', line 2631

def complete_notification
  @complete_notification
end

#dropzoneString

Name of the Scotty dropzone to use for the current API. Corresponds to the JSON property dropzone

Returns:

  • (String)


2637
2638
2639
# File 'generated/google/apis/serviceusage_v1/classes.rb', line 2637

def dropzone
  @dropzone
end

#enabledBoolean Also known as: enabled?

Whether upload is enabled. Corresponds to the JSON property enabled

Returns:

  • (Boolean)


2642
2643
2644
# File 'generated/google/apis/serviceusage_v1/classes.rb', line 2642

def enabled
  @enabled
end

#max_sizeFixnum

Optional maximum acceptable size for an upload. The size is specified in bytes. Corresponds to the JSON property maxSize

Returns:

  • (Fixnum)


2649
2650
2651
# File 'generated/google/apis/serviceusage_v1/classes.rb', line 2649

def max_size
  @max_size
end

#mime_typesArray<String>

An array of mimetype patterns. Esf will only accept uploads that match one of the given patterns. Corresponds to the JSON property mimeTypes

Returns:

  • (Array<String>)


2655
2656
2657
# File 'generated/google/apis/serviceusage_v1/classes.rb', line 2655

def mime_types
  @mime_types
end

#progress_notificationBoolean Also known as: progress_notification?

Whether to receive a notification for progress changes of media upload. Corresponds to the JSON property progressNotification

Returns:

  • (Boolean)


2660
2661
2662
# File 'generated/google/apis/serviceusage_v1/classes.rb', line 2660

def progress_notification
  @progress_notification
end

#start_notificationBoolean Also known as: start_notification?

Whether to receive a notification on the start of media upload. Corresponds to the JSON property startNotification

Returns:

  • (Boolean)


2666
2667
2668
# File 'generated/google/apis/serviceusage_v1/classes.rb', line 2666

def start_notification
  @start_notification
end

#upload_serviceString

DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. Specify name of the upload service if one is used for upload. Corresponds to the JSON property uploadService

Returns:

  • (String)


2673
2674
2675
# File 'generated/google/apis/serviceusage_v1/classes.rb', line 2673

def upload_service
  @upload_service
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
# File 'generated/google/apis/serviceusage_v1/classes.rb', line 2680

def update!(**args)
  @complete_notification = args[:complete_notification] if args.key?(:complete_notification)
  @dropzone = args[:dropzone] if args.key?(:dropzone)
  @enabled = args[:enabled] if args.key?(:enabled)
  @max_size = args[:max_size] if args.key?(:max_size)
  @mime_types = args[:mime_types] if args.key?(:mime_types)
  @progress_notification = args[:progress_notification] if args.key?(:progress_notification)
  @start_notification = args[:start_notification] if args.key?(:start_notification)
  @upload_service = args[:upload_service] if args.key?(:upload_service)
end