All Downloads are FREE. Search and download functionalities are using the official Maven repository.

travel.izi.api.model.entity.Content Maven / Gradle / Ivy

/*
 * Copyright (C) 2014 IZITEQ B.V.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package travel.izi.api.model.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
import com.google.auto.value.AutoValue;

import javax.annotation.Nullable;
import java.io.Serializable;
import java.util.List;

/**
 * Language specific {@link FullMtgObject} content: texts, descriptions, media.
 */
@SuppressWarnings("unused")
@AutoValue
@JsonDeserialize(builder = AutoValue_Content.Builder.class)
public abstract class Content implements Serializable {

    public static Builder builder() {
        return new AutoValue_Content.Builder();
    }

    /**
     * Language (ISO 639-1) of this content item.
     */
    public abstract String language();

    /**
     * Title.
     */
    public abstract String title();

    /**
     * Shortened description.
     */
    public abstract String summary();

    /**
     * Full description.
     */
    @JsonProperty("desc")
    public abstract String description();

    /**
     * News (typical for museum).
     */
    @Nullable
    public abstract String news();

    /**
     * A message to notify/congratulate the end-user of successful end of guide/quest. Typical
     * for museum, collection, tour.
     */
    @Nullable
    public abstract String closingLine();

    /**
     * MTGObject's playback algorithm settings. Specifies the way data inside MTGObject must be
     * played.
     */
    @Nullable
    public abstract Playback playback();

    /**
     * Download links to offline packages for each supported mobile platform and combination of
     * image, audio and video data formats.
     */
    @Nullable
    public abstract Download download();

    /**
     * Array of images data.
     */
    @Nullable
    public abstract List images();

    /**
     * Array of audio data.
     */
    @Nullable
    public abstract List audio();

    /**
     * Array of video data.
     */
    @Nullable
    public abstract List video();

    /**
     * Array of included object's content.
     */
    @Nullable
    public abstract List children();

    /**
     * Array of included museum collection's content.
     */
    @Nullable
    public abstract List collections();

    /**
     * Array of linked object's content.
     */
    @Nullable
    public abstract List references();

    /**
     * Quiz data.
     */
    @Nullable
    public abstract Quiz quiz();

    /**
     * Number of children.
     */
    @Nullable
    public abstract Integer childrenCount();

    /**
     * Total audio duration.
     */
    @Nullable
    public abstract Integer audioDuration();

    @AutoValue.Builder
    @JsonPOJOBuilder(withPrefix = "")
    public abstract static class Builder {
        public abstract Builder language(String language);
        public abstract Builder title(String title);
        public abstract Builder summary(String summary);
        @JsonProperty("desc")
        public abstract Builder description(String description);
        public abstract Builder news(String news);
        public abstract Builder closingLine(String closingLine);
        public abstract Builder playback(Playback playback);
        public abstract Builder download(Download download);
        public abstract Builder images(List images);
        public abstract Builder audio(List audio);
        public abstract Builder video(List video);
        public abstract Builder children(List children);
        public abstract Builder collections(List collections);
        public abstract Builder references(List references);
        public abstract Builder quiz(Quiz quiz);
        public abstract Builder childrenCount(Integer childrenCount);
        public abstract Builder audioDuration(Integer audioDuration);

        public abstract Content build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy