Requires any of the roles: | SystemAdministrator, Manager, Customer |
GET | /customers/{customerId}/inherited-schedule | ||
---|---|---|---|
GET | /endpoints/{endpointId}/inherited-schedule |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
/**
* Get the inherited schedule for this customer
*/
@Api(Description="Get the inherited schedule for this customer")
public static class GetInheritedSchedule
{
/**
* The customer ID whose inherited schedule you want to retrieve
*/
@ApiMember(Description="The customer ID whose inherited schedule you want to retrieve")
public String customerId = null;
/**
* The endpoint ID whose inherited schedule you want to retrieve (use this OR customer id
*/
@ApiMember(Description="The endpoint ID whose inherited schedule you want to retrieve (use this OR customer id")
public String endpointId = null;
public String getCustomerId() { return customerId; }
public GetInheritedSchedule setCustomerId(String value) { this.customerId = value; return this; }
public String getEndpointId() { return endpointId; }
public GetInheritedSchedule setEndpointId(String value) { this.endpointId = value; return this; }
}
public static class Schedule
{
public String timeZoneId = null;
public Boolean inherit = null;
public Boolean forceClosed = null;
public ArrayList<SchedulingRule> rules = null;
public String defaultState = null;
public String getTimeZoneId() { return timeZoneId; }
public Schedule setTimeZoneId(String value) { this.timeZoneId = value; return this; }
public Boolean isInherit() { return inherit; }
public Schedule setInherit(Boolean value) { this.inherit = value; return this; }
public Boolean isForceClosed() { return forceClosed; }
public Schedule setForceClosed(Boolean value) { this.forceClosed = value; return this; }
public ArrayList<SchedulingRule> getRules() { return rules; }
public Schedule setRules(ArrayList<SchedulingRule> value) { this.rules = value; return this; }
public String getDefaultState() { return defaultState; }
public Schedule setDefaultState(String value) { this.defaultState = value; return this; }
}
public static class SchedulingRule
{
public String id = null;
public String name = null;
public Integer priority = null;
public String state = null;
public String source = null;
public String condition = null;
public SimpleSchedulingRuleTypes simpleRuleType = null;
public String customerState = null;
public String flowId = null;
public Struct flowParams = null;
public Boolean isAllDay = null;
public String startDate = null;
public String startTime = null;
public String endTime = null;
public ArrayList<Integer> bySetPosition = null;
public ArrayList<Integer> byMonth = null;
public ArrayList<Integer> byWeekNo = null;
public ArrayList<Integer> byYearDay = null;
public ArrayList<Integer> byMonthDay = null;
public ArrayList<ScheduleDay> byDay = null;
public ArrayList<Integer> byHour = null;
public ArrayList<Integer> byMinute = null;
public Integer interval = null;
public Integer count = null;
public String untilDate = null;
public SchedulingRuleFrequency frequency = null;
public String getId() { return id; }
public SchedulingRule setId(String value) { this.id = value; return this; }
public String getName() { return name; }
public SchedulingRule setName(String value) { this.name = value; return this; }
public Integer getPriority() { return priority; }
public SchedulingRule setPriority(Integer value) { this.priority = value; return this; }
public String getState() { return state; }
public SchedulingRule setState(String value) { this.state = value; return this; }
public String getSource() { return source; }
public SchedulingRule setSource(String value) { this.source = value; return this; }
public String getCondition() { return condition; }
public SchedulingRule setCondition(String value) { this.condition = value; return this; }
public SimpleSchedulingRuleTypes getSimpleRuleType() { return simpleRuleType; }
public SchedulingRule setSimpleRuleType(SimpleSchedulingRuleTypes value) { this.simpleRuleType = value; return this; }
public String getCustomerState() { return customerState; }
public SchedulingRule setCustomerState(String value) { this.customerState = value; return this; }
public String getFlowId() { return flowId; }
public SchedulingRule setFlowId(String value) { this.flowId = value; return this; }
public Struct getFlowParams() { return flowParams; }
public SchedulingRule setFlowParams(Struct value) { this.flowParams = value; return this; }
public Boolean getIsAllDay() { return isAllDay; }
public SchedulingRule setIsAllDay(Boolean value) { this.isAllDay = value; return this; }
public String getStartDate() { return startDate; }
public SchedulingRule setStartDate(String value) { this.startDate = value; return this; }
public String getStartTime() { return startTime; }
public SchedulingRule setStartTime(String value) { this.startTime = value; return this; }
public String getEndTime() { return endTime; }
public SchedulingRule setEndTime(String value) { this.endTime = value; return this; }
public ArrayList<Integer> getBySetPosition() { return bySetPosition; }
public SchedulingRule setBySetPosition(ArrayList<Integer> value) { this.bySetPosition = value; return this; }
public ArrayList<Integer> getByMonth() { return byMonth; }
public SchedulingRule setByMonth(ArrayList<Integer> value) { this.byMonth = value; return this; }
public ArrayList<Integer> getByWeekNo() { return byWeekNo; }
public SchedulingRule setByWeekNo(ArrayList<Integer> value) { this.byWeekNo = value; return this; }
public ArrayList<Integer> getByYearDay() { return byYearDay; }
public SchedulingRule setByYearDay(ArrayList<Integer> value) { this.byYearDay = value; return this; }
public ArrayList<Integer> getByMonthDay() { return byMonthDay; }
public SchedulingRule setByMonthDay(ArrayList<Integer> value) { this.byMonthDay = value; return this; }
public ArrayList<ScheduleDay> getByDay() { return byDay; }
public SchedulingRule setByDay(ArrayList<ScheduleDay> value) { this.byDay = value; return this; }
public ArrayList<Integer> getByHour() { return byHour; }
public SchedulingRule setByHour(ArrayList<Integer> value) { this.byHour = value; return this; }
public ArrayList<Integer> getByMinute() { return byMinute; }
public SchedulingRule setByMinute(ArrayList<Integer> value) { this.byMinute = value; return this; }
public Integer getInterval() { return interval; }
public SchedulingRule setInterval(Integer value) { this.interval = value; return this; }
public Integer getCount() { return count; }
public SchedulingRule setCount(Integer value) { this.count = value; return this; }
public String getUntilDate() { return untilDate; }
public SchedulingRule setUntilDate(String value) { this.untilDate = value; return this; }
public SchedulingRuleFrequency getFrequency() { return frequency; }
public SchedulingRule setFrequency(SchedulingRuleFrequency value) { this.frequency = value; return this; }
}
public static enum SimpleSchedulingRuleTypes
{
Always,
CustomerState,
Time;
}
public static class Struct extends HashMap<String,Value>
{
}
public static class Value
{
public Boolean boolValue = null;
public String stringValue = null;
public Double numberValue = null;
public ArrayList<Struct> listValue = null;
public Struct structValue = null;
public Boolean isBoolValue() { return boolValue; }
public Value setBoolValue(Boolean value) { this.boolValue = value; return this; }
public String getStringValue() { return stringValue; }
public Value setStringValue(String value) { this.stringValue = value; return this; }
public Double getNumberValue() { return numberValue; }
public Value setNumberValue(Double value) { this.numberValue = value; return this; }
public ArrayList<Struct> getListValue() { return listValue; }
public Value setListValue(ArrayList<Struct> value) { this.listValue = value; return this; }
public Struct getStructValue() { return structValue; }
public Value setStructValue(Struct value) { this.structValue = value; return this; }
}
public static class ScheduleDay
{
public Integer offset = null;
public DayOfWeek dayOfWeek = null;
public Integer getOffset() { return offset; }
public ScheduleDay setOffset(Integer value) { this.offset = value; return this; }
public DayOfWeek getDayOfWeek() { return dayOfWeek; }
public ScheduleDay setDayOfWeek(DayOfWeek value) { this.dayOfWeek = value; return this; }
}
public static enum SchedulingRuleFrequency
{
None,
Secondly,
Minutely,
Hourly,
Daily,
Weekly,
Monthly,
Yearly;
}
}
Java GetInheritedSchedule DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /customers/{customerId}/inherited-schedule HTTP/1.1 Host: team.evovoice.io Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { timeZoneId: String, inherit: False, forceClosed: False, rules: [ { id: String, name: String, priority: 0, state: String, source: String, condition: String, simpleRuleType: Always, customerState: String, flowId: String, isAllDay: False, startDate: String, startTime: String, endTime: String, bySetPosition: [ 0 ], byMonth: [ 0 ], byWeekNo: [ 0 ], byYearDay: [ 0 ], byMonthDay: [ 0 ], byDay: [ { offset: 0, dayOfWeek: Sunday } ], byHour: [ 0 ], byMinute: [ 0 ], interval: 0, count: 0, untilDate: String, frequency: None } ], defaultState: String }