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

com.hp.jipp.model.MediaColDatabase.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 "media-col-database" collection as defined in:
 * [PWG5100.7](https://ftp.pwg.org/pub/pwg/candidates/cs-ippjobext21-20230210-5100.7.pdf),
 * [PWG5100.7-2019](https://ftp.pwg.org/pub/pwg/candidates/cs-ippjobext20-20190816-5100.7.pdf).
 */
@Suppress("RedundantCompanionReference", "unused")
data class MediaColDatabase
constructor(
    /** May contain any keyword from [MediaBackCoating] or a name. */
    var mediaBackCoating: KeywordOrName? = null,
    var mediaBottomMargin: Int? = null,
    /** May contain any keyword from [MediaColor] or a name. */
    var mediaColor: KeywordOrName? = null,
    /** May contain any keyword from [MediaBackCoating] or a name. */
    var mediaFrontCoating: KeywordOrName? = null,
    /** May contain any keyword from [MediaGrain] or a name. */
    var mediaGrain: KeywordOrName? = null,
    var mediaHoleCount: Int? = null,
    var mediaInfo: String? = null,
    /** May contain any keyword from [Media] or a name. */
    var mediaKey: KeywordOrName? = null,
    var mediaLeftMargin: Int? = null,
    var mediaOrderCount: Int? = null,
    /** May contain any keyword from [MediaPrePrinted] or a name. */
    var mediaPrePrinted: KeywordOrName? = null,
    /** May contain any keyword from [MediaRecycled] or a name. */
    var mediaRecycled: KeywordOrName? = null,
    var mediaRightMargin: Int? = null,
    var mediaSize: MediaSize? = null,
    /** May contain any keyword from [Media] or a name. */
    var mediaSizeName: KeywordOrName? = null,
    /** May contain any keyword from [MediaSource] or a name. */
    var mediaSource: KeywordOrName? = null,
    var mediaSourceProperties: MediaSourceProperties? = null,
    var mediaThickness: Int? = null,
    /** May contain any keyword from [MediaTooth] or a name. */
    var mediaTooth: KeywordOrName? = null,
    var mediaTopMargin: Int? = null,
    var mediaTopOffset: Int? = null,
    /** May contain any keyword from [MediaTracking]. */
    var mediaTracking: String? = null,
    /** May contain any keyword from [MediaType] or a name. */
    var mediaType: KeywordOrName? = null,
    var mediaWeightMetric: Int? = null,
) : AttributeCollection {

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

    /** Produce an attribute list from members. */
    override val attributes: List>
        get() = listOfNotNull(
            mediaBackCoating?.let { MediaColDatabase.mediaBackCoating.of(it) },
            mediaBottomMargin?.let { MediaColDatabase.mediaBottomMargin.of(it) },
            mediaColor?.let { MediaColDatabase.mediaColor.of(it) },
            mediaFrontCoating?.let { MediaColDatabase.mediaFrontCoating.of(it) },
            mediaGrain?.let { MediaColDatabase.mediaGrain.of(it) },
            mediaHoleCount?.let { MediaColDatabase.mediaHoleCount.of(it) },
            mediaInfo?.let { MediaColDatabase.mediaInfo.of(it) },
            mediaKey?.let { MediaColDatabase.mediaKey.of(it) },
            mediaLeftMargin?.let { MediaColDatabase.mediaLeftMargin.of(it) },
            mediaOrderCount?.let { MediaColDatabase.mediaOrderCount.of(it) },
            mediaPrePrinted?.let { MediaColDatabase.mediaPrePrinted.of(it) },
            mediaRecycled?.let { MediaColDatabase.mediaRecycled.of(it) },
            mediaRightMargin?.let { MediaColDatabase.mediaRightMargin.of(it) },
            mediaSize?.let { MediaColDatabase.mediaSize.of(it) },
            mediaSizeName?.let { MediaColDatabase.mediaSizeName.of(it) },
            mediaSource?.let { MediaColDatabase.mediaSource.of(it) },
            mediaSourceProperties?.let { MediaColDatabase.mediaSourceProperties.of(it) },
            mediaThickness?.let { MediaColDatabase.mediaThickness.of(it) },
            mediaTooth?.let { MediaColDatabase.mediaTooth.of(it) },
            mediaTopMargin?.let { MediaColDatabase.mediaTopMargin.of(it) },
            mediaTopOffset?.let { MediaColDatabase.mediaTopOffset.of(it) },
            mediaTracking?.let { MediaColDatabase.mediaTracking.of(it) },
            mediaType?.let { MediaColDatabase.mediaType.of(it) },
            mediaWeightMetric?.let { MediaColDatabase.mediaWeightMetric.of(it) },
        )

    /** Defines types for each member of [MediaColDatabase]. */
    companion object : AttributeCollection.Converter {
        override fun convert(attributes: List>): MediaColDatabase =
            MediaColDatabase(
                extractOne(attributes, mediaBackCoating),
                extractOne(attributes, mediaBottomMargin),
                extractOne(attributes, mediaColor),
                extractOne(attributes, mediaFrontCoating),
                extractOne(attributes, mediaGrain),
                extractOne(attributes, mediaHoleCount),
                extractOne(attributes, mediaInfo)?.value,
                extractOne(attributes, mediaKey),
                extractOne(attributes, mediaLeftMargin),
                extractOne(attributes, mediaOrderCount),
                extractOne(attributes, mediaPrePrinted),
                extractOne(attributes, mediaRecycled),
                extractOne(attributes, mediaRightMargin),
                extractOne(attributes, mediaSize),
                extractOne(attributes, mediaSizeName),
                extractOne(attributes, mediaSource),
                extractOne(attributes, mediaSourceProperties),
                extractOne(attributes, mediaThickness),
                extractOne(attributes, mediaTooth),
                extractOne(attributes, mediaTopMargin),
                extractOne(attributes, mediaTopOffset),
                extractOne(attributes, mediaTracking),
                extractOne(attributes, mediaType),
                extractOne(attributes, mediaWeightMetric),
            )
        override val cls = MediaColDatabase::class.java
        @Deprecated("Remove this symbol")
        @JvmField val Types = this
        @JvmField val mediaBackCoating = KeywordOrNameType("media-back-coating")
        @JvmField val mediaBottomMargin = IntType("media-bottom-margin")
        @JvmField val mediaColor = KeywordOrNameType("media-color")
        @JvmField val mediaFrontCoating = KeywordOrNameType("media-front-coating")
        @JvmField val mediaGrain = KeywordOrNameType("media-grain")
        @JvmField val mediaHoleCount = IntType("media-hole-count")
        @JvmField val mediaInfo = TextType("media-info")
        @JvmField val mediaKey = KeywordOrNameType("media-key")
        @JvmField val mediaLeftMargin = IntType("media-left-margin")
        @JvmField val mediaOrderCount = IntType("media-order-count")
        @JvmField val mediaPrePrinted = KeywordOrNameType("media-pre-printed")
        @JvmField val mediaRecycled = KeywordOrNameType("media-recycled")
        @JvmField val mediaRightMargin = IntType("media-right-margin")
        @JvmField val mediaSize = AttributeCollection.Type("media-size", MediaSize)
        @JvmField val mediaSizeName = KeywordOrNameType("media-size-name")
        @JvmField val mediaSource = KeywordOrNameType("media-source")
        @JvmField val mediaSourceProperties = AttributeCollection.Type("media-source-properties", MediaSourceProperties)
        @JvmField val mediaThickness = IntType("media-thickness")
        @JvmField val mediaTooth = KeywordOrNameType("media-tooth")
        @JvmField val mediaTopMargin = IntType("media-top-margin")
        @JvmField val mediaTopOffset = IntType("media-top-offset")
        @JvmField val mediaTracking = KeywordType("media-tracking")
        @JvmField val mediaType = KeywordOrNameType("media-type")
        @JvmField val mediaWeightMetric = IntType("media-weight-metric")
    }

    /**
     * Data object corresponding to a "media-size" collection.
     */
    @Suppress("RedundantCompanionReference", "unused")
    data class MediaSize
    constructor(
        var xDimension: IntOrIntRange? = null,
        var yDimension: IntOrIntRange? = null,
    ) : AttributeCollection {

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

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

        /** Defines types for each member of [MediaSize]. */
        companion object : AttributeCollection.Converter {
            override fun convert(attributes: List>): MediaSize =
                MediaSize(
                    extractOne(attributes, xDimension),
                    extractOne(attributes, yDimension),
                )
            override val cls = MediaSize::class.java
            @Deprecated("Remove this symbol")
            @JvmField val Types = this
            @JvmField val xDimension = IntOrIntRangeType("x-dimension")
            @JvmField val yDimension = IntOrIntRangeType("y-dimension")
        }
        override fun toString() = "MediaSize(${attributes.joinToString()})"
    }

    /**
     * Data object corresponding to a "media-source-properties" collection.
     */
    @Suppress("RedundantCompanionReference", "unused")
    data class MediaSourceProperties
    constructor(
        /** May contain any keyword from [MediaSourceFeedDirection]. */
        var mediaSourceFeedDirection: String? = null,
        var mediaSourceFeedOrientation: Orientation? = null,
    ) : AttributeCollection {

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

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

        /** Defines types for each member of [MediaSourceProperties]. */
        companion object : AttributeCollection.Converter {
            override fun convert(attributes: List>): MediaSourceProperties =
                MediaSourceProperties(
                    extractOne(attributes, mediaSourceFeedDirection),
                    extractOne(attributes, mediaSourceFeedOrientation),
                )
            override val cls = MediaSourceProperties::class.java
            @Deprecated("Remove this symbol")
            @JvmField val Types = this
            @JvmField val mediaSourceFeedDirection = KeywordType("media-source-feed-direction")
            /**
             * "media-source-feed-orientation" member type.
             */
            @JvmField val mediaSourceFeedOrientation = Orientation.Type("media-source-feed-orientation")
        }
        override fun toString() = "MediaSourceProperties(${attributes.joinToString()})"
    }
    override fun toString() = "MediaColDatabase(${attributes.joinToString()})"
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy