package xyz.igorgee.utilities;

public class ModelToUpload {
    String file;
    String fileName;
    boolean hasRightsToModel;
    boolean acceptTermsAndConditions;
    String title;
    boolean isPublic;
    int isForSale;
    boolean isDownloadable;

    public ModelToUpload(String file, String fileName, boolean hasRightsToModel, boolean acceptTermsAndConditions) {
        this.file = file;
        this.fileName = fileName;
        this.hasRightsToModel = hasRightsToModel;
        this.acceptTermsAndConditions = acceptTermsAndConditions;
        this.isPublic = true;
        this.isForSale = 0; // Why is this an int and not a boolean lol?
        this.isDownloadable = false;
    }

    public String getFile() {
        return file;
    }

    public void setFile(String file) {
        this.file = file;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public boolean isHasRightsToModel() {
        return hasRightsToModel;
    }

    public void setHasRightsToModel(boolean hasRightsToModel) {
        this.hasRightsToModel = hasRightsToModel;
    }

    public boolean isAcceptTermsAndConditions() {
        return acceptTermsAndConditions;
    }

    public void setAcceptTermsAndConditions(boolean acceptTermsAndConditions) {
        this.acceptTermsAndConditions = acceptTermsAndConditions;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public boolean isPublic() {
        return isPublic;
    }

    public void setIsPublic(boolean isPublic) {
        this.isPublic = isPublic;
    }

    public int getIsForSale() {
        return isForSale;
    }

    public void setIsForSale(int isForSale) {
        this.isForSale = isForSale;
    }

    public boolean isDownloadable() {
        return isDownloadable;
    }

    public void setIsDownloadable(boolean isDownloadable) {
        this.isDownloadable = isDownloadable;
    }
}

@@ -25,16 +25,139 @@
 ities;%0A%0A
+import java.util.HashMap;%0Aimport java.util.Map;%0A%0Aimport xyz.igorgee.Api.Model.Material;%0Aimport xyz.igorgee.Api.Materials;%0A%0A
 public c
@@ -215,25 +215,25 @@
 leName;%0A    
-b
+B
 oolean hasRi
@@ -245,25 +245,25 @@
 oModel;%0A    
-b
+B
 oolean accep
@@ -297,33 +297,33 @@
 ring title;%0A    
-b
+B
 oolean isPublic;
@@ -327,19 +327,23 @@
 ic;%0A    
-i
+I
 nt
+eger
  isForSa
@@ -350,17 +350,17 @@
 le;%0A    
-b
+B
 oolean i
@@ -373,16 +373,84 @@
 oadable;
+%0A    Map%3CString, Material%3E materials;%0A    Integer defaultMaterialId;
 %0A%0A    pu
@@ -795,9 +795,9 @@
 e = 
-0
+1
 ; //
@@ -876,16 +876,274 @@
  false;%0A
+        this.defaultMaterialId = 6;%0A%0A        materials = new HashMap%3C%3E();%0A        for (Materials m : Materials.values()) %7B%0A            materials.put(String.valueOf(m.getMaterialId()),%0A                    new Material(m.getMaterialId(), 1.00f, 1));%0A        %7D%0A
     %7D%0A%0A 
@@ -2509,11 +2509,411 @@
 e;%0A    %7D
+%0A%0A    public Map%3CString, Material%3E getMaterials() %7B%0A        return materials;%0A    %7D%0A%0A    public void setMaterials(Map%3CString, Material%3E materials) %7B%0A        this.materials = materials;%0A    %7D%0A%0A    public Integer getDefaultMaterialId() %7B%0A        return defaultMaterialId;%0A    %7D%0A%0A    public void setDefaultMaterialId(Integer defaultMaterialId) %7B%0A        this.defaultMaterialId = defaultMaterialId;%0A    %7D
 %0A%7D%0A

Add materials to model upload request