Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// 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 "document-format-details" collection as defined in:
* [PWG5100.7](https://ftp.pwg.org/pub/pwg/candidates/cs-ippjobext10-20031031-5100.7.pdf).
*/
@Suppress("RedundantCompanionReference", "unused")
data class DocumentFormatDetails
constructor(
var documentFormat: String? = null,
var documentFormatDeviceId: String? = null,
var documentFormatVersion: String? = null,
var documentNaturalLanguage: List? = null,
var documentSourceApplicationName: String? = null,
var documentSourceApplicationVersion: String? = null,
var documentSourceOsName: String? = null,
var documentSourceOsVersion: String? = null
) : AttributeCollection {
/** Construct an empty [DocumentFormatDetails]. */
constructor() : this(null, null, null, null, null, null, null, null)
/** Produce an attribute list from members. */
override val attributes: List> by lazy {
listOfNotNull(
documentFormat?.let { Types.documentFormat.of(it) },
documentFormatDeviceId?.let { Types.documentFormatDeviceId.of(it) },
documentFormatVersion?.let { Types.documentFormatVersion.of(it) },
documentNaturalLanguage?.let { Types.documentNaturalLanguage.of(it) },
documentSourceApplicationName?.let { Types.documentSourceApplicationName.of(it) },
documentSourceApplicationVersion?.let { Types.documentSourceApplicationVersion.of(it) },
documentSourceOsName?.let { Types.documentSourceOsName.of(it) },
documentSourceOsVersion?.let { Types.documentSourceOsVersion.of(it) }
)
}
/** Type for attributes of this collection */
class Type(override val name: String) : AttributeCollection.Type(DocumentFormatDetails)
/** All member names as strings. */
object Name {
/** "document-format" member name */
const val documentFormat = "document-format"
/** "document-format-device-id" member name */
const val documentFormatDeviceId = "document-format-device-id"
/** "document-format-version" member name */
const val documentFormatVersion = "document-format-version"
/** "document-natural-language" member name */
const val documentNaturalLanguage = "document-natural-language"
/** "document-source-application-name" member name */
const val documentSourceApplicationName = "document-source-application-name"
/** "document-source-application-version" member name */
const val documentSourceApplicationVersion = "document-source-application-version"
/** "document-source-os-name" member name */
const val documentSourceOsName = "document-source-os-name"
/** "document-source-os-version" member name */
const val documentSourceOsVersion = "document-source-os-version"
}
/** Types for each member attribute. */
object Types {
val documentFormat = StringType(Tag.mimeMediaType, Name.documentFormat)
val documentFormatDeviceId = TextType(Name.documentFormatDeviceId)
val documentFormatVersion = TextType(Name.documentFormatVersion)
val documentNaturalLanguage = StringType(Tag.naturalLanguage, Name.documentNaturalLanguage)
val documentSourceApplicationName = NameType(Name.documentSourceApplicationName)
val documentSourceApplicationVersion = TextType(Name.documentSourceApplicationVersion)
val documentSourceOsName = NameType(Name.documentSourceOsName)
val documentSourceOsVersion = TextType(Name.documentSourceOsVersion)
}
/** Defines types for each member of [DocumentFormatDetails] */
companion object : AttributeCollection.Converter {
override fun convert(attributes: List>): DocumentFormatDetails =
DocumentFormatDetails(
extractOne(attributes, Types.documentFormat),
extractOne(attributes, Types.documentFormatDeviceId)?.value,
extractOne(attributes, Types.documentFormatVersion)?.value,
extractAll(attributes, Types.documentNaturalLanguage),
extractOne(attributes, Types.documentSourceApplicationName)?.value,
extractOne(attributes, Types.documentSourceApplicationVersion)?.value,
extractOne(attributes, Types.documentSourceOsName)?.value,
extractOne(attributes, Types.documentSourceOsVersion)?.value
)
}
}