MediaResponseInfo

This message is for backends to pass their scotty media specific fields to ESF. Backend will include this in their response message to ESF. Example: ExportFile is an rpc defined for upload using scotty from ESF.

rpc ExportFile(ExportFileRequest) returns (ExportFileResponse)

Message ExportFileResponse will include apiserving.MediaResponseInfo to tell ESF about data like dynamicDropzone it needs to pass to Scotty.

message ExportFileResponse { optional gdata.Media blob = 1; optional apiserving.MediaResponseInfo media_response_info = 2 }

JSON representation
{
  "dynamicDropzone": string,
  "customData": string,
  "dynamicDropTarget": string,
  "dataStorageTransform": string,
  "trafficClassField": enum (TrafficClass),
  "mediaForDiff": {
    object (Media)
  },
  "verifyHashFromHeader": boolean,
  "requestClass": enum (RequestClass),
  "scottyCustomerLog": string,
  "scottyAgentUserId": string,
  "originalObjectBlobMintIndex": integer,
  "destinationBlobMintIndex": integer
}
Fields
dynamicDropzone

string

Specifies the Scotty dropzone to use for uploads.

customData

string

Data to copy from backend response to the next backend requests. Custom data is returned to Scotty in the agentState field, which Scotty will then provide in subsequent upload notifications.

dynamicDropTarget

string (bytes format)

Specifies the Scotty Drop Target to use for uploads. If present in a media response, Scotty does not upload to a standard drop zone. Instead, Scotty saves the upload directly to the location specified in this drop target. Unlike drop zones, the drop target is the final storage location for an upload. So, the agent does not need to clone the blob at the end of the upload. The agent is responsible for garbage collecting any orphaned blobs that may occur due to aborted uploads. For more information, see the drop target design doc here: http://goto/ScottyDropTarget This field will be preferred to dynamicDropzone. If provided, the identified field in the response must be of the type uploader.agent.DropTarget.

A base64-encoded string.

dataStorageTransform

string (bytes format)

Specifies any transformation to be applied to data before persisting it or retrieving from storage. E.g., encryption options for blobstore2. This should be of the form uploader_service.DataStorageTransform.

A base64-encoded string.

trafficClassField

enum (TrafficClass)

Specifies the TrafficClass that Scotty should use for any RPCs to fetch the response bytes. Will override the traffic class GTOS of the incoming http request. This is a temporary field to facilitate whitelisting and experimentation by the bigstore agent only. For instance, this does not apply to RTMP reads. WARNING: DO NOT USE WITHOUT PERMISSION FROM THE SCOTTY TEAM.

mediaForDiff

object (Media)

Diff Updates must respond to a START notification with this Media proto to tell Scotty to decode the diff encoded payload and apply the diff against this field. If the request was diff encoded, but this field is not set, Scotty will treat the encoding as identity. This is corresponding to Apiary's DiffUploadResponse.original_object (//depot/google3/gdata/rosy/proto/data.proto?l=413). See go/esf-scotty-diff-upload for more information.

verifyHashFromHeader

boolean

Tells Scotty to verify hashes on the agent's behalf by parsing out the X-Goog-Hash header.

requestClass

enum (RequestClass)

Request class to use for all Blobstore operations for this request.

scottyCustomerLog

string (bytes format)

Customer-specific data to be recorded in the Scotty logs type is logs_proto_scotty.CustomerLog

A base64-encoded string.

scottyAgentUserId

string (int64 format)

Requester ID passed along to be recorded in the Scotty logs

originalObjectBlobMintIndex

integer

For the first notification of a |diff_encoded| HttpRequestInfo, this is the index of the blob mint that Scotty should use when reading the original blob. This field is optional. It's not required ever, even if destinationBlobMintIndex is set. In situations like that, we will use the destination blob's mint for the destination blob and regular blob ACL checks for the original object.

Note: This field is only for use by Drive API for diff uploads.

destinationBlobMintIndex

integer

For the first notification of a |diff_encoded| HttpRequestInfo, this is the index of the blob mint that Scotty should use when writing the resulting blob. This field is optional. It's not required ever, even if originalObjectBlobMintIndex is set. In situations like that, we will use the destination blob's mint for the destination blob and regular blob ACL checks for the original object.

Note: This field is only for use by Drive API for diff uploads.

TrafficClass

This enum may be extended in the future. NOTE: If you modify or add enums here, be sure to update //java/com/google/net/base/TrafficClassComparator.java and //net/base/google_iptos.h. WARNING: DO NOT write code that depends on this enum not growing, unless you explicitly want your code to fail compilation, or your tests to fail, when a new enum member is added. Things that you don't want to do include: 1. Using TrafficClass variable as a switch variable, without supplying a default case. 2. Supplying a default case, but doing LOG(FATAL) there. 3. Generating protobufs, that contain entries for each of the enum's members, then comparing the generated protobufs against a golden copy (the new members will not be present in the golden, and the comparison will fail).

Enums
BE1 Application-selectable traffic classes Best effort
AF1 Assured forwarding priority 1
AF2 Assured forwarding priority 2
AF3 Assured forwarding priority 3
AF4 Assured forwarding priority 4
NC1 Network control
NC0 Network control
BE0 Best effort at high packet loss
LLQ Low-latency queue (LLQ) best effort (go/llq)
LLQ1 LLQ assured forwarding priority 1 (go/llq2)
LLQ2 LLQ assured forwarding priority 2 (go/llq2)
LLQ3 LLQ assured forwarding priority 3 (go/llq3)

RequestClass

The request class is used for prioritizing requests and monitoring.

Enums
UNKNOWN_REQUEST_CLASS Unpopulated requestClass in log files will be taken as 0 in dremel query. GoogleSQL will try to cast it to enum by default. An unused 0 value is added to avoid GoogleSQL casting error. Please refer to b/69677280.
LATENCY_SENSITIVE A latency-sensitive request.
PRODUCTION_BATCH A request generated by a batch process.
BEST_EFFORT A best-effort request.