2 * ===============LICENSE_START=======================================================
4 * ===================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property & Tech Mahindra. All rights reserved.
6 * ===================================================================================
7 * This Acumos software file is distributed by AT&T and Tech Mahindra
8 * under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * This file 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 com.logging.rest.example.springbootswagger2.controller;
23 import java.io.Serializable;
25 //import org.acumos.portal.be.common.JSONTags;
27 import com.fasterxml.jackson.annotation.JsonProperty;
30 * This class represents a common format set for the request body sent from the client.
31 * Getters and setters encapsulate the fields of a class by making them accessible
32 * only through its public methods and keep the values themselves private.
33 * @param <T> Type inside request
36 public class JsonRequest<T> implements Serializable{
38 private static final long serialVersionUID = 7576436006913504503L;
41 * Json property requestFrom.
43 @JsonProperty(value = JSONTags.TAG_REQUEST_FROM)
44 private String requestFrom;
47 * Json property requestId.
49 @JsonProperty(value = JSONTags.TAG_REQUEST_ID)
50 private String requestId;
53 * Json property body. It represents the type of generic object.
55 @JsonProperty(value = JSONTags.TAG_REQUEST_BODY)
58 public String getRequestId() {
62 public void setRequestId(String requestId) {
63 this.requestId = requestId;
71 public void setBody(T body) {
75 public String getRequestFrom() {
79 public void setRequestFrom(String requestFrom) {
80 this.requestFrom = requestFrom;