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

com.hp.jipp.model.MediaOverprint.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 2023-03-07
@file:Suppress("MaxLineLength", "WildcardImport")

package com.hp.jipp.model

import com.hp.jipp.encoding.* // ktlint-disable no-wildcard-imports

/**
 * Data object corresponding to a "media-overprint" collection as defined in:
 * [PWG5100.13](https://ftp.pwg.org/pub/pwg/candidates/cs-ippnodriver20-20230301-5100.13.pdf).
 */
@Suppress("RedundantCompanionReference", "unused")
data class MediaOverprint
constructor(
    var mediaOverprintDistance: Int? = null,
    var mediaOverprintMethod: String? = null,
) : AttributeCollection {

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

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

    /** Defines types for each member of [MediaOverprint]. */
    companion object : AttributeCollection.Converter {
        override fun convert(attributes: List>): MediaOverprint =
            MediaOverprint(
                extractOne(attributes, mediaOverprintDistance),
                extractOne(attributes, mediaOverprintMethod),
            )
        override val cls = MediaOverprint::class.java
        @Deprecated("Remove this symbol")
        @JvmField val Types = this
        @JvmField val mediaOverprintDistance = IntType("media-overprint-distance")
        @JvmField val mediaOverprintMethod = KeywordType("media-overprint-method")
    }
    override fun toString() = "MediaOverprint(${attributes.joinToString()})"
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy