aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/openecomp/vid/scheduler/SchedulerResponseWrapper.java
blob: 5f148c06b452eeec056ee0f3a29118288d76ac41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package org.openecomp.vid.scheduler;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * This wrapper encapsulates the Scheduler response
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
	    "status",
	    "entity",
	    "uuid"
})

public class SchedulerResponseWrapper {
	
	@JsonProperty("status")
	private int status;

	@JsonProperty("entity")
	private String entity;
	
	@JsonProperty("uuid")
	private String uuid;

	@JsonProperty("entity")
    public String getEntity() {
        return entity;
    }
	
	@JsonProperty("status")
    public int getStatus() {
        return status;
    }
	
	@JsonProperty("uuid")
    public String getUuid() {
        return uuid;
    }	
	
	@JsonProperty("status")
    public void setStatus(int v) {
        this.status = v;
    }

	@JsonProperty("entity")
    public void setEntity(String v) {
        this.entity = v;
    }
	
	@JsonProperty("uuid")
    public void setUuid(String v) {
        this.uuid = v;
    }	

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }

    public String getResponse () {
    	
    	StringBuilder b = new StringBuilder ("{ \"status\": ");
    	b.append(getStatus()).append(", \"entity\": \" " ).append(this.getEntity()).append("\" ,\"uuid\": \"" ).append(this.getUuid()).append("\"}");
        return (b.toString());
    }

}