public class Comic {
    private int id;
    private int digitalId;
    private String title;
    private double issueNumber;
    private String variantDescription;
    private String description;
    private String modified;
    private String isbn;
    private String upc;
    private String diamondCode;
    private String ean;
    private String issn;
    private String format;
    private int pageCount;
    private List<Text> textObjects;
    private String resourceURI;
    private List<URL> urls;
    private SeriesSummary series;
    private List<ComicSummary> collections;
    private List<ComicSummary> variants;
    private List<ComicSummary> collectedIssues;
    private List<ComicDate> dates;
    private List<ComicPrice> prices;
    private Image thumbnail;
    private List<Image> images;
    private CreatorList creators;
    private CharacterList characters;
    private StoryList stories;
    private EventList events;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getDigitalId() {
        return digitalId;
    }

    public void setDigitalId(int digitalId) {
        this.digitalId = digitalId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public double getIssueNumber() {
        return issueNumber;
    }

    public void setIssueNumber(double issueNumber) {
        this.issueNumber = issueNumber;
    }

    public String getVariantDescription() {
        return variantDescription;
    }

    public void setVariantDescription(String variantDescription) {
        this.variantDescription = variantDescription;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getModified() {
        return modified;
    }

    public void setModified(String modified) {
        this.modified = modified;
    }

    public String getIsbn() {
        return isbn;
    }

    public void setIsbn(String isbn) {
        this.isbn = isbn;
    }

    public String getUpc() {
        return upc;
    }

    public void setUpc(String upc) {
        this.upc = upc;
    }

    public String getDiamondCode() {
        return diamondCode;
    }

    public void setDiamondCode(String diamondCode) {
        this.diamondCode = diamondCode;
    }

    public String getEan() {
        return ean;
    }

    public void setEan(String ean) {
        this.ean = ean;
    }

    public String getIssn() {
        return issn;
    }

    public void setIssn(String issn) {
        this.issn = issn;
    }

    public String getFormat() {
        return format;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    public int getPageCount() {
        return pageCount;
    }

    public void setPageCount(int pageCount) {
        this.pageCount = pageCount;
    }

    public List<Text> getTextObjects() {
        return textObjects;
    }

    public void setTextObjects(List<Text> textObjects) {
        this.textObjects = textObjects;
    }

    public String getResourceURI() {
        return resourceURI;
    }

    public void setResourceURI(String resourceURI) {
        this.resourceURI = resourceURI;
    }

    public List<URL> getUrls() {
        return urls;
    }

    public void setUrls(List<URL> urls) {
        this.urls = urls;
    }

    public SeriesSummary getSeries() {
        return series;
    }

    public void setSeries(SeriesSummary series) {
        this.series = series;
    }

    public List<ComicSummary> getCollections() {
        return collections;
    }

    public void setCollections(List<ComicSummary> collections) {
        this.collections = collections;
    }

    public List<ComicSummary> getCollectedIssues() {
        return collectedIssues;
    }

    public void setCollectedIssues(List<ComicSummary> collectedIssues) {
        this.collectedIssues = collectedIssues;
    }

    public List<ComicDate> getDates() {
        return dates;
    }

    public void setDates(List<ComicDate> dates) {
        this.dates = dates;
    }

    public List<ComicPrice> getPrices() {
        return prices;
    }

    public void setPrices(List<ComicPrice> prices) {
        this.prices = prices;
    }

    public Image getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(Image thumbnail) {
        this.thumbnail = thumbnail;
    }

    public List<Image> getImages() {
        return images;
    }

    public void setImages(List<Image> images) {
        this.images = images;
    }

    public CreatorList getCreators() {
        return creators;
    }

    public void setCreators(CreatorList creators) {
        this.creators = creators;
    }

    public CharacterList getCharacters() {
        return characters;
    }

    public void setCharacters(CharacterList characters) {
        this.characters = characters;
    }

    public StoryList getStories() {
        return stories;
    }

    public void setStories(StoryList stories) {
        this.stories = stories;
    }

    public EventList getEvents() {
        return events;
    }

    public void setEvents(EventList events) {
        this.events = events;
    }

    public List<ComicSummary> getVariants() {
        return variants;
    }

    public void setVariants(List<ComicSummary> variants) {
        this.variants = variants;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
} public class Creator {

    private int id;
    private String firstName;
    private String middleName;
    private String lastName;
    private String suffix;
    private String fullName;
    private String modified;
    private String resourceURI;
    private List<URL> urls;
    private Image thumbnail;
    private SeriesList series;
    private StoryList stories;
    private ComicList comics;
    private EventList events;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getMiddleName() {
        return middleName;
    }

    public void setMiddleName(String middleName) {
        this.middleName = middleName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getSuffix() {
        return suffix;
    }

    public void setSuffix(String suffix) {
        this.suffix = suffix;
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public String getModified() {
        return modified;
    }

    public void setModified(String modified) {
        this.modified = modified;
    }

    public String getResourceURI() {
        return resourceURI;
    }

    public void setResourceURI(String resourceURI) {
        this.resourceURI = resourceURI;
    }

    public List<URL> getUrls() {
        return urls;
    }

    public void setUrls(List<URL> urls) {
        this.urls = urls;
    }

    public Image getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(Image thumbnail) {
        this.thumbnail = thumbnail;
    }

    public SeriesList getSeries() {
        return series;
    }

    public void setSeries(SeriesList series) {
        this.series = series;
    }

    public StoryList getStories() {
        return stories;
    }

    public void setStories(StoryList stories) {
        this.stories = stories;
    }

    public ComicList getComics() {
        return comics;
    }

    public void setComics(ComicList comics) {
        this.comics = comics;
    }

    public EventList getEvents() {
        return events;
    }

    public void setEvents(EventList events) {
        this.events = events;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
} public class Event {
    private int id;
    private String title;
    private String description;
    private String resourceURI;
    private List<URL> urls;
    private String modified;
    private String start;
    private String end;
    private Image thumbnail;
    private ComicList comics;
    private StoryList stories;
    private SeriesList series;
    private CharacterList characters;
    private CreatorList creators;
    private EventSummary next;
    private EventSummary previous;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getResourceURI() {
        return resourceURI;
    }

    public void setResourceURI(String resourceURI) {
        this.resourceURI = resourceURI;
    }

    public List<URL> getUrls() {
        return urls;
    }

    public void setUrls(List<URL> urls) {
        this.urls = urls;
    }

    public String getModified() {
        return modified;
    }

    public void setModified(String modified) {
        this.modified = modified;
    }

    public String getStart() {
        return start;
    }

    public void setStart(String start) {
        this.start = start;
    }

    public String getEnd() {
        return end;
    }

    public void setEnd(String end) {
        this.end = end;
    }

    public Image getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(Image thumbnail) {
        this.thumbnail = thumbnail;
    }

    public ComicList getComics() {
        return comics;
    }

    public void setComics(ComicList comics) {
        this.comics = comics;
    }

    public StoryList getStories() {
        return stories;
    }

    public void setStories(StoryList stories) {
        this.stories = stories;
    }

    public SeriesList getSeries() {
        return series;
    }

    public void setSeries(SeriesList series) {
        this.series = series;
    }

    public CharacterList getCharacters() {
        return characters;
    }

    public void setCharacters(CharacterList characters) {
        this.characters = characters;
    }

    public CreatorList getCreators() {
        return creators;
    }

    public void setCreators(CreatorList creators) {
        this.creators = creators;
    }

    public EventSummary getNext() {
        return next;
    }

    public void setNext(EventSummary next) {
        this.next = next;
    }

    public EventSummary getPrevious() {
        return previous;
    }

    public void setPrevious(EventSummary previous) {
        this.previous = previous;
    }


    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
} public class MarvelCharacter {

    private int id;
    private String name;
    private String description;
    private Date modified;
    private String resourceURI;
    private List<URL> urls;
    private Image thumbnail;
    private ComicList comics;
    private StoryList stories;
    private EventList events;
    private SeriesList series;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getModified() {
        return modified;
    }

    public void setModified(Date modified) {
        this.modified = modified;
    }

    public String getResourceURI() {
        return resourceURI;
    }

    public void setResourceURI(String resourceURI) {
        this.resourceURI = resourceURI;
    }

    public List<URL> getUrls() {
        return urls;
    }

    public void setUrls(List<URL> urls) {
        this.urls = urls;
    }

    public Image getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(Image thumbnail) {
        this.thumbnail = thumbnail;
    }

    public ComicList getComics() {
        return comics;
    }

    public void setComics(ComicList comics) {
        this.comics = comics;
    }

    public StoryList getStories() {
        return stories;
    }

    public void setStories(StoryList stories) {
        this.stories = stories;
    }

    public EventList getEvents() {
        return events;
    }

    public void setEvents(EventList events) {
        this.events = events;
    }

    public SeriesList getSeries() {
        return series;
    }

    public void setSeries(SeriesList series) {
        this.series = series;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }

} public class Result<T> {
    private int code;
    private String status;
    private String etag;
    private String copyright;
    private String attributionText;
    private String attributionHTML;
    private Container<T> data;
    private String rawResponse;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Container<T> getData() {
        return data;
    }

    public void setData(Container<T> data) {
        this.data = data;
    }

    public String getEtag() {
        return etag;
    }

    public void setEtag(String etag) {
        this.etag = etag;
    }

    public String getCopyright() {
        return copyright;
    }

    public void setCopyright(String copyright) {
        this.copyright = copyright;
    }

    public String getAttributionText() {
        return attributionText;
    }

    public void setAttributionText(String attributionText) {
        this.attributionText = attributionText;
    }

    public String getAttributionHTML() {
        return attributionHTML;
    }

    public void setAttributionHTML(String attributionHTML) {
        this.attributionHTML = attributionHTML;
    }

    public String getRawResponse() {
        return rawResponse;
    }

    public void setRawResponse(String rawResponse) {
        this.rawResponse = rawResponse;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }

} @JsonIgnoreProperties
public class Story {
    private int id;
    private String title;
    private String description;
    private String resourceURI;
    private List<URL> urls;
    private String type;
    private String modified;
    private Image thumbnail;
    private ComicList comics;
    private SeriesList series;
    private EventList events;
    private CharacterList characters;
    private CreatorList creators;
    private ComicSummary originalIssue;
    private String start;
    private String end;
    private StoryList stories;
    private StorySummary next;
    private StorySummary previous;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getResourceURI() {
        return resourceURI;
    }

    public void setResourceURI(String resourceURI) {
        this.resourceURI = resourceURI;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getModified() {
        return modified;
    }

    public void setModified(String modified) {
        this.modified = modified;
    }

    public Image getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(Image thumbnail) {
        this.thumbnail = thumbnail;
    }

    public ComicList getComics() {
        return comics;
    }

    public void setComics(ComicList comics) {
        this.comics = comics;
    }

    public SeriesList getSeries() {
        return series;
    }

    public void setSeries(SeriesList series) {
        this.series = series;
    }

    public EventList getEvents() {
        return events;
    }

    public void setEvents(EventList events) {
        this.events = events;
    }

    public CharacterList getCharacters() {
        return characters;
    }

    public void setCharacters(CharacterList characters) {
        this.characters = characters;
    }

    public CreatorList getCreators() {
        return creators;
    }

    public void setCreators(CreatorList creators) {
        this.creators = creators;
    }

    public ComicSummary getOriginalIssue() {
        return originalIssue;
    }

    public void setOriginalIssue(ComicSummary originalIssue) {
        this.originalIssue = originalIssue;
    }

    public List<URL> getUrls() {
        return urls;
    }

    public void setUrls(List<URL> urls) {
        this.urls = urls;
    }

    public String getStart() {
        return start;
    }

    public void setStart(String start) {
        this.start = start;
    }

    public String getEnd() {
        return end;
    }

    public void setEnd(String end) {
        this.end = end;
    }

    public StoryList getStories() {
        return stories;
    }

    public StorySummary getNext() {
        return next;
    }

    public void setNext(StorySummary next) {
        this.next = next;
    }

    public StorySummary getPrevious() {
        return previous;
    }

    public void setPrevious(StorySummary previous) {
        this.previous = previous;
    }

    public void setStories(StoryList stories) {
        this.stories = stories;

    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
} public class ComicParametersBuilder {
    private final ComicParameters comicParameters = new ComicParameters();

    public ComicParametersBuilder(int id) {
        comicParameters.setId(id);
    }

    public ComicParametersBuilder withFormat(Format format) {
        comicParameters.setFormat(format);
        return this;
    }

    public ComicParametersBuilder withFormatType(FormatType formatType) {
        comicParameters.setFormatType(formatType);
        return this;
    }

    public ComicParametersBuilder withNoVariants(Boolean noVariants) {
        comicParameters.setNoVariants(noVariants);
        return this;
    }

    public ComicParametersBuilder withDateDescriptor(DateDescriptor dateDescriptor) {
        comicParameters.setDateDescriptor(dateDescriptor);
        return this;
    }

    public ComicParametersBuilder withDateRange(Range<Date> dateRange) {
        comicParameters.setDateRange(dateRange);
        return this;
    }

    public ComicParametersBuilder withHasDigitalIssue(Boolean hasDigitalIssue) {
        comicParameters.setHasDigitalIssue(hasDigitalIssue);
        return this;
    }

    public ComicParametersBuilder withModifiedSince(Date modifiedSince) {
        comicParameters.setModifiedSince(modifiedSince);
        return this;
    }

    public ComicParametersBuilder addCreator(Integer creatorId) {
        comicParameters.addCreator(creatorId);
        return this;
    }

    public ComicParametersBuilder addSeries(Integer seriesId) {
        comicParameters.addSeries(seriesId);
        return this;
    }

    public ComicParametersBuilder addEvent(Integer eventId) {
        comicParameters.addEvent(eventId);
        return this;
    }
    public ComicParametersBuilder addStory(Integer storyId) {
        comicParameters.addStory(storyId);
        return this;
    }

    // TODO better name required!
    public ComicParametersBuilder addSharedAppearances(Integer characterId) {
        comicParameters.addSharedAppearances(characterId);
        return this;
    }

    public ComicParametersBuilder addCollaborators(Integer creatorId) {
        comicParameters.addCollaborators(creatorId);
        return this;
    }

    public ComicParametersBuilder addOrderBy(ComicOrderBy orderBy) {
        comicParameters.addOrderBy(orderBy);
        return this;
    }

    public ComicParametersBuilder withLimit(Integer limit) {
        comicParameters.setLimit(limit);
        return this;
    }

    public ComicParametersBuilder withOffset(Integer offset) {
        comicParameters.setOffset(offset);
        return this;
    }

    public ComicParameters create() {
        return comicParameters;
    }
} public class CreatorParametersBuilder {
    private final CreatorParameters creatorParameters;

    public CreatorParametersBuilder(Integer id) {
        creatorParameters = new CreatorParameters(id);
    }

    public CreatorParametersBuilder withFirstName(String firstName) {
        creatorParameters.setFirstName(firstName);
        return this;
    }

    public CreatorParametersBuilder withMiddleName(String middleName) {
        creatorParameters.setMiddleName(middleName);
        return this;
    }

    public CreatorParametersBuilder withLastName(String lastName) {
        creatorParameters.setLastName(lastName);
        return this;
    }

    public CreatorParametersBuilder withSuffix(String suffix) {
        creatorParameters.setSuffix(suffix);
        return this;
    }

    public CreatorParametersBuilder withModifiedSince(Date modifiedSince) {
        creatorParameters.setModifiedSince(modifiedSince);
        return this;
    }

    public CreatorParametersBuilder addComics(Integer comics) {
        creatorParameters.addComics(comics);
        return this;
    }

    public CreatorParametersBuilder addSeries(Integer seriesId) {
        creatorParameters.addSeries(seriesId);
        return this;
    }

    public CreatorParametersBuilder addStories(Integer story) {
        creatorParameters.addStory(story);
        return this;
    }


    public CreatorParametersBuilder withLimit(Integer limit) {
        creatorParameters.setLimit(limit);
        return this;
    }

    public CreatorParametersBuilder withOffset(Integer offset) {
        creatorParameters.setOffset(offset);
        return this;
    }


    public CreatorParameters create() {
        return creatorParameters;
    }
} public class EventParametersBuilder {

    private EventParameters eventParameters;

    public EventParametersBuilder(Integer id) {
        this.eventParameters = new EventParameters(id);
    }

    public EventParametersBuilder withName(String name) {
        eventParameters.setName(name);
        return this;
    }

    public EventParametersBuilder withModifiedSince(Date modifiedSince) {
        eventParameters.setModifiedSince(modifiedSince);
        return this;
    }

    public EventParametersBuilder withLimit(Integer limit) {
        eventParameters.setLimit(limit);
        return this;
    }

    public EventParametersBuilder withOffset(Integer offset) {
        eventParameters.setOffset(offset);
        return this;
    }

    public EventParametersBuilder withCreators(Integer creator) {
        eventParameters.addCreator(creator);
        return this;
    }

    public EventParametersBuilder addSeries(Integer series) {
        eventParameters.addSeries(series);
        return this;
    }

    public EventParametersBuilder addStories(Integer story) {
        eventParameters.addStory(story);
        return this;
    }

    public EventParametersBuilder addOrderBy(EventsOrderBy orderBy) {
        eventParameters.addOrderBy(orderBy);
        return this;
    }

    public EventParameters create() {
        return eventParameters;
    }
} public class StoryParametersBuilder {

    private final StoryParameters storyParameters;

    public StoryParametersBuilder(Integer id) {
        this.storyParameters = new StoryParameters(id);
    }

    public StoryParametersBuilder withModifiedSince(Date modifiedSince) {
        storyParameters.setModifiedSince(modifiedSince);
        return this;
    }

    public StoryParametersBuilder withLimit(Integer limit) {
        storyParameters.setLimit(limit);
        return this;
    }

    public StoryParametersBuilder withOffset(Integer offset) {
        storyParameters.setOffset(offset);
        return this;
    }


    public StoryParametersBuilder addSeries(Integer series) {
        storyParameters.addSeries(series);
        return this;
    }

    public StoryParametersBuilder addComics(Integer comics) {
        storyParameters.addComics(comics);
        return this;
    }

    public StoryParametersBuilder addEvents(Integer events) {
        storyParameters.addEvents(events);
        return this;
    }

    public StoryParametersBuilder addOrderBy(StoryOrderBy orderBy) {
        storyParameters.addOrderBy(orderBy);
        return this;
    }

    public StoryParameters create() {
        return storyParameters;
    }
}
import com.github.codingricky.marvel.model.Comic;
import com.github.codingricky.marvel.model.Creator;
import com.github.codingricky.marvel.model.Event;
import com.github.codingricky.marvel.model.MarvelCharacter;
import com.github.codingricky.marvel.model.Result;
import com.github.codingricky.marvel.model.Story;
import com.github.codingricky.marvel.parameter.ComicParametersBuilder;
import com.github.codingricky.marvel.parameter.CreatorParametersBuilder;
import com.github.codingricky.marvel.parameter.EventParametersBuilder;
import com.github.codingricky.marvel.parameter.StoryParametersBuilder;
import org.junit.Test;
import static org.fest.assertions.Assertions.assertThat;
package com.github.codingricky.marvel;



public class ComicsRestTest extends AbstractRestTest {

    @Test
    public void testGetComics() throws Exception {
        Result<Comic> comics = restClient.getComics();
        assertThat(comics.getData()).isNotNull();
    }

    @Test
    public void testGetComicsById() throws Exception {
        Result<Comic> comics = restClient.getComics(AMAZING_SPIDER_MAN_COMIC_ID);
        assertThat(comics.getData()).isNotNull();
    }

    @Test
    public void testGetComicsEvents() throws Exception {
        Result<Event> events = restClient.getComicsEvents(new EventParametersBuilder(AMAZING_SPIDER_MAN_COMIC_ID).create());
        assertThat(events.getData()).isNotNull();
    }

    @Test
    public void testGetComicsCharacters() throws Exception {
        Result<MarvelCharacter> characters = restClient.getComicsCharacters(new ComicParametersBuilder(AMAZING_SPIDER_MAN_COMIC_ID).create());