2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 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.adapters.vdu;
23 import java.util.Arrays;
24 import java.util.Objects;
26 public class VduArtifact {
28 // Enumerate the types of artifacts permitted. This may need to be a variable string
29 // value if arbitrary (cloud-specific) artifacts may be attached to VDUs in ASDC.
30 public enum ArtifactType {
31 MAIN_TEMPLATE, NESTED_TEMPLATE, CONFIG_FILE, SCRIPT_FILE, TEXT_FILE, ENVIRONMENT
35 private byte[] content;
36 private ArtifactType type;
38 // Default constructor
39 public VduArtifact() {}
41 // Fully specified constructor
42 public VduArtifact (String name, byte[] content, ArtifactType type) {
44 this.content = content;
48 public String getName() {
51 public void setName (String name) {
54 public byte[] getContent() {
57 public void setContent(byte[] content) {
58 this.content = content;
60 public ArtifactType getType() {
63 public void setType(ArtifactType type) {
68 public boolean equals(Object o) {
72 if (o == null || getClass() != o.getClass()) {
75 VduArtifact that = (VduArtifact) o;
76 return Objects.equals(name, that.name) &&
77 Arrays.equals(content, that.content) &&