Trendsic Platform Service

<back to all web services

CoverageTemplatesRequest

Requires Authentication
The following routes are available for this service:
GET/v1/coverage/policies/templates
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class CoverageTemplatesRequest
    {
        
    }

    public static class CoverageTemplatesResponse
    {
        public ArrayList<CoverageTemplateInfo> Templates = new ArrayList<CoverageTemplateInfo>();
        public ResponseStatus ResponseStatus = null;
        
        public ArrayList<CoverageTemplateInfo> getTemplates() { return Templates; }
        public CoverageTemplatesResponse setTemplates(ArrayList<CoverageTemplateInfo> value) { this.Templates = value; return this; }
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public CoverageTemplatesResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
    }

    public static class CoverageTemplateInfo
    {
        public String Key = null;
        public String Name = null;
        public String Sub = null;
        public CoveragePolicyDoc Doc = null;
        
        public String getKey() { return Key; }
        public CoverageTemplateInfo setKey(String value) { this.Key = value; return this; }
        public String getName() { return Name; }
        public CoverageTemplateInfo setName(String value) { this.Name = value; return this; }
        public String getSub() { return Sub; }
        public CoverageTemplateInfo setSub(String value) { this.Sub = value; return this; }
        public CoveragePolicyDoc getDoc() { return Doc; }
        public CoverageTemplateInfo setDoc(CoveragePolicyDoc value) { this.Doc = value; return this; }
    }

    public static class CoveragePolicyDoc
    {
        public String Intro = null;
        public String LockLine = null;
        public String TemplateName = null;
        public CoveragePolicyPrefs Prefs = null;
        public ArrayList<CoverageRuleDef> Rules = new ArrayList<CoverageRuleDef>();
        
        public String getIntro() { return Intro; }
        public CoveragePolicyDoc setIntro(String value) { this.Intro = value; return this; }
        public String getLockLine() { return LockLine; }
        public CoveragePolicyDoc setLockLine(String value) { this.LockLine = value; return this; }
        public String getTemplateName() { return TemplateName; }
        public CoveragePolicyDoc setTemplateName(String value) { this.TemplateName = value; return this; }
        public CoveragePolicyPrefs getPrefs() { return Prefs; }
        public CoveragePolicyDoc setPrefs(CoveragePolicyPrefs value) { this.Prefs = value; return this; }
        public ArrayList<CoverageRuleDef> getRules() { return Rules; }
        public CoveragePolicyDoc setRules(ArrayList<CoverageRuleDef> value) { this.Rules = value; return this; }
    }

    public static class CoveragePolicyPrefs
    {
        public String AssignmentMode = null;
        public Integer RestHours = null;
        public Integer OtThresholdHours = null;
        public Integer RingWaitMinutes = null;
        public String QuietStart = null;
        public String QuietEnd = null;
        public Boolean RescheduleAllowed = null;
        public String QuietMode = null;
        public ArrayList<CoverageRingDef> Rings = new ArrayList<CoverageRingDef>();
        
        public String getAssignmentMode() { return AssignmentMode; }
        public CoveragePolicyPrefs setAssignmentMode(String value) { this.AssignmentMode = value; return this; }
        public Integer getRestHours() { return RestHours; }
        public CoveragePolicyPrefs setRestHours(Integer value) { this.RestHours = value; return this; }
        public Integer getOtThresholdHours() { return OtThresholdHours; }
        public CoveragePolicyPrefs setOtThresholdHours(Integer value) { this.OtThresholdHours = value; return this; }
        public Integer getRingWaitMinutes() { return RingWaitMinutes; }
        public CoveragePolicyPrefs setRingWaitMinutes(Integer value) { this.RingWaitMinutes = value; return this; }
        public String getQuietStart() { return QuietStart; }
        public CoveragePolicyPrefs setQuietStart(String value) { this.QuietStart = value; return this; }
        public String getQuietEnd() { return QuietEnd; }
        public CoveragePolicyPrefs setQuietEnd(String value) { this.QuietEnd = value; return this; }
        public Boolean isRescheduleAllowed() { return RescheduleAllowed; }
        public CoveragePolicyPrefs setRescheduleAllowed(Boolean value) { this.RescheduleAllowed = value; return this; }
        public String getQuietMode() { return QuietMode; }
        public CoveragePolicyPrefs setQuietMode(String value) { this.QuietMode = value; return this; }
        public ArrayList<CoverageRingDef> getRings() { return Rings; }
        public CoveragePolicyPrefs setRings(ArrayList<CoverageRingDef> value) { this.Rings = value; return this; }
    }

    public static class CoverageRingDef
    {
        public String Key = null;
        public String Label = null;
        public String Sub = null;
        public Integer WaitMinutes = null;
        public Boolean Enabled = null;
        
        public String getKey() { return Key; }
        public CoverageRingDef setKey(String value) { this.Key = value; return this; }
        public String getLabel() { return Label; }
        public CoverageRingDef setLabel(String value) { this.Label = value; return this; }
        public String getSub() { return Sub; }
        public CoverageRingDef setSub(String value) { this.Sub = value; return this; }
        public Integer getWaitMinutes() { return WaitMinutes; }
        public CoverageRingDef setWaitMinutes(Integer value) { this.WaitMinutes = value; return this; }
        public Boolean isEnabled() { return Enabled; }
        public CoverageRingDef setEnabled(Boolean value) { this.Enabled = value; return this; }
    }

    public static class CoverageRuleDef
    {
        public String RuleId = null;
        public String Name = null;
        public String Kind = null;
        public String Demand = null;
        public String SourcePolicyName = null;
        public String CascadeLevel = null;
        public String Why = null;
        public String Change = null;
        public String OverrideWho = null;
        public String OverrideConsequence = null;
        public String NoNote = null;
        public HashMap<String,String> Params = new HashMap<String,String>();
        public ArrayList<CoverageRuleDocSection> Doc = new ArrayList<CoverageRuleDocSection>();
        public CoverageRuleTune Tune = null;
        
        public String getRuleId() { return RuleId; }
        public CoverageRuleDef setRuleId(String value) { this.RuleId = value; return this; }
        public String getName() { return Name; }
        public CoverageRuleDef setName(String value) { this.Name = value; return this; }
        public String getKind() { return Kind; }
        public CoverageRuleDef setKind(String value) { this.Kind = value; return this; }
        public String getDemand() { return Demand; }
        public CoverageRuleDef setDemand(String value) { this.Demand = value; return this; }
        public String getSourcePolicyName() { return SourcePolicyName; }
        public CoverageRuleDef setSourcePolicyName(String value) { this.SourcePolicyName = value; return this; }
        public String getCascadeLevel() { return CascadeLevel; }
        public CoverageRuleDef setCascadeLevel(String value) { this.CascadeLevel = value; return this; }
        public String getWhy() { return Why; }
        public CoverageRuleDef setWhy(String value) { this.Why = value; return this; }
        public String getChange() { return Change; }
        public CoverageRuleDef setChange(String value) { this.Change = value; return this; }
        public String getOverrideWho() { return OverrideWho; }
        public CoverageRuleDef setOverrideWho(String value) { this.OverrideWho = value; return this; }
        public String getOverrideConsequence() { return OverrideConsequence; }
        public CoverageRuleDef setOverrideConsequence(String value) { this.OverrideConsequence = value; return this; }
        public String getNoNote() { return NoNote; }
        public CoverageRuleDef setNoNote(String value) { this.NoNote = value; return this; }
        public HashMap<String,String> getParams() { return Params; }
        public CoverageRuleDef setParams(HashMap<String,String> value) { this.Params = value; return this; }
        public ArrayList<CoverageRuleDocSection> getDoc() { return Doc; }
        public CoverageRuleDef setDoc(ArrayList<CoverageRuleDocSection> value) { this.Doc = value; return this; }
        public CoverageRuleTune getTune() { return Tune; }
        public CoverageRuleDef setTune(CoverageRuleTune value) { this.Tune = value; return this; }
    }

    public static class CoverageRuleDocSection
    {
        public String H = null;
        public String T = null;
        
        public String getH() { return H; }
        public CoverageRuleDocSection setH(String value) { this.H = value; return this; }
        public String getT() { return T; }
        public CoverageRuleDocSection setT(String value) { this.T = value; return this; }
    }

    public static class CoverageRuleTune
    {
        public String Intro = null;
        public ArrayList<CoverageRuleTuneOption> Options = new ArrayList<CoverageRuleTuneOption>();
        
        public String getIntro() { return Intro; }
        public CoverageRuleTune setIntro(String value) { this.Intro = value; return this; }
        public ArrayList<CoverageRuleTuneOption> getOptions() { return Options; }
        public CoverageRuleTune setOptions(ArrayList<CoverageRuleTuneOption> value) { this.Options = value; return this; }
    }

    public static class CoverageRuleTuneOption
    {
        public String Label = null;
        public String Sub = null;
        
        public String getLabel() { return Label; }
        public CoverageRuleTuneOption setLabel(String value) { this.Label = value; return this; }
        public String getSub() { return Sub; }
        public CoverageRuleTuneOption setSub(String value) { this.Sub = value; return this; }
    }

}

Java CoverageTemplatesRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v1/coverage/policies/templates HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Templates: 
	[
		{
			Key: String,
			Name: String,
			Sub: String,
			Doc: 
			{
				Intro: String,
				LockLine: String,
				TemplateName: String,
				Prefs: 
				{
					AssignmentMode: String,
					RestHours: 0,
					OtThresholdHours: 0,
					RingWaitMinutes: 0,
					QuietStart: String,
					QuietEnd: String,
					RescheduleAllowed: False,
					QuietMode: String,
					Rings: 
					[
						{
							Key: String,
							Label: String,
							Sub: String,
							WaitMinutes: 0,
							Enabled: False
						}
					]
				},
				Rules: 
				[
					{
						RuleId: String,
						Name: String,
						Kind: String,
						Demand: String,
						SourcePolicyName: String,
						CascadeLevel: String,
						Why: String,
						Change: String,
						OverrideWho: String,
						OverrideConsequence: String,
						NoNote: String,
						Params: 
						{
							String: String
						},
						Doc: 
						[
							{
								H: String,
								T: String
							}
						],
						Tune: 
						{
							Intro: String,
							Options: 
							[
								{
									Label: String,
									Sub: String
								}
							]
						}
					}
				]
			}
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}