aboutsummaryrefslogtreecommitdiffstats
path: root/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/CloudifyEvent.java
blob: d95ff24d81cfc96a860c4c4c48f9574370ebf4ad (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*******************************************************************************
 * =============LICENSE_START=========================================================
 *
 * =================================================================================
 *  Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
 * ================================================================================
 *  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.
 * ============LICENSE_END=========================================================
 *
 *  ECOMP is a trademark and service mark of AT&T Intellectual Property.
 *******************************************************************************/
package org.onap.ccsdk.dashboard.model;

import java.util.LinkedList;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

public class CloudifyEvent extends ECTransportModel {

    /** The id of the blueprint the execution is in the context of. */
    public final String blueprint_id;
    /** The id of the deployment the execution is in the context of. */
    public final String deployment_id;
    /** List of errors that happened while executing a given task */
    public final List<CloudifyErrorCause> error_causes;
    /** The executions status. */
    public final String event_type;
    /** The time the execution was queued at. */
    public final String execution_id;
    /** log level */
    public final String level;
    /** logger id */
    public final String logger;
    /** message text */
    public final String message;
    /** node instance id */
    public final String node_instance_id;
    /** node name */
    public final String node_name;
    /** Operation path */
    public final String operation;
    /** time at which the event occurred on the executing machine */
    public final String reported_timestamp;
    /** time at which the event was logged on the management machine */
    public final String timestamp;
    /** resource is a cloudify_event or a cloudify_log */
    public final String type;
    /** The id/name of the workflow the execution is of. */
    public final String workflow_id;

    @JsonCreator
    public CloudifyEvent(@JsonProperty("blueprint_id") String blueprint_id,
            @JsonProperty("deployment_id") String deployment_id,
            @JsonProperty("error_causes") List<CloudifyErrorCause> error_causes,
            @JsonProperty("event_type") String event_type, @JsonProperty("execution_id") String execution_id,
            @JsonProperty("level") String level, @JsonProperty("logger") String logger,
            @JsonProperty("message") String message, @JsonProperty("node_instance_id") String node_instance_id,
            @JsonProperty("node_name") String node_name, @JsonProperty("operation") String operation,
            @JsonProperty("reported_timestamp") String reported_timestamp, @JsonProperty("timestamp") String timestamp,
            @JsonProperty("type") String type, @JsonProperty("workflow_id") String workflow_id) {

        this.blueprint_id = blueprint_id;
        this.deployment_id = deployment_id;
        this.error_causes = (error_causes == null) ? new LinkedList<CloudifyErrorCause>() : error_causes;
        this.event_type = event_type;
        this.execution_id = execution_id;
        this.level = level;
        this.logger = logger;
        this.message = message;
        this.node_instance_id = node_instance_id;
        this.node_name = node_name;
        this.operation = operation;
        this.reported_timestamp = reported_timestamp;
        this.timestamp = timestamp;
        this.type = type;
        this.workflow_id = workflow_id;
    }
}