You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
102 lines
2.7 KiB
Java
102 lines
2.7 KiB
Java
/*
|
|
* Copyright (c) 2004-2015 Stuart Boston
|
|
*
|
|
* This file is part of TheMovieDB API.
|
|
*
|
|
* TheMovieDB API is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* any later version.
|
|
*
|
|
* TheMovieDB API is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with TheMovieDB API. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
*/
|
|
package com.omertron.themoviedbapi.model.media;
|
|
|
|
import com.omertron.themoviedbapi.model.AbstractJsonMapping;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import org.apache.commons.lang3.builder.EqualsBuilder;
|
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
|
|
|
/**
|
|
* Trailer specific information from the "Append to Response" method
|
|
*
|
|
* @author Stuart
|
|
*/
|
|
public class Trailer extends AbstractJsonMapping {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
@JsonProperty("name")
|
|
private String name;
|
|
@JsonProperty("size")
|
|
private String size;
|
|
@JsonProperty("source")
|
|
private String source;
|
|
@JsonProperty("type")
|
|
private String type;
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public String getSize() {
|
|
return size;
|
|
}
|
|
|
|
public void setSize(String size) {
|
|
this.size = size;
|
|
}
|
|
|
|
public String getSource() {
|
|
return source;
|
|
}
|
|
|
|
public void setSource(String source) {
|
|
this.source = source;
|
|
}
|
|
|
|
public String getType() {
|
|
return type;
|
|
}
|
|
|
|
public void setType(String type) {
|
|
this.type = type;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object obj) {
|
|
if (obj instanceof Trailer) {
|
|
final Trailer other = (Trailer) obj;
|
|
return new EqualsBuilder()
|
|
.append(name, other.name)
|
|
.append(size, other.size)
|
|
.append(source, other.source)
|
|
.append(type, other.type)
|
|
.isEquals();
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return new HashCodeBuilder()
|
|
.append(name)
|
|
.append(size)
|
|
.append(source)
|
|
.append(type)
|
|
.toHashCode();
|
|
}
|
|
}
|