com.hp.jipp.model.PrintAccuracy.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 "print-accuracy" collection as defined in:
* [PWG5100.21](https://ftp.pwg.org/pub/pwg/candidates/cs-ipp3d11-20190329-5100.21.pdf).
*/
@Suppress("RedundantCompanionReference", "unused")
data class PrintAccuracy
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 [PrintAccuracy]. */
constructor() : this(null)
/** Produce an attribute list from members. */
override val attributes: List>
get() = listOfNotNull(
accuracyUnits?.let { PrintAccuracy.accuracyUnits.of(it) },
xAccuracy?.let { PrintAccuracy.xAccuracy.of(it) },
yAccuracy?.let { PrintAccuracy.yAccuracy.of(it) },
zAccuracy?.let { PrintAccuracy.zAccuracy.of(it) },
)
/** Defines types for each member of [PrintAccuracy]. */
companion object : AttributeCollection.Converter {
override fun convert(attributes: List>): PrintAccuracy =
PrintAccuracy(
extractOne(attributes, accuracyUnits),
extractOne(attributes, xAccuracy),
extractOne(attributes, yAccuracy),
extractOne(attributes, zAccuracy),
)
override val cls = PrintAccuracy::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() = "PrintAccuracy(${attributes.joinToString()})"
}