| POST | /{Workspace}/ScheduleRequestList |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
/**
* Set schedules for multiple tasks in a single operation.
*/
public static class ScheduleRequestList
{
public String Workspace = null;
public ArrayList<ScheduleRequest> ScheduleRequests = null;
public String getWorkspace() { return Workspace; }
public ScheduleRequestList setWorkspace(String value) { this.Workspace = value; return this; }
public ArrayList<ScheduleRequest> getScheduleRequests() { return ScheduleRequests; }
public ScheduleRequestList setScheduleRequests(ArrayList<ScheduleRequest> value) { this.ScheduleRequests = value; return this; }
}
public static class ScheduleRequest
{
public String Workspace = null;
public String ObjectId = null;
public String VersionId = null;
public ArrayList<String> Users = null;
public ArrayList<String> Teams = null;
public Boolean UnassignUsers = null;
public Boolean UnassignTeams = null;
public Boolean Unschedule = null;
public Boolean DeleteTask = null;
public String Status = null;
public String Type = null;
public String TaskType = null;
public String DueDate = null;
public Boolean SetPriority = null;
public Integer Priority = null;
public ArrayList<Schedule> Schedules = null;
public String getWorkspace() { return Workspace; }
public ScheduleRequest setWorkspace(String value) { this.Workspace = value; return this; }
public String getObjectId() { return ObjectId; }
public ScheduleRequest setObjectId(String value) { this.ObjectId = value; return this; }
public String getVersionId() { return VersionId; }
public ScheduleRequest setVersionId(String value) { this.VersionId = value; return this; }
public ArrayList<String> getUsers() { return Users; }
public ScheduleRequest setUsers(ArrayList<String> value) { this.Users = value; return this; }
public ArrayList<String> getTeams() { return Teams; }
public ScheduleRequest setTeams(ArrayList<String> value) { this.Teams = value; return this; }
public Boolean isUnassignUsers() { return UnassignUsers; }
public ScheduleRequest setUnassignUsers(Boolean value) { this.UnassignUsers = value; return this; }
public Boolean isUnassignTeams() { return UnassignTeams; }
public ScheduleRequest setUnassignTeams(Boolean value) { this.UnassignTeams = value; return this; }
public Boolean isUnschedule() { return Unschedule; }
public ScheduleRequest setUnschedule(Boolean value) { this.Unschedule = value; return this; }
public Boolean isDeleteTask() { return DeleteTask; }
public ScheduleRequest setDeleteTask(Boolean value) { this.DeleteTask = value; return this; }
public String getStatus() { return Status; }
public ScheduleRequest setStatus(String value) { this.Status = value; return this; }
public String getType() { return Type; }
public ScheduleRequest setType(String value) { this.Type = value; return this; }
public String getTaskType() { return TaskType; }
public ScheduleRequest setTaskType(String value) { this.TaskType = value; return this; }
public String getDueDate() { return DueDate; }
public ScheduleRequest setDueDate(String value) { this.DueDate = value; return this; }
public Boolean isSetPriority() { return SetPriority; }
public ScheduleRequest setSetPriority(Boolean value) { this.SetPriority = value; return this; }
public Integer getPriority() { return Priority; }
public ScheduleRequest setPriority(Integer value) { this.Priority = value; return this; }
public ArrayList<Schedule> getSchedules() { return Schedules; }
public ScheduleRequest setSchedules(ArrayList<Schedule> value) { this.Schedules = value; return this; }
}
public static class Schedule
{
public String Workspace = null;
public String ObjectId = null;
public String VersionId = null;
public String BasedOn = null;
public String Start = null;
public String End = null;
public String TimeZone = null;
public ArrayList<String> Users = null;
public ArrayList<String> Teams = null;
public HashMap<String,Object> Data = null;
public String getWorkspace() { return Workspace; }
public Schedule setWorkspace(String value) { this.Workspace = value; return this; }
public String getObjectId() { return ObjectId; }
public Schedule setObjectId(String value) { this.ObjectId = value; return this; }
public String getVersionId() { return VersionId; }
public Schedule setVersionId(String value) { this.VersionId = value; return this; }
public String getBasedOn() { return BasedOn; }
public Schedule setBasedOn(String value) { this.BasedOn = value; return this; }
public String getStart() { return Start; }
public Schedule setStart(String value) { this.Start = value; return this; }
public String getEnd() { return End; }
public Schedule setEnd(String value) { this.End = value; return this; }
public String getTimeZone() { return TimeZone; }
public Schedule setTimeZone(String value) { this.TimeZone = value; return this; }
public ArrayList<String> getUsers() { return Users; }
public Schedule setUsers(ArrayList<String> value) { this.Users = value; return this; }
public ArrayList<String> getTeams() { return Teams; }
public Schedule setTeams(ArrayList<String> value) { this.Teams = value; return this; }
public HashMap<String,Object> getData() { return Data; }
public Schedule setData(HashMap<String,Object> value) { this.Data = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /{Workspace}/ScheduleRequestList HTTP/1.1
Host: dev.fieldsquared.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ScheduleRequestList xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Schedules">
<ScheduleRequests>
<ScheduleRequest>
<DeleteTask>false</DeleteTask>
<DueDate>String</DueDate>
<ObjectId>String</ObjectId>
<Priority>0</Priority>
<Schedules>
<Schedule>
<BasedOn>String</BasedOn>
<Data xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:KeyValueOfstringanyType>
<d6p1:Key>String</d6p1:Key>
<d6p1:Value />
</d6p1:KeyValueOfstringanyType>
</Data>
<End>String</End>
<ObjectId>String</ObjectId>
<Start>String</Start>
<Teams xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:string>String</d6p1:string>
</Teams>
<TimeZone>String</TimeZone>
<Users xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:string>String</d6p1:string>
</Users>
<VersionId>String</VersionId>
<Workspace>String</Workspace>
</Schedule>
</Schedules>
<SetPriority>false</SetPriority>
<Status>String</Status>
<TaskType>String</TaskType>
<Teams xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</Teams>
<Type>String</Type>
<UnassignTeams>false</UnassignTeams>
<UnassignUsers>false</UnassignUsers>
<Unschedule>false</Unschedule>
<Users xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</Users>
<VersionId>String</VersionId>
<Workspace>String</Workspace>
</ScheduleRequest>
</ScheduleRequests>
<Workspace>String</Workspace>
</ScheduleRequestList>