001/*
002 * (C) Copyright 2015 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *
016 * Contributors:
017 *      André Justo
018 */
019
020package org.nuxeo.ecm.media.publishing.wistia.model;
021
022import org.codehaus.jackson.annotate.JsonIgnoreProperties;
023import org.codehaus.jackson.annotate.JsonProperty;
024
025import java.util.ArrayList;
026import java.util.Date;
027import java.util.List;
028
029@JsonIgnoreProperties(ignoreUnknown = true)
030public class Media {
031
032    protected String name;
033
034    protected String type;
035
036    @JsonProperty("created")
037    protected Date createdAt;
038
039    @JsonProperty("updated")
040    protected Date updatedAt;
041
042    protected float duration;
043
044    @JsonProperty("hashed_id")
045    protected String hashedId;
046
047    protected String description;
048
049    protected float progress;
050
051    protected String status;
052
053    protected Thumbnail thumbnail;
054
055    protected Project project;
056
057    protected Stats stats;
058
059    @JsonProperty("assets")
060    protected List<Assets> assets = new ArrayList<Assets>();
061
062    public String getName() {
063        return name;
064    }
065
066    public void setName(String name) {
067        this.name = name;
068    }
069
070    public String getType() {
071        return type;
072    }
073
074    public void setType(String type) {
075        this.type = type;
076    }
077
078    public Date getCreatedAt() {
079        return createdAt;
080    }
081
082    public void setCreatedAt(Date createdAt) {
083        this.createdAt = createdAt;
084    }
085
086    public Date getUpdatedAt() {
087        return updatedAt;
088    }
089
090    public void setUpdatedAt(Date updatedAt) {
091        this.updatedAt = updatedAt;
092    }
093
094    public float getDuration() {
095        return duration;
096    }
097
098    public void setDuration(float duration) {
099        this.duration = duration;
100    }
101
102    public String getHashedId() {
103        return hashedId;
104    }
105
106    public void setHashedId(String hashedId) {
107        this.hashedId = hashedId;
108    }
109
110    public String getDescription() {
111        return description;
112    }
113
114    public void setDescription(String description) {
115        this.description = description;
116    }
117
118    public float getProgress() {
119        return progress;
120    }
121
122    public void setProgress(float progress) {
123        this.progress = progress;
124    }
125
126    public String getStatus() {
127        return status;
128    }
129
130    public void setStatus(String status) {
131        this.status = status;
132    }
133
134    public Thumbnail getThumbnail() {
135        return thumbnail;
136    }
137
138    public void setThumbnail(Thumbnail thumbnail) {
139        this.thumbnail = thumbnail;
140    }
141
142    public Project getProject() {
143        return project;
144    }
145
146    public void setProject(Project project) {
147        this.project = project;
148    }
149
150    public Stats getStats() {
151        return stats;
152    }
153
154    public void setStats(Stats stats) {
155        this.stats = stats;
156    }
157
158    public List<Assets> getAssets() {
159        return this.assets;
160    }
161
162    @Override
163    public String toString() {
164        return "--- Media info ---" +
165                "\nname: \t" + getName() +
166                "\ntype: \t" + getType() +
167                "\nduration: \t" + getDuration() +
168                "\ndescription: \t" + getDescription() +
169                "\nstatus: \t" + getStatus() +
170                "\nhashedId: \t" + getHashedId() + "\n";
171    }
172}