public static DefaultPortsBuilder.ServiceProtocol fromString(String protocol) {
            if (StringUtils.isBlank(protocol)) {
                return TCP;
            }
            for (DefaultPortsBuilder.ServiceProtocol serviceProtocol : DefaultPortsBuilder.ServiceProtocol.values()) {
                if (serviceProtocol.getProtocolString().equalsIgnoreCase(protocol)) {
                    return serviceProtocol;
                }
            }
            return TCP;
        }
This class is to generate the default ports taken from the
service spec for the manifest snippet.
Handles Ports for Services as well as Agents.
manifest-generator/generator-services/src/main/java/io/hyscale/generator/services/builder/DefaultPortsBuilder.java