2017-09-13 22:58:34 +05:30
|
|
|
/*
|
|
|
|
* The MIT License (MIT)
|
|
|
|
*
|
|
|
|
* Copyright (c) 2017 Gopinath Langote
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
* in the Software without restriction, including without limitation the rights
|
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
|
|
* copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
* SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package com.iluwatar.partialresponse;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@link Video} is a entity to serve from server.It contains all video related information..
|
|
|
|
* <p>
|
|
|
|
*/
|
|
|
|
public class Video {
|
2017-09-14 19:27:46 +05:30
|
|
|
private Integer id;
|
2017-09-13 22:58:34 +05:30
|
|
|
private String title;
|
2017-09-14 19:15:44 +05:30
|
|
|
private Integer length;
|
2017-09-13 22:58:34 +05:30
|
|
|
private String description;
|
2017-09-14 19:15:44 +05:30
|
|
|
private String director;
|
|
|
|
private String language;
|
2017-09-13 22:58:34 +05:30
|
|
|
|
|
|
|
/**
|
|
|
|
* @param id video unique id
|
|
|
|
* @param title video title
|
2017-09-14 19:15:44 +05:30
|
|
|
* @param length video length in minutes
|
2017-09-13 22:58:34 +05:30
|
|
|
* @param description video description by publisher
|
2017-09-14 19:27:46 +05:30
|
|
|
* @param director video director name
|
|
|
|
* @param language video language {private, public}
|
2017-09-13 22:58:34 +05:30
|
|
|
*/
|
2017-09-14 19:27:46 +05:30
|
|
|
public Video(Integer id, String title, Integer length, String description, String director, String language) {
|
2017-09-13 22:58:34 +05:30
|
|
|
this.id = id;
|
|
|
|
this.title = title;
|
|
|
|
this.length = length;
|
|
|
|
this.description = description;
|
2017-09-14 19:15:44 +05:30
|
|
|
this.director = director;
|
|
|
|
this.language = language;
|
2017-09-13 22:58:34 +05:30
|
|
|
}
|
2017-09-14 10:09:02 +05:30
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
2017-09-14 19:27:46 +05:30
|
|
|
return "{" +
|
|
|
|
"\"id\": \"" + id + "\"," +
|
|
|
|
"\"title\": \"" + title + "\"," +
|
2017-09-14 19:35:52 +05:30
|
|
|
"\"length\": " + length + "," +
|
2017-09-14 19:27:46 +05:30
|
|
|
"\"description\": \"" + description + "\"," +
|
|
|
|
"\"director\": \"" + director + "\"," +
|
|
|
|
"\"language\": \"" + language + "\"," +
|
|
|
|
"}";
|
2017-09-14 10:09:02 +05:30
|
|
|
}
|
2017-09-13 22:58:34 +05:30
|
|
|
}
|