Fixing and Refactoring POM's
[ccsdk/oran.git] / a1-policy-management / src / main / java / org / onap / ccsdk / oran / a1policymanagementservice / controllers / v2 / ServiceRegistrationInfo.java
1 /*-
2  * ========================LICENSE_START=================================
3  * ONAP : ccsdk oran
4  * ======================================================================
5  * Copyright (C) 2019-2020 Nordix Foundation. 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.ccsdk.oran.a1policymanagementservice.controllers.v2;
22
23 import com.fasterxml.jackson.annotation.JsonProperty;
24 import com.google.gson.annotations.SerializedName;
25
26 import io.swagger.annotations.ApiModel;
27 import io.swagger.annotations.ApiModelProperty;
28
29 import org.immutables.gson.Gson;
30
31 @Gson.TypeAdapters
32 @ApiModel(value = "service_registration_info_v2", description = "Information for one service")
33 public class ServiceRegistrationInfo {
34
35     @ApiModelProperty(value = "identity of the service", required = true, allowEmptyValue = false)
36     @SerializedName(value = "service_id")
37     @JsonProperty("service_id")
38     public String serviceId = "";
39
40     @ApiModelProperty(value = "keep alive interval for the service. This is a heartbeat supervision of the service, "
41             + "which in regular intevals must invoke a 'keepAlive' REST call. "
42             + "When a service does not invoke this call within the given time, it is considered unavailble. "
43             + "An unavailable service will be automatically deregistered and its policies will be deleted. "
44             + "Value 0 means no timeout supervision.")
45     @SerializedName("keep_alive_interval_seconds")
46     @JsonProperty("keep_alive_interval_seconds")
47     public long keepAliveIntervalSeconds = 0;
48
49     @ApiModelProperty(value = "callback for notifying of RIC synchronization", required = false, allowEmptyValue = true)
50     @SerializedName("callback_url")
51     @JsonProperty("callback_url")
52     public String callbackUrl = "";
53
54     public ServiceRegistrationInfo() {}
55
56     public ServiceRegistrationInfo(String id, long keepAliveIntervalSeconds, String callbackUrl) {
57         this.serviceId = id;
58         this.keepAliveIntervalSeconds = keepAliveIntervalSeconds;
59         this.callbackUrl = callbackUrl;
60     }
61
62 }