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

travel.izi.api.model.entity.CompactMtgObject 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 travel.izi.api.model.enumeration.*;

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

/**
 * The compact version of {@link MtgObject}. Used to display a list of items.
 */
@SuppressWarnings("unused")
@AutoValue
@JsonDeserialize(builder = AutoValue_CompactMtgObject.Builder.class)
public abstract class CompactMtgObject extends MtgObject {

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

    /**
     * Language (ISO 639-1) of object's content.
     */
    public abstract String language();

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

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

    /**
     * Full description. Only for objects from "children" section.
     */
    @Nullable
    @JsonProperty("desc")
    public abstract String description();

    /**
     * Array of images data.
     * 

NOTE: Contains only one object (first image).

*/ @Nullable public abstract List images(); /** * Quiz data. Only for objects from "children" section. */ @Nullable public abstract Quiz quiz(); /** * Route in KML format (typical for tour). This route is for display on map purposes only. */ @Nullable public abstract String route(); /** * Number of children. */ @Nullable public abstract Integer childrenCount(); @AutoValue.Builder @JsonPOJOBuilder(withPrefix = "") public abstract static class Builder { public abstract Builder uuid(String uuid); public abstract Builder type(MtgObjectType type); public abstract Builder category(Category category); public abstract Builder playbackType(PlaybackType playbackType); public abstract Builder status(Status status); public abstract Builder publisher(CompactMtgObject publisher); public abstract Builder contentProvider(ContentProvider contentProvider); public abstract Builder languages(List languages); public abstract Builder location(Location location); public abstract Builder country(CompactMtgObject country); public abstract Builder city(CompactMtgObject city); public abstract Builder triggerZones(List triggerZones); public abstract Builder map(Map map); public abstract Builder placement(Placement placement); public abstract Builder distance(Integer distance); public abstract Builder duration(Integer duration); public abstract Builder purchase(Purchase purchase); public abstract Builder translations(List translations); public abstract Builder countryCode(String countryCode); public abstract Builder reviews(ReviewsResponse.Estimation reviews); public abstract Builder hidden(Boolean hidden); public abstract Builder visible(Boolean visible); public abstract Builder hash(String hash); 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 images(List images); public abstract Builder quiz(Quiz quiz); public abstract Builder route(String route); public abstract Builder childrenCount(Integer childrenCount); public abstract CompactMtgObject build(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy