DocumentationAPI reference
Rust · 0.1.0
ImportMemosRequest
A stateful upload request: start with spec, then continue with uploadId.
One upload alternative per request
spec and uploadId are alternatives, not fields to send together. writeOffset and totalSize are decimal strings; data is base64 in REST JSON. Resume with the server's committedSize and finish only after all bytes arrive. Read the operation page for finalization, retry and validation behavior.
Where this schema is used
These links are derived from direct references in the protocol snapshot. Follow the calling operation for authentication, accepted fields and runtime behavior; a reusable resource schema is not by itself a complete write request.
Shape and fields
object
| Field | Type / requirement | Description |
|---|---|---|
name | string Required | Required. The user who receives the memos. Must be the caller. Format: users/{user} |
spec | allOf ImportMemosSpec | Starts a new upload. The same call may also carry data and finish_write. |
uploadId | string | Continues the upload identified by a previous response. |
writeOffset | string Required | Required. Zero-based byte offset at which data is written. Must equal the committed size, except when retrying the most recently accepted chunk with identical bytes and offset, which is accepted without writing again. |
data | string (bytes) | Optional. Archive bytes, at most max_chunk_size long. With no data and finish_write false, the call reports progress without writing, and write_offset is ignored. |
finishWrite | boolean | Optional. Finish the upload after writing data. The committed size must then equal total_size. The archive is validated and, unless validate_only is set, imported. Any later call for an imported upload returns the same report. |
validateOnly | boolean | Optional. On a finishing call, validate the archive and return the plan without importing. The upload stays staged so a later finishing call can import it. |
conflictPolicy | string (enum)CONFLICT_POLICY_UNSPECIFIED · SKIP · REPLACE · DUPLICATE | Optional. Read on the finishing call that imports. Unspecified means SKIP. |
Complete schema
Use this complete JSON definition for constraints and nested structure. A field's presence here does not mean it is writable by every caller.
{
"required": [
"name",
"writeOffset"
],
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Required. The user who receives the memos. Must be the caller.\n Format: users/{user}"
},
"spec": {
"allOf": [
{
"$ref": "#/components/schemas/ImportMemosSpec"
}
],
"description": "Starts a new upload. The same call may also carry data and finish_write."
},
"uploadId": {
"type": "string",
"description": "Continues the upload identified by a previous response."
},
"writeOffset": {
"type": "string",
"description": "Required. Zero-based byte offset at which data is written. Must equal the\n committed size, except when retrying the most recently accepted chunk\n with identical bytes and offset, which is accepted without writing again."
},
"data": {
"type": "string",
"description": "Optional. Archive bytes, at most max_chunk_size long. With no data and\n finish_write false, the call reports progress without writing, and\n write_offset is ignored.",
"format": "bytes"
},
"finishWrite": {
"type": "boolean",
"description": "Optional. Finish the upload after writing data. The committed size must\n then equal total_size. The archive is validated and, unless\n validate_only is set, imported. Any later call for an imported upload\n returns the same report."
},
"validateOnly": {
"type": "boolean",
"description": "Optional. On a finishing call, validate the archive and return the plan\n without importing. The upload stays staged so a later finishing call can\n import it."
},
"conflictPolicy": {
"enum": [
"CONFLICT_POLICY_UNSPECIFIED",
"SKIP",
"REPLACE",
"DUPLICATE"
],
"type": "string",
"description": "Optional. Read on the finishing call that imports. Unspecified means SKIP.",
"format": "enum"
}
}
}