/**
 * JBoss, Home of Professional Open Source.
 * Copyright 2014 Red Hat, Inc., and individual contributors
 * as indicated by the @author tags.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.jboss.pnc.causeway.rest.pnc;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * Author: Michal Szynkiewicz, michal.l.szynkiewicz@gmail.com Date: 8/25/16 Time: 7:34 AM
 */
@Data
@Deprecated
public class MilestoneReleaseResultRest {

    private final String eventType = "BREW_IMPORT_SUCCESS";

    private Integer milestoneId;

    private ReleaseStatus releaseStatus;
    private String errorMessage;

    private List<BuildImportResultRest> builds = new ArrayList<>();

    @JsonIgnore
    public boolean isSuccessful() {
        return !builds.isEmpty() && allBuildsSuccessful();
    }

    private boolean allBuildsSuccessful() {
        return builds.stream().allMatch(r -> r.getStatus() == BuildImportStatus.SUCCESSFUL);
    }
}

@@ -1036,16 +1036,23 @@
 private 
+static 
 final St
@@ -1060,17 +1060,15 @@
 ing 
-eventType
+SUCCESS
  = %22
@@ -1088,16 +1088,81 @@
 UCCESS%22;
+%0A    private static final String FAILURE = %22BREW_IMPORT_FAILURE%22;
 %0A%0A    pr
@@ -1333,16 +1333,171 @@
 t%3C%3E();%0A%0A
+    public String getEventType() %7B%0A        if (isSuccessful()) %7B%0A            return SUCCESS;%0A        %7D else %7B%0A            return FAILURE;%0A        %7D%0A    %7D%0A%0A
     @Jso

Return correct eventType in milestone release result.