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    import java.util.Date;
026    
027    /**
028     * @since 2.10
029     */
030    public class ManualMeasure extends Model {
031    
032      private Long id;
033      private String metricKey;
034      private String resourceKey;
035      private Double value;
036      private String textValue;
037      private Date createdAt;
038      private Date updatedAt;
039      private String userLogin;
040      private String username;
041    
042      public ManualMeasure() {
043      }
044    
045      @CheckForNull
046      public Long getId() {
047        return id;
048      }
049    
050      public ManualMeasure setId(@Nullable Long id) {
051        this.id = id;
052        return this;
053      }
054    
055      @CheckForNull
056      public String getMetricKey() {
057        return metricKey;
058      }
059    
060      public ManualMeasure setMetricKey(@Nullable String metricKey) {
061        this.metricKey = metricKey;
062        return this;
063      }
064    
065      @CheckForNull
066      public Double getValue() {
067        return value;
068      }
069    
070      public ManualMeasure setValue(@Nullable Double value) {
071        this.value = value;
072        return this;
073      }
074    
075      @CheckForNull
076      public String getTextValue() {
077        return textValue;
078      }
079    
080      public ManualMeasure setTextValue(@Nullable String textValue) {
081        this.textValue = textValue;
082        return this;
083      }
084    
085      @CheckForNull
086      public Date getCreatedAt() {
087        return createdAt;
088      }
089    
090      public ManualMeasure setCreatedAt(@Nullable Date createdAt) {
091        this.createdAt = createdAt;
092        return this;
093      }
094    
095      @CheckForNull
096      public Date getUpdatedAt() {
097        return updatedAt;
098      }
099    
100      public ManualMeasure setUpdatedAt(@Nullable Date updatedAt) {
101        this.updatedAt = updatedAt;
102        return this;
103      }
104    
105      @CheckForNull
106      public String getUserLogin() {
107        return userLogin;
108      }
109    
110      public ManualMeasure setUserLogin(@Nullable String userLogin) {
111        this.userLogin = userLogin;
112        return this;
113      }
114    
115      @CheckForNull
116      public String getUsername() {
117        return username;
118      }
119    
120      public ManualMeasure setUsername(@Nullable String username) {
121        this.username = username;
122        return this;
123      }
124    
125      @CheckForNull
126      public String getResourceKey() {
127        return resourceKey;
128      }
129    
130      public ManualMeasure setResourceKey(@Nullable String resourceKey) {
131        this.resourceKey = resourceKey;
132        return this;
133      }
134    
135      @Override
136      public String toString() {
137        return new StringBuilder().append("Measure{")
138          .append("id='").append(id).append('\'')
139          .append("resourceKey='").append(resourceKey).append('\'')
140          .append("metricKey='").append(metricKey).append('\'')
141          .append(", value=").append(value)
142          .append(", textValue='").append(textValue).append('\'')
143          .append('}').toString();
144      }
145    }