2 * ========================LICENSE_START=================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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===================================
21 package org.onap.ccsdk.oran.a1policymanagementservice.controllers.v1;
23 import com.google.gson.annotations.SerializedName;
25 import io.swagger.v3.oas.annotations.media.Schema;
27 import org.immutables.gson.Gson;
30 @Schema(name = "service_registration_info_v1")
31 public class ServiceRegistrationInfo {
33 @SerializedName("serviceName")
34 public String serviceName = "";
36 @Schema(description = "keep alive interval for the service. This is a heartbeat supervision of the service, "
37 + "which in regular intevals must invoke a 'keepAlive' REST call. "
38 + "When a service does not invoke this call within the given time, it is considered unavailble. "
39 + "An unavailable service will be automatically deregistered and its policies will be deleted. "
40 + "Value 0 means no timeout supervision.")
41 @SerializedName("keepAliveIntervalSeconds")
42 public long keepAliveIntervalSeconds = 0;
44 @Schema(description = "callback for notifying of RIC synchronization")
45 @SerializedName("callbackUrl")
46 public String callbackUrl = "";
48 public ServiceRegistrationInfo() {}
50 public ServiceRegistrationInfo(String name, long keepAliveIntervalSeconds, String callbackUrl) {
51 this.serviceName = name;
52 this.keepAliveIntervalSeconds = keepAliveIntervalSeconds;
53 this.callbackUrl = callbackUrl;