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.openecomp.sdc.generator.logging;
23 import java.util.HashMap;
26 public enum ArtifactGeneratorLogResponseCode {
27 INTERNAL_SERVER_ERROR(201),
28 MISSING_CONFIG_PROPERTIES_FILE(202),
29 MISSING_SYSTME_PROPERY_CONFIGURATION(203),
30 MANDATORY_ATTRIBUTE_MISSING(313),
31 SERVICE_TOSCA_MISSING(314),
32 INVALID_TOSCA_YAML(315),
33 INVALID_CLIENT_CONFIGURATION(316),
34 UNABLE_TO_GENERATE_ARTIFACT(317),
35 MISSING_WIDGET_CONFIGURATION(318),
36 INVALID_ID_VALUE(319),
37 MISSING_SERVICE_VERSION(320),
38 INVALID_SERVICE_VERSION(321),
39 MISSING_RESOURCE_VERSION(322),
40 INVALID_RESOURCE_VERSION(323),
41 MISSING_PRO_SERVICE(324),
42 MISSING_PRO_SERVICE_METADATA(325),
43 RESOURCE_TOSCA_MISSING(326);
46 private static Map<Integer, ArtifactGeneratorLogResponseCode> mapValueToEnum = new HashMap<>();
49 for (ArtifactGeneratorLogResponseCode responseCode :
50 ArtifactGeneratorLogResponseCode.values()) {
51 mapValueToEnum.put(responseCode.value, responseCode);
57 ArtifactGeneratorLogResponseCode(int value) {
61 public static ArtifactGeneratorLogResponseCode parseValue(int value) {
62 return mapValueToEnum.get(value);
65 public int getValue() {