aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/nbi/apis/servicecatalog/model/ServiceSpecificationRequest.java
blob: 8b7022cf55f40aa98e0c9dea0a5f444147521951 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
/*
 * ============LICENSE_START=============================================================================================================
 * Copyright (c) 2020 NikhilMohan
 * ===================================================================
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
 * OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 * ============LICENSE_END===============================================================================================================
 *
 */


package org.onap.nbi.apis.servicecatalog.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * ServiceSpecification is a class that offers characteristics to describe a type of service. Functionally, it acts as a template by which Services may be instantiated. By sharing the same specification, these services would therefore share the same set of characteristics.
 */
@ApiModel(description = "ServiceSpecification is a class that offers characteristics to describe a type of service. Functionally, it acts as a template by which Services may be instantiated. By sharing the same specification, these services would therefore share the same set of characteristics.")
public class ServiceSpecificationRequest {

  @NotEmpty(message = "is missing in the request!")
  private String name = null;

  @NotEmpty(message = "is missing in the request!")
  private String description = null;

  private String type = "ONAPservice";

  private String schemaLocation = null;

  private String baseType = null;

  private String toscaModelURL = null;

  private String toscaResourceName = null;

  @NotEmpty(message = "is missing in the request!")
  private String category = null;

  private String subcategory = null;

  private String version = null;

  private LifecycleStatusValues lifecycleStatus = null;

  private TargetServiceSchemaRef targetServiceSchema = null;

  private List<Attachment> attachment = null;

  @NotEmpty(message = "is missing in the request!")
  @Valid
  private List<RelatedPartyRef> relatedParty = null;

  private List<ResourceSpecificationRef> resourceSpecification = null;

  private List<ServiceSpecCharacteristicRequest> serviceSpecCharacteristic = null;

   /**
   * Name of the service specification
   * @return name
  **/
  @ApiModelProperty(value = "Name of the service specification")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }



   /**
   * A narrative that explains in detail what the service specification
   * @return description
  **/
  @ApiModelProperty(value = "A narrative that explains in detail what the service specification")
  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

   /**
   * This attribute allows to dynamically extends TMF class. Valued with &#39;ONAPservice&#39;. We use this feature to add following attributes: toscaModelURL toscaResourceName category (1) subcategory (1) distributionStatus
   * @return type
  **/
  @ApiModelProperty(value = "This attribute allows to dynamically extends TMF class. Valued with 'ONAPservice'. We use this feature to add following attributes: toscaModelURL toscaResourceName category (1) subcategory (1) distributionStatus")
  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

   /**
   * Not used
   * @return schemaLocation
  **/
  @ApiModelProperty(value = "Not used")
  public String getSchemaLocation() {
    return schemaLocation;
  }

  public void setSchemaLocation(String schemaLocation) {
    this.schemaLocation = schemaLocation;
  }



   /**
   * Not used
   * @return baseType
  **/
  @ApiModelProperty(value = "Not used")
  public String getBaseType() {
    return baseType;
  }

  public void setBaseType(String baseType) {
    this.baseType = baseType;
  }



   /**
   * Additional attribute (not in the TMF API) - extended through @type - toscaModelURL
   * @return toscaModelURL
  **/
  @ApiModelProperty(value = "Additional attribute (not in the TMF API) - extended through @type - toscaModelURL")
  public String getToscaModelURL() {
    return toscaModelURL;
  }

  public void setToscaModelURL(String toscaModelURL) {
    this.toscaModelURL = toscaModelURL;
  }

   /**
   * Additional attribute (not in the TMF API) - extended through @type - toscaResourceName
   * @return toscaResourceName
  **/
  @ApiModelProperty(value = "Additional attribute (not in the TMF API) - extended through @type - toscaResourceName")
  public String getToscaResourceName() {
    return toscaResourceName;
  }

  public void setToscaResourceName(String toscaResourceName) {
    this.toscaResourceName = toscaResourceName;
  }

   /**
   * Additional attribute - extended through @type - category Please note that this attribute is managed in TMF - in future release we&#39;ll introduce category resource
   * @return category
  **/
  @ApiModelProperty(value = "Additional attribute - extended through @type - category Please note that this attribute is managed in TMF - in future release we'll introduce category resource")
  public String getCategory() {
    return category;
  }

  public void setCategory(String category) {
    this.category = category;
  }

   /**
   * Additional attribute - extended through @type - category Please note that this attribute is managed in TMF - in future release we&#39;ll introduce category resource
   * @return subcategory
  **/
  @ApiModelProperty(value = "Additional attribute - extended through @type - category Please note that this attribute is managed in TMF - in future release we'll introduce category resource")
  public String getSubcategory() {
    return subcategory;
  }

  public void setSubcategory(String subcategory) {
    this.subcategory = subcategory;
  }

    /**
   * Service specification version
   * @return version
  **/
  @ApiModelProperty(value = "Service specification version")
  public String getVersion() {
    return version;
  }

  public void setVersion(String version) {
    this.version = version;
  }

   /**
   * Get lifecycleStatus
   * @return lifecycleStatus
  **/
  @ApiModelProperty(value = "")
  public LifecycleStatusValues getLifecycleStatus() {
    return lifecycleStatus;
  }

  public void setLifecycleStatus(LifecycleStatusValues lifecycleStatus) {
    this.lifecycleStatus = lifecycleStatus;
  }

   /**
   * Get targetServiceSchema
   * @return targetServiceSchema
  **/
  @ApiModelProperty(value = "")
  public TargetServiceSchemaRef getTargetServiceSchema() {
    return targetServiceSchema;
  }

  public void setTargetServiceSchema(TargetServiceSchemaRef targetServiceSchema) {
    this.targetServiceSchema = targetServiceSchema;
  }

  public ServiceSpecificationRequest addAttachmentItem(Attachment attachmentItem) {
    if (this.attachment == null) {
      this.attachment = new ArrayList<Attachment>();
    }
    this.attachment.add(attachmentItem);
    return this;
  }

   /**
   * Get attachment
   * @return attachment
  **/
  @ApiModelProperty(value = "")
  public List<Attachment> getAttachment() {
    return attachment;
  }

  public void setAttachment(List<Attachment> attachment) {
    this.attachment = attachment;
  }

  public ServiceSpecificationRequest addRelatedPartyItem(RelatedPartyRef relatedPartyItem) {
    if (this.relatedParty == null) {
      this.relatedParty = new ArrayList<RelatedPartyRef>();
    }
    this.relatedParty.add(relatedPartyItem);
    return this;
  }

   /**
   * Get relatedParty
   * @return relatedParty
  **/
  @ApiModelProperty(value = "")
  public List<RelatedPartyRef> getRelatedParty() {
    return relatedParty;
  }

  public void setRelatedParty(List<RelatedPartyRef> relatedParty) {
    this.relatedParty = relatedParty;
  }

  public ServiceSpecificationRequest addResourceSpecificationItem(ResourceSpecificationRef resourceSpecificationItem) {
    if (this.resourceSpecification == null) {
      this.resourceSpecification = new ArrayList<ResourceSpecificationRef>();
    }
    this.resourceSpecification.add(resourceSpecificationItem);
    return this;
  }

   /**
   * Get resourceSpecification
   * @return resourceSpecification
  **/
  @ApiModelProperty(value = "")
  public List<ResourceSpecificationRef> getResourceSpecification() {
    return resourceSpecification;
  }

  public void setResourceSpecification(List<ResourceSpecificationRef> resourceSpecification) {
    this.resourceSpecification = resourceSpecification;
  }

  public ServiceSpecificationRequest addServiceSpecCharacteristicItem(ServiceSpecCharacteristicRequest serviceSpecCharacteristicItem) {
    if (this.serviceSpecCharacteristic == null) {
      this.serviceSpecCharacteristic = new ArrayList<ServiceSpecCharacteristicRequest>();
    }
    this.serviceSpecCharacteristic.add(serviceSpecCharacteristicItem);
    return this;
  }

   /**
   * Get serviceSpecCharacteristic
   * @return serviceSpecCharacteristic
  **/
  @ApiModelProperty(value = "")
  public List<ServiceSpecCharacteristicRequest> getServiceSpecCharacteristic() {
    return serviceSpecCharacteristic;
  }

  public void setServiceSpecCharacteristic(List<ServiceSpecCharacteristicRequest> serviceSpecCharacteristic) {
    this.serviceSpecCharacteristic = serviceSpecCharacteristic;
  }




}