A ScratchFile represents raw file content used as intermediate input or output of
pipeline steps (see AutomationStepData). Unlike File, ScratchFiles are not surfaced
in the Data Catalog because they typically represent transient processing artifacts
rather than standalone valuable data. When a ScratchFile is promoted to user-visible
status, it is linked to a File object that appears in the Data Catalog. The
originAutomationStepData field tracks which pipeline step produced this file.
To upload content, create a ScratchFile; it starts with uploadStatus NOT_UPLOADED and
returns a presigned uploadUrl. PUT the file's bytes to uploadUrl, then update the
ScratchFile with uploadStatus SUCCEEDED to finalize the upload. Finalizing verifies the
content was uploaded (up to 5GB) and makes it available via downloadUrl; uploadUrl is
only returned until the upload is finalized. If the upload cannot be completed, leave the
ScratchFile unfinalized; it remains NOT_UPLOADED. Alternatively, use the create-and-upload
method to create and finalize a ScratchFile in one request.