| DELETE | /devops/api/caches/{location} |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class CacheClearRq
{
public String location = null;
public String getLocation() { return location; }
public CacheClearRq setLocation(String value) { this.location = value; return this; }
}
public static class CacheClearRs
{
public CacheClearResult Result = null;
public CacheStatResult BeforeStatistics = null;
public CacheStatResult AfterStatistics = null;
public CacheClearResult getResult() { return Result; }
public CacheClearRs setResult(CacheClearResult value) { this.Result = value; return this; }
public CacheStatResult getBeforeStatistics() { return BeforeStatistics; }
public CacheClearRs setBeforeStatistics(CacheStatResult value) { this.BeforeStatistics = value; return this; }
public CacheStatResult getAfterStatistics() { return AfterStatistics; }
public CacheClearRs setAfterStatistics(CacheStatResult value) { this.AfterStatistics = value; return this; }
}
public static class CacheClearResult extends CacheResultBase
{
public Boolean IsCleared = null;
public Boolean getIsCleared() { return IsCleared; }
public CacheClearResult setIsCleared(Boolean value) { this.IsCleared = value; return this; }
}
public static class CacheResultBase
{
public CacheResult Result = null;
public CacheLocation Location = null;
public CacheKey Key = null;
public CacheResult getResult() { return Result; }
public CacheResultBase setResult(CacheResult value) { this.Result = value; return this; }
public CacheLocation getLocation() { return Location; }
public CacheResultBase setLocation(CacheLocation value) { this.Location = value; return this; }
public CacheKey getKey() { return Key; }
public CacheResultBase setKey(CacheKey value) { this.Key = value; return this; }
}
@Flags()
public static enum CacheResult
{
@SerializedName("0") None(0),
@SerializedName("1") Miss(1),
@SerializedName("2") Hit(2),
@SerializedName("4") Put(4),
@SerializedName("8") Deleted(8),
@SerializedName("16") Cleared(16),
@SerializedName("32") Added(32),
@SerializedName("64") Updated(64),
@SerializedName("128") Unavailable(128),
@SerializedName("256") Expired(256);
private final int value;
CacheResult(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static enum CacheLocation
{
@SerializedName("0") None(0),
@SerializedName("1") OutOfProcess(1),
@SerializedName("2") InProcess(2),
@SerializedName("3") InContext(3);
private final int value;
CacheLocation(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static class CacheKey
{
public String Region = null;
public String BaseKey = null;
public String Key = null;
public Integer ExpirationSeconds = null;
public String getRegion() { return Region; }
public CacheKey setRegion(String value) { this.Region = value; return this; }
public String getBaseKey() { return BaseKey; }
public CacheKey setBaseKey(String value) { this.BaseKey = value; return this; }
public String getKey() { return Key; }
public CacheKey setKey(String value) { this.Key = value; return this; }
public Integer getExpirationSeconds() { return ExpirationSeconds; }
public CacheKey setExpirationSeconds(Integer value) { this.ExpirationSeconds = value; return this; }
}
public static class CacheStatResult extends CacheResultBase
{
public ArrayList<CacheStat> Statistics = null;
public Boolean IsHit = null;
public ArrayList<CacheStat> getStatistics() { return Statistics; }
public CacheStatResult setStatistics(ArrayList<CacheStat> value) { this.Statistics = value; return this; }
public Boolean getIsHit() { return IsHit; }
public CacheStatResult setIsHit(Boolean value) { this.IsHit = value; return this; }
}
public static class CacheStat
{
public String Name = null;
public String Value = null;
public String getName() { return Name; }
public CacheStat setName(String value) { this.Name = value; return this; }
public String getValue() { return Value; }
public CacheStat setValue(String value) { this.Value = 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.
DELETE /devops/api/caches/{location} HTTP/1.1
Host: devapi.billhighway.com
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CacheClearRs xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.DTO.Caching.Api.Response">
<AfterStatistics xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.Caching">
<d2p1:Key i:nil="true" />
<d2p1:Location>None</d2p1:Location>
<d2p1:Result>None</d2p1:Result>
<d2p1:Statistics>
<d2p1:CacheStat>
<d2p1:_x003C_Name_x003E_k__BackingField>String</d2p1:_x003C_Name_x003E_k__BackingField>
<d2p1:_x003C_Value_x003E_k__BackingField>String</d2p1:_x003C_Value_x003E_k__BackingField>
</d2p1:CacheStat>
</d2p1:Statistics>
</AfterStatistics>
<BeforeStatistics xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.Caching">
<d2p1:Key i:nil="true" />
<d2p1:Location>None</d2p1:Location>
<d2p1:Result>None</d2p1:Result>
<d2p1:Statistics>
<d2p1:CacheStat>
<d2p1:_x003C_Name_x003E_k__BackingField>String</d2p1:_x003C_Name_x003E_k__BackingField>
<d2p1:_x003C_Value_x003E_k__BackingField>String</d2p1:_x003C_Value_x003E_k__BackingField>
</d2p1:CacheStat>
</d2p1:Statistics>
</BeforeStatistics>
<Result xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.Caching">
<d2p1:Key i:nil="true" />
<d2p1:Location>None</d2p1:Location>
<d2p1:Result>None</d2p1:Result>
</Result>
</CacheClearRs>