001 /*
002 * Sonar, open source software quality management tool.
003 * Copyright (C) 2008-2012 SonarSource
004 * mailto:contact AT sonarsource DOT com
005 *
006 * Sonar 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 * Sonar 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
017 * License along with Sonar; if not, write to the Free Software
018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
019 */
020 package org.sonar.wsclient.services;
021
022 public class Metric extends Model {
023
024 private String key;
025 private String name;
026 private int direction;
027 private String domain;
028 private String description;
029 private String type;
030 private Boolean userManaged;
031 private Boolean hidden;
032
033 public String getKey() {
034 return key;
035 }
036
037 public Metric setKey(String key) {
038 this.key = key;
039 return this;
040 }
041
042 public String getName() {
043 return name;
044 }
045
046 public Metric setName(String name) {
047 this.name = name;
048 return this;
049 }
050
051 public int getDirection() {
052 return direction;
053 }
054
055 public Metric setDirection(int direction) {
056 this.direction = direction;
057 return this;
058 }
059
060 public String getDomain() {
061 return domain;
062 }
063
064 public Metric setDomain(String domain) {
065 this.domain = domain;
066 return this;
067 }
068
069 public String getDescription() {
070 return description;
071 }
072
073 public Metric setDescription(String description) {
074 this.description = description;
075 return this;
076 }
077
078 public String getType() {
079 return type;
080 }
081
082 public Metric setType(String type) {
083 this.type = type;
084 return this;
085 }
086
087 public Boolean getHidden() {
088 return hidden;
089 }
090
091 public Metric setHidden(Boolean hidden) {
092 this.hidden = hidden;
093 return this;
094 }
095
096 public Boolean getUserManaged() {
097 return userManaged;
098 }
099
100 public Metric setUserManaged(Boolean userManaged) {
101 this.userManaged = userManaged;
102 return this;
103 }
104
105 @Override
106 public String toString() {
107 return new StringBuilder()
108 .append(name)
109 .append("(")
110 .append(key)
111 .append(")")
112 .toString();
113 }
114 }