MediaRequestInfo

Extra information added to operations that support Scotty media requests.

JSON representation
{
  "requestId": string,
  "notificationType": enum (NotificationType),
  "currentBytes": string,
  "totalBytes": string,
  "totalBytesIsEstimated": boolean,
  "customData": string,
  "diffObjectVersion": string,
  "finalStatus": integer,
  "requestReceivedParamsServingInfo": string
}
Fields
requestId

string

The Scotty request ID.

notificationType

enum (NotificationType)

The type of notification received from Scotty.

currentBytes

string (int64 format)

The number of current bytes uploaded or downloaded.

totalBytes

string (int64 format)

The total size of the file.

totalBytesIsEstimated

boolean

Whether the total bytes field contains an estimated data.

customData

string

Data to be copied to backend requests. Custom data is returned to Scotty in the agentState field, which Scotty will then provide in subsequent upload notifications.

diffObjectVersion

string

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.

finalStatus

integer

The existence of the finalStatus field indicates that this is the last call to the agent for this requestId. http://google3/uploader/agent/scotty_agent.proto?l=737&rcl=347601929

requestReceivedParamsServingInfo

string (bytes format)

The partition of the Scotty server handling this request. type is uploader_service.RequestReceivedParamsServingInfo LINT.IfChange(request_received_params_serving_info_annotations) LINT.ThenChange()

A base64-encoded string.

NotificationType

Enumeration of the possible notification types for requests from Scotty.

Enums
START

Such requests signals the start of a request containing media upload. Only the media field(s) in the inserted/updated resource are set.

The response should either return an error or succeed. On success, responses don't need to contain anything.

PROGRESS

Such requests signals that the upload has progressed and that the backend might want to access the media file specified in relevant fields in the resource. Only the media field(s) in the inserted/updated resource are set.

The response should either return an error or succeed. On success, responses don't need to contain anything.

END

Such requests signals the end of a request containing media upload. END should be handled just like normal Insert/Upload requests, that is, they should process the request and return a complete resource in the response.

Pointers to media data (a GFS path usually) appear in the relevant fields in the inserted/updated resource. See gdata.Media in data.proto.

RESPONSE_SENT

Such requests occur after an END and signal that the response has been sent back to the client. RESPONSE_SENT is only sent to the backend if it is configured to receive them.

The response does not need to contain anything.

ERROR

Such requests indicate that an error occurred while processing the request. ERROR is only sent to the backend if it is configured to receive them. It is not guaranteed that all errors will result in this notification to the backend, even if the backend requests them.

Since these requests are just for informational purposes, the response does not need to contain anything.