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

com.hp.jipp.model.JobConstraintsSupported.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
import com.hp.jipp.encoding.AttributeGroup.Companion.groupOf

/**
 * Data object corresponding to a "job-constraints-supported" collection as defined in:
 * [PWG5100.13](https://ftp.pwg.org/pub/pwg/candidates/cs-ippnodriver20-20230301-5100.13.pdf),
 * [PWG5100.13-2012](https://ftp.pwg.org/pub/pwg/candidates/cs-ippjobprinterext3v10-20120727-5100.13.pdf).
 */
@Suppress("RedundantCompanionReference", "unused")
data class JobConstraintsSupported
constructor(
    var resolverName: String? = null,
    /** Additional attributes (see specification for valid values). */
    var extras: AttributeGroup = groupOf(Tag.jobAttributes),
) : AttributeCollection {

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

    /** Produce an attribute list from members. */
    override val attributes: List>
        get() = listOfNotNull(
            resolverName?.let { JobConstraintsSupported.resolverName.of(it) },
        ) + extras

    /** Defines types for each member of [JobConstraintsSupported]. */
    companion object : AttributeCollection.Converter {
        override fun convert(attributes: List>): JobConstraintsSupported =
            JobConstraintsSupported(
                extractOne(attributes, resolverName)?.value,
                groupOf(
                    Tag.jobAttributes,
                    attributes.filterNot { it.name == resolverName.name }
                ),
            )
        override val cls = JobConstraintsSupported::class.java
        @Deprecated("Remove this symbol")
        @JvmField val Types = this
        @JvmField val resolverName = NameType("resolver-name")
    }
    override fun toString() = "JobConstraintsSupported(${attributes.joinToString()})"
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy