3 * Copyright (C) 2009-2024 SonarSource SA
4 * mailto:info AT sonarsource DOT com
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 3 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 package org.sonar.server.v2.api.projects.request;
22 import io.swagger.v3.oas.annotations.media.Schema;
23 import javax.annotation.Nullable;
24 import javax.validation.constraints.NotEmpty;
25 import javax.validation.constraints.NotNull;
27 public record BoundProjectCreateRestRequest(
30 @Schema(description = "Key of the project to create")
34 @Schema(description = "Name of the project to create")
38 @Schema(description = "Identifier of DevOps platform configuration to use.")
39 String devOpsPlatformSettingId,
44 Identifier of the DevOps platform repository to import:
45 - repository slug for GitHub and Bitbucket Cloud
46 - repository id for GitLab
48 String repositoryIdentifier,
51 @Schema(description = """
52 Project New Code Definition Type
53 New code definitions of the following types are allowed:
56 - REFERENCE_BRANCH - will default to the main branch.
58 String newCodeDefinitionType,
61 @Schema(description = """
62 Project New Code Definition Value
63 For each new code definition type, a different value is expected:
64 - no value, when the new code definition type is PREVIOUS_VERSION and REFERENCE_BRANCH
65 - a number between 1 and 90, when the new code definition type is NUMBER_OF_DAYS
67 String newCodeDefinitionValue,
70 @Schema(description = "True if project is part of a mono repo.")