com.hp.jipp.model.PowerTimeoutPolicyCol.kt Maven / Gradle / Ivy
// Copyright 2020 - 2024 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 2024-06-13
@file:Suppress("MaxLineLength", "WildcardImport")
package com.hp.jipp.model
import com.hp.jipp.encoding.* // ktlint-disable no-wildcard-imports
/**
* Data object corresponding to a "power-timeout-policy-col" collection as defined in:
* [PWG5100.22](https://ftp.pwg.org/pub/pwg/candidates/cs-ippsystem10-20191122-5100.22.pdf).
*/
@Suppress("RedundantCompanionReference", "unused")
data class PowerTimeoutPolicyCol
constructor(
var startPowerState: String? = null,
var timeoutId: Int? = null,
/** May contain any keyword from [TimeoutPredicate]. */
var timeoutPredicate: String? = null,
var timeoutSeconds: Int? = null,
) : AttributeCollection {
/** Construct an empty [PowerTimeoutPolicyCol]. */
constructor() : this(null)
/** Produce an attribute list from members. */
override val attributes: List>
get() = listOfNotNull(
startPowerState?.let { PowerTimeoutPolicyCol.startPowerState.of(it) },
timeoutId?.let { PowerTimeoutPolicyCol.timeoutId.of(it) },
timeoutPredicate?.let { PowerTimeoutPolicyCol.timeoutPredicate.of(it) },
timeoutSeconds?.let { PowerTimeoutPolicyCol.timeoutSeconds.of(it) },
)
/** Defines types for each member of [PowerTimeoutPolicyCol]. */
companion object : AttributeCollection.Converter {
override fun convert(attributes: List>): PowerTimeoutPolicyCol =
PowerTimeoutPolicyCol(
extractOne(attributes, startPowerState),
extractOne(attributes, timeoutId),
extractOne(attributes, timeoutPredicate),
extractOne(attributes, timeoutSeconds),
)
override val cls = PowerTimeoutPolicyCol::class.java
@Deprecated("Remove this symbol")
@JvmField val Types = this
@JvmField val startPowerState = KeywordType("start-power-state")
@JvmField val timeoutId = IntType("timeout-id")
@JvmField val timeoutPredicate = KeywordType("timeout-predicate")
@JvmField val timeoutSeconds = IntType("timeout-seconds")
}
override fun toString() = "PowerTimeoutPolicyCol(${attributes.joinToString()})"
}