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 and Server)
46 - repository id for GitLab
48 String repositoryIdentifier,
53 Identifier of the DevOps platform project in which the repository is located.
54 This is only needed for Azure and BitBucket Server platforms
56 String projectIdentifier,
59 @Schema(description = """
60 Project New Code Definition Type
61 New code definitions of the following types are allowed:
64 - REFERENCE_BRANCH - will default to the main branch.
66 String newCodeDefinitionType,
69 @Schema(description = """
70 Project New Code Definition Value
71 For each new code definition type, a different value is expected:
72 - no value, when the new code definition type is PREVIOUS_VERSION and REFERENCE_BRANCH
73 - a number between 1 and 90, when the new code definition type is NUMBER_OF_DAYS
75 String newCodeDefinitionValue,
78 @Schema(description = "True if project is part of a mono repo.")