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.vid.asdc.beans.tosca;
23 import java.util.Collection;
24 import java.util.LinkedList;
27 * The Class ToscaCsar.
29 public class ToscaCsar {
32 private final ToscaModel parent;
35 private final Collection<ToscaModel> children;
40 public static class Builder {
43 private final ToscaModel parent;
46 private Collection<ToscaModel> children = new LinkedList<ToscaModel> ();
49 * Instantiates a new builder.
51 * @param parent the parent
53 public Builder(ToscaModel parent) {
60 * @param child the child
63 public Builder addVnf(ToscaModel child) {
71 * @return the tosca csar
73 public ToscaCsar build() {
74 return new ToscaCsar(this);
79 * Instantiates a new tosca csar.
81 * @param builder the builder
83 public ToscaCsar(Builder builder) {
84 this.parent = builder.parent;
85 this.children = builder.children;
93 public ToscaModel getParent() { return parent; }
98 * @return the children
100 public Collection<ToscaModel> getChildren() { return children; }