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 */ 020 021package org.sonarqube.ws.client.ce; 022 023import javax.annotation.CheckForNull; 024import javax.annotation.Nullable; 025 026public class ActivityStatusWsRequest { 027 private final String componentId; 028 private final String componentKey; 029 030 private ActivityStatusWsRequest(Builder builder) { 031 this.componentId = builder.componentId; 032 this.componentKey = builder.componentKey; 033 } 034 035 @CheckForNull 036 public String getComponentId() { 037 return componentId; 038 } 039 040 @CheckForNull 041 public String getComponentKey() { 042 return componentKey; 043 } 044 045 public static Builder newBuilder() { 046 return new Builder(); 047 } 048 049 public static class Builder { 050 private String componentId; 051 private String componentKey; 052 053 private Builder() { 054 // enforce newBuilder() use for instantiation 055 } 056 057 public Builder setComponentId(@Nullable String componentId) { 058 this.componentId = componentId; 059 return this; 060 } 061 062 public Builder setComponentKey(@Nullable String componentKey) { 063 this.componentKey = componentKey; 064 return this; 065 } 066 067 public ActivityStatusWsRequest build() { 068 return new ActivityStatusWsRequest(this); 069 } 070 } 071}