diff options
Diffstat (limited to 'proto/internal/upload_patchset_file.proto')
-rw-r--r-- | proto/internal/upload_patchset_file.proto | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/proto/internal/upload_patchset_file.proto b/proto/internal/upload_patchset_file.proto new file mode 100644 index 0000000000..3c1748b0f8 --- /dev/null +++ b/proto/internal/upload_patchset_file.proto @@ -0,0 +1,61 @@ +// Copyright 2008 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package codereview.internal; +option java_package = "com.google.codereview.internal"; + +import "git_meta.proto"; + +message UploadPatchsetFileRequest { + // Unique key for the patchset. + // + required string patchset_key = 10; + + // Path of the file once the patch is applied + // + required string file_name = 11; + + // Type of change made to the file + // + enum StatusType { + ADD = 1; + MODIFY = 2; + DELETE = 3; + } + required StatusType status = 13; + + // Deflated base content for the file (pre-image), encoding + // is not specified, but should be UTF-8. base_id is the + // Git style blob SHA-1 hash of the inflated base_data. + // + optional bytes base_z = 14; + optional string base_id = 15; + + // Deflated gerrit friendly patch format for the file + // + optional bytes patch_z = 16; + optional string patch_id = 17; + optional string final_id = 18; +} + +message UploadPatchsetFileResponse { + enum CodeType { + CREATED = 1; + + CLOSED = 2; // the patchset is not accepting files + UNKNOWN_PATCHSET = 3; // the patchset key is invalid + PATCHING_ERROR = 4; // the patch could not be applied + } + required CodeType status_code = 10; +} |