// THIS FILE IS AUTO-GENERATED. DO NOT EDIT
package ai.verta.modeldb.versioning.autogenerated._public.modeldb.versioning.model;

import ai.verta.modeldb.versioning.*;
import ai.verta.modeldb.versioning.blob.diff.*;
import com.pholser.junit.quickcheck.generator.*;
import com.pholser.junit.quickcheck.generator.java.util.*;
import com.pholser.junit.quickcheck.random.*;
import java.util.*;

public class AutogenEnvironmentBlobGen extends Generator<AutogenEnvironmentBlob> {
  public AutogenEnvironmentBlobGen() {
    super(AutogenEnvironmentBlob.class);
  }

  @Override
  public AutogenEnvironmentBlob generate(SourceOfRandomness r, GenerationStatus status) {
    // if (r.nextBoolean())
    //     return null;

    AutogenEnvironmentBlob obj = new AutogenEnvironmentBlob();
    if (r.nextBoolean()) {
      int size = r.nextInt(0, 10);
      List<String> ret = new ArrayList(size);
      for (int i = 0; i < size; i++) {
        ret.add(new StringGenerator().generate(r, status));
      }
      obj.setCommandLine(Utils.removeEmpty(ret));
    }
    if (r.nextBoolean()) {
      obj.setDocker(
          Utils.removeEmpty(gen().type(AutogenDockerEnvironmentBlob.class).generate(r, status)));
    }
    if (r.nextBoolean()) {
      int size = r.nextInt(0, 10);
      List<AutogenEnvironmentVariablesBlob> ret = new ArrayList(size);
      for (int i = 0; i < size; i++) {
        ret.add(gen().type(AutogenEnvironmentVariablesBlob.class).generate(r, status));
      }
      obj.setEnvironmentVariables(Utils.removeEmpty(ret));
    }
    if (r.nextBoolean()) {
      obj.setPython(
          Utils.removeEmpty(gen().type(AutogenPythonEnvironmentBlob.class).generate(r, status)));
    }
    return obj;
  }
}
