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 @Schema(name = "service_registration_info_v2", description = "Information for one service")
29 public class ServiceRegistrationInfo {
31 @Schema(description = "identity of the service", required = true)
32 @SerializedName("service_id")
33 @JsonProperty("service_id")
34 public String serviceId = "";
36 @Schema(description = "keep alive interval for the service. This is used to enable optional heartbeat supervision of the service. "
37 + "If set (> 0) the registered service should regularly invoke a 'keepalive' REST call. "
38 + "When a service fails to invoke this 'keepalive' call within the configured time, the service is considered unavailable. "
39 + "An unavailable service will be automatically deregistered and its policies will be deleted. "
40 + "Value 0 means timeout supervision is disabled.")
41 @SerializedName("keep_alive_interval_seconds")
42 @JsonProperty("keep_alive_interval_seconds")
43 public long keepAliveIntervalSeconds = 0;
45 @Schema(description = "callback for notifying of Near-RT RIC state changes", required = false, defaultValue = "")
46 @SerializedName("callback_url")
47 @JsonProperty("callback_url")
48 public String callbackUrl = "";
50 public ServiceRegistrationInfo() {}
52 public ServiceRegistrationInfo(String id, long keepAliveIntervalSeconds, String callbackUrl) {
54 this.keepAliveIntervalSeconds = keepAliveIntervalSeconds;
55 this.callbackUrl = callbackUrl;