// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.security.tls;

import java.util.Arrays;

/**
 * @author bjorncs
 */
public enum MixedMode {
    PLAINTEXT_CLIENT_MIXED_SERVER("plaintext_client_mixed_server"),
    TLS_CLIENT_MIXED_SERVER("tls_client_mixed_server");

    final String configValue;

    MixedMode(String configValue) {
        this.configValue = configValue;
    }

    public String configValue() {
        return configValue;
    }

    static MixedMode fromConfigValue(String configValue) {
        return Arrays.stream(values())
                .filter(v -> v.configValue.equals(configValue))
                .findFirst()
                .orElseThrow(() -> new IllegalArgumentException("Unknown value: " + configValue));
    }
}

@@ -344,16 +344,55 @@
 server%22)
+,%0A    DISABLED(%22tls_client_tls_server%22)
 ;%0A%0A    f
@@ -565,24 +565,190 @@
 lue;%0A    %7D%0A%0A
+    /**%0A     * @return Default value when mixed mode is not explicitly specified%0A     */%0A    public static MixedMode defaultValue() %7B%0A        return DISABLED;%0A    %7D%0A%0A
     static M

Add 'tls_client_tls_server' as tls mixed mode option