001 /*
002 * SonarQube, open source software quality management tool.
003 * Copyright (C) 2008-2014 SonarSource
004 * mailto:contact AT sonarsource DOT com
005 *
006 * SonarQube is free software; you can redistribute it and/or
007 * modify it under the terms of the GNU Lesser General Public
008 * License as published by the Free Software Foundation; either
009 * version 3 of the License, or (at your option) any later version.
010 *
011 * SonarQube is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014 * Lesser General Public License for more details.
015 *
016 * You should have received a copy of the GNU Lesser General Public License
017 * along with this program; if not, write to the Free Software Foundation,
018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
019 */
020 package org.sonar.wsclient.services;
021
022 import javax.annotation.CheckForNull;
023 import javax.annotation.Nullable;
024
025 /**
026 * @author Evgeny Mandrikov
027 */
028 public class Server extends Model {
029
030 public static enum Status {
031 SETUP,
032 UP,
033 DOWN,
034
035 /**
036 * @since 3.3
037 */
038 MIGRATION_RUNNING
039 }
040
041 private String id;
042 private String version;
043 private Status status;
044 private String statusMessage;
045
046 @CheckForNull
047 public String getVersion() {
048 return version;
049 }
050
051 @CheckForNull
052 public String getId() {
053 return id;
054 }
055
056 public Server setVersion(@Nullable String s) {
057 this.version = s;
058 return this;
059 }
060
061 public Server setId(@Nullable String id) {
062 this.id = id;
063 return this;
064 }
065
066 @CheckForNull
067 public Status getStatus() {
068 return status;
069 }
070
071 @CheckForNull
072 public String getStatusMessage() {
073 return statusMessage;
074 }
075
076 public Server setStatus(Status status) {
077 this.status = status;
078 return this;
079 }
080
081 public Server setStatusMessage(@Nullable String statusMessage) {
082 this.statusMessage = statusMessage;
083 return this;
084 }
085
086 }