package com.jscape.inet.proxy.socks.protocol.v5.messages;

import java.util.Arrays;

import static com.jscape.util.Parameters.assertNotNull;

/**
 * @author Alex Usun
 */
public class AuthenticationMethodRequest
        extends Message {

    public final int[] methods;

    public AuthenticationMethodRequest(int... methods) {
        assertNotNull(methods);
        this.methods = methods;
    }

    public AuthenticationMethodRequest(AuthenticationMethodType method1, AuthenticationMethodType method2) {
        this(method1.code, method2.code);
    }

    public AuthenticationMethodRequest(AuthenticationMethodType method) {
        this(method.code);
    }

    @Override
    public String toString() {
        return "AuthenticationMethodRequest {"
               + "methods=" + Arrays.toString(this.methods)
               + '}';
    }
}
