All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hp.jipp.model.InputAttributes.kt Maven / Gradle / Ivy

// Copyright 2018 - 2024 HP Development Company, L.P.
// SPDX-License-Identifier: MIT
//
// DO NOT MODIFY. Code is auto-generated by genTypes.py. Content taken from registry at
// https://www.iana.org/assignments/ipp-registrations/ipp-registrations.xml, updated on 2024-06-13
@file:Suppress("MaxLineLength", "WildcardImport")

package com.hp.jipp.model

import com.hp.jipp.encoding.* // ktlint-disable no-wildcard-imports

/**
 * Data object corresponding to a "input-attributes" collection as defined in:
 * [PWG5100.15](https://ftp.pwg.org/pub/pwg/candidates/cs-ippfaxout10-20131115-5100.15.pdf).
 */
@Suppress("RedundantCompanionReference", "unused")
data class InputAttributes
constructor(
    var inputAutoScaling: Boolean? = null,
    var inputAutoSkewCorrection: Boolean? = null,
    var inputBrightness: Int? = null,
    /** May contain any keyword from [InputColorMode]. */
    var inputColorMode: String? = null,
    /** May contain any keyword from [InputContentType]. */
    var inputContentType: String? = null,
    var inputContrast: Int? = null,
    /** May contain any keyword from [InputFilmScanMode]. */
    var inputFilmScanMode: String? = null,
    var inputImagesToTransfer: Int? = null,
    /** May contain any size name keyword from [Media] or a name. */
    var inputMedia: KeywordOrName? = null,
    var inputOrientationRequested: Orientation? = null,
    var inputQuality: PrintQuality? = null,
    var inputResolution: Resolution? = null,
    var inputScalingHeight: Int? = null,
    var inputScalingWidth: Int? = null,
    var inputScanRegions: List? = null,
    var inputSharpness: Int? = null,
    /** May contain any keyword from [Sides]. */
    var inputSides: String? = null,
    /** May contain any keyword from [InputSource]. */
    var inputSource: String? = null,
) : AttributeCollection {

    /** Construct an empty [InputAttributes]. */
    constructor() : this(null)

    /** Produce an attribute list from members. */
    override val attributes: List>
        get() = listOfNotNull(
            inputAutoScaling?.let { InputAttributes.inputAutoScaling.of(it) },
            inputAutoSkewCorrection?.let { InputAttributes.inputAutoSkewCorrection.of(it) },
            inputBrightness?.let { InputAttributes.inputBrightness.of(it) },
            inputColorMode?.let { InputAttributes.inputColorMode.of(it) },
            inputContentType?.let { InputAttributes.inputContentType.of(it) },
            inputContrast?.let { InputAttributes.inputContrast.of(it) },
            inputFilmScanMode?.let { InputAttributes.inputFilmScanMode.of(it) },
            inputImagesToTransfer?.let { InputAttributes.inputImagesToTransfer.of(it) },
            inputMedia?.let { InputAttributes.inputMedia.of(it) },
            inputOrientationRequested?.let { InputAttributes.inputOrientationRequested.of(it) },
            inputQuality?.let { InputAttributes.inputQuality.of(it) },
            inputResolution?.let { InputAttributes.inputResolution.of(it) },
            inputScalingHeight?.let { InputAttributes.inputScalingHeight.of(it) },
            inputScalingWidth?.let { InputAttributes.inputScalingWidth.of(it) },
            inputScanRegions?.let { InputAttributes.inputScanRegions.of(it) },
            inputSharpness?.let { InputAttributes.inputSharpness.of(it) },
            inputSides?.let { InputAttributes.inputSides.of(it) },
            inputSource?.let { InputAttributes.inputSource.of(it) },
        )

    /** Defines types for each member of [InputAttributes]. */
    companion object : AttributeCollection.Converter {
        override fun convert(attributes: List>): InputAttributes =
            InputAttributes(
                extractOne(attributes, inputAutoScaling),
                extractOne(attributes, inputAutoSkewCorrection),
                extractOne(attributes, inputBrightness),
                extractOne(attributes, inputColorMode),
                extractOne(attributes, inputContentType),
                extractOne(attributes, inputContrast),
                extractOne(attributes, inputFilmScanMode),
                extractOne(attributes, inputImagesToTransfer),
                extractOne(attributes, inputMedia),
                extractOne(attributes, inputOrientationRequested),
                extractOne(attributes, inputQuality),
                extractOne(attributes, inputResolution),
                extractOne(attributes, inputScalingHeight),
                extractOne(attributes, inputScalingWidth),
                extractAll(attributes, inputScanRegions),
                extractOne(attributes, inputSharpness),
                extractOne(attributes, inputSides),
                extractOne(attributes, inputSource),
            )
        override val cls = InputAttributes::class.java
        @Deprecated("Remove this symbol")
        @JvmField val Types = this
        @JvmField val inputAutoScaling = BooleanType("input-auto-scaling")
        @JvmField val inputAutoSkewCorrection = BooleanType("input-auto-skew-correction")
        @JvmField val inputBrightness = IntType("input-brightness")
        @JvmField val inputColorMode = KeywordType("input-color-mode")
        @JvmField val inputContentType = KeywordType("input-content-type")
        @JvmField val inputContrast = IntType("input-contrast")
        @JvmField val inputFilmScanMode = KeywordType("input-film-scan-mode")
        @JvmField val inputImagesToTransfer = IntType("input-images-to-transfer")
        @JvmField val inputMedia = KeywordOrNameType("input-media")
        /**
         * "input-orientation-requested" member type.
         */
        @JvmField val inputOrientationRequested = Orientation.Type("input-orientation-requested")
        /**
         * "input-quality" member type.
         */
        @JvmField val inputQuality = PrintQuality.Type("input-quality")
        @JvmField val inputResolution = ResolutionType("input-resolution")
        @JvmField val inputScalingHeight = IntType("input-scaling-height")
        @JvmField val inputScalingWidth = IntType("input-scaling-width")
        @JvmField val inputScanRegions = AttributeCollection.SetType("input-scan-regions", InputScanRegions)
        @JvmField val inputSharpness = IntType("input-sharpness")
        @JvmField val inputSides = KeywordType("input-sides")
        @JvmField val inputSource = KeywordType("input-source")
    }

    /**
     * Data object corresponding to a "input-scan-regions" collection.
     */
    @Suppress("RedundantCompanionReference", "unused")
    data class InputScanRegions
    constructor(
        var xDimension: Int? = null,
        var xOrigin: Int? = null,
        var yDimension: Int? = null,
        var yOrigin: Int? = null,
    ) : AttributeCollection {

        /** Construct an empty [InputScanRegions]. */
        constructor() : this(null)

        /** Produce an attribute list from members. */
        override val attributes: List>
            get() = listOfNotNull(
                xDimension?.let { InputScanRegions.xDimension.of(it) },
                xOrigin?.let { InputScanRegions.xOrigin.of(it) },
                yDimension?.let { InputScanRegions.yDimension.of(it) },
                yOrigin?.let { InputScanRegions.yOrigin.of(it) },
            )

        /** Defines types for each member of [InputScanRegions]. */
        companion object : AttributeCollection.Converter {
            override fun convert(attributes: List>): InputScanRegions =
                InputScanRegions(
                    extractOne(attributes, xDimension),
                    extractOne(attributes, xOrigin),
                    extractOne(attributes, yDimension),
                    extractOne(attributes, yOrigin),
                )
            override val cls = InputScanRegions::class.java
            @Deprecated("Remove this symbol")
            @JvmField val Types = this
            @JvmField val xDimension = IntType("x-dimension")
            @JvmField val xOrigin = IntType("x-origin")
            @JvmField val yDimension = IntType("y-dimension")
            @JvmField val yOrigin = IntType("y-origin")
        }
        override fun toString() = "InputScanRegions(${attributes.joinToString()})"
    }
    override fun toString() = "InputAttributes(${attributes.joinToString()})"
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy