com.hp.jipp.model.DocumentFormatDetails.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 "document-format-details" collection as defined in:
* [PWG5100.7](https://ftp.pwg.org/pub/pwg/candidates/cs-ippjobext21-20230210-5100.7.pdf),
* [PWG5100.7-2003](https://ftp.pwg.org/pub/pwg/candidates/cs-ippjobext10-20031031-5100.7.pdf).
*/
@Suppress("RedundantCompanionReference", "unused")
data class DocumentFormatDetails
constructor(
var documentSourceApplicationName: String? = null,
var documentSourceApplicationVersion: String? = null,
var documentSourceOsName: String? = null,
var documentSourceOsVersion: String? = null,
) : AttributeCollection {
/** Construct an empty [DocumentFormatDetails]. */
constructor() : this(null)
/** Produce an attribute list from members. */
override val attributes: List>
get() = listOfNotNull(
documentSourceApplicationName?.let { DocumentFormatDetails.documentSourceApplicationName.of(it) },
documentSourceApplicationVersion?.let { DocumentFormatDetails.documentSourceApplicationVersion.of(it) },
documentSourceOsName?.let { DocumentFormatDetails.documentSourceOsName.of(it) },
documentSourceOsVersion?.let { DocumentFormatDetails.documentSourceOsVersion.of(it) },
)
/** Defines types for each member of [DocumentFormatDetails]. */
companion object : AttributeCollection.Converter {
override fun convert(attributes: List>): DocumentFormatDetails =
DocumentFormatDetails(
extractOne(attributes, documentSourceApplicationName)?.value,
extractOne(attributes, documentSourceApplicationVersion)?.value,
extractOne(attributes, documentSourceOsName)?.value,
extractOne(attributes, documentSourceOsVersion)?.value,
)
override val cls = DocumentFormatDetails::class.java
@Deprecated("Remove this symbol")
@JvmField val Types = this
@JvmField val documentSourceApplicationName = NameType("document-source-application-name")
@JvmField val documentSourceApplicationVersion = TextType("document-source-application-version")
@JvmField val documentSourceOsName = NameType("document-source-os-name")
@JvmField val documentSourceOsVersion = TextType("document-source-os-version")
}
override fun toString() = "DocumentFormatDetails(${attributes.joinToString()})"
}