2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 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
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.so.serviceinstancebeans;
23 import java.beans.Transient;
24 import java.io.Serializable;
25 import java.util.ArrayList;
26 import java.util.List;
29 import com.fasterxml.jackson.annotation.JsonInclude;
30 import com.fasterxml.jackson.annotation.JsonInclude.Include;
31 import com.fasterxml.jackson.annotation.JsonProperty;
32 import com.fasterxml.jackson.annotation.JsonRootName;
34 @JsonRootName(value = "requestParameters")
35 @JsonInclude(Include.NON_DEFAULT)
36 public class RequestParameters implements Serializable {
38 private static final long serialVersionUID = -5979049912538894930L;
39 @JsonProperty("subscriptionServiceType")
40 private String subscriptionServiceType;
41 @JsonProperty("userParams")
42 private List<Map<String, Object>> userParams = new ArrayList<>();
43 @JsonProperty("aLaCarte")
44 private Boolean aLaCarte;
45 @JsonProperty("payload")
46 private String payload;
47 @JsonProperty("usePreload")
48 private Boolean usePreload; // usePreload would always be true for Update
50 @JsonProperty("autoBuildVfModules")
51 private Boolean autoBuildVfModules;
52 @JsonProperty("cascadeDelete")
53 private Boolean cascadeDelete;
54 @JsonProperty("testApi")
55 private String testApi; // usePreload would always be true for Update
56 @JsonProperty("rebuildVolumeGroups")
57 private Boolean rebuildVolumeGroups;
59 public String getSubscriptionServiceType() {
60 return subscriptionServiceType;
63 public void setSubscriptionServiceType(String subscriptionServiceType) {
64 this.subscriptionServiceType = subscriptionServiceType;
66 @JsonProperty("aLaCarte")
67 public Boolean getALaCarte() {
70 @JsonProperty("aLaCarte")
71 public void setaLaCarte(Boolean aLaCarte) {
72 this.aLaCarte = aLaCarte;
75 public Boolean isaLaCarte() {
79 public String getPayload(){
82 public void setPayload(String value){
86 public Boolean isUsePreload() {
90 @JsonProperty("usePreload")
91 public Boolean getUsePreload() {
95 @JsonProperty("usePreload")
96 public void setUsePreload(Boolean usePreload) {
97 this.usePreload = usePreload;
100 public String getTestApi() {
104 public void setTestApi(String testApi) {
105 this.testApi = testApi;
108 public List<Map<String, Object>> getUserParams() {
112 public void setUserParams(List<Map<String, Object>> userParams) {
113 this.userParams = userParams;
116 public String getUserParamValue(String name){
117 if(userParams!=null){
118 for(Map<String, Object> param:userParams){
119 if(param.containsKey("name") && param.get("name").equals(name) && param.containsKey("value")){
120 return param.get("value").toString();
127 public Boolean getAutoBuildVfModules() {
128 return autoBuildVfModules;
131 public void setAutoBuildVfModules(Boolean autoBuildVfModules) {
132 this.autoBuildVfModules = autoBuildVfModules;
135 public Boolean getCascadeDelete() {
136 return cascadeDelete;
139 public void setCascadeDelete(Boolean cascadeDelete) {
140 this.cascadeDelete = cascadeDelete;
143 public Boolean getRebuildVolumeGroups() {
144 return rebuildVolumeGroups;
147 public void setRebuildVolumeGroups(Boolean rebuildVolumeGroups) {
148 this.rebuildVolumeGroups = rebuildVolumeGroups;
152 public String toString() {
153 return "RequestParameters [subscriptionServiceType="
154 + subscriptionServiceType + ", userParams=" + userParams
155 + ", aLaCarte=" + aLaCarte + ", testApi= " + testApi + ", autoBuildVfModules="
156 + autoBuildVfModules + ", usePreload="
157 + usePreload + ", rebuildVolumeGroups="
158 + rebuildVolumeGroups + ", payload=" + payload + "]";