nl.vpro.domain.media.update.ItemizeRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of media-domain Show documentation
Show all versions of media-domain Show documentation
The basic domain classes for 'media', the core of POMS. Also, the 'update' XML bindings for it.
It also contains some closely related domain classes like the enum to contain NICAM kijkwijzer settings.
package nl.vpro.domain.media.update;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.time.Duration;
import jakarta.validation.constraints.NotNull;
import jakarta.xml.bind.annotation.*;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import nl.vpro.jackson2.XMLDurationToJsonTimestamp;
import nl.vpro.xml.bind.DurationXmlAdapter;
/**
* @author Michiel Meeuwissen
* @since 5.6
*/
@Data
@AllArgsConstructor
@lombok.Builder(builderClassName = "Builder")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "itemizeType")
@XmlRootElement(name = "itemize")
public class ItemizeRequest {
@NotNull
@XmlAttribute
private String mid;
@XmlElement(required = false)
@XmlJavaTypeAdapter(DurationXmlAdapter.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonSerialize(using = XMLDurationToJsonTimestamp.Serializer.class)
@JsonDeserialize(using = XMLDurationToJsonTimestamp.DeserializerJavaDuration.class)
private Duration start;
@XmlElement(required = true)
@XmlJavaTypeAdapter(DurationXmlAdapter.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonSerialize(using = XMLDurationToJsonTimestamp.Serializer.class)
@JsonDeserialize(using = XMLDurationToJsonTimestamp.DeserializerJavaDuration.class)
private Duration stop;
public ItemizeRequest() {
}
}