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

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

There is a newer version: 0.7.16
Show newest version
// Copyright 2018 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 2021-05-04
@file:Suppress("MaxLineLength", "WildcardImport")

package com.hp.jipp.model

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

/**
 * Data object corresponding to a "print-accuracy-supported" collection as defined in:
 * [PWG5100.21](https://ftp.pwg.org/pub/pwg/candidates/cs-ipp3d11-20190329-5100.21.pdf).
 */
@Suppress("RedundantCompanionReference", "unused")
data class PrintAccuracySupported
constructor(
    /** May contain any keyword from [AccuracyUnit]. */
    var accuracyUnits: String? = null,
    var xAccuracy: Int? = null,
    var yAccuracy: Int? = null,
    var zAccuracy: Int? = null,
) : AttributeCollection {

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

    /** Produce an attribute list from members. */
    override val attributes: List>
        get() = listOfNotNull(
            accuracyUnits?.let { PrintAccuracySupported.accuracyUnits.of(it) },
            xAccuracy?.let { PrintAccuracySupported.xAccuracy.of(it) },
            yAccuracy?.let { PrintAccuracySupported.yAccuracy.of(it) },
            zAccuracy?.let { PrintAccuracySupported.zAccuracy.of(it) },
        )

    /** Defines types for each member of [PrintAccuracySupported]. */
    companion object : AttributeCollection.Converter {
        override fun convert(attributes: List>): PrintAccuracySupported =
            PrintAccuracySupported(
                extractOne(attributes, accuracyUnits),
                extractOne(attributes, xAccuracy),
                extractOne(attributes, yAccuracy),
                extractOne(attributes, zAccuracy),
            )
        override val cls = PrintAccuracySupported::class.java
        @Deprecated("Remove this symbol")
        @JvmField val Types = this
        @JvmField val accuracyUnits = KeywordType("accuracy-units")
        @JvmField val xAccuracy = IntType("x-accuracy")
        @JvmField val yAccuracy = IntType("y-accuracy")
        @JvmField val zAccuracy = IntType("z-accuracy")
    }
    override fun toString() = "PrintAccuracySupported(${attributes.joinToString()})"
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy