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.v2;
23 import com.fasterxml.jackson.annotation.JsonProperty;
24 import com.google.gson.annotations.SerializedName;
26 import io.swagger.v3.oas.annotations.media.Schema;
28 import org.immutables.gson.Gson;
31 @Schema(name = "service_registration_info_v2", description = "Information for one service")
32 public class ServiceRegistrationInfo {
34 @Schema(description = "identity of the service", required = true)
35 @SerializedName("service_id")
36 @JsonProperty("service_id")
37 public String serviceId = "";
39 @Schema(description = "keep alive interval for the service. This is a heartbeat supervision of the service, "
40 + "which in regular intevals must invoke a 'keepalive' REST call. "
41 + "When a service does not invoke this call within the given time, it is considered unavailble. "
42 + "An unavailable service will be automatically deregistered and its policies will be deleted. "
43 + "Value 0 means no timeout supervision.")
44 @SerializedName("keep_alive_interval_seconds")
45 @JsonProperty("keep_alive_interval_seconds")
46 public long keepAliveIntervalSeconds = 0;
48 @Schema(description = "callback for notifying of Near-RT RIC state changes", required = false)
49 @SerializedName("callback_url")
50 @JsonProperty("callback_url")
51 public String callbackUrl = "";
53 public ServiceRegistrationInfo() {}
55 public ServiceRegistrationInfo(String id, long keepAliveIntervalSeconds, String callbackUrl) {
57 this.keepAliveIntervalSeconds = keepAliveIntervalSeconds;
58 this.callbackUrl = callbackUrl;