protected ZoneId zoneOf(String environment, String region) {
        if (isNullOrBlank(region))
            return zone = controller.defaultZone(isNullOrBlank(environment) ? Environment.dev
                                                                            : Environment.from(environment));

        if (isNullOrBlank(environment))
            throw new IllegalArgumentException("Environment must be specified if region is specified");

        return zone = ZoneId.from(environment, region);
    }
Base class for hosted Vespa plugin mojos which refer to a particular deployment.

@author jonmv
vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/AbstractVespaDeploymentMojo.java