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

io.sphere.sdk.projects.Project Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.projects;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.neovisionaries.i18n.CountryCode;
import io.sphere.sdk.models.Base;
import io.sphere.sdk.models.CreationTimestamped;

import java.time.ZonedDateTime;
import java.util.List;

public final class Project extends Base implements CreationTimestamped {
    private final String key;
    private final String name;
    private final List countries;
    private final List languages;
    private final ZonedDateTime createdAt;
    private final ZonedDateTime trialUntil;

    @JsonCreator
    private Project(final String key, final String name, final List countries, final List languages, final ZonedDateTime createdAt,  @JsonDeserialize(using=TrialUntilDeserializer.class) final ZonedDateTime trialUntil) {
        this.key = key;
        this.name = name;
        this.countries = countries;
        this.languages = languages;
        this.createdAt = createdAt;
        this.trialUntil = trialUntil;
    }

    public String getKey() {
        return key;
    }

    public String getName() {
        return name;
    }

    public List getCountries() {
        return countries;
    }

    public List getLanguages() {
        return languages;
    }

    public ZonedDateTime getTrialUntil() {
        return trialUntil;
    }

    @Override
    public ZonedDateTime getCreatedAt() {
        return createdAt;
    }

    public static TypeReference typeReference() {
        return new TypeReference(){
            @Override
            public String toString() {
                return "TypeReference";
            }
        };
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy