//
// Discreet3DSSaveOption.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//

import Foundation



public class Discreet3DSSaveOption: SaveOptions {

    /** Gets or sets whether export all lights in the scene. */
    public var exportLight: Bool?
    /** Gets or sets whether export all cameras in the scene */
    public var exportCamera: Bool?
    /** The separator between object's name and the duplicated counter, default value is \"_\". When scene contains objects that use the same name, Aspose.3D 3DS exporter will generate a different name for the object. For example there's two nodes named \"Box\", the first node will have a name \"Box\", and the second node will get a new name \"Box_2\"; using the default configuration */
    public var duplicatedNameSeparator: String?
    /** The counter used by generating new name for duplicated names */
    public var duplicatedNameCounterBase: Int32?
    /** The format of the duplicated counter, default value is empty string. */
    public var duplicatedNameCounterFormat: String?
    /** Gets or sets the master scale used in exporting. */
    public var masterScale: Double?
    /** Gets or sets the GammaCorrectedColor. */
    public var gammaCorrectedColor: Bool?
    /** Gets or sets flip coordinate system of control points/normal during importing/exporting.. */
    public var flipCoordinateSystem: Bool?
    /** Gets or sets the HighPreciseColor. */
    public var highPreciseColor: Bool?

public enum CodingKeys: String, CodingKey {
        case exportLight = "ExportLight"
        case exportCamera = "ExportCamera"
        case duplicatedNameSeparator = "DuplicatedNameSeparator"
        case duplicatedNameCounterBase = "DuplicatedNameCounterBase"
        case duplicatedNameCounterFormat = "DuplicatedNameCounterFormat"
        case masterScale = "MasterScale"
        case gammaCorrectedColor = "GammaCorrectedColor"
        case flipCoordinateSystem = "FlipCoordinateSystem"
        case highPreciseColor = "HighPreciseColor"
    }

    public init(saveFormat: SaveFormat?, lookupPaths: [String]?, fileName: String?, fileFormat: String?, exportLight: Bool?, exportCamera: Bool?, duplicatedNameSeparator: String?, duplicatedNameCounterBase: Int32?, duplicatedNameCounterFormat: String?, masterScale: Double?, gammaCorrectedColor: Bool?, flipCoordinateSystem: Bool?, highPreciseColor: Bool?) {
        self.exportLight = exportLight
        self.exportCamera = exportCamera
        self.duplicatedNameSeparator = duplicatedNameSeparator
        self.duplicatedNameCounterBase = duplicatedNameCounterBase
        self.duplicatedNameCounterFormat = duplicatedNameCounterFormat
        self.masterScale = masterScale
        self.gammaCorrectedColor = gammaCorrectedColor
        self.flipCoordinateSystem = flipCoordinateSystem
        self.highPreciseColor = highPreciseColor
        super.init(saveFormat: saveFormat, lookupPaths: lookupPaths, fileName: fileName, fileFormat: fileFormat)
    }

    // Encodable protocol methods
    
    public override func encode(to encoder: Encoder) throws {
        
        var container = encoder.container(keyedBy: String.self)
        
        try container.encodeIfPresent(exportLight, forKey: "ExportLight")
        try container.encodeIfPresent(exportCamera, forKey: "ExportCamera")
        try container.encodeIfPresent(duplicatedNameSeparator, forKey: "DuplicatedNameSeparator")
        try container.encodeIfPresent(duplicatedNameCounterBase, forKey: "DuplicatedNameCounterBase")
        
        try container.encodeIfPresent(duplicatedNameCounterFormat, forKey: "DuplicatedNameCounterFormat")
        try container.encodeIfPresent(masterScale, forKey: "MasterScale")
        try container.encodeIfPresent(gammaCorrectedColor, forKey: "GammaCorrectedColor")
        try container.encodeIfPresent(flipCoordinateSystem, forKey: "FlipCoordinateSystem")
        
        try container.encodeIfPresent(highPreciseColor, forKey: "HighPreciseColor")
        try super.encode(to: encoder)
    }
    
    // Decodable protocol methods
    
    public required init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: String.self)
        
        exportLight = try container.decodeIfPresent(Bool.self, forKey: "ExportLight")
        exportCamera = try container.decodeIfPresent(Bool.self, forKey: "ExportCamera")
        duplicatedNameSeparator = try container.decodeIfPresent(String.self, forKey: "DuplicatedNameSeparator")
        duplicatedNameCounterBase = try container.decodeIfPresent(Int32.self, forKey: "DuplicatedNameCounterBase")
        
        duplicatedNameCounterFormat = try container.decodeIfPresent(String.self, forKey: "DuplicatedNameCounterFormat")
        masterScale = try container.decodeIfPresent(Double.self, forKey: "MasterScale")
        gammaCorrectedColor = try container.decodeIfPresent(Bool.self, forKey: "GammaCorrectedColor")
        flipCoordinateSystem = try container.decodeIfPresent(Bool.self, forKey: "FlipCoordinateSystem")
        
        highPreciseColor = try container.decodeIfPresent(Bool.self, forKey: "HighPreciseColor")
        try super.init(from: decoder)
    }

}

