68eec88fb547aa27c62fa1519adf7946c2794785
[policy/drools-applications.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP
4  * ================================================================================
5  * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.drools.models.domain.operational;
22
23 import com.google.gson.annotations.SerializedName;
24 import java.io.Serializable;
25 import lombok.Builder;
26 import lombok.Data;
27
28 /**
29  * Policy Operation.
30  */
31
32 @Data
33 @Builder
34 public class Operation implements Serializable {
35     private static final long serialVersionUID = 6175229119078195110L;
36
37     /**
38      * Operation Identifier.
39      */
40     private String id;
41
42     /**
43      * Description.
44      */
45     private String description;
46
47     /**
48      * Actor Operation.
49      */
50     @SerializedName("operation")
51     private ActorOperation actorOperation;
52
53     /**
54      * Operation Timeout in seconds.
55      */
56     @Builder.Default
57     private int timeout = 10;
58
59     /**
60      * Number of Retries.
61      */
62     @Builder.Default
63     private int retries = 0;
64
65     /**
66      * Success Treatment.
67      */
68     @Builder.Default
69     private String success = "final_success";
70
71     /**
72      * Failure Treatment.
73      */
74     @Builder.Default
75     private String failure = "final_failure";
76
77     /**
78      * Failure Timeout Treatment.
79      */
80     @SerializedName("failure_timeout")
81     @Builder.Default
82     private String failureTimeout = "final_failure_timeout";
83
84     /**
85      * Failure Retry Treatment.
86      */
87     @SerializedName("failure_retries")
88     @Builder.Default
89     private String failureRetries = "final_failure_retries";
90
91     /**
92      * Failure Exception Treatment.
93      */
94     @SerializedName("failure_exception")
95     @Builder.Default
96     private String failureException = "final_failure_exception";
97
98     /**
99      * Failure Guard Treatment.
100      */
101     @SerializedName("failure_guard")
102     @Builder.Default
103     private String failureGuard = "final_failure_guard";
104 }