com.hp.jipp.model.OutputAttributes.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 "output-attributes" collection as defined in:
* [PWG5100.17](https://ftp.pwg.org/pub/pwg/candidates/cs-ippscan10-20140918-5100.17.pdf).
*/
@Suppress("RedundantCompanionReference", "unused")
data class OutputAttributes
constructor(
var noiseRemoval: Int? = null,
var outputCompressionQualityFactor: Int? = null,
) : AttributeCollection {
/** Construct an empty [OutputAttributes]. */
constructor() : this(null)
/** Produce an attribute list from members. */
override val attributes: List>
get() = listOfNotNull(
noiseRemoval?.let { OutputAttributes.noiseRemoval.of(it) },
outputCompressionQualityFactor?.let { OutputAttributes.outputCompressionQualityFactor.of(it) },
)
/** Defines types for each member of [OutputAttributes]. */
companion object : AttributeCollection.Converter {
override fun convert(attributes: List>): OutputAttributes =
OutputAttributes(
extractOne(attributes, noiseRemoval),
extractOne(attributes, outputCompressionQualityFactor),
)
override val cls = OutputAttributes::class.java
@Deprecated("Remove this symbol")
@JvmField val Types = this
@JvmField val noiseRemoval = IntType("noise-removal")
@JvmField val outputCompressionQualityFactor = IntType("output-compression-quality-factor")
}
override fun toString() = "OutputAttributes(${attributes.joinToString()})"
}