class NetworkServiceDescriptorParser {

    public Optional<NetworkServiceDescriptor> parse(final byte[] zipBytes) {
        try {
            final Map<String, FileEntry> files = getZipContent(zipBytes);
            if (isMetaFilePresent(files)) {
                final Optional<ToscaMetadata> optional =
                        toscaMetadataParser.parse(files.get(TOSCA_META_PATH_FILE_NAME));
                if (optional.isPresent()) {
                    final ToscaMetadata toscaMetadata = optional.get();
                    logger.info("Parsed ToscaMetadata {}", toscaMetadata);
                    final String entryDefinitionFile = toscaMetadata.getEntry(ENTRY_DEFINITIONS);
                    if (entryDefinitionFile != null && files.containsKey(entryDefinitionFile)) {
                        final Map<String, Object> fileContent =
                                fileParser.getFileContent(files.get(entryDefinitionFile));
                        final Map<String, Object> topologyTemplates = getTopologyTemplates(fileContent);
                        final Map<String, Object> nodeTemplates = getNodeTemplates(topologyTemplates);

                        final Optional<NetworkServiceDescriptor> nsdOptional =
                                getNetworkServiceDescriptor(topologyTemplates);
                        if (nsdOptional.isPresent()) {
                            final NetworkServiceDescriptor networkServiceDescriptor = nsdOptional.get();
                            networkServiceDescriptor.setVnfs(getVirtualNetworkFunctions(nodeTemplates));
                            return Optional.of(networkServiceDescriptor);
                        }

                    }
                }

            }

            logger.error("Unable to find {} file in {}", TOSCA_META_PATH_FILE_NAME, files);
        } catch (final Exception exception) {
            logger.error("Unable to parse nsd zip content", exception);
        }
        return Optional.empty();
    }

    @Autowired public  NetworkServiceDescriptorParser(final ToscaMetadataParser toscaMetadataParser, final FileParser fileParser);

}