cc8fff6146e14bac518acc00520daf4b0514ae3f
[vid.git] / vid-app-common / src / main / java / org / onap / vid / model / RequestReferencesContainer.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * VID
4  * ================================================================================
5  * Copyright (C) 2017 - 2019 AT&T Intellectual Property. 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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.onap.vid.model;
22
23 import com.fasterxml.jackson.annotation.*;
24 import com.google.common.base.MoreObjects;
25 import org.onap.vid.mso.model.RequestReferences;
26
27 import java.util.HashMap;
28 import java.util.Map;
29
30 @JsonInclude(JsonInclude.Include.NON_NULL)
31 public class RequestReferencesContainer {
32     private final RequestReferences requestReferences;
33
34     @JsonIgnore
35     private Map<String, Object> additionalProperties = new HashMap<>();
36
37     @JsonAnyGetter
38     public Map<String, Object> getAdditionalProperties() {
39         return this.additionalProperties;
40     }
41
42     @JsonAnySetter
43     public void setAdditionalProperty(String name, Object value) {
44         this.additionalProperties.put(name, value);
45     }
46
47     public RequestReferencesContainer(@JsonProperty("requestReferences") RequestReferences requestReferences) {
48         this.requestReferences = requestReferences;
49     }
50
51     public RequestReferences getRequestReferences() {
52         return requestReferences;
53     }
54
55     @Override
56     public String toString() {
57         return MoreObjects.toStringHelper(this)
58                 .add("requestReferences", requestReferences)
59                 .add("additionalProperties", additionalProperties)
60                 .toString();
61     }
62 }