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

com.hp.jipp.model.PdlInitFile.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 "pdl-init-file" collection as defined in:
 * [PWG5100.11](https://ftp.pwg.org/pub/pwg/candidates/cs-ippjobprinterext10-20101030-5100.11.pdf).
 */
@Suppress("RedundantCompanionReference", "unused")
data class PdlInitFile
constructor(
    var pdlInitFileEntry: String? = null,
    var pdlInitFileLocation: java.net.URI? = null,
    var pdlInitFileName: String? = null
) : AttributeCollection {

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

    /** Produce an attribute list from members. */
    override val attributes: List> by lazy {
        listOfNotNull(
            pdlInitFileEntry?.let { Types.pdlInitFileEntry.of(it) },
            pdlInitFileLocation?.let { Types.pdlInitFileLocation.of(it) },
            pdlInitFileName?.let { Types.pdlInitFileName.of(it) }
        )
    }

    /** Type for attributes of this collection */
    class Type(override val name: String) : AttributeCollection.Type(PdlInitFile)

    /** All member names as strings. */
    object Name {
        /** "pdl-init-file-entry" member name */
        const val pdlInitFileEntry = "pdl-init-file-entry"
        /** "pdl-init-file-location" member name */
        const val pdlInitFileLocation = "pdl-init-file-location"
        /** "pdl-init-file-name" member name */
        const val pdlInitFileName = "pdl-init-file-name"
    }

    /** Types for each member attribute. */
    object Types {
        val pdlInitFileEntry = NameType(Name.pdlInitFileEntry)
        val pdlInitFileLocation = UriType(Name.pdlInitFileLocation)
        val pdlInitFileName = NameType(Name.pdlInitFileName)
    }

    /** Defines types for each member of [PdlInitFile] */
    companion object : AttributeCollection.Converter {
        override fun convert(attributes: List>): PdlInitFile =
            PdlInitFile(
                extractOne(attributes, Types.pdlInitFileEntry)?.value,
                extractOne(attributes, Types.pdlInitFileLocation),
                extractOne(attributes, Types.pdlInitFileName)?.value
            )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy