com.hp.jipp.model.JobPresetsSupported.kt Maven / Gradle / Ivy
// 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 2019-05-28
@file:Suppress("MaxLineLength", "WildcardImport")
package com.hp.jipp.model
import com.hp.jipp.encoding.* // ktlint-disable no-wildcard-imports
/**
* Data object corresponding to a "job-presets-supported" collection as defined in:
* [IPPPRESET](https://ftp.pwg.org/pub/pwg/ipp/registrations/reg-ipppreset-20171214.pdf).
*/
@Suppress("RedundantCompanionReference", "unused")
data class JobPresetsSupported
constructor(
/** May contain any keyword from [PresetName] or a name. */
var presetName: KeywordOrName? = null
) : AttributeCollection {
/** Construct an empty [JobPresetsSupported]. */
constructor() : this(null)
/** Produce an attribute list from members. */
override val attributes: List> by lazy {
listOfNotNull(
presetName?.let { Types.presetName.of(it) }
)
}
/** Type for attributes of this collection */
class Type(override val name: String) : AttributeCollection.Type(JobPresetsSupported)
/** All member names as strings. */
object Name {
/** "preset-name" member name */
const val presetName = "preset-name"
}
/** Types for each member attribute. */
object Types {
val presetName = KeywordOrNameType(Name.presetName)
}
/** Defines types for each member of [JobPresetsSupported] */
companion object : AttributeCollection.Converter {
override fun convert(attributes: List>): JobPresetsSupported =
JobPresetsSupported(
extractOne(attributes, Types.presetName)
)
}
}