2015-07-06 17:04:25 +02:00
|
|
|
/*
|
|
|
|
* Twidere - Twitter client for Android
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
|
|
|
|
*
|
|
|
|
* This program 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
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package org.mariotaku.twidere.api.twitter.model;
|
|
|
|
|
2015-10-21 15:53:46 +02:00
|
|
|
import org.mariotaku.library.logansquare.extension.annotation.EnumClass;
|
|
|
|
import org.mariotaku.library.logansquare.extension.annotation.Implementation;
|
|
|
|
import org.mariotaku.twidere.api.twitter.model.impl.ScheduledStatusImpl;
|
|
|
|
|
2015-07-06 17:04:25 +02:00
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by mariotaku on 15/7/6.
|
|
|
|
*/
|
2015-10-21 15:53:46 +02:00
|
|
|
@Implementation(ScheduledStatusImpl.class)
|
2015-07-06 17:04:25 +02:00
|
|
|
public interface ScheduledStatus {
|
|
|
|
|
2015-07-17 16:30:41 +02:00
|
|
|
long getUserId();
|
|
|
|
|
|
|
|
boolean isPossiblySensitive();
|
|
|
|
|
|
|
|
long getId();
|
|
|
|
|
2015-07-06 17:04:25 +02:00
|
|
|
long[] getMediaIds();
|
|
|
|
|
|
|
|
Date getUpdatedAt();
|
|
|
|
|
|
|
|
Date getCreatedAt();
|
|
|
|
|
|
|
|
Date getExecuteAt();
|
|
|
|
|
|
|
|
String getText();
|
2015-07-17 16:30:41 +02:00
|
|
|
|
|
|
|
State getState();
|
|
|
|
|
2015-10-21 15:53:46 +02:00
|
|
|
@EnumClass
|
2015-07-17 16:30:41 +02:00
|
|
|
enum State {
|
|
|
|
SCHEDULED("scheduled"), FAILED("failed"), CANCELED("canceled");
|
|
|
|
|
|
|
|
private final String value;
|
|
|
|
|
|
|
|
State(String value) {
|
|
|
|
this.value = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static State parse(String value) {
|
|
|
|
if (SCHEDULED.value.equalsIgnoreCase(value)) {
|
|
|
|
return SCHEDULED;
|
|
|
|
} else if (FAILED.value.equalsIgnoreCase(value)) {
|
|
|
|
return FAILED;
|
|
|
|
} else if (CANCELED.value.equalsIgnoreCase(value)) {
|
|
|
|
return CANCELED;
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
}
|
2015-07-06 17:04:25 +02:00
|
|
|
}
|