class JCRObject extends AbstractJSONSchema2Pojo implements JObjectExtraAnnotations {

  private final String pkg;
  private final String type;
  private final String className;
  private final String group;
  private final String version;
  private final String scope;
  private final String specClassName;
  private final String statusClassName;
  private final boolean withSpec;
  private final boolean withStatus;
  private final String singular;
  private final String plural;

  private final boolean storage;
  private final boolean served;

  public JCRObject(
      String pkg,
      String type,
      String group,
      String version,
      String scope,
      String specClassName,
      String statusClassName,
      boolean withSpec,
      boolean withStatus,
      boolean storage,
      boolean served,
      String singular,
      String plural,
      Config config) {
    super(config, null, false, null, null);

    this.pkg = (pkg == null) ? "" : pkg.trim();
    this.type = (this.pkg.isEmpty()) ? type : pkg + "." + type;
    this.className = type;
    this.group = group;
    this.version = version;
    this.scope = scope;
    this.specClassName = specClassName;
    this.statusClassName = statusClassName;
    this.withSpec = withSpec;
    this.withStatus = withStatus;
    this.storage = storage;
    this.served = served;
    this.singular = singular;
    this.plural = plural;
  }

  @Override
  public String getType() {
    return this.type;
  }

  @Override
  public GeneratorResult generateJava() {<FILL_FUNCTION_BODY>}
}

    CompilationUnit cu = new CompilationUnit();
    if (!pkg.isEmpty()) {
      cu.setPackageDeclaration(new PackageDeclaration(new Name(pkg)));
    }
    ClassOrInterfaceDeclaration clz = cu.addClass(className);

    clz.addAnnotation(
        new SingleMemberAnnotationExpr(
            new Name("io.fabric8.kubernetes.model.annotation.Version"),
            new NameExpr(
                "value = \""
                    + version
                    + "\" , storage = "
                    + storage
                    + " , served = "
                    + served)));
    clz.addAnnotation(
        new SingleMemberAnnotationExpr(
            new Name("io.fabric8.kubernetes.model.annotation.Group"),
            new StringLiteralExpr(group)));

    if (singular != null) {
      clz.addAnnotation(
          new SingleMemberAnnotationExpr(
              new Name("io.fabric8.kubernetes.model.annotation.Singular"),
              new StringLiteralExpr(singular)));
    }

    if (plural != null) {
      clz.addAnnotation(
          new SingleMemberAnnotationExpr(
              new Name("io.fabric8.kubernetes.model.annotation.Plural"),
              new StringLiteralExpr(plural)));
    }

    ClassOrInterfaceType jlVoid = new ClassOrInterfaceType().setName("java.lang.Void");

    ClassOrInterfaceType spec = (withSpec)
        ? new ClassOrInterfaceType().setName(this.pkg + "." + this.specClassName)
        : jlVoid;

    ClassOrInterfaceType status = (withStatus)
        ? new ClassOrInterfaceType().setName(this.pkg + "." + this.statusClassName)
        : jlVoid;

    ClassOrInterfaceType crType = new ClassOrInterfaceType()
        .setName("io.fabric8.kubernetes.client.CustomResource")
        .setTypeArguments(spec, status);

    clz.addExtendedType(crType);

    if (scope.equals("Namespaced")) {
      clz.addImplementedType("io.fabric8.kubernetes.api.model.Namespaced");
    }

    if (config.isGeneratedAnnotations()) {
      clz.addAnnotation(newGeneratedAnnotation());
    }
    if (config.isObjectExtraAnnotations()) {
      addExtraAnnotations(clz);
    }
    return new GeneratorResult(
        Collections.singletonList(new GeneratorResult.ClassResult(className, cu)));
  
<methods>public static java.lang.String escapeQuotes(java.lang.String) ,public static io.fabric8.java.generator.nodes.AbstractJSONSchema2Pojo fromJsonSchema(java.lang.String, JSONSchemaProps, java.lang.String, io.fabric8.java.generator.Config) ,public abstract io.fabric8.java.generator.nodes.GeneratorResult generateJava() ,public java.lang.String getDescription() ,public java.lang.Double getMaximum() ,public java.lang.Double getMinimum() ,public java.lang.String getPattern() ,public abstract java.lang.String getType() ,public static final AnnotationExpr newGeneratedAnnotation() ,public static java.lang.String packageName(java.lang.String) ,public static java.lang.String sanitizeString(java.lang.String) <variables>static final java.lang.String ARRAY_CRD_TYPE,static final java.lang.String BOOLEAN_CRD_TYPE,static final java.lang.String DATETIME_CRD_TYPE,static final java.lang.String DOUBLE_CRD_TYPE,static final java.lang.String FLOAT_CRD_TYPE,static final java.lang.String INT32_CRD_TYPE,static final java.lang.String INT64_CRD_TYPE,static final java.lang.String INTEGER_CRD_TYPE,static final java.lang.String NUMBER_CRD_TYPE,static final java.lang.String OBJECT_CRD_TYPE,static final java.lang.String STRING_CRD_TYPE,protected final non-sealed io.fabric8.java.generator.Config config,protected final non-sealed JsonNode defaultValue,protected final non-sealed java.lang.String description,protected final non-sealed boolean isNullable,protected java.lang.Double maximum,protected java.lang.Double minimum,protected java.lang.String pattern