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.user.request;
22 import io.swagger.v3.oas.annotations.extensions.Extension;
23 import io.swagger.v3.oas.annotations.extensions.ExtensionProperty;
24 import io.swagger.v3.oas.annotations.media.Schema;
25 import javax.annotation.Nullable;
27 public record UsersSearchRestRequest(
28 @Schema(defaultValue = "true", description = "Return active/inactive users")
32 @Schema(description = "Return managed or non-managed users. Only available for managed instances, throws for non-managed instances")
36 @Schema(description = "Filter on login, name and email.\n"
37 + "This parameter can either perform an exact match, or a partial match (contains), it is case insensitive.")
41 @Schema(description = "Filter on externalIdentity.\n"
42 + "This parameter perform a case-sensitive exact match")
43 String externalIdentity,
46 @Schema(description = "Filter users based on the last connection date field. Only users who interacted with this instance at or after the date will be returned. "
47 + "The format must be ISO 8601 datetime format (YYYY-MM-DDThh:mm:ss±hhmm)",
48 example = "2020-01-01T00:00:00+0100")
49 String sonarQubeLastConnectionDateFrom,
52 @Schema(description = "Filter users based on the last connection date field. Only users that never connected or who interacted with this instance at "
53 + "or before the date will be returned. The format must be ISO 8601 datetime format (YYYY-MM-DDThh:mm:ss±hhmm)",
54 example = "2020-01-01T00:00:00+0100")
55 String sonarQubeLastConnectionDateTo,
58 @Schema(description = "Filter users based on the SonarLint last connection date field Only users who interacted with this instance using SonarLint at or after "
59 + "the date will be returned. The format must be ISO 8601 datetime format (YYYY-MM-DDThh:mm:ss±hhmm)",
60 example = "2020-01-01T00:00:00+0100")
61 String sonarLintLastConnectionDateFrom,
64 @Schema(description = "Filter users based on the SonarLint last connection date field. Only users that never connected or who interacted with this instance "
65 + "using SonarLint at or before the date will be returned. The format must be ISO 8601 datetime format (YYYY-MM-DDThh:mm:ss±hhmm)",
66 example = "2020-01-01T00:00:00+0100")
67 String sonarLintLastConnectionDateTo,
70 @Schema(description = "Filter users belonging to group. Only available for system administrators. Using != operator will exclude users from this group.",
71 extensions = @Extension(properties = {@ExtensionProperty(name = "internal", value = "true")}))