com.hp.jipp.model.MediaColReady.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 "media-col-ready" collection as defined in:
* [PWG5100.13](https://ftp.pwg.org/pub/pwg/candidates/cs-ippjobprinterext3v10-20120727-5100.13.pdf),
* [PWG5100.3](https://ftp.pwg.org/pub/pwg/candidates/cs-ippprodprint10-20010212-5100.3.pdf).
*/
@Suppress("RedundantCompanionReference", "unused")
data class MediaColReady
constructor(
var mediaSourceProperties: MediaSourceProperties? = null
) : AttributeCollection {
/** Construct an empty [MediaColReady]. */
constructor() : this(null)
/** Produce an attribute list from members. */
override val attributes: List> by lazy {
listOfNotNull(
mediaSourceProperties?.let { Types.mediaSourceProperties.of(it) }
)
}
/** Type for attributes of this collection */
class Type(override val name: String) : AttributeCollection.Type(MediaColReady)
/** All member names as strings. */
object Name {
/** "media-source-properties" member name */
const val mediaSourceProperties = "media-source-properties"
}
/** Types for each member attribute. */
object Types {
val mediaSourceProperties = MediaSourceProperties.Type(Name.mediaSourceProperties)
}
/** Defines types for each member of [MediaColReady] */
companion object : AttributeCollection.Converter {
override fun convert(attributes: List>): MediaColReady =
MediaColReady(
extractOne(attributes, Types.mediaSourceProperties)
)
}
/**
* Data object corresponding to a "media-source-properties" collection.
*/
@Suppress("RedundantCompanionReference", "unused")
data class MediaSourceProperties
constructor(
/** May contain any keyword from [FeedOrientation]. */
var mediaSourceFeedDirection: String? = null,
var mediaSourceFeedOrientation: Orientation? = null
) : AttributeCollection {
/** Construct an empty [MediaSourceProperties]. */
constructor() : this(null, null)
/** Produce an attribute list from members. */
override val attributes: List> by lazy {
listOfNotNull(
mediaSourceFeedDirection?.let { Types.mediaSourceFeedDirection.of(it) },
mediaSourceFeedOrientation?.let { Types.mediaSourceFeedOrientation.of(it) }
)
}
/** Type for attributes of this collection */
class Type(override val name: String) : AttributeCollection.Type(MediaSourceProperties)
/** All member names as strings. */
object Name {
/** "media-source-feed-direction" member name */
const val mediaSourceFeedDirection = "media-source-feed-direction"
/** "media-source-feed-orientation" member name */
const val mediaSourceFeedOrientation = "media-source-feed-orientation"
}
/** Types for each member attribute. */
object Types {
val mediaSourceFeedDirection = KeywordType(Name.mediaSourceFeedDirection)
/**
* "media-source-feed-orientation" member type.
*/
val mediaSourceFeedOrientation = Orientation.Type(Name.mediaSourceFeedOrientation)
}
/** Defines types for each member of [MediaSourceProperties] */
companion object : AttributeCollection.Converter {
override fun convert(attributes: List>): MediaSourceProperties =
MediaSourceProperties(
extractOne(attributes, Types.mediaSourceFeedDirection),
extractOne(attributes, Types.mediaSourceFeedOrientation)
)
}
}
}