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 "print-objects" collection as defined in:
* [PWG5100.21](https://ftp.pwg.org/pub/pwg/candidates/cs-ipp3d11-20190329-5100.21.pdf).
*/
@Suppress("RedundantCompanionReference", "unused")
data class PrintObjects
constructor(
var documentNumber: Int? = null,
var objectOffset: ObjectOffset? = null,
var objectSize: ObjectSize? = null,
var objectUuid: java.net.URI? = null
) : AttributeCollection {
/** Construct an empty [PrintObjects]. */
constructor() : this(null, null, null, null)
/** Produce an attribute list from members. */
override val attributes: List> by lazy {
listOfNotNull(
documentNumber?.let { Types.documentNumber.of(it) },
objectOffset?.let { Types.objectOffset.of(it) },
objectSize?.let { Types.objectSize.of(it) },
objectUuid?.let { Types.objectUuid.of(it) }
)
}
/** Type for attributes of this collection */
class Type(override val name: String) : AttributeCollection.Type(PrintObjects)
/** All member names as strings. */
object Name {
/** "document-number" member name */
const val documentNumber = "document-number"
/** "object-offset" member name */
const val objectOffset = "object-offset"
/** "object-size" member name */
const val objectSize = "object-size"
/** "object-uuid" member name */
const val objectUuid = "object-uuid"
}
/** Types for each member attribute. */
object Types {
val documentNumber = IntType(Name.documentNumber)
val objectOffset = ObjectOffset.Type(Name.objectOffset)
val objectSize = ObjectSize.Type(Name.objectSize)
val objectUuid = UriType(Name.objectUuid)
}
/** Defines types for each member of [PrintObjects] */
companion object : AttributeCollection.Converter {
override fun convert(attributes: List>): PrintObjects =
PrintObjects(
extractOne(attributes, Types.documentNumber),
extractOne(attributes, Types.objectOffset),
extractOne(attributes, Types.objectSize),
extractOne(attributes, Types.objectUuid)
)
}
/**
* Data object corresponding to a "object-offset" collection.
*/
@Suppress("RedundantCompanionReference", "unused")
data class ObjectOffset
constructor(
var xOffset: Int? = null,
var yOffset: Int? = null,
var zOffset: Int? = null
) : AttributeCollection {
/** Construct an empty [ObjectOffset]. */
constructor() : this(null, null, null)
/** Produce an attribute list from members. */
override val attributes: List> by lazy {
listOfNotNull(
xOffset?.let { Types.xOffset.of(it) },
yOffset?.let { Types.yOffset.of(it) },
zOffset?.let { Types.zOffset.of(it) }
)
}
/** Type for attributes of this collection */
class Type(override val name: String) : AttributeCollection.Type(ObjectOffset)
/** All member names as strings. */
object Name {
/** "x-offset" member name */
const val xOffset = "x-offset"
/** "y-offset" member name */
const val yOffset = "y-offset"
/** "z-offset" member name */
const val zOffset = "z-offset"
}
/** Types for each member attribute. */
object Types {
val xOffset = IntType(Name.xOffset)
val yOffset = IntType(Name.yOffset)
val zOffset = IntType(Name.zOffset)
}
/** Defines types for each member of [ObjectOffset] */
companion object : AttributeCollection.Converter {
override fun convert(attributes: List>): ObjectOffset =
ObjectOffset(
extractOne(attributes, Types.xOffset),
extractOne(attributes, Types.yOffset),
extractOne(attributes, Types.zOffset)
)
}
}
/**
* Data object corresponding to a "object-size" collection.
*/
@Suppress("RedundantCompanionReference", "unused")
data class ObjectSize
constructor(
var xDimension: Int? = null,
var yDimension: Int? = null,
var zDimension: Int? = null
) : AttributeCollection {
/** Construct an empty [ObjectSize]. */
constructor() : this(null, null, null)
/** Produce an attribute list from members. */
override val attributes: List> by lazy {
listOfNotNull(
xDimension?.let { Types.xDimension.of(it) },
yDimension?.let { Types.yDimension.of(it) },
zDimension?.let { Types.zDimension.of(it) }
)
}
/** Type for attributes of this collection */
class Type(override val name: String) : AttributeCollection.Type(ObjectSize)
/** All member names as strings. */
object Name {
/** "x-dimension" member name */
const val xDimension = "x-dimension"
/** "y-dimension" member name */
const val yDimension = "y-dimension"
/** "z-dimension" member name */
const val zDimension = "z-dimension"
}
/** Types for each member attribute. */
object Types {
val xDimension = IntType(Name.xDimension)
val yDimension = IntType(Name.yDimension)
val zDimension = IntType(Name.zDimension)
}
/** Defines types for each member of [ObjectSize] */
companion object : AttributeCollection.Converter {
override fun convert(attributes: List>): ObjectSize =
ObjectSize(
extractOne(attributes, Types.xDimension),
extractOne(attributes, Types.yDimension),
extractOne(attributes, Types.zDimension)
)
}
}
}