import "Domain.bond"

namespace AI

[Description("Instances of AvailabilityData represent the result of executing an availability test.")]
struct AvailabilityData
    : Domain
{
    [Description("Schema version")]
    10: required int32 	 ver = 2;
    
    [MaxStringLength("64")]
    [Description("Identifier of a test run. Use it to correlate steps of test run and telemetry generated by the service.")]
    [ActAsRequired("Renaming testRunId to id.")]
    21: required string 	 id;
    
    [MaxStringLength("1024")]
    [Description("Name of the test that these availability results represents.")]
    [ActAsRequired("Renaming testName to name.")]
    41: required string 	 name;
    
    [Description("Duration in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff")]
    [CSType("TimeSpan")]
    50: required string 	 duration;
    
    [ActAsRequired("Renaming result to success.")]
    [Description("Success flag.")]
    61: required bool 	 success;
    
    [MaxStringLength("1024")]
    [Description("Name of the location where the test was run from.")]
    70: string 	 runLocation;
    
    [MaxStringLength("8192")]
    [Description("Diagnostic message for the result.")]
    80: string 	 message;
    
    [Description("Collection of custom properties.")]
    [MaxKeyLength("150")]
    [MaxValueLength("8192")]
    100: map<string, string> 	 properties;
    
    [Description("Collection of custom measurements.")]
    [MaxKeyLength("150")]
    200: map<string, double> 	 measurements;
    
}
