// Path: src/main/java/org/nameapi/client/lib/NameApiKeys.java
// public interface NameApiKeys {
// 
//     /**
//      * The api key is required for any call to NameAPI services.
//      * You must supply a valid context with the {@code mode} argument.
//      */
//     Key<String> API_KEY = Key.stringKey("apiKey");
// 
//     /**
//      * The context is used as an optional argument by many of the NameApi services.
//      * You can supply a context with the {@code mode} argument.
//      */
//     Key<Context> CONTEXT = Key.create("Context", Context.class);
// 
// }


import com.optimaize.anythingworks.client.rest.RestBaseCommand;
import com.optimaize.anythingworks.client.rest.http.RestHttpClient;
import com.optimaize.anythingworks.client.rest.http.RestHttpClientImpl;
import com.optimaize.command4j.ExecutionContext;
import org.jetbrains.annotations.NotNull;
import org.nameapi.client.lib.NameApiKeys;
import org.nameapi.ontology5.input.context.Context;
import java.net.URL;
package org.nameapi.client.services;



/**
 * Adds NameAPI-specific functionality to the BaseCommand.
 * @param <T> The wsdl port type.
 */
public abstract class NameApiBaseCommand<T, A, R> extends RestBaseCommand<T, A, R> {

    protected static String CLIENT_VERSION = "NameAPI Java Client 5.0";

    protected NameApiBaseCommand(@NotNull Class<T> wsdlPortType) {
        super(wsdlPortType);
    }

    @NotNull
    protected Context getContext(@NotNull ExecutionContext ec) {
// Path: src/main/java/org/nameapi/client/lib/NameApiKeys.java
// public interface NameApiKeys {
// 
//     /**
//      * The api key is required for any call to NameAPI services.
//      * You must supply a valid context with the {@code mode} argument.
//      */
//     Key<String> API_KEY = Key.stringKey("apiKey");
// 
//     /**
//      * The context is used as an optional argument by many of the NameApi services.
//      * You can supply a context with the {@code mode} argument.
//      */
//     Key<Context> CONTEXT = Key.create("Context", Context.class);
// 
// }


// Path: src/main/java/org/nameapi/client/services/NameApiBaseCommand.java
import com.optimaize.anythingworks.client.rest.RestBaseCommand;
import com.optimaize.anythingworks.client.rest.http.RestHttpClient;
import com.optimaize.anythingworks.client.rest.http.RestHttpClientImpl;
import com.optimaize.command4j.ExecutionContext;
import org.jetbrains.annotations.NotNull;
import org.nameapi.client.lib.NameApiKeys;
import org.nameapi.ontology5.input.context.Context;
import java.net.URL;

package org.nameapi.client.services;



/**
 * Adds NameAPI-specific functionality to the BaseCommand.
 * @param <T> The wsdl port type.
 */
public abstract class NameApiBaseCommand<T, A, R> extends RestBaseCommand<T, A, R> {

    protected static String CLIENT_VERSION = "NameAPI Java Client 5.0";

    protected NameApiBaseCommand(@NotNull Class<T> wsdlPortType) {
        super(wsdlPortType);
    }

    @NotNull
    protected Context getContext(@NotNull ExecutionContext ec) {
        return ec.getMode().get(NameApiKeys.CONTEXT).get();