public ImageConfiguration build() {
      int numArguments = 0;
      if (!credentialRetrievers.isEmpty()) {
        numArguments++;
      }
      if (dockerClient != null) {
        numArguments++;
      }
      if (tarPath != null) {
        numArguments++;
      }
      Preconditions.checkArgument(numArguments <= 1);
      return new ImageConfiguration(imageReference, credentialRetrievers, dockerClient, tarPath);
    }
Builds the {@link ImageConfiguration}.

@return the corresponding {@link ImageConfiguration}
jib-core/src/main/java/com/google/cloud/tools/jib/configuration/ImageConfiguration.java