com.hp.jipp.model.PrinterIccProfiles.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jipp-core Show documentation
Show all versions of jipp-core Show documentation
IPP packet builder/parser
// 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
import com.hp.jipp.encoding.AttributeGroup.Companion.groupOf
/**
* Data object corresponding to a "printer-icc-profiles" collection as defined in:
* [PWG5100.13](https://ftp.pwg.org/pub/pwg/candidates/cs-ippjobprinterext3v10-20120727-5100.13.pdf).
*/
@Suppress("RedundantCompanionReference", "unused")
data class PrinterIccProfiles
constructor(
var profileName: String? = null,
var profileUrl: java.net.URI? = null,
/** Additional attributes (see specification for valid values). */
var extras: AttributeGroup = groupOf(Tag.jobAttributes),
) : AttributeCollection {
/** Construct an empty [PrinterIccProfiles]. */
constructor() : this(null)
/** Produce an attribute list from members. */
override val attributes: List>
get() = extras + listOfNotNull(
profileName?.let { PrinterIccProfiles.profileName.of(it) },
profileUrl?.let { PrinterIccProfiles.profileUrl.of(it) },
)
/** Defines types for each member of [PrinterIccProfiles]. */
companion object : AttributeCollection.Converter {
override fun convert(attributes: List>): PrinterIccProfiles =
PrinterIccProfiles(
extractOne(attributes, profileName)?.value,
extractOne(attributes, profileUrl),
groupOf(
Tag.jobAttributes,
attributes.filterNot { it.name == profileName.name || it.name == profileUrl.name }
),
)
override val cls = PrinterIccProfiles::class.java
@Deprecated("Remove this symbol")
@JvmField val Types = this
@JvmField val profileName = NameType("profile-name")
@JvmField val profileUrl = UriType("profile-url")
}
override fun toString() = "PrinterIccProfiles(${attributes.joinToString()})"
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy