2 * ========================LICENSE_START=================================
5 * Copyright (C) 2019 AT&T Intellectual Property and Nokia
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===================================
20 package org.oransc.ric.portal.dashboard.model;
22 import java.time.Instant;
24 import org.oransc.ric.e2mgr.client.model.SetupRequest;
26 import com.fasterxml.jackson.annotation.JsonProperty;
29 * Response to an E2 Manager setupRequest message carries the original
30 * information plus request type, timestamp and HTTP response code.
32 public class E2SetupResponse extends SetupRequest implements IDashboardResponse {
34 public E2SetupResponse() {
37 public E2SetupResponse(E2SetupRequestType type, SetupRequest request, int responseCode) {
38 super.ranName(request.getRanName()).ranIp(request.getRanIp()).ranPort(request.getRanPort());
39 this.requestType = type;
40 this.timeStamp = Instant.now();
41 this.responseCode = responseCode;
44 @JsonProperty("requestType")
45 private E2SetupRequestType requestType = null;
47 public SetupRequest requestType(E2SetupRequestType type) {
48 this.requestType = type;
57 public E2SetupRequestType getRequestType() {
61 public void setRequestType(E2SetupRequestType type) {
62 this.requestType = type;
65 @JsonProperty("timeStamp")
66 private Instant timeStamp = null;
68 public SetupRequest timeStamp(Instant timeStamp) {
69 this.timeStamp = timeStamp;
78 public Instant getTimeStamp() {
82 public void setTimeStamp(Instant timeStamp) {
83 this.timeStamp = timeStamp;
86 @JsonProperty("responseCode")
87 private Integer responseCode = null;
89 public SetupRequest responseCode(Integer responseCode) {
90 this.responseCode = responseCode;
97 * @return responseCode
99 public Integer getResponseCode() {
103 public void setResponseCode(Integer responseCode) {
104 this.responseCode = responseCode;