16b32db0ad558bf7a23a2d8b93e869a74cdcac2a
[appc.git] / appc-dispatcher / appc-dispatcher-common / domain-model-lib / src / main / java / org / onap / appc / domainmodel / lcm / TransactionRecord.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APPC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Copyright (C) 2017 Amdocs
8  * =============================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  * 
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  * 
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * 
21  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22  * ============LICENSE_END=========================================================
23  */
24
25 package org.onap.appc.domainmodel.lcm;
26
27 import java.time.Instant;
28
29
30 public class TransactionRecord {
31
32     private String transactionId;
33     private Instant originTimestamp;
34     private String requestId;
35     private String subRequestId;
36     private String originatorId;
37     private Instant startTime;
38     private Instant endTime;
39     private String targetId;
40     private String targetType;
41     private VNFOperation operation;
42     private int resultCode;
43     private String description;
44     private RequestStatus requestState;
45     private String serviceInstanceId;
46     private String vnfcName;
47     private String vserverId;
48     private String vfModuleId;
49     private Flags.Mode mode;
50
51     public Instant getOriginTimestamp() {
52         return originTimestamp;
53     }
54
55     public void setOriginTimestamp(Instant originTimestamp) {
56         this.originTimestamp = originTimestamp;
57     }
58
59     public Instant getStartTime() {
60         return startTime;
61     }
62
63     public void setStartTime(Instant startTime) {
64         this.startTime = startTime;
65     }
66
67     public Instant getEndTime() {
68         return endTime;
69     }
70
71     public void setEndTime(Instant endTime) {
72         this.endTime = endTime;
73     }
74
75     public String getMode() {
76         return mode.name();
77     }
78
79     public void setMode(Flags.Mode mode) {
80         this.mode=mode;
81     }
82
83     public String getTransactionId() {
84         return transactionId;
85     }
86
87     public void setTransactionId(String transactionId) {
88         this.transactionId = transactionId;
89     }
90
91     public String getServiceInstanceId() {
92         return serviceInstanceId;
93     }
94
95     public void setServiceInstanceId(String serviceInstanceId) {
96         this.serviceInstanceId = serviceInstanceId;
97     }
98
99     public String getVnfcName() {
100         return vnfcName;
101     }
102
103     public void setVnfcName(String vnfcName) {
104         this.vnfcName = vnfcName;
105     }
106
107     public String getVserverId() {
108         return vserverId;
109     }
110
111     public void setVserverId(String vserverId) {
112         this.vserverId = vserverId;
113     }
114
115     public String getVfModuleId() {
116         return vfModuleId;
117     }
118
119     public void setVfModuleId(String vfModuleId) {
120         this.vfModuleId = vfModuleId;
121     }
122
123     public String getTargetType() {
124         return targetType;
125     }
126
127     public void setTargetType(String targetType) {
128         this.targetType = targetType;
129     }
130
131     public VNFOperation getOperation() {
132         return operation;
133     }
134
135     public void setOperation(VNFOperation operation) {
136         this.operation = operation;
137     }
138
139     public int getResultCode() {
140         return resultCode;
141     }
142
143     public void setResultCode(int resultCode) {
144         this.resultCode = resultCode;
145     }
146
147     public String getDescription() {
148         return description;
149     }
150
151     public void setDescription(String description) {
152         this.description = description;
153     }
154
155     public String getRequestState() {
156         return requestState.name();
157     }
158
159     public void setRequestState(RequestStatus requestState) {
160         this.requestState = requestState;
161     }
162
163     public String getOriginatorId() {
164         return originatorId;
165     }
166
167     public void setOriginatorId(String originatorId) {
168         this.originatorId = originatorId;
169     }
170
171     public String getRequestId() {
172         return requestId;
173     }
174
175     public void setRequestId(String requestId) {
176         this.requestId = requestId;
177     }
178
179     public String getSubRequestId() {
180         return subRequestId;
181     }
182
183     public void setSubRequestId(String subRequestId) {
184         this.subRequestId = subRequestId;
185     }
186
187     public String getTargetId() {
188         return targetId;
189     }
190
191     public void setTargetId(String targetId) {
192         this.targetId = targetId;
193     }
194
195     @Override
196     public String toString() {
197         return "TransactionRecord{" +
198                 "transactionId='" + transactionId + '\'' +
199                 ", originTimestamp=" + originTimestamp +
200                 ", requestId='" + requestId + '\'' +
201                 ", subRequestId='" + subRequestId + '\'' +
202                 ", originatorId='" + originatorId + '\'' +
203                 ", startTime=" + startTime +
204                 ", endTime=" + endTime +
205                 ", targetId='" + targetId + '\'' +
206                 ", targetType='" + targetType + '\'' +
207                 ", operation='" + operation + '\'' +
208                 ", resultCode='" + resultCode + '\'' +
209                 ", description='" + description + '\'' +
210                 ", requestState='" + requestState + '\'' +
211                 ", serviceInstanceId='" + serviceInstanceId + '\'' +
212                 ", vnfcName='" + vnfcName + '\'' +
213                 ", vserverId='" + vserverId + '\'' +
214                 ", vfModuleId='" + vfModuleId + '\'' +
215                 '}';
216     }
217 }