com.hp.jipp.model.ProofPrint.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 "proof-print" collection as defined in:
* [PWG5100.11](https://ftp.pwg.org/pub/pwg/candidates/cs-ippjobprinterext10-20101030-5100.11.pdf).
*/
@Suppress("RedundantCompanionReference", "unused")
data class ProofPrint
constructor(
/** May contain any keyword from [Media] or a name. */
var media: KeywordOrName? = null,
var mediaCol: MediaCol? = null,
var proofPrintCopies: Int? = null,
) : AttributeCollection {
/** Construct an empty [ProofPrint]. */
constructor() : this(null)
/** Produce an attribute list from members. */
override val attributes: List>
get() = listOfNotNull(
media?.let { ProofPrint.media.of(it) },
mediaCol?.let { ProofPrint.mediaCol.of(it) },
proofPrintCopies?.let { ProofPrint.proofPrintCopies.of(it) },
)
/** Defines types for each member of [ProofPrint]. */
companion object : AttributeCollection.Converter {
override fun convert(attributes: List>): ProofPrint =
ProofPrint(
extractOne(attributes, media),
extractOne(attributes, mediaCol),
extractOne(attributes, proofPrintCopies),
)
override val cls = ProofPrint::class.java
@Deprecated("Remove this symbol")
@JvmField val Types = this
@JvmField val media = KeywordOrNameType("media")
@JvmField val mediaCol = AttributeCollection.Type("media-col", MediaCol)
@JvmField val proofPrintCopies = IntType("proof-print-copies")
}
override fun toString() = "ProofPrint(${attributes.joinToString()})"
}