// Path: print-api/src/main/java/com/aevi/print/util/Preconditions.java
// public static <T> T checkNotNull(T object, String message) {
//     if (object == null) {
//         throw new IllegalArgumentException(message);
//     }
//     return object;
// }


import com.aevi.util.json.Jsonable;
import java.util.Map;
import static com.aevi.print.util.Preconditions.checkNotNull;
import com.aevi.util.json.JsonConverter;
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.aevi.print.model;




/**
 * Contains information such as name, DPI and paper width for a specific PrinterSettings on the Device.
 */
public class PrinterSettings implements Jsonable {

    public static final String OPTION_DEFAULT = "default";

    private final String printerId;
    private final int paperWidth;
    private final int printableWidth;
    private final float paperDotsPmm;
    private final PaperKind paperKind;
    private final String[] commands;
    private final int[] codepages;
    private final Map<String, String> options;
    private final boolean canHandleCommands;
    private final boolean doesReportStatus;
    private final boolean doesSupportCodepages;
    private final String[] supportedLanguages;

    private final PrinterFont[] printerFonts;
    private String displayName;

    PrinterSettings(String printerId, int paperWidth, int printableWidth, float paperDotsPmm,
                    PaperKind paperKind, PrinterFont[] printerFonts,
                    boolean canHandleCommands, String[] commands,
                    boolean doesReportStatus,
                    int[] codepages, boolean doesSupportCodepages,
                    Map<String, String> options,
                    String[] supportedLanguages) {



// Path: print-api/src/main/java/com/aevi/print/util/Preconditions.java
// public static <T> T checkNotNull(T object, String message) {
//     if (object == null) {
//         throw new IllegalArgumentException(message);
//     }
//     return object;
// }


// Path: print-api/src/main/java/com/aevi/print/model/PrinterSettings.java
import com.aevi.util.json.Jsonable;
import java.util.Map;
import static com.aevi.print.util.Preconditions.checkNotNull;
import com.aevi.util.json.JsonConverter;

/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.aevi.print.model;




/**
 * Contains information such as name, DPI and paper width for a specific PrinterSettings on the Device.
 */
public class PrinterSettings implements Jsonable {

    public static final String OPTION_DEFAULT = "default";

    private final String printerId;
    private final int paperWidth;
    private final int printableWidth;
    private final float paperDotsPmm;
    private final PaperKind paperKind;
    private final String[] commands;
    private final int[] codepages;
    private final Map<String, String> options;
    private final boolean canHandleCommands;
    private final boolean doesReportStatus;
    private final boolean doesSupportCodepages;
    private final String[] supportedLanguages;

    private final PrinterFont[] printerFonts;
    private String displayName;

    PrinterSettings(String printerId, int paperWidth, int printableWidth, float paperDotsPmm,
                    PaperKind paperKind, PrinterFont[] printerFonts,
                    boolean canHandleCommands, String[] commands,
                    boolean doesReportStatus,
                    int[] codepages, boolean doesSupportCodepages,
                    Map<String, String> options,
                    String[] supportedLanguages) {



        this.printerId = checkNotNull(printerId, "printerId must not be null") ;