// 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 AutogenPythonEnvironmentBlobGen extends Generator<AutogenPythonEnvironmentBlob> {
  public AutogenPythonEnvironmentBlobGen() {
    super(AutogenPythonEnvironmentBlob.class);
  }

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

    AutogenPythonEnvironmentBlob obj = new AutogenPythonEnvironmentBlob();
    if (r.nextBoolean()) {
      int size = r.nextInt(0, 10);
      List<AutogenPythonRequirementEnvironmentBlob> ret = new ArrayList(size);
      for (int i = 0; i < size; i++) {
        ret.add(gen().type(AutogenPythonRequirementEnvironmentBlob.class).generate(r, status));
      }
      obj.setConstraints(Utils.removeEmpty(ret));
    }
    if (r.nextBoolean()) {
      int size = r.nextInt(0, 10);
      List<AutogenPythonRequirementEnvironmentBlob> ret = new ArrayList(size);
      for (int i = 0; i < size; i++) {
        ret.add(gen().type(AutogenPythonRequirementEnvironmentBlob.class).generate(r, status));
      }
      obj.setRequirements(Utils.removeEmpty(ret));
    }
    if (r.nextBoolean()) {
      obj.setVersion(
          Utils.removeEmpty(gen().type(AutogenVersionEnvironmentBlob.class).generate(r, status)));
    }
    return obj;
  }
}
