Line data Source code
1 : // Copyright (C) 2022 The Android Open Source Project 2 : // 3 : // Licensed under the Apache License, Version 2.0 (the "License"); 4 : // you may not use this file except in compliance with the License. 5 : // You may obtain a copy of the License at 6 : // 7 : // http://www.apache.org/licenses/LICENSE-2.0 8 : // 9 : // Unless required by applicable law or agreed to in writing, software 10 : // distributed under the License is distributed on an "AS IS" BASIS, 11 : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 : // See the License for the specific language governing permissions and 13 : // limitations under the License. 14 : 15 : package com.google.gerrit.extensions.api.changes; 16 : 17 : import com.google.gerrit.common.Nullable; 18 : import com.google.gerrit.extensions.api.accounts.AccountInput; 19 : 20 : /** Information for creating a new patch set from a given patch. */ 21 1 : public class ApplyPatchPatchSetInput { 22 : 23 : /** The patch to be applied. */ 24 : public ApplyPatchInput patch; 25 : 26 : /** 27 : * The commit message for the new patch set. If not specified, a predefined message will be used. 28 : */ 29 : @Nullable public String commitMessage; 30 : 31 : /** 32 : * 40-hex digit SHA-1 of the commit which will be the parent commit of the newly created patch 33 : * set. If set, it must be a merged commit or a change revision on the destination branch. 34 : * Otherwise, the target change's branch tip will be used. 35 : */ 36 : @Nullable public String base; 37 : 38 : /** 39 : * The author of the new patch set. Must include both {@link AccountInput#name} and {@link 40 : * AccountInput#email} fields. 41 : */ 42 : @Nullable public AccountInput author; 43 : }