001/* 002 * SonarQube 003 * Copyright (C) 2009-2016 SonarSource SA 004 * mailto:contact AT sonarsource DOT com 005 * 006 * This program 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 * This program 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 */ 020package org.sonarqube.ws.client.project; 021 022import javax.annotation.CheckForNull; 023import javax.annotation.Nullable; 024 025/** 026 * @since 5.5 027 */ 028public class DeleteRequest { 029 030 private final String id; 031 private final String key; 032 033 private DeleteRequest(Builder builder) { 034 this.id = builder.id; 035 this.key = builder.key; 036 } 037 038 @CheckForNull 039 public String getKey() { 040 return key; 041 } 042 043 @CheckForNull 044 public String getId() { 045 return id; 046 } 047 048 public static Builder builder() { 049 return new Builder(); 050 } 051 052 public static class Builder { 053 private String id; 054 private String key; 055 056 private Builder() { 057 } 058 059 public Builder setId(@Nullable String id) { 060 this.id = id; 061 return this; 062 } 063 064 public Builder setKey(@Nullable String key) { 065 this.key = key; 066 return this; 067 } 068 069 public DeleteRequest build() { 070 return new DeleteRequest(this); 071 } 072 } 073}