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

com.hp.jipp.model.JobSaveDisposition.kt Maven / Gradle / Ivy

There is a newer version: 0.7.16
Show newest version
// 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 2021-05-04
@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-save-disposition" collection as defined in:
 * [PWG5100.11](https://ftp.pwg.org/pub/pwg/candidates/cs-ippjobprinterext10-20101030-5100.11.pdf).
 */
@Suppress("RedundantCompanionReference", "unused")
data class JobSaveDisposition
constructor(
    /** May contain any keyword from [SaveDisposition]. */
    var saveDisposition: String? = null,
    var saveInfo: List? = null,
) : AttributeCollection {

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

    /** Produce an attribute list from members. */
    override val attributes: List>
        get() = listOfNotNull(
            saveDisposition?.let { JobSaveDisposition.saveDisposition.of(it) },
            saveInfo?.let { JobSaveDisposition.saveInfo.of(it) },
        )

    /** Defines types for each member of [JobSaveDisposition]. */
    companion object : AttributeCollection.Converter {
        override fun convert(attributes: List>): JobSaveDisposition =
            JobSaveDisposition(
                extractOne(attributes, saveDisposition),
                extractAll(attributes, saveInfo),
            )
        override val cls = JobSaveDisposition::class.java
        @Deprecated("Remove this symbol")
        @JvmField val Types = this
        @JvmField val saveDisposition = KeywordType("save-disposition")
        @JvmField val saveInfo = AttributeCollection.SetType("save-info", SaveInfo)
    }

    /**
     * Data object corresponding to a "save-info" collection.
     */
    @Suppress("RedundantCompanionReference", "unused")
    data class SaveInfo
    constructor(
        var saveDocumentFormat: String? = null,
        var saveLocation: java.net.URI? = null,
        var saveName: String? = null,
    ) : AttributeCollection {

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

        /** Produce an attribute list from members. */
        override val attributes: List>
            get() = listOfNotNull(
                saveDocumentFormat?.let { SaveInfo.saveDocumentFormat.of(it) },
                saveLocation?.let { SaveInfo.saveLocation.of(it) },
                saveName?.let { SaveInfo.saveName.of(it) },
            )

        /** Defines types for each member of [SaveInfo]. */
        companion object : AttributeCollection.Converter {
            override fun convert(attributes: List>): SaveInfo =
                SaveInfo(
                    extractOne(attributes, saveDocumentFormat),
                    extractOne(attributes, saveLocation),
                    extractOne(attributes, saveName)?.value,
                )
            override val cls = SaveInfo::class.java
            @Deprecated("Remove this symbol")
            @JvmField val Types = this
            @JvmField val saveDocumentFormat = StringType(Tag.mimeMediaType, "save-document-format")
            @JvmField val saveLocation = UriType("save-location")
            @JvmField val saveName = NameType("save-name")
        }
        override fun toString() = "SaveInfo(${attributes.joinToString()})"
    }
    override fun toString() = "JobSaveDisposition(${attributes.joinToString()})"
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy