Adding rest service for so monitoring
[so.git] / mso-api-handlers / mso-requests-db / src / main / java / org / onap / so / db / request / beans / InfraActiveRequests.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 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.so.db.request.beans;
22
23 import java.util.Objects;
24
25 import javax.persistence.Entity;
26 import javax.persistence.Table;
27
28 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
29 import org.apache.commons.lang3.builder.ToStringBuilder;
30
31 /**
32  * InfraActiveRequests generated by hbm2java
33  */
34 @JsonIgnoreProperties(ignoreUnknown = true)
35 @Entity
36 @Table(name = "infra_active_requests")
37 public class InfraActiveRequests extends InfraRequests {
38
39     private static final long serialVersionUID = -6818265918910035170L;
40
41     public InfraActiveRequests() {}
42
43     public InfraActiveRequests(final String requestId, final String action) {
44         setRequestId(requestId);
45         setAction(action);
46     }
47
48     public InfraActiveRequests(final String requestId) {
49         setRequestId(requestId);
50     }
51
52     @Override
53     public boolean equals(final Object other) {
54         if (this == other) {
55             return true;
56         }
57         if (!(other instanceof InfraActiveRequests)) {
58             return false;
59         }
60         final InfraActiveRequests castOther = (InfraActiveRequests) other;
61         return Objects.equals(getRequestId(), castOther.getRequestId());
62     }
63
64     @Override
65     public int hashCode() {
66         return Objects.hash(getRequestId());
67     }
68
69     @Override
70     public String toString() {
71         return new ToStringBuilder(this).append("requestId", getRequestId())
72                 .append("clientRequestId", getClientRequestId()).append("action", getAction())
73                 .append("requestStatus", getRequestStatus()).append("statusMessage", getStatusMessage())
74                 .append("progress", getProgress()).append("startTime", getStartTime()).append("endTime", getEndTime())
75                 .append("source", getSource()).append("vnfId", getVnfId()).append("vnfName", getVnfName())
76                 .append("vnfType", getVnfType()).append("serviceType", getServiceType())
77                 .append("aicNodeClli", getAicNodeClli()).append("tenantId", getTenantId())
78                 .append("provStatus", getProvStatus()).append("vnfParams", getVnfParams())
79                 .append("vnfOutputs", getVnfOutputs()).append("requestBody", getRequestBody())
80                 .append("responseBody", getResponseBody()).append("lastModifiedBy", getLastModifiedBy())
81                 .append("modifyTime", getModifyTime()).append("requestType", getRequestType())
82                 .append("volumeGroupId", getVolumeGroupId()).append("volumeGroupName", getVolumeGroupName())
83                 .append("vfModuleId", getVfModuleId()).append("vfModuleName", getVfModuleName())
84                 .append("vfModuleModelName", getVfModuleModelName()).append("aaiServiceId", getAaiServiceId())
85                 .append("aicCloudRegion", getAicCloudRegion()).append("callBackUrl", getCallBackUrl())
86                 .append("correlator", getCorrelator()).append("serviceInstanceId", getServiceInstanceId())
87                 .append("serviceInstanceName", getServiceInstanceName()).append("requestScope", getRequestScope())
88                 .append("requestAction", getRequestAction()).append("networkId", getNetworkId())
89                 .append("networkName", getNetworkName()).append("networkType", getNetworkType())
90                 .append("requestorId", getRequestorId()).append("configurationId", getConfigurationId())
91                 .append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId())
92                 .append("operationalEnvName", getOperationalEnvName()).toString();
93     }
94 }